/dpt/ - Daily Programming Thread

Old thread: What are you working on, Sup Forums?

Other urls found in this thread:

zurich.rustfest.eu/sessions/elisabeth
stackoverflow.com/questions/33931196/why-print-has-side-effects
en.wikipedia.org/wiki/Side_effect_(computer_science)
twitter.com/NSFWRedditVideo

Sepples is cancer.

fuck opengl

Threadly reminder that a memory leak is a side-effect, and a perfectly valid one. An empty printout isn't, though.

>with Julie Sussman

Did Gerald just put his wife's name on there so they wouldn't be accused of mansplaining?

>empowering
>makes me feel more confident about the code I write
nice b8, here is your (YOU)

Your dumbness is exposed, again.

Threadly reminder to use `#![feature(nll)]`.

Threadly reminder not to use Rust.

>zurich.rustfest.eu/sessions/elisabeth
The memes are real...

>Memory leak is not a side-effect

>he thinks the post said memory leak is not a side-effect

Is SICP a meme?

>he thinks the post said anyone said memory leak is not a side-effect

>Starbound used C++
>Spellbound will use Rust
What did chucklefish mean by this

First for bengaluru best city .

All my life I believed that programmers were brainlets.

Now I have to admit, serious C++ library developers are on par with top scientists in scientific fields. The amount of shit they have to know is mind boggling.

>it "thinks" anyone said a memory leak is not a side-effect
>it "thinks" a memory leak is a "perfectly valid" side-effect
>it "thinks" an empty printout is not a side-effect
>it "thinks" that even if it was a side-effect, it would be an invalid one, unlike a memory leak

>Starbound

What a nightmare. Summer 2013 release they said.

According to some research:
"Julie, who is both a computer programmer and a professional writer, edited the book and made quite significant contributions to its ultimate content, in addition to writing the Instructor's Manual."

Take form that what you want.


No, it's a great book.

I unironically want diversity in tech.

>serious C++ library developers are on par with top scientists in scientific fields
>this is what sepples monkeys actually believe
No, user. They're on par with patent lawyers.

What is a good way to handle memory management?

Doubtful that she made "quite significant contributions" if we was credited with "with" instead of "and".

>I love Rust because it makes me feel more confident about the code I write, and the strict compiler compensates for my lack of discipline.
That's it. I'm gonna stop being a rustvirgin today. Wish me luck, anons.

Use rust.

>What is a good way to handle memory management?
Just leak it. It's safe and perfectly valid.

>memory leak is an invalid side effect

Thanks!

Even for complete brainlet beginners?

t. Julian Assange

Tell me why I should read this book kind anons

>memory leak is a """valid"" side-effect
>empty printout is neither a side-effect, nor valid
>t. rustlet

>structure and interpretation of '60s computer programs

It's an outdated meme.

>the basics of computer science are irrelevant. it's the current year
>t. numale soyboy

>it thinks anyone said printing is an invalid side effect

>It's an outdated meme.
You seem knowledgeable on the subject. List the things in the book that are outdated.

Scheme

Dude, I really don't know.
Does it really matter?

>it and a she-it spawned a roughly humanoid parasite that claimed printing is not a side effect
>it now violently backpedals

So out of all the things in the book, you can only list that it uses a language you dislike. Is anyone surprised?

Apparently it does to you, fucking misogynist. Never use Rust again.

Dynamic typing.

>it thinks anyone said printing is not a side effect

Your dumbness, smugness and cringeness being exposed here is an almost everyday thing now.

>muh worthless opinions
Yes, we've covered this. You don't like Scheme. What outdated things does the book teach, though?

You consider you quite literally less than human. What makes you think your opinions about me matter after you state that printouts are not a side effect, that counter-examples to a claim don't disprove a claim, that memory leaks are valid and other gems?

>after you state that printouts are not a side effect,
Said who?

I'm not who you think I am.

> sepples monkeys
Stay ignorant, script kid.

>memory leaks are "invalid"

It doesn't matter if you're a samefag or just equally subhuman and worthless. Then bottom line is that you and the creatures that spawned you should at least qualify as a human for your opinions to be up for any consideration.

These threads have hit a new low

>it doesn't matter because ur too mean

>Even for complete brainlet beginners?

Depends.

Theoretically it's an entry level book.
So it doesn't require any prerequisites.

But it's not a "let me spoonfeed you" book like many contemporary books. You have to really spend some time with it.


If you are a complete newbie I'd read "the little schemer" first, you can read the complete book in a few days and it will teach you a lot of basics for scheme.
After that you can take the deep dive and read SICP which take much longer.

Man these just keep getting more and more disgusting. I felt bad about the brainy versions where the brain made a chess game but now this just evokes a rotting corpse. It's somehow worse than the tumor.

>it thinks if it keeps making this post, memory leaks will become "valid"

>back up your entire program state to a protected region of memory every 10 seconds
>purge the rest of the heap

No more memory leaks. Ever.

kek I think the autist is trying to say that memory leak is "unsafe", (which of course is wrong)

>for a brainlet
I don't think so if you mean it literally. I'm thinking there's plenty of room for people in this industry that wouldn't understand SCIP well at all and get lost repeatedly upon reading.
But it's not relying on prerequisite information as stated.

>memory leaks are "invalid"

Just get a garbage collector at that point.
Yes they handle cycles nowadays.

I think your subhuman Rust butt-buddy is trying to say that memory leaks are "valid" because they're "memory-safe", in which case printing a moved string in C++ is also valid.

Read TAOCP if you want real theory, dumb millennial.

Printing a moved string in C++ is also valid side-effect, not a valid result. Read a book, stupid nigger.

>memory leaks are "valid" because they're "memory-safe", in which case printing a moved string in C++ is also valid.

AUTISM FIGHTTTT.. no wonder you nerds never get laid

>it costs $212.65 USD to purchase a copy of the C++17 standard from ISO

So much for being a free language

What the fuck are you doing in here Chad?
Go party or something. It's Thursday.

gcc is refusing to compile my program.

>It's Thursday.

hidden pearl.

Well that's at a loss. It takes multiple trees in paper mass to print the Bibl- I mean standard.
It's a good investment too. You can't expect them to keep this up and in the future you can just purchase the diff.

>Printing a moved string in C++ is also valid side-effect, not a valid result.
So the possibly unintended output of the program is not an "invalid result", according to you, so at least that's consistent with your mentally ill conception that leaking memory is a "valid side-effect". But then what invalid result were you screeching about?

Well not brainlet as in literally too dumb but I have no previous knowledge is all.

Memory Leak is not an output, it's not a result. Memory leak is a side effect. All results are side effects, all side-effects aren't results. Are you purposefully being retarded or what?

It's a worthwhile read then. But it's for a deeper understanding of the topic.
Many get by knowing less. And that can be learned quicker.

Wait, I stand corrected.
There is not even any relation between side effects and results.

>I unironically want "disadvantaged" demographics such as "upper middle class spoiled white women" in tech.
FTFY
Finally we can bring some diversity in skill levels in tech and slay the monster that is meritocracy.

This is by far the worst general on Sup Forums.

>that
That sounds great actually.

kek, you couldn't even let this pass, could you?

Would you please explain why?
Isn't it better to have people interested in the field working in it and people who aren't interested not working in it?

So let me get this straight: "invalid result" is simply unintended output, and your claim is that Rust doesn't compile programs that produce unintended results. You also claim that crashing in the middle of a computation because you ran out of memory is a "valid side-effect" because it's not a "result". Quick question, user: do you think you should be regarded as human?

Ah, I see. I've got an intro book with Python to start off with that goes through projects involving basic things like lists, arrays, functions, classes, etc. I also assume that algorithms and data structures are very important to learn at some point.

>It now thinks anyone said compilation failure is a side effect

> is anyone surprised?
> pretending that an imaginary crowd shares your opinion

I know people who do this, they all have genuine autism.

>something about C++ tolerating invisible invalid results
>does Rust tolerate invalid results?
>No which is why it stopped compiling there.

Explain how a print statement is a side effect? It doesn't change the internal state of your program. No memes.

>shares your opinion
What opinion was I expressing there, tard? I asked you to list thing the book teaches that are outdated. The only thing you could come up with is Scheme, which is apparently "outdated" in some unspecified sense because you don't like it, so I pointed it out. You know, in case anyone actually mistakes you for someone that has read the book and knows what material it discusses.

>Rust doesn't tolerate invalid results so it stopped compiling but it doesn't make sense to me

>lower efficiency due to a bunch of my team wasting time helping along the diversity broads
>increased office drama - men growing over-competitive due to female audience in the engineering stable
>HR-tier political backstabbery now imported into engineering
>got no choice but to hire such negative contributors, or the diversity racket's gonna fuck us over big time
wow, only positives!

You are not a programmer. Get out.

>first result on google stackoverflow.com/questions/33931196/why-print-has-side-effects

en.wikipedia.org/wiki/Side_effect_(computer_science)

>Stroustrup: any library that includes a catch-all file called "utilities" is poorly designed
>C++ standard library: #include

>"invalid results" means unintended output
>"invalid results" doesn't include leaking memory until you crash. that's just a "side effect", so it's fine
>does rust tolerate "invalid results"? of course not! rust doesn't compile programs that produce unintended output

That really looks like an environment where I would thrive.
I'm simple irreplaceable. If others have lower efficiency I can do other things without worry.
Negative contributors are a dream to work with.

>Not to have side effects for a function means that a call to it can be replaced by its return value. print does not return any value so if it was pure (it had no side effects) it could be replaced by NOT-OPERATION.
>However, as you can see in your terminal, when you call print something happens: Some text gets printed in the screen. That is not NOT-OPERATION and therefore, print has side effects.
This is so fucking dumb.

>memory leak is an invalid side-effect because that's not what I intended, u meenie