/dpt/ - Daily Programming Thread

Old thread: What are you working on Sup Forums?

Other urls found in this thread:

news.ycombinator.com/item?id=14060846
github.com/vurtun/nuklear
github.com/dlang/dmd/pull/6680
twitter.com/SFWRedditImages

Daily reminder that Functional Programming is for special snowflake redditors

Please do not use an anime image next time. Thanks.

Do you still cry yourself to sleep because you failed SICP or whatever your school's equivalent was?

>projecting

news.ycombinator.com/item?id=14060846
Walter managed to switch the dmd backend to Boost

Who said "projecting"?

>hehe i am le special snowflake because i know how to cdr down a list!!!! i am much smarter than u heheh dont these stupid startups know how much superior my special snowflake language is? why arent they using haskell??? WTF!!!

Projecting what? I passed that class. You evidently didn't, brainlet.

It's so sad to see the Blub paradox in action.

Do you think car and cdr are Haskell functions?

Were you dropped on your head and fed bleach as an infant?

>It's so sad to see the Blub paradox in action.

D is dead. Please stop trying to flog a dead horse.

Thanks for a traditional image.

What a handsome chap.

Wrong

It's been dead for years, Andrei. Just give it up. Your family misses you.

Who are you quoting this from?

Python, Ruby, Go, and Node are all shit.

You're wasting a lot of space by listing them.

I am quoting from my /jp/ friend.

t. unemployable haskell autist

Yes, I suppose it would be more efficient to list the few languages that aren't shit.

I see. Thank you for clarifying.

>SDL2
this is good advice but i want to start developing my actual app and not getting lost in rabbit holes. i don't care how gui works under the hood, i just need comfy framework easy to style like picrelated, with native perfomance and static linking, it is too much to ask in 2017

It's funny because I'm employed as a functional programmer.

Either that or simply state the common properties these languages have which causes them to be instant shitlangs.

t. unemployed dysfunctional programmer

I don't mean to be a faggot, but C isn't such a bad language, it's fast and nice and simple and it makes me happy, but those other functional ones are where the special snowflake really begins to shine. Stay away from them.

Are there any drugs that will make me program better? Apart from hormones, of course.

Cum

>native performance
>electron
No. This will not happen. Electron has terrible performance.

Stop being lazy and do it properly.

Steve Jobs used LSD to make the Apple I and II.

Guys how do I git gud? I dont wanna be a code monkey and that's all I'll be (if im lucky) after I grad... what do?

Amphetamines

They fuck up my short term memory but a lot of people report the opposite so your mileage may vary

Learn the basic git commands like clone, checkout, commit, push, pull, branch, merge.

>with native perfomance
Delphi/Lazarus

>where the special snowflake really begins to shine
You mean
>where my limited intellect runs out and I stop being able to understand the code

Excellent meme my dude

already know them!

github.com/vurtun/nuklear

What do you want to do then?

i want to be a system programmer sans the C++

>i want to be a system programmer sans the C++
>system programmer
>no C++
good luck

t. special snowflake millennial with massively inflated ego from overcoddling parents

>where my limited intellect runs out and I stop being able to understand the code
You mean
>I'm so smart because I can code haskell lmao gtfo dumbfag OOPers you'll never be as special and intellectual as me

who are you retards quoting?

Who are you quoting, fuckface?

He is clearly referencing post numbers: 59790993, 59791012 and 59791020.

Nobody. I didn't quote anyone.

who in the F*CK are you quoting???????????????????????????????????????????!

>you'll never be as special and intellectual as me
Well, you clearly won't be, because you're still arguing against functional languages being superior to whatever shit you prefer to use.

You should take the dildo out of your ass to ease that butthurt.

t. special snowflake millennial

Who are you quoting?

Saying "functional languages" isn't enough since they are a subset of both POO and procedural programming.

Anyone have recommendations for must-read books for beginners? Very new, and looking for something to get me started.

You do understand that functional and OOP languages are entirely different and serve their own unique purposes. Stating that one is superior to the other is silly and lacks a deep understanding of the real purpose of a functional language.
Besides that, functional programmers are a minority in programmers and software space so of course you're going to be called a special snowflake.

@59791090
>You do understand that functional and OOP languages are entirely different
Only a retard can make such claims considering one is a subset of the other.

thinking about a text input method for xbox one controller where you move the 2 different analog sticks in diff directions for the various letters, just doing a standalone app to begin with to try out different things, with a view to having a native input method for windows. will probably be very slow compared to touch typing, but whatever

you should write a macro that takes an error handling function, a message, and a condition and use that everywhere.

github.com/dlang/dmd/pull/6680
D is now free software.

>POO

t. buttflustered OOP language user trying to stay relevant

user...

That's a horrible idea, user, don't be the 395th person to make a failed keyboard.

Can somebody tell me when sometimes I can't terminate my program with ctrl+c in the terminal?

What did you mean by this? Should I substitute all members of OOP for the word itself? That would make him a "buttflustered FP language user" and a "buttflustered imperative language user" .

>If I can't understand it useless...

Godamn, I have some many colleagues like. People who refuse to open a book. People who shun any type of knowledge that may not have immediate value. People who are in CompSci, but HATE discreet mathematics.

You are a vermin that no one respects. You are bound to be a mediocre loser.

You shouldn't be writing looping garbage in the first place

But, user, ctrl+c is copy. you are merely copying the application.

Are you the guy who keeps claiming that C structs are OOP?

>i passed my first semester discrete math course, i am le special snowflake xd

What makes a programming language a systems language if not system calls?

>If I can't understand it useless...
Who said this?
>any type of knowledge that may not have immediate value
Such a thing is by definition impossible. Assuming you aren't some sort of animal.

>claims to value knowledge
>can't even tell the difference between 'Discrete' and 'Discreet'
lmao pseudo-intellectuals

This isn't your subreddit.

So that's a yes then.

Who are you quoting? He literally didn't say that.

I really do wonder what happens to people like you later in life. I don't know happened to most of my peers. People like you, who thought that it's "dumb" to know ans learn. People that think that others are only trying to show off.

That was heavily implied to be a "no". I'm sorry your plebbitor mind can't infer that.

He misspelled 'discrete' when getting all high and mighty about passing a course for undergrads.

learn javascript

>i am le superior intellectual mind, all my peers r inferior, i am le special snowflake xddddd
Signs you go to a shit school

>computers are for fucking nerds

he's either indian ESL or trolling

Oh no I mistyped, whatever shall I do?

Mate...

because you pressed ctrl+s on accident with your fat fingers and XOFF'd the terminal. You need to press control+q to fix it.

You calling me a nerd, faggot?

"The entire point of programming is automation. The question that immediately comes to mind after you learn this fact is - why not program a computer to program itself? Macros are a simple mechanism for generating code, in other words, automating programming. Unless your system includes a better mechanism for automating programming (so far, I have not seen any such mechanisms), _not_ having macros means that you basically don't understand _why_ you are writing code.

This is why it is not surprising that most software sucks - a lot of programmers only have a very shallow understanding of why they are programming. Even many hackers just hack because it's fun. So is masturbation.

This is also the reason why functional programming languages ignore macros. The people behind them are not interested in programming automation. Wadler created ML to help automate proofs. The Haskell gang is primarily interested in advancing applied type theory.

Which brings me to my last point: as you probably know, the reputation of the functional programming people as intelligent is not baseless. You don't need macros if you know what you are doing (your domain), and your system is already targeted at your domain. Adding macros to ML will have no impact on its usefulness for building theorem provers. You can't make APL or Matlab better languages for working with arrays by adding macros. But as soon as you need to express new domain concepts in a language that does not natively support them, macros become essential to maintaining good, concise code. This IMO is the largest missing piece in most projects based around domain-driven design."

>claims to value knowledge
>can't even tell the difference between 'Discrete' and 'Discreet'
Where did he say this?

Who are you quoting here?

Something like this perhaps? Excuse my shit macro, I haven't made one ever.
#define ERR_CHECK(cond, err_handler, msg) {if (cond) {fputs(msg, stderr); err_handler();}}

void some_err_handler() {
/* ... */
}

bool some_func(Struct* s) {
ERR_CHECK(!(s = malloc(sizeof *s)), &some_err_handler, "Blah blah blah");

/* ... */

return true;
};

What a beautiful string of text. This post will end the argument.

You confused homophones, that's not a "typo", that's borderline illiteracy which is hilarious considering you're chiding other people for "shunning knowledge without immediate value"

The problem isn't with loops, it's with goto.

Go back to r*ddit

Add a __LINE__ to your output for improved usability.

He is the average channer that probably has a miserable life. He thinks everything different is a meme, hates "sjw" languages, thinks only "numales" use things like R or Ruby, and engages the "C vs C++" threads. The common bottom of the barrel of society.

#define log_error(msg) fprintf(stderr, "[ERROR] (%s:%d: errno: %d) %s\n", __FILE__, __LINE__, errno, msg)
#define log_errorf(msg, ...) fprintf(stderr, "[ERROR] (%s:%d: errno: %d) %s\n", __FILE__, __LINE__, errno, msg, __VA_ARGS__)

#define assertm(cond, kill, msg) if(!(cond)) { log_error(msg); if(kill) { assert(cond); exit(EXIT_FAILURE); }}
#define assertmf(cond, kill, msg, ...) if(!(cond)) { log_errorf(msg, __VA_ARGS__); if(kill) { assert(cond); exit(EXIT_FAILURE); }}


Any function that can fail should return a bool and it should be checked by the caller that way if it's not a error that kills the entire program caller functions can adjust appropriately to a failed function.

Defeated at his argument, helpless and confused user cannot comprehend what the other user is saying, and subsequently goes back to his instinctual phrases.

By "looping" I mean non-termination, gotos can't be recursive in most languages which have them.

hello rëddit