/dpt/ – Daily Programming Thread

What are you working on, Any Forums?

Previous thread:

Attached: Free Pascal.jpg (508x539, 306.3K)

Other urls found in this thread:

godbolt.org/z/zGdxaT3a3
godbolt.org/z/cbnqYerrc
twitter.com/NSFWRedditImage

erlang

elaborate further

preparing for interview today, probably going to shower and shave and pick up a little around the house

I'm running java 8 with javafx on netbeans.
my gui thread stops responding from time to time, even though the functions I'm running are on other threads.
is there any way to debug what I'm doing wrong?

this was hard work bros

Attached: todo.gif (424x825, 184.73K)

Never heard of it.

Lisp is so elegant, so simple, so easy to learn and even to implement. And thanks to Clojure with its persistent data structures it even has decent performance and great thread safety now, and is compatible with the Java and JavaScript ecosystems.

How do you go back to pajeet trash like JS or C# or whatever after getting acquainted with the White Man's programming language?

Attached: clojure.png (1000x543, 190.35K)

install Elm

please remind me, does the C17 C language standard have "const" for variables or not?

this but with me and cmake

Attached: file.jpg (1440x1080, 160.85K)

it seems the compiler is way clever and that all these three functions compile to exactly the same assembly (unless I misread?)
godbolt.org/z/zGdxaT3a3

I am rewriting my small 2D logical array (dimensions are abouts 20x10) into a 1D integer array (10x32bit ints)
because my runtime was halved when I made that replacement in one part of the code
I am trying to get 0 if a certain bit is 0, and 1 otherwise.

since all those three functions seem to compile to exactly the same assembly, I guess the takeaway is that any other way I might concoct probably would also be exactly equivalent?
if these are all the same I guess I might as well use option C since that is the most readable (although it LOOKS worse than option A due to the conditional)?

the place I am using the 0-or-1 function is here
# history(:,:,step) is an array of small ints representing the state at each step
# this_visited(:) is the mask represented as an array(vector) of ints, each int being the mask of one row
forall (x=1:board_width, y=1:board_height)
history(x,y,step+1) = history(x,y,step)*ZERO_IF_BIT(this_visited,x,y)
endforall

where I do a masked copy of history(:,:,step) to history(:,:,step+1) and set the other values to 0

I am just rambling at this point (and still surprised at the speedup replacing one of my 2D logical arrays with a vector of ints gave me)
bits are amazing

Attached: 2022-01-31-051319_146664929.png (866x920, 68.09K)

or wait maybe I am doing a retard and my example is constant so it reduces to a constant expression oh my god fuck

Not sure how this works with Java/NetBeans, but when debugging with Visual Studio you can pause the debugger and it will take you to the particular line that execution was at, I think with the threads window you can even see where each thread is at. You might be able to do the same thing

>example is constant so it reduces to a constant expression
YEAH that might have been the issue
I added a read-statement to modify one array element to make it not constant and now they compile JUST slightly differently
(but I can not tell what the difference does)
godbolt.org/z/cbnqYerrc

Attached: lsight.png (1874x769, 215.52K)

Does Python have a built in module to strip characters not acceptable by the current filesystem in a filename, or should I just do something like

for char in r'*."/\[]:;|,':
line_log_filename = line_log_filename.replace(char, "")

lol I'm so glad I don't know how to use cmake and don't have to for work

or maybe I am a double-retard and the only difference is the colour annotations

good job user

i'm not even using c or c++, i just need some dependencies and using bindings to them. glad i don't work with it either. vcpkg and meson are also complete shit.

Incredibly performant and memory-safe concurrent software for financial trading. In Rust.