old thread: What are you working on, Jow Forums?
/dpt/ - Daily Programming Thread
My bedroom has the size of this toiler room
How does OpenGL even work anyway? What functions does it call? Can OpenGL be implemented in anything other than C?
What are some easy/trivial problems I can work for practice?
Maybe there is a website with nice problems to practice on?
Lisp is the most powerful programming language.
Show it
Emulator
I think that's a little harder than "trivial", user..
JavaScript rocks!
who's idea was javascript
This is it, the ultimate in Considered Harmful essays. Programming Considered Harmful.
flownet.com
xor both ints and check how many 1s are in it
I got my community college to add SICP!!!!!!!!!
THEY BOUGHT SICP FOR ME, AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
I'm going to community college too user
should I read sicp
I've seen it memed on Jow Forums
Read HtDP.
htdp.org
Someday I will teach my Hello World program... To love...
why the fuck do people care so much about buggy software get a life you fucking nerds
>why the fuck do people care so much about buggy software get a life you fucking nerds
typed user in /dpt/. He hit submit and, satisfied, adjusted his programming socks.
SICP is outdated trash for lisp larpers
Who's this cute girl?
>typed
types are shit
I don't care about LISP, I'm trying to learn logic reasoning.
I'll be studying the book for several hours a day starting hopefully tomorrow.
>girl
t. python archmage
>types are shit
"untyped" the same user. He was always proud of his puns.
book is filled with intellectual ego stroking language
This. Types are a social construct to restrict my diverse set of ideas and dreams.
Enough with this shitty meme
owned
that "How we got here" part is a good explanation why functional programming sucks
Who /LAMP/ here?
>true == 1
true
>true === 1
false
This one at least makes sense. Do you guys just mindlessly shit on javascript because you invested time in learning useless languages like rust and aren't smart enough to learn a new one?
I want to lick her feet
Omega LUL
He's literally criticizing JS for floating pointing errors. Don't reply to retards.
Damn, how can a language be this shitty? I hope it's a bug.
Functional programming sucks because it's insufficiently process-oriented?
Not a bug, JS is just a shitty DSL
It's a default they can't fix now.
pretty much
I started programming with JS. JS is utter garbage. It let a bad impression on programming on my as a new comer.
What do you think is the alternative? I'd say that functional programming provides great primitives for building process-oriented programs, as Erlang proves.
most programs are processes, they dont evaluate input, return output and end
the alternative is imperative programming that has state, obviously
>It let a bad impression
At least your bad impression wasn't hoisted.
How is it better?
what is the best way to write C++ in windows?
so far I've just been doing it on my thinkpad (running debian) and using make in the terminal
WSL or MSYS2.
Doesn't building on Windows require to use VS Code and non-standard Microsoft libc?
doesn't the document sufficiently answer that question?
Use the linux subsystem (they have debian)
I'm not really sure I haven't done it yet
WSL kind of seems like shit desu
also would it even make native binaries?
just use visual studio
>also would it even make native binaries?
Yes, native Linux binaries.
It's true though
No. It doesn't offer support for building processes on top of mutable primitives. Read up on Erlang.
Why would you do that? C++ on windows is stupid and slow.
Recomendations:
- use cmake if you are making multiplatform stuff
- mingw is nice, quite outdate but also a bit comfy if you come from a gcc background
- if you are using visual prepare your anus for a 8gb download of pure garbage
- press the nmake panic button if nothing else works
You can run eclipse. I use it for Java.
What if you want to use separate tools for the job and not be locked into Microsoft's restrictive ecosystem?
wikipedia says erlang has immutable data so I dont know what you're talking about
if data is mutable it's not really functional programming
hmm this kind of seems like a better option than VScode
You didn't understand my post.
how about you explain it then?
The vscode c++ plugin is good though
WSL or Linux VM
I want to try making windows binaries
int
foo(int bar);
unsigned long long
bar(int foo);
Thoughts on declaring functions like this, with the type a line above to prevent indentation?
disgusting
in denial about the merits of FP while copying it / 10
kind of gay desu
>What are some easy/trivial problems I can work for practice?
RPN calculator.
Lots of mature projects use it. Take a look at libsodium.
its still disgusting
are you programming on a calculator? is your screen not long enough to fit the type and the function name?
I see that the discordification of /dpt/ is complete.
hacka has an animation? what is this?
That's because sort, by default, converts all its arguments to strings and then sorts those.
You have to pass it a function that will compare the arguments for you.
[6, -2, 2, -7].sort((a, b) => a > b)
Array(4) [ -7, -2, 2, 6 ]
Just do it in cmake, should be cross platform between Windows/Linux with no changes to your code.
Install the latest visual studio whatever & visual cpp and you'll be good, I think you have to start cmake-gui from the vs dev console though so that PATH is setup right.
cmake on windows will also work with cygwin/MSYS2/mingw-w64/clang for windows etc. etc. etc, it's the best option
There's no excuse to span more than 80 characters, including indentation. Fix your shit code if you unironically believe this
static inline struct very_long_struct_object
*foo(struct *another_struct, struct *and_another, size_t something);
Is worst than
static inline struct very_long_struct_object *foo(struct *another_struct,
struct *and_another, size_t something);
Or even, God forbid, having that on one single line (113 width is far too much). Show me some of your public code contributions, otherwise I don't care what you find "disgusting".
>There's no excuse to span more than 80 characters, including indentation.
totally depends on the language
try writing Java with a max line length of 80
static inline
struct very_long_struct_object *foo(
struct *another_struct,
struct *and_another,
size_t something
);
>try writing Java
There's your problem.
I dont have "public code contributions" because I don't work for free, my current project has 120k lines of code and I don't have any functions that long because I don't have retarded-ass fucking typenames like "very_long_struct_object"
>foo(
>breaking on empty parentheses
Nobody does this. Pretty sure it's frowned upon.
I'm trying to compile a project I found on Github, but am getting these three errors. This is my first time using Visual Studio so I am not sure how to proceed and could use a little help.
>I don't work for free
Funny how it's a reliable sign of a mediocre programmer.
being a professional means you're mediocre?
/dpt/ has always been shit, it hasn't got worse it's just congealed.
isn't there a /dpt/ irc?
is it on rizon?
>Nobody does this. Pretty sure it's frowned upon.
>why cant I think for myself and format things in a way that make sense
yeah at #dailyprog
god damn I hate Windows and having no admin rights is fucking suffering
Can't even get mingw or cygwin properly because of it
>ironically using w**dows
protip: don't use windows