/dpt/ - Daily Programming Thread

What are you working on, Jow Forums?

Last thread:

Attached: atom_vs_vscode.jpg (713x720, 82K)

Other urls found in this thread:

factorcode.org/
docs.rust-embedded.org/embedonomicon/dma.html
madnight.github.io/githut/#/pull_requests/2018/4
twitter.com/SFWRedditVideos

nice OP image.
I'm working on making a GML library work.

Lisp is the lost most post frost cost toast boast

Can goyim use Lisp?

Please do not use an anime image next time. Thank you.

ok

Is Forth a meme?

Distracting myself with old programming assignments before the semester starts tomorrow and I get more programming assignments.

Yes, using Lisp is a good way to demonstrate your acceptance of the intellectual superiority of the Jews. Don't forget to make regular donations to some Israel charities as well, just make sure they don't go to Palestinians.

Attached: The-Mission-to-End-Childhood-Hunger-in-Israel-Popup.jpg (550x480, 42K)

Going to reiterate my question here since no one answered it last thread

Help for getting employed.
How do I make a portfolio? What about a good CV any tips?
Should I sign up one of those github like pages (never used one before) and upload random projects I worked on on my profile?
What projects should I have though? Should I just do those 100 Jow Forums programming assignments and add them all there?

Attached: 1548192898657.jpg (564x564, 30K)

Yes, and a dead one. The closest living thing there is right now is factorcode.org/ , but it's practically abandoned as well.

image should be backwards, atom is bloated as fuck

*picks up haskell*

I am quite new to Javascript and has never used it before otherwise. I have a simple task where I am supposed to read a file in as a text buffer via AJAX, eg. reading its contents which I am supposed to use later on

However as I am new, and have no real literature to guide me in this I hope some of you could just paste code for how this would be done on file "foo.txt"

I want to stop programming as a hobby, but I'm not sure where to begin. I've been told to start with Python and go from there. Do you guys have any recommendations on resources for diving into Python?

Start*

Ironically, you just mentioned a good starting point.
Look up the book "Diving into Python 3". Make sure you learn Python 3 and beyond, 2 is legacy.
If you're interested in learning some general theoretical principles behind programming as a whole, read SICP.

Just pick any and start reading/watching/whatever. People spend too much time choosing, bookmarking, downloading sources instead of just reading them. A mediocre book is better than no book, and you can always read another.

>tfw you'll never be smart enough to be hired by galois to write haskell

speak for you'reself

Attached: 1548024517789.png (842x462, 257K)

well that's what i'm doing
i have a few projects some small, some medium sized - but i think they are cool as ideas
i read up on some interview tips and tricks and will send out some applications this week since i can answer common interview questions

by the way, to you, and others, i have a biology related degree, should i upload it as a degree

i don't have a CS DIPLOMA, per se

Attached: 1549310044984.jpg (748x767, 99K)

i think he is

How quick/feasible will it be for me to refactor an entire 700 line Python script that uses matplotlib & numpy into a C++ project? (so that I can create a faster program and better frontend).

About half a minute with cython.

Why don't more people use Lisp? Why do people learn useless stuff like D? All these pointless meme Langs that came out. Stop supporting them

Lisp is not for the goyim.

Still waiting on a legitimate reason to use Lisp over D, or why D is "a joke".

L isp

Attached: 1548244378016.jpg (563x530, 76K)

reading this:
docs.rust-embedded.org/embedonomicon/dma.html
it's insane the effort taken to make something like DMA safe (and that's just for a trivial use-case). Still, pretty interesting.

> Why don't more people use Lisp?
It's an obsolete shit.
> Why do people learn useless stuff like D?
They don't, stop spreading fake news, Andrei.
> All these pointless meme Langs that came out. Stop supporting them
Exactly. Neither D nor Common Lisp is in the top 50 languages on GitHub in 2018, yet they were on the 40th and 42nd places in 2014: madnight.github.io/githut/#/pull_requests/2018/4 . Not only they aren't growing, they're actually dying.

>argumentum ad populum
Also, all the recent languages are simply rediscovering stuff Lisp already had 70 years ago.

Because Lisp is associated with anime watching, mouth breathing, pedophiles with no redeemable quality.

> the recent languages are simply rediscovering stuff Lisp already had 70 years ago.
This meme again. God, lispers are really obnoxious.

Attached: 1534149798844.png (970x793, 40K)

Interesting, they actually use Pin types for something other than coroutines, maybe I should look into them.

D is literally dying to Go and Rust and C# and C and C++. It fails in every level . D is garbage pajeet mixed with C. It's gross. It's disgusting . It's presumptuous they called it D. I can't find a single good thing about D

>Languages backed by major companies are doing good
wew, who knew.
>garbage pajeet mixed with C
Meaning what exactly?
Every language that supports the OOP paradigm is pajeet shit?

Name one (1) language feature modern programming languages have that Lisp doesn't have.

Scala implicits

What can you do with D that C can't or any other language

UFCS is vastly superior to LIsp's way.

Advanced static type system based on the achievements of the PL theory in the past 50 years
Pattern matching
Freedom from GC via smart pointers or borrow checker
Good support for concurrency and parallelism
Good standard library
Lots of third-party libraries
Editors support
Employability
Relevant standard
Most of the community being older than 16 yet younger than 55 and having a job
People actually using them

> B-BUT IT COULD BE DONE WITH SOME MACROS
And you can write everything in Assembly if you wish to, that doesn't make it a reasonable choice.

>What can you do with D that C
ranges & slices which includes strings since they're implicit ranges.
UFCS + a proper functional style
templates
selective imports in the function scope.
proper immutable
default args
inout guards
int add(int x, int y
in(x != 0, || y != 0) //compile error if 0
{
...
}

contracts
delegates (note Function pointers are NOT the same).
and that's just off the top of my head.

>compile error on function arguments
>can't check runtime behavior
oh wow you need handholding to use functions I see

But scala,kotlin,go,rust are all better more employable

Oh boy, here comes the classic Cnile checklist.
>What? You actually ENJOY safety?
>bloat
>But i can do that with a disgusting 400 line macro!
>don't need it
>don't want it
>why would you use that?

>D is garbage pajeet mixed with C.
>D is like C
Oh, you don't say.

Nothing gets past you and your astute observational skills.

>I can't find a single good thing about D
It's one of the best systems languages ever made.

I don't know what it is you don't like about it. I don't think you do either.

D is bloated and slow

who the FUCK needs compile time argument checking. What good is that even supposed to be

compile time evaluation is fast

Wow, this list looks exactly like C# 2.0 from 2004 or C++11.

[citation needed]
>lmao i enjoy my run-time blowing up!
Never change C friends.
LINQ is shit.
Sepples is disgustingly ugly and its FP is embarrassing.

Literally slower than go and rust and java. It doesn't even show up in top 10 speeds

I hate D because you think you're a real programmer for using it
I'm over here working hard trying to learn lisp and forth and learn real programming

Do you know lisp
Do you know forth?

No. You know nothing. You make no projects. You make nothing. Fuck you and fuck D.

>>lmao i enjoy my run-time blowing up!
>Never change C friends.
how does COMPILE TIME checking save you from runtime errors? Are you stupid?

Attached: 1c8.jpg (640x645, 61K)

> one of the best systems languages ever made
> with GC
Dfags are delusional.

I mean, I understand the reason - D has no niche, so they've been trying to put some label or another on it in the past 20 years, but it's utterly mediocre in each category.

>lisp
>real programming
oh wow

>Are you stupid?
I could ask you the same thing, because that's PRECISELY the point of compile time checks.

so what do you suggest

What's extra Autismal, "even in C" you can do whatever the fuck you want as a result of arguments being invalid values. Who doesn't check for NULL's or invalid cases? Someone had to be worse than retarded to think "okay, normally I take a few lines at the beginning to handle errors, but how about instead I extend the fucking compiler for a more limited ability to handle errors?"

>D has no niche
It's a better C and Sepples
You can turn the GC off.
>B-BUT I'LL LOSE X
give me a specific.

no.... no it isn't.


functionThatDoesntTake1(1); //compile time error

int totallyNotOne = functionThatReturnsAnInt(); //assume 1
functionThatDoesntTake1(totallyNotOne); //No compile time error


I'm so fucking tired to argue about baseline shit with people who think they know literally anything because they took a class on HTML in high school

Are there even guided for writing D? I wanna make a compiler. I want to do graphics demos. Oh I cant use D? Thanks. Fuckhead

I wish I could post benchmarks to show how slow D is but it's so irrelevant Benchmark Game removed it from the contest couple years ago.

what are you babies working on?

Attached: _scrot.png (862x871, 152K)

>I'll give an incredibly unrealistic and limited example which proves my dissonant bias while completely missing the bigger picture.
Wew, yes they literally don't stop all run-time errors. They help to MITIGATE them at compile time with logical guards. Because compile time errors are ALWAYS better than run-time errors.

>trap coding
They were right

>incredibly unrealistic
nigger what? Literally any program that doesn't operate on purely static values will suffer from this. And if you fuck up a program THAT LITERALLY IS A STATIC BLOCK OF CODE you shouldn't be writing code ot begin with

>don't want it to happen during runtime
>have to write extra guards so you don't try it at compile-time or run-time
>not just having a programmer with the minimum fucking competency at what they're doing

D sounds pretty nice famu

I love just writing hundreds of lines of performant, clear C++ while watching you niggers debate meme programming languages/concepts.

It's mostly to prevent API misuse.
Which if you've used raw OpenGL, or Vulkan, you should understand the pain. But of course, here comes the part where you claim to be perfect programmers who literally write nothing but immaculate code free of any errors. And any shred of safety is the sign of a faggot sucking 1000 dicks, and you aint no fag.

>I love just writing hundreds of lines
have you considered a more expressive language senpai?

I'll give it to you later.

> It's a better C and Sepples
What do you mean "better"? Python is even "better", it's so easy to use, but it's a different niche from C and C++. Same goes for D - it's "better" than C and C++, but so are much more popular languages like C# and Kotlin, and if you're ok with GC, you're better off using them than D.
> You can turn the GC off.
And then it stops being better C and C++, as opposed to Rust, for example. Oh, and you lose all the libraries because they're designed to work with GC.

D is situated somewhere in between C++ and C#/Java, but there is nothing there, no program to be written, no tasks to be solved.

> KOI8-R
*sweating nervously*
It can't be! You're dead! I killed you!

>Which if you've used raw OpenGL, or Vulkan, you should understand the pain
You mean those things that work exclusively on dynamically loaded data that cannot be checked at compile time? Yeah I'm sure D is just PERFECT for those applications.

Do OGL binding even exist for that meme language?

I hate debates about programming languages. I like it far more, when there's discussion about algorithms or even homework problems.

i am looking to score a programming job
but the only degree i have is bachelor of science in biology

should i include it in my resume
or better not bother?

>*sweating nervously*
have you worked with it?

>What do you mean "better"?
syntax, features, first party package manager.
>and you lose all the libraries because they're designed to work with GC.
no you don't.

I guess it's better than no degree at all.

Have you read your SICP today?

Attached: 1543262954743.jpg (800x534, 66K)

have you bought a noose yet?

>how does COMPILE TIME checking save you from runtime errors?
For example, GCC can check the number/type of arguments to printf-style functions to ensure that they match the format string. What reason could you possibly have to be against this?

It was the default Russian encoding in most Linuxes until utf8 gradually established itself by ~2008 (I think?). Being one of the 4 (unix, windows, dos, mac) incompatible encodings for Russian and the less popular one it was PITA to work with. utf8 is the reason I don't hate Rob Pike as much as I could.
> syntax, features, first party package manager.
So just like C#/Kotlin, but worse.
> no you don't.
Yes you do, considering @nogc is a recent pathetic attempt to piggyback on the Rust bandwagon no one is gonna to support.

You really shouldn't bother arguing with Cniles. Their entire existence revolves around making shit harder on themselves for no real gain.

No

Attached: 1548911708055.png (760x720, 439K)

>D has no niche
They have a very wide net

That being people that want to write C++ but think C++ is an abomination

>but it's utterly mediocre in each category.
It's supposed to be. It's just supposed to be C++ with a head on its shoulders.

I really think you don't even know what you're complaining about. I have never heard one human being say that D is a bad language.

>So just like C#/Kotlin
No, because as I've said D doesn't require a shitty bolt-on like LINQ to have FP. The only C# thing in D is type[] var instead of type var[]
>Yes you do, considering @nogc is a recent pathetic attempt to piggyback on the Rust bandwagon no one is gonna to support.
How the fuck is a language older than Rust piggybacking off it?

D's only advantage over C++ is cleaner syntax. There's no reason to migrate away because there's no killer feature.

> C++ with a head on its shoulders
> with GC
Every fucking time. Besides, with C++11/14/17, there's really nothing worth switching.

No, I already read it and now I'm programming in Scheme.

Attached: 1547855612895.gif (640x360, 354K)

Movie-related programming question.

What would have been the programming error in ED-209's programming in the original Robocop movie that would have made him not recognise that Kinney dropped his gun? I've been thinking it would have been a result of a missing if statement, or a botched one. It's commonly cited as a programming error for the reason he blasts Kinney.

Attached: ED-209.jpg (1200x670, 120K)

>only
Let us know when C++ modules actually come out.
D has the eternal advantage of having room for ACTUAL growth and can deprecate and replace things freely as a language should. Sepples is forever hostage to the world of Enterprise and the ISO/Boost devs.
And yes there is, actual companies have said there's immense advantages which is why they chose it.
I'm started to think all the anti-D shit are you sunk-cost sepplets.

> D doesn't require a shitty bolt-on like LINQ
That's a funny thing to say D has nothing like LINQ.
> How the fuck is a language older than Rust piggybacking off it?
Hm
> @nogc is a new attribute and is first implemented in DMD 2.066.

It didn't make an error, the human body is far more capable than any gun

>D has the eternal advantage of having room for ACTUAL growth and can deprecate and replace things freely as a language should.
...because no actual software relies on it.

>That's a funny thing to say D has nothing like LINQ.
Yes it has UFCS which makes writing functional code great.
Let me know then C# gets that.

It totally did, though, lmao. He drops the gun, and the robot was supposed to be programmed to recognise that and stop its countdown before it unloads, but it just continues as if he's still pointing the gun
>"You now have 15 seconds to comply"

C# has had extension methods since fucking forever.
Anyway UFCS is fucking gay, just an admittance that OOP-style member functions are a mistake.

>room for growth
>hasn't grown in years