/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: 1492015003303.jpg (1015x1600, 303K)

Other urls found in this thread:

youtube.com/watch?v=bodOMl_o-3g
pastebin.com/LzcXSENg
pastebin.com/CNJGwv5m
pastebin.com/SU2U8Q4M
twitter.com/SFWRedditImages

ATOMIC IS NOT THE SAME AS VOLATILE YOU FUCKING SHITS

Me in the back

thank you for the excellent NNB OP
I love you all

Attached: 1514001288758.jpg (1920x1080, 809K)

first for volatomic variables

Should a good programmer be knowledgeable in the domain she's currently working in?

>What are you working on, Jow Forums?
le cute robot.
creep gait now, because stable.
extra slow walk, because more creepy

Attached: creep2.webm (1280x720, 2.47M)

are there even some requirements for the variable when it's declared as atomic? seems backward to me, atomic are the operations and not the variables

>she
>a good programmer

>functional differential geometry
jeesus how productive is dr. sussman

Soon
youtube.com/watch?v=bodOMl_o-3g

Femanon can into Brogramming? I find this humorous, as I too have X chromosomes and a phallus.

wtf happened to this board

Attached: 4.jpg (1046x1402, 357K)

L O N D O N
O
N
D
O
N

>she

Attached: Admiral-Ackbar-xlarge.jpg (1280x800, 44K)

slut lab

>should one be good in the profession one is executing?
This is one of these rhetoric questions, rite? ;)

XX chromosomes working on a LALR parser generator here :^) Let's see your parser generator bitch

i want to be the little girl

wtf I just write recursive descents by hand

be more specific

Attached: 1312331323746.gif (511x494, 60K)

The reason C is still around and tends to outlast meme of the month languages (and is likely to continue doing so) is because it caters to a wider range of scenarios than "what's normal on typical machines with typical OSes and architectures on 13 April 2019".

XX chromosomes where XX = 53 maybe.

recursive descent or gtfo

It's the 14th, dumbass.

Not in God's own country.

it was already 14th in Israel

What's something to do in C? I tried contributing to prominent projects but every time I found something to fix, by the time I figured out everything and was confident enough to send a patch, a developer already more familiar with the project had already patched it better than I could. One or two times it was my own bug report fixed before I could even address it myself.

And now your meme language is obsolete while C marches on.

Attached: alligator.jpg (538x564, 95K)

Try to average two ints.

user! user! Want to code JavaScript with me? It rocks!

Attached: 9ea73fa062732e0b637ac15d7c2f8f92.jpg (564x827, 41K)

everything that isnt C or C++ is made in C or C++

every other language tends to just be yet-another-front-end-piping-into-LLVM language that is fighting for relevancy on social media until it eventually and ultimately dies out and everyone goes back to working in C or C++

rust seems to need "unsafe" to get any real fucking work done

cute doll but JS is only slightly better than python and python is pure trash.

>and ultimately dies out
javascript.png

>What's something to do in C?
Work?

The rust compiler was never written in C or C++

rust compiler is just llvm
rustc is a front-end that just generates an IR
it just pipes an intermediate representation to llvm, like all the other meme languages

Ok?

I'm gonna post this gay hangman game here on the offchance that someone can help me figure out how to fix the main game loop, which is extremely close to working.

pastebin.com/LzcXSENg


header:

#include
#include
#include
#include

#ifndef HANGMAN_
#define HANGMAN_


#define MAXWORD 100
#define GAMEPLAY 1
#define GAMEOVER 0
#define MAXATTEMPTS 5
#define MARKER '#'


void convert_upper(char **word);

void game_display(char *tracker, int attempts);

void game_loop();

void get_guess(char *guess);

void set_tracker(char **tracker, char **word);

void set_word(char **word);

void update(char **tracker, char **target, char guess, int *attempts_ptr, int *state_ptr);


#endif

What is LLVM

That's only true for the fundamentals, and most things that need to be made are not fundamentals.

Not the Rust compiler.

can anyone else only write a code when full or at least not even slightly hungry? there are times of the day in which I can't concentrate well enough to do shite because I'm waiting for meal time

Attached: 1547152826778.jpg (640x640, 48K)

What problems are you having?

>tokenizing and generating a rust syntax tree and intermediate representation, then it just hands everything over to LLVM to do the actual compiling and machine code generation

Ignore that link


this is it

pastebin.com/CNJGwv5m

lose some weight, you'll feel better

Not seeing you're point.
The Rust compiler, which is the bit that tokenizes the source and spits out an AST and IR, was never written in C or C++.

look at this -> it's prompting me to get another character after I've changed the win state from within the update function. also, the loss condition isn't triggering even though attempts run out. I fix these two things and it's done and I can fucking move on to the next level. I'm done with this shit but I don't want to walk away until it's finished.

A source to source "compiler" is called transpiler.

no I'm actually Jow Forums, have started going to the gym two months ago after years of being a skelly

Good thing the Rust compiler doesn't compile to another source.

"transpiler" is a special case of "compiler"

anti-trans shitlord compiler

valgrind
Enter a word: hello
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x483AC78: strlen (vg_replace_strmem.c:460)
==8712== by 0x4908A55: puts (in /usr/lib/libc-2.28.so)
==8712== by 0x109286: game_display (hangman.c:41)
==8712== by 0x109459: main (hangman.c:97)
==8712==
#####
5/5 attempts


Enter a letter: i
i
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x483AC78: strlen (vg_replace_strmem.c:460)
==8712== by 0x491F491: strdup (in /usr/lib/libc-2.28.so)
==8712== by 0x109335: check_guess (hangman.c:72)
==8712== by 0x1094B7: main (hangman.c:103)
==8712==
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x483BD2A: strcmp (vg_replace_strmem.c:848)
==8712== by 0x1093A1: check_guess (hangman.c:79)
==8712== by 0x1094B7: main (hangman.c:103)
==8712==
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x483BD1E: strcmp (vg_replace_strmem.c:848)
==8712== by 0x1093A1: check_guess (hangman.c:79)
==8712== by 0x1094B7: main (hangman.c:103)
==8712==
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x1093A4: check_guess (hangman.c:79)
==8712== by 0x1094B7: main (hangman.c:103)
==8712==
==8712== Conditional jump or move depends on uninitialised value(s)
==8712== at 0x483AC78: strlen (vg_replace_strmem.c:460)
==8712== by 0x4908A55: puts (in /usr/lib/libc-2.28.so)
==8712== by 0x109286: game_display (hangman.c:41)
==8712== by 0x1094C8: main (hangman.c:105)

I'm the complete opposite, can't do anything unless my stomach is empty or close to it. If I just ate a meal I might as well forget about getting anything done in the next hour or so. I refuse all forms of bloat, software or biological

Attached: foo.png (600x800, 751K)

Do americans do this? Do they ask if they can get at Mcdonalds?

being you sounds terrible
glad I'm not you

I made a hangman thing in Python3. Please comment and critize. Is this "pythonic"?

pastebin.com/SU2U8Q4M

Hey I'm the C hangman guy
(or as I like to call it "changman")
I played a couple games of yours with swear words. Python was my first language and it's pretty fun. Try rewriting the whole thing in a Game class!

that sounds just as bad, and thinking now I guess I can't read or do anything that requires concentration when I'm hungry

I'm not American, sorry

yes?
how else would you order food at a drive through

Literally me, I hate eating because of that desu

Didn't know there are sets in Python, neat

>Is this "pythonic"?
It's shit so it must be

I can get so absorbed that I forget to eat and drink

The best programmers are furries and have feminine and/or neutrois gender identities.

What arguments do you have for disliking it?

...

"hammer" is a special case of "tool"

Ok kind user, explain to me what LLVM IR is then

hate us 'cause you aint us

>Ok kind user, explain to me what LLVM IR is then
magic compiler gogo juice

no
people hate you because you're faggots and not in a good way

Working on NES emulator in HolyC, I added Color Dreams & MMC1 mappers so I can play Bible Adventures and Mega Man 2.

Attached: TempleNES.webm (872x652, 2.81M)

Do you develop inside TOS our outside and sync your files in?

only when the cheese feeding tubes are out of order

I expanded my introgression mapping tool to allow for computing a large look-up table of partial solutions and decomposing incoming queries into a form which minimizes the amount of new computations that need to be made to construct a solution. That's a 2GB lookup table on 150GB of source data and the worst-case computation time down to 900ms from 7 minutes (average case down to 600ms from 3.5 seconds).

Now I'm modifying the look-up table generator from a naive implementation to a 'bootstrap' version that prioritizes certain (smaller and more common) solutions and uses the look-up table as it is being built to construct the other solutions. It should cut the table generation time significantly (currently it takes around 50 minutes).

tfw no loli gf to read sicp to me

Attached: 60984747_p0.jpg (758x800, 208K)

Attached: 1553771544619.webm (720x480, 1.98M)

Up until this project, I did everything inside TOS. I decided to do things a bit different this time and set up a build task in vscode on primary workstation to generate a ISO.C. I run TOS bare-metal on the other workstation and set up hotkeys for BootRAM and to download/mount ISO.C, then sync to/execute from RAM disk. So far, it works well.

arduino IDE doesn't recognize my serial ports. I'm on Ubuntu in the preferences.txt file has COM1 listed under serial.port. Is this a windows designation?

Also, the permission checker is asking me to add arduino the dialout group everytime I open the IDE which is weird and annoying. I've searched online but can't seem to get a clear answer. Anyone?

I really appreciate you sharing your work with us, user. :)

very nice

nevermind I fixed it by installing Java Oracle 8.

blinked my first LED.

I am God.

More info on this image please?

Is a function still pure if it has internal state but the state never leaks out?

yes

When given the same input, does it always have the same output?

arguably

can you repeat the question

in the real world, no
how is a function going to produce output if the computer is off

That doesn't make a function pure though, you can have a function that always returns a number + 1 but you change an outside variable.

If your application has state, then your application has state, containing it inside or outside the function really doesn't matter, you're just trying too hard at that point.

You're doing god's work

are scott meyers books (effective cpp, effective stl etc.) still relevant/useful today?

oh you mean like effectively modern recently effective C++

You shouldn't be using C++, so no.

>explain to me what LLVM IR is then
An IR.
If you're going to say IR is source, then assembly is source and therefore every compiler is a transpiler, which makes your claim pointless and stupid.

Python touched my boypussy.

not sure, but general rule of thumb with C++ books is if it's pre-2011 (and even then, some post-2011 books still use c++03) it's out of date

i've done a lot of script kiddie bullshit and game modding, lua scripting, quakec, runescape bots, etc, but never writing a standalone application and i want to make an open world inertial 2d space shooter.

i have the mechanics of how i want the engine to work i guess, how its going to be a series of grids and how to sort the grids and such but i completely lack the knowledge of how to translate that abstract conceptual assortment of mechanics into a program

how shameful is it to use game maker

C++ is literally a scam by the textbook industry to get people to continuously buy new garbage, even if you're not currently in university.
I can get a C book from fucking 1988 and it's still mostly relevant.