/dpt/ - Daily Programming Thread

What are you working on, Any Forums?

Previous thread:

Attached: typical haskell programmers.png (2514x1262, 3.82M)

Other urls found in this thread:

github.com/friendlyanon/cmake-init
twitter.com/SFWRedditGifs

nth for lambda calculus

Reminding anons to use github.com/friendlyanon/cmake-init when creating new C++ and C projects!

>michael snoyman
>@snoyberg
OY WAT?

Reminding anons to use the report button when reporting new spam!

>FP is the new OOP
terrible headline mr snoy

Attached: rust_trannies_garbage_collecting_themselves_lmao.png (2000x2000, 1.84M)

but the tranny in the OP image isn't using rust
it's a terrible headline for a terrible talk

leetcode.com/problems/next-permutation/

how the fuck is this problem a medium now? i guess it's asked by facebook so everyone memorized it

anyone have any recommendations for recurrent neural network data sets to fuck around with to test architecture?

even bartosz' talk was unexpectedly dull
top left was unironically the best talk

Bottom left has an interesting title. Was that on programming or politics?

I kind of skimmed through it but he kept saying "what is this hiding" so i assume that was the reason for the title

>tfw took me an hour and a half to copy and paste the given solution for a leetcode problem
6 months ago i could solve mediums in 20 to 30 minutes, now i can't even reverse an array without struggling
i swear to god i have a learning disability

i wasted 2 hours of my life on a leetcode medium that i still don't honestly even understand the solution to what the fuck am i doing with myself lol
i feel like the opposite of the for loops meme. because i'm borderline allergic to using while loops because you just don't use those in a real codebase

>i can't even reverse an array without struggling
in J this is just '|.'

What does ( . )( . ) do in J?

>in J this is just '|.'
so it's just someone else that did the work for you

( . )( . )
. .

in any c like language it's just
while (start < end) {
swap(a, start, end);
start++;
end--;
}

i was retarded and tried doing it with 1 pointer
honestly i don't know why i even bother trying to get better at programming i'm a fucking idiot

for something like reverse or swap it's probably more readable to just call reverse(collection) instead of doing it yourself anyways

>not putting the increment/decrement in the call to swap
not a true c programmer

>You're not allowed to use a calculator on this exam
>Gee whiz, prof, then I guess you're not allowed to use a computron to grade this either, because someone else is doing the work for you
>Go build your own computron, otherwise you should be ashamed of yourself; frowny face

who are you quoting?

I fucked up my entire Linux Mint laptop by replacing this file with an incompatible version:

/lib/x86_64-linux-gnu/libc.so.6

I saved the original before I did anything, but I'm in serious trouble anyway. cp command won't work, and neither will sudo. Normally, I would solve this situation by editing the system using a live Ubuntu USB stick. Unfortunately, my hard disk is encrypted. I know the key but I don't know if I'll be able to access encryptfs externally, even with the key. How do I unfuck my system?
I will post this here, and on /fglt/

>what were you doing user?
CTF

Attached: friendly_lion.webm (576x720, 1.82M)

>2022
>not automatically associating greentext with made up stories
>ISHYGDDT

nits on your code reviews look bad in performance review

>programmers understand it but manager doesn't

does a text editor and a compiler still work? You can write something to write a program to make the syscalls without libc.

i want to give haskell another try but purely functional programming makes my brain hurt

it definitely would not get through review unless they just stop caring or ignore that line
do people in 2022 actually do anything with ++ or -- besides putting it on a separate line?

that's weakness leaving the body

Because I effectively fucked up my libc, nothing which uses libc works. So nano and vi do not work.

what kind of 50 y factory do you work at where people can't write array[i++] = ...

>array[i++]
do people actually do that?
have not seen a single instance of that at all

do you know what a program is?

probably not
i've been doing the same leetcode medium for 3 hours and i still don't understand it lol

i'm a failure of a human :)

...

for (int start = 0, end = length-1; start < end; start++, end--) {
swap(a, start, end);
}

Wouldn't this be the standard? Or is the loop condition too awkwardly long?