/dpt/ - Daily Programming Thread

prev: What are you working on?

Other urls found in this thread:

pastebin.com/KfRWDSnh
youtube.com/watch?v=60sGTd8T-KY
github.com/cnlohr/libsurvive
twitter.com/NSFWRedditGif

First for coffeescript is pretty good.

C++17 is complete.

>trying to decide which functional language to learn
>can't decide between JS and Rust
Help

And... It's still shit.

help

...

you need a .h lad

Learn JS just to know it

Good for book writers like (((Bajrne))). Every 3 years they get to publish a new book.

There's an O'Reilly Book called "functional Javascript", so maybe torrent that and skim it a bit first

Learn JS just to know you should have not.

>#include foo.c

what

I am so fucking hyped for std::pmr::polymorphic_allocator
>GCC 7 WHEN

well that was fun.
still should have automatized suits but oh well.

module runnable;

void main()
{
enum suit: int { sp = 0, he, di, cl }
suit sel;
int[52] cards;
cards[0..12] = suit.sp;
cards[13..26] = suit.he;
cards[26..39] = suit.di;
cards[39..52] = suit.cl;

void shuffle_and_draw()
{
import std.random : randomShuffle;
import std.stdio : writeln, writefln;
auto range = cards[0..$];
randomShuffle(range);
writeln("After :",range);
int trump = range[0];
writefln("Trump is: %s",sel);
}

import std.stdio : writeln;
writeln("Before: ",cards );
shuffle_and_draw();
}

who the hell came up with this fucking bullshit?

OOPS

The joys of backwards compatibility user
At least I'm pretty sure that's the reason

what is it?

x86 GDT entry I think

You're not suppose to use it anyway, unless you're writing an OS. And if you are writing an OS then you deserve the suffering.

Rust if you want to die broke

I'm literally laughing out loud at that picture, all I have to do is read a section then scroll to his face, instant keks. and his fucking school shooter outfit. that can't have been serious right?

I'm having a hard time figuring out how to do this CRC problem.

pastebin.com/KfRWDSnh This is what I have so far. It works when just inputting the first 64 characters as well as inputting the whole string. However, I don't know how to get the intermediate checksums.

Additionally, most of the solutions online don't seem to give the right output, even when I try brute forcing different polynomials.

The polynomial is in the pastebin, btw.

This image will trigger users of bad languages

>people still deny the accuracy of this image

>JS
>Rust
Neither of those languages is a functional languages.

They're both dysfunctional.

C was a mistake
ML was robbed
Haskell/Idris opens our eyes to the hell we've chosen for ourselves
We underestimated the hardware growth
We were faithless, we chose being "close to the metal" in an era of kb and mb
We should have sided with humanity, but we sided with the machinery
Our programs are ugly, our future is grim, our stack is unwieldy and grotesque

writing the nim game in scheme

In what way?

This thread is now /dppt/, the daily pragmatic programming thread.

Shared mutable state and dynamic typing are not pragmatic, so any language that permits either is not welcome here.

You forgot to add POO to the list.

#59573794
Are you the guy that tried to start /"""""relevant""""" languages general/?

>stating the obvious

finally made it
you don't need a header

C was a mistake
ML was robbed
I'm a humongous shitposter

You should still use headers with c though.
Or move on to a language from the 21st century.

Ugh, HtDP keeps getting more tiresome. The exercises are too easy and the pacing is too slow. It's a good book for someone with 0 programming skills, but I need something with more difficulty to keep me motivated.

Try SICP instead.

Dynamic typing should have ended with Lisp/Scheme

and then Lisp/Scheme should've ended

>dynamic typing
>OOPs

If you are implying that me stating the obvious is somehow bad, then why did you do it yourself?
And who are you quoting?

Dynamic typing is for people who don't want to write correct code. If you're so sure your code is correct, then prove it to the satisfaction of the compiler.

I actually started with SICP, but it overwhelmed me. Now that I'm more experienced, I might pick it up again. Is The Little Schemer any good?

>Is The Little Schemer any good?
It deals with dynamic typing and is therefore absolute trash which should be avoided at all costs.

I haven't used it so I can't comment on it, sorry.

I'm not doing it like this because I want to and the program needs to be really fast, need c.

>dynamic typing is absolute trash
Motivate.

If you need performance, you can use C++, surely?

>being a faggot

Who are you quoting?
Same question here.

>program needs to be really fast, need c.
wew lad

Meant to quote

Kanna is absolute trash and you should delete that image while you still can

"dynamic typing is absolute trash" is nowhere to be found in that post.

>It deals with dynamic typing and is therefore absolute trash

Are you blind by any chance? The person who is currently helping you with reading is doing a shit job.

I'm blind and my personal screen reader is retarded. What did you mean with your comment?

C was a mistake
ML was robbed
Roses are blue
And so are you

I'm glad you agree.
>What did you mean with your comment?
I was merely pointing out your inability to read and comprehend basic sentences.
No wonder someone like you would prefer dynamic typing. It all makes sense now.

C was robbed
ML was a mistake

>Idris
>fast development
Factually wrong.

Indeed. Being "fast to develop in" isn't and cannot possibly be a property of any given language.

Yes, it is fast to develop in, assuming you avoid proofs

Are you by any chance the OCaml shill? If so, is that language still relevant now F# is here?
Excuses for my reading comprehension. Java ate away a large part of my brain.

That doesn't seem to be possible, assuming Idris is a programming language, which I believe it is.

So why isnt it?

youtube.com/watch?v=60sGTd8T-KY
Livestream of reverse engineering the HTC Vive, love this guys work.

His repo is at github.com/cnlohr/libsurvive

Kanna is shit and F# doesn't even have HKTs

>Are you by any chance the OCaml shill?
Why would I be shilling literal garbage? Do just you assume everyone you talk to to be a complete retard?
>If so, is that language still relevant now F# is here?
How can a language be "relevant"? If you're asking whether or not you should even acknowledge the existence of either of them, the answer is definitely no.

>Java ate away a large part of my brain.
Yes, that's noticeable and I'm glad you are trying to fix it, but the path you've chosen is simply wrong from the onset. Dynamic typing will lead your brain to become even more of a joke than it currently is.

Fudge off, pedo scum!
>b-b-b-but she's a 1000yo dragon magicia-
No!

Who are you quoting, reddit poster?

dumb frogposter

kanna is still terrible tho

simmer down /u/steve

you call this loli?

Get the fuck off my chan senpai

It's a programming language.

C is a robber
ML got mistaked

I would be

writing like that

if I came from

plebbit

Ahh I miss osdeving I should play around with writing an os again. But skip all this bullshit with the bootloader going straight to long mode.

>the OCaml shill?
What do you mean by a OCaml shill?

D. checkmate

What sort of retarded attempt at logic is that? You not displaying one plebbitor trait somehow makes you a non-plebbitor?
Some other plebbit traits would be using plebbit filenames coupled with general plebbit rhetoric and frogposting. All of which you are guilty of.

stfu pedo scum

@59574301
>using this meme incorrectly

Everyone else with a brain begs to differ.

>Why would I be shilling literal garbage? Do just you assume everyone you talk to to be a complete retard?
No, but there's some user around here tricking people into using OCaml.
>Yes, that's noticeable and I'm glad you are trying to fix it, but the path you've chosen is simply wrong from the onset. Dynamic typing will lead your brain to become even more of a joke than it currently is.
I successfully went through the beginner track of the haskell wikibook. So my brain is not completely dysfunctional yet.
FUCK YOU FROG POSTER
EMBRACE THE LOLI
Exactly what I said.

>Exactly what I said.
Maybe you're talking about me.

>tfw to intelligent to use javascript

btw that's a great massage technique to combat hair loss

Haskell is a fine start, but it's still not powerful enough.

please stop posting frogs

If JavaScript is so shit, what can i learn for web development?

So, what do you consider a powerful language?

All web dev is shit

fuck off to and your frontend is supposed to work with js disabled anyway

No, frogposting is to much fun

@59574560
lad, if you want (you)s, please do it somewhere else.

Idris among the Turing complete ones, otherwise Coq.

>still no burnout