/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: qt_muslimah.png (448x648, 200K)

Other urls found in this thread:

threejs.org/
github.com/Monkeyfume/thinkpad-tech-tree/blob/master/thinkpad-tech-tree.txt
stackoverflow.com/questions/55025141/problem-with-program-counter-register-r15-pc
pastebin.com/PW3dpkJt
godbolt.org/z/BqGSUu
twitter.com/SFWRedditVideos

First for JavaScript. Based Webgl and ThreeJS
threejs.org/

wtf

Attached: Screen Shot 2019-03-06 at 9.41.45 AM.png (1142x384, 78K)

Making a menu system for console applications with ascii art. Slightly based on Power Menu for ms dos.

Attached: PowerMenu.png (640x400, 5K)

Attached: IMG_20190306_132901.jpg (1560x1546, 458K)

coding a remote detonator to rid the world of infidels

nice, I like it

what language should I use
no meme answers please

I don't know what the fuck this does, but it's very aesthetic

>remote
Doing it wrong, Abdul.

based

If you don't want meme answers then don't post meme questions.
>what language should I use
for what? what are you trying to do?

How do I get write() to write immediately to the serial port and return only when it's done and as fast as possible

Replace the -, |, and + with legit unicode line characters. You can copy some from the bottom of this file:
github.com/Monkeyfume/thinkpad-tech-tree/blob/master/thinkpad-tech-tree.txt

Buffer your data, output one byte at a time, flush if you have to, return

a UNIX-like OS that's not written in an unsafe language like C

>C is unsafe
You wouldnt happen to be a rust tranny would you

was fucking tired of comparing schedules with others. Black tiles mean time slots where everyone's available. It was a good waste of time :)

Attached: schedule.webm (992x696, 1009K)

>bandicam
why not use OBS

no, just a concerned citizen and a user of an OS that's written in C

Github?

why not xsplit

might commit later after some polishing.

>What are you working on, Jow Forums?
Programming microcontrollers on arm. Help solve the problem if you are an expert or something, btw.

stackoverflow.com/questions/55025141/problem-with-program-counter-register-r15-pc

Attached: .jpg (1000x1000, 204K)

>a UNIX-like OS
Yeah, that's exactly what the world needs more of.

When ARM devices boot they always begin at the reset exception vector, which (depending on the specific ARM chip) is either at 0x00000000 or 0xffff0000. This is unchangeable.

Usually you just put a branch instruction at 0x00000000 though.

Ok, thanks. Then why do we need this option in the project settings?

Attached: .png (626x468, 22K)

Shitty script that finds good digits in a thread

Attached: 1534081475817.png (490x216, 49K)

*dabs*

*dubs**

*dubs*

>get;
>set;

Attached: 1544871350631.png (1200x675, 211K)

FUCK YOU

Very nice

Post the code pls

C# rocks

How do I make Linux not shit to code on.
Like how do I make vim useful for programing?

it's a text editor, you just have to learn the key bindings

(defn g
([x & moar] (+ (first moar) x) )
)
How do I get all elements in the list instead of just the first one to add up to x?

def LILJON(n):
for i in range(1,n+1):
if not i%7 and not i%3:
print ("WHAT OKAY")
elif not i%3:
print ("WHAT")
elif not i%7:
print ("OKAY")
else:
print (i)
print ("YEEEEEAHHHH!")

Attached: 1551884262122.jpg (288x450, 78K)

>OBS
isn't that only for mac?

Works on Windows and Linux as well.

dumb frogposter

Install wine, install notepad++. If you could find a copy of epsilon it's pretty powerful, it's like a less-shitty version of vim. emacs looks cool but it looks difficult to set-up and I don't know how easy multi-pane support is. Code::Blocks is kinda nifty and supports theming but I haven't used it.

I haven't found many editors that were as good as Epsilon. It had support for n-many panes, default edit-mode, could alt-x terminal command, like grep. Was programmed in a lisp-like language, and could be re-edited if you could get through it's documentation and files and stuff.

>ffmpeg dependency
is this just a wrapper for the godly ffmpeg?

enjoy with it

C++ book recommendations?

What ISN'T an ffmpeg wrapper?

ffmpeg

what java http server/framework is the least cancerous these days?

ffmpeg is a libffmpeg wrapper

what isn't?

Here you go senpai (WIP)
pastebin.com/PW3dpkJt

holy shit is web dev always that simple? I always assumed 'scraping' or whatever the hell you have to do to get info from a web page was way more of a mess than that.

They are all equally awful

Please don't call me a web dev user
Well for one thing it's Python and I'm using Jow Forums's API so it's pretty much just
jsonResponse = requests.get(someUrl).json()

Attached: 1547845039708.jpg (390x478, 40K)

It's more complicated if you want good performance or evade anti-scraping protections.

akarin is cute

fuck you akarin

dumb akarin

No bully pls

Attached: 1459037836636.jpg (627x720, 27K)

Age of friendship is over
Time of bullying has come

I want to marry akarin

If I create a struct with a single field, will the compiler be able to optimize that?

Attached: 1525654811193.png (800x770, 822K)

why don't you try and see

Not if you make it a library

Some ABIs have overhead for this technique but within a function it should make no difference.

Is webdev really this simple?
Time to write a Clover that isn't shit

that's just a web scrapper

hey guys i just finished a project in php,SQL and now i'm out of ideas do any of you guys know something i could do to add to my Git account ?
i know how to use python,Java,SQL,PHP,C++,html,CSS

What is there to optimize? I what's the overhead a struct could bring up?

Attached: 1551463879376.jpg (400x400, 28K)

Attached: 1547288507129.jpg (1920x1080, 113K)

There must be some sort of drawback to it

omae ma wo bullied

Attached: 1549107149346.jpg (400x400, 33K)

there isnt really

I'm legit asking out of curiosity.

what happens?

>started learning c++
What the fuck is this
Some nigger took C and bloated it to hell and back
How am I supposed to write efficient code in this monstrosity, there are three gorillion ways of doing the same thing and even if you find a reasonable one you're probably missing something.

not in C/C++

there could be one extra instruction per access, but almost all of the common compilers optimize that away.

This is a very comfy visual style. Do share screenshots when you have something going :)

yeah its what C++ is
C but with ++ in it

Some ABIs (ARM eabi for example) require that structs are passed via memory rather than register.

"""modern""" C++

Pretty much all the warts are a consequence of having to maintain backward compatibility. You have the choice to ignore any parts of it you want. Don't jump on the hate bandwagon because of what you've seen in /dpt/, these people are mostly idiots and still in college.

It might get saved on the stack instead of passing the field directly using registers.

not really:
godbolt.org/z/BqGSUu

Can someone explain to me why the Integer does not change in Java?
The compiler gives no warning or error so I don't get it.
public static interface IncrementMoney {
void func(Person p);
}

public static interface IncrementInteger {
void func(Integer in);
}

public static void main(String[] args) {
Person p = new Person("John", 1980);
Integer in = 100;

in++;
System.out.printf("%d\n", in);

IncrementMoney c = (arg) -> {
arg.money++;
};

IncrementInteger sh = (Integer arg) -> {
arg++;
};

applyOnPerson(c, p);
applyOnInteger(sh, in);

System.out.printf("%d\n", p.money);
System.out.printf("%d\n", in);
}

public static void applyOnPerson(IncrementMoney cb, Person p) {
for (int i = 0; i != 5; i++) {
System.out.printf("Change %d\n", p.money);
cb.func(p);
}
}

public static void applyOnInteger(IncrementInteger cb, Integer in) {
for (int i = 0; i != 5; i++) {
System.out.printf("Change Integer %d\n", in);
cb.func(in);
}
}


This is the output
101
Change 0
Change 1
Change 2
Change 3
Change 4
Change Integer 101
Change Integer 101
Change Integer 101
Change Integer 101
Change Integer 101
5
101

decided to start looking into Perl
it's pretty useful
has some fuck nasty syntax here and there though, a lot of common expressions just look like someone mashed the keyboard for a bit

learn what reference semantics are

C++ has zero cost abstraction

Classes are passed by reference in Java and Integer is a class. Integer is not an int, so I don't see why it does not work.

arg++ is equivalent to arg = (Integer) ((int) arg) + 1)

are these the same

struct Foo {
int x[10];
};


and int Foo[10]

more or less

Autism

how does an os signal to a program that an even has occurred e.g. a vsync

So arg should increase

When a program invokes a system call, it is interrupted and the system switches to Kernel space. The Kernel then saves the process execution context (so that it can resume the program later) and determines what is being requested. The Kernel carefully checks that the request is valid and that the process invoking the system call has enough privilege. For instance some system calls can only be called by a user with superuserprivilege (often referred to as root).If everything is good, the Kernel processes the request in Kernel Mode and can access the device drivers in charge of controlling the hardware (e.g. reading a character inputted from the keyboard). TheKernel can read and modify the data of the calling process as it has access to memory in User Space (e.g.it can copy the keyboard character into a buffer that the calling process has access to) When the Kernel is done processing the request, it restores the process execution context that was saved when the system call was invoked, and control returns to the calling program which continues executing.

Have you converted C++ code to assembly once? The bloat isn't fault of the language, it's fault of incompetent programmers.

>If everything is good, the Kernel processes the request in Kernel Mode
wrong