/dpt/ - Daily Programming Thread:

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

Other urls found in this thread:

dlang.org/comparison.html
dlang.org/spec/garbage.html
dlang.org/blog/2017/03/20/dont-fear-the-reaper/
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
dlang.org/phobos/index.html
wiki.dlang.org/Books
disqus.com/
twitter.com/NSFWRedditImage

Why do people still use pure imperative languages?

>OOP

Any D fags here? How do you parse ints from stdin and store them in an int[]?
I tried tried int[] n = readline().split().to!int but as I expected, it won't work because it is receiving an array, not each elements

Should I learn Rust or C++?

Do you want a job? C++
Are you a trap? Rust

>shitpost general
execellent start

Whats a good way to transition from beginner just learning books to intermediate level stuff? Just keep hammering away at code or should I go with another book? Trying to learn python if that helps.

Why do you think being a trap and having a job are mutually exclusive?

Also explain your reasoning.

I think it's time for you to start crossdressing.

at the same time it's time for you to stop crossdressing.

People have complained, don't blame me I'm just a relay, blame the messenger:

What does this do?

It memes an entire board.

qwantem EXPLOZION

please don't.

Makes a resource. Obviously...

In Scheme is there a way to read data from a file during macro expansion time and apply a (syntax-rules) macro to it?

int[] numbers = readln().splitter().map!(a => a.to!int).array;

I was implementing Karatsuba algorithm in python as a exercise.
Been reading Algorithm Design all night. Cormen is a meme.

What are they doing??

Maybe if you can read that data at compile time.

>algorithm
>range
>conv
Heh, I was looking for a short and quick way to achieve this but it seems all those imports defeat the purpose. I'll just stick to my linear-imperative practices.

Sharing a toilet, it's common in japanese culture. It's like taking a bath with big breasted women and small children, common occurence.

Yeah, we warned you. "F***tional" achieves nothing of value. Just do a foreach loop and get your ints from there

Those fucking japs...

Sauce?

How do I remove sperm stains from my clothes? It's for a programming job interview.

Suck the stain off with your mouth.

Don't remove them just dress like a woman.

They've solidified by now so there isn't anything to suck off.
But I need to.

Lick it off.

Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); she's super duper cute; and she's a blast to write in! Say something nice about her, /dpt/!
>Features
dlang.org/comparison.html
>GC
dlang.org/spec/garbage.html
dlang.org/blog/2017/03/20/dont-fear-the-reaper/
dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
>Standard library
dlang.org/phobos/index.html
>Books
wiki.dlang.org/Books

rip

Is there any reason to ever use the heap?

>I can't code for my financial gains.
>I am stuck in solving every problem from the art of computer program and CLRS
How do I get out of this?
>Also, wtf is sandal

stack/heap might not exist

ID3D12 interfaces uses them.

Bump

>Anime
Hi.
Go to hell.

>>Anime
>Hi.
>Go to hell.
Hi.
Go to hell.

You wouldn't a matrix with few million elements on stack.

You do realize you can adjust the size of the stack at any time, right?

The stack already has a lot of things on it because it is used for functions. Putting stuff on the heap means you can pass data around outside of the scope of the function.

cover all of the clothes with sperm so the stain doesn't stand out

>you can pass data around outside of the scope of the function
And why would I want to do that? Sounds like bad programming.

It's called returning a value -- something people do all the fucking time.

???
No, they don't.

The fuck do you think a function is?

whatever you need it to be

What hapen

Oh poorfags can't post lel.

>There are people in 2017 who are still contributing to the botnet.

Dead programming thread.

What? It's a thread about Ruby?

f

You take that back right now.

Programming noob writing a very basic parser in Java using Scanner. I have a dozen of Token types. How to organize my code? Is it possible to expose a method in the classes to let the Scanner find them as a Token in a String? How to do that?

Never.

Why use Ruby when it is slow and inconsistent compare to a scripting like language like Go which is actually fast.

A dialect of C with no I/O.

testing

X *p = new C(args);

// delete p using D later

where X is a unique_ptr, so it deletes it automatically using D (last argument to unique_ptr is a custom deleter function).

All that syntactic garbage is needed to make sure X's type is deduced correctly and args is forwarded without being copied or 'losing' any type information (C++ is so terrible that it sometimes decays or changes the type behind your back if you're not careful)

>ReturnTypeReturnType
It probably doesn't even compile

Hiro is a giant jew fuck. /dpt/ should make an inhouse captcha

I'll make the logo.

>no programming channels on disqus
fuck this gay earth

>disqus
What?

i think it declares a variable in C++

To allocate dynamic memory, retard.

disqus.com/

it's now used by many websites to implement commentary. it's also used for talking about many subjects. you can subscribe to a channel to then see its posts on your wall.

>Website doesn't display anything with third-party JS disabled
What a fucking joke. I can tell just by that and it's fucking stupid name that it's fucking shit.
Stop being a retard and just use IRC.

irc is shit and obsolete. disqus offer persistency, centralization, data integration, and avatars.

Is there any purpose in const void* foo?

>persistency
Set up an IRC bouncer if you care that much.
>centralization
How the hell is that a good thing?
>data integration
IRC has been able to handle files for a VERY long time.
>avatars
Literally who cares?

Yes.

Tell me

You want to pass a pointer to some unspecified const value to some function.
For example. qsort/bearch uses that.

>Set up an IRC bouncer if you care that much.
really? your solution to a problem is adding more problems? and disqus has complete persistency: your comments, other users comments, ... the complete discussion is kept

>How the hell is that a good thing?
now, i only have to visit my disqus home page to know if someone replied to me on any website using disqus. since many anime streaming websites are now using it, it really has changed my life.

>IRC has been able to handle files for a VERY long time.
by data integration, i mean that you can embed files but also youtube links, twitter links, ... in your comments.

>Literally who cares?
me. by seeing my avatar, you should have a idea of who i am. an avatar help you to dissociate from other users.

please, don't be a retrograde, accept disqus.

traps can code in their spare time as a hobby, but they don't get paid to code, they get paid to pleasure faceless old men

Not programming. Fuck off to some other shithole.

>the complete discussion is kept
thank god i don't need to use this crap

Why did (You) (You) me 4 times?
>the complete discussion is kept
Why do you need that shit? I bet you use reddit and love all of the "karma" or whatever following you around.
>anime streaming
AHAHAHAHAHAHAHAHAH
>by data integration, i mean that you can embed files but also youtube links, twitter links, ... in your comments.
You're literally talking about posting a hyperlink.
>an avatar help you to dissociate from other users
Right. A username/nick doesn't do that at all.

Thanks for the (You).

>responding to bait

but you are still using irc where many channels have a logging bot

>Why did (You) (You) me 4 times?
because i select your text by double clicking then i click on your post number to quote you easily.

>Why do you need that shit? I bet you use reddit and love all of the "karma" or whatever following you around.
i couldn't care less about karma. i care about sharing opinions with other people on subject that interests me (socialization).

>AHAHAHAHAHAHAHAHAH
please, don't say that, especially when posting on this website. without anime, Sup Forums would not exist. this is the truth.

>You're literally talking about posting a hyperlink.
but it's embed like youtube links here.

>Right. A username/nick doesn't do that at all.
a poet and a painter talk differently to your soul.

>please, don't say that, especially when posting on this website. without anime, Sup Forums would not exist. this is the truth.
No, I was laughing at the fact that you're a fucking stupid streamfag.

>by seeing my avatar, you should have a idea of who i am
So an insufferable weeb?

Anime is the fundamental part of imageboard culture and being disgraceful to the anime must be a punishable offence.

avatarfagging is gayer than namefagging, faggot.

What the hell is up with GCC for ARM, it's emitting pure garbage, maybe 30% of the instructions could straight up be removed, and I'm not even picking the worst exemple.

Supposedly, this binary was compiled with size optimizations.
What the fuck, compiler people.

I guess I was right

>reaction images are ""avatarfagging""
So basically you're admitting that you're either a r*dditor or simply a retarded newfag?

Any languages that can sleep(cycles)?

pic18

Garbage emitting pure garbage is reasonable.

ARM focuses mainly on llvm.

>Those fucking captchas

You must be new here, but I'm not the poster you were replying to.

forgot pic

>not using legacy captcha
kys

Everyone is anonymous here, so it's not hard to confuse one insufferable weeb with another. You can be a weeb and not be a faggot about it

I'm seriously talking pure shit code here, so bad the fucking assembler should refuse to take it as input.

This fucking piece of shit will create 4 stack variables in a function, write all the arguments into it, then NEVER FUCKING USE ANY OF THEM.

And then half the stack variables it writes and immediately reads back from it all the time, because why the hell not.

Sometimes it will just vomit 5 lines of garbage because it needs to use TWO FUCKING registers at the same time and OH MY GOD if you don't write it at least three times in two different places it's probably going to forget it still has the value right here in the god damned register.

Yes, I'm mad.

>anime streaming
Among my entire reaction image folder I can't find even one that comes close to the disgust I currently feel towards you.