/dpt/ - Daily Programming Thread

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

Attached: 1565093523125.jpg (708x1000, 115K)

Other urls found in this thread:

research.google.com/pubs/archive/46070.pdf
codingame.com
play.elevatorsaga.com/
janestreet.com/puzzles/
codeforces.com/blog/entry/54550
codeforces.com/blog/entry/18417
dev.realworldocaml.org/
youtube.com/watch?v=pA-8eBZvN1E
twitter.com/NSFWRedditImage

What is a good way to test the performance of an allocator? I want to compare the one I hacked together in five minutes to Clang's.

anybody wanna write a library that implements this?

research.google.com/pubs/archive/46070.pdf

what's a good way to use a restapi in c++? right now im just using c++ system calls to open a terminal and cURL the headers and shit to get what i need but it's super fucking confounded. there has to be a better way right?

int multiply(int a, char *b) {
return a b;
}
fix it:
int multiply(int a, int b) {
return a * b;
}
>bzzzt errror you didn't define a main()

cunny

welp! fuck this site, I didnt know it forced you to have an account with them

Is there a better notepad interface than jupyter for Julia?

solution.c:4:13: error: parameter name omitted
int main(int,char**){ return 0; }
^
solution.c:4:20: error: parameter name omitted
int main(int,char**){ return 0; }
^
2 errors generated.

fuck

Can you use ES6 on QML? Is it worth learning like is QML here to stay?

I don't know of any popular QML desktop apps, meanwhile there are many electron based ones like Slack, Discord, Vscode

so yea

I was doing this assuming that we were not supposed to touch the parameters of the function

#include
#include

int multiply(int a, char *b) {
if(atoi(b) >= 0){
return a * atoi(b);
}
}

int main(){
char *p = "4";
printf("%i" , multiply(1, p));
printf("\n");
return 0;
}

Oi, Anone! Why are you mucking about with JavaScript so early in the morning?

Attached: 76c86b3bc56e4877c960c28e8003b24f.jpg (1365x2048, 138K)

if you've got to create an account, just go with codingame.com
it seems to be pretty amusing. You can get a feel for it by clicking Get Started and then X Continue Without Account.

play.elevatorsaga.com/
have fun

I wanna hug

are you a girl?

cat slimes melt flesh on contact. if you tried to hug one the momentum would probably let it take out enough of your body without even trying that you'd definitely die.
that girl can only hug the slime because she is 2d.

Why aren't you learning OCaml to get employed at Jane Street for $250k+bonus?

I wonder how many emails and resumes jane street get from NEETS who copied a hello world and think Jane Street will hire anyone even remotely interested in oh camel

better question to ask is "how many resumes has Jane just forwarded to the FBI for investigation"?

can someone post that info graphic with a list of projects one can start programming

>MBAs don't give a fuck and never will.
But why? Software isn't magic and I'm not a wizard. If there is a passable product it will be held together by rubberbands and chewing gum. When the software breaks or the product doesn't get delivered with all the features some cunt promised it won't be me getting blamed. I hope.

What do you mean? Obviously they would be biased toward someone with experience in OCaml since their entire stack is written in it. If you're competent it'll only take a couple of months before you can contribute to the compiler

>But why?
Because 99.9% of them are only out to climb and chase the dream of being an 8-10 figure CEO. Lying to promise and deliver outrageous shit is standard, and how many get noticed and get job offers from better companies. You are just a worker bee to them, who slams on his keyboard to make the electric box do the things it needs to do.

If you let someone who onyl wrote a hello world work on a compiler within a few months i'd pity your code base

They're known as the "ocaml company", so i imagine some people would imagine they'd happily hire anyone who has an interest in, or pretends to have an interest in ocaml.
But maybe i'm wrong.

No. I mean any competent programmer can pick up OCaml and contribute to the compiler and other core projects within a couple of months. That would greatly increase your chances of getting hired

It's quite the opposite. Jane Street is not a nobody company and they realize any competent programmer can pick up OCaml in no time. You are up against a lot of candidates and there's limited positions, and they are going to go for the smart ones that they know can learn and bring a lot to the table. Not ammeters that did the first OCaml hello world tutorial online to make up for their lack of knowledge.

The only languages you need are Lisp and C.

Attached: lisp-chan-and-alien.png (400x400, 160K)

Lisp and Ada!

>ammeters

I remember guys in codeforces, say about mostly algortim interview.

janestreet.com/puzzles/

codeforces.com/blog/entry/54550
codeforces.com/blog/entry/18417

One jane street employer writing new version ocaml book, mostly new employer will learn ocaml using this book and book is easy than SICP.
dev.realworldocaml.org/

>I like how you got into a position of trust and lied so hard that your old company had to scramble and push itself to the limit to make a barely working product. Now they are in patching hell and are being threatened with lawsuits. Welcome aboard.
Day of the rope soon.

So the Lisp shills and C shills were the same kikes all along.

nah, this is just a Lisp shill that's broken down. When they get dispirited, they start making space for languages they see as useful but not competitive with Lisp.

>C
>useful
Anyone who wants to do anything serious with C moves on to sepples. And sepples is garbage for numerous reasons.

so if i understood the abstract, this is analyzing the perceived frame by frame video quality, not the content quality?
so its analyzing if the video is shaking a lot, for example?

>I feel the team there tried their best, but ultimately just weren't up to the task. Unfortunate, but I sense a much brighter future here

GNU coding standard recommends using Scheme and C for all your programs.

If that's what they use to write their garbage software, then at least now I know what to avoid

>not using Linux
lmao

I bet you think bloatware Ubuntu is a good distribution. Is it still "GNU/Linux" if I use no GNU software?

install DragonflyBSD

It actually mostly C. Scheme never gained enough popularity within the GNU community.

Is gnu run by kikes?

>Stallman was born March 16, 1953,[8] in New York City, to a family of Jewish heritage.
Stallman's the jew anomaly

is he the second coming?

McCarthy, the creator of Lisp, is also a jew. That explains (((their))) obsession with (((Lisp))) lmao. I don't get their C obsession though. Ritchie was white afaik and no one really likes C unless the only alternative is Assembly. Maybe it's just trolling to get gullible goys to deal with a shitlang.

C is a very iconic language, it's probably going to be used for atleast another century.

It amazes me at people who are ignorant of Lisp to not even be able to write the syntax correctly without getting it horribly wrong.

when the old guys die it will likely just die
considering how few people even wants to code in it amidst all the high level language available nowadays
most people cant even brain pointers for gods sake

youtube.com/watch?v=pA-8eBZvN1E
for some reason listening to this gay guy explain basic datastructures to normies is pretty nice background noise

do you happen to be gay?

>when the old guys die it will likely just die
nah, there's a few younger generations who like C.
Granted I think with the explosion of newer langs coming out every other year, C will more than likely dramatically drop in usage to COBOL levels.

what's there to know user, just string together operators and some keywords, then throw a bunch of parens in both directions. My editor will balance them for me on auto-save :^)

Nope.

listening to a gay guy whisper in your ears for hours long is not gay?

it's the data structures that arouses me

Attached: kek.jpg (344x146, 5K)

Okay, I'm starting with C guys.

Attached: 1553767843031.png (1280x720, 1.06M)

>need to learn c++ for a job
>decide to make a game
>user hears
>"that sounds good, i'd like to make a game, i was thinking about learning to program"
>ok
>5 hours later
>"how do I make a string again?"
I DONT KNOW NIGGER JUST COPY AND PASTE THE BIT YOU WROTE LAST TIME

Can we NOT have pedoshit on Jow Forums?
/sqt/ is already plagued enough by vile fucks who sexualize children...

How goes learning C++?
I also should learn it for job.

this is /prog/ but i agree

You're retarded.

C is mind poison. PDP-11's don't exist anymore. Learn sepples or Python, something that makes money and isn't outdated.

reminds me of /agdg/
Some guy yesterday couldn't figure out a 2d array for making an inventory system and ended up buying a unity store asset for it.

>PDP-11's don't exist anymore
why do people keep bringing this up when talking about C

>still no good tag based file organizing program or filesystem
When will the HSF meme die?

2 dimensional arrays of RGB colors are children now?
wtf i just deleted a bunch of them!!!

just make one yourself it's extremely simple

C's is based off how PDP-11s worked.

>PDP-11's don't exist anymore

What does it mean?

Attached: 1557513350898.jpg (374x374, 41K)

But isn't Linux and a lot of engines programmed in C?

Isn't it one of the most optimized languages and the base of C++?

"C teaches you how hardware works" is just a meme because the hardware it represents doesn't exist anymore. If you really want to understand modern processors learn something easy like Python or JavaScript so you get the basics of programming and then learn Intel Assembly and sepples side by side.

the old computer architecture C was originally designed on and for no longer exists
C was heavily influenced by the computer it was designed on, a big no no in language design

has to do with Unix.

That's irrelevant see

It's still has lots of influence since kernel and lots of programs use it?

Languages are fast because they're old. FORTRAN is the fastest when done properly because it has so many years of compiler theory behind it. C is the next tier but Ada and some other forgotten langs are about as fast. Rust is a unique case because it was designed to be fast from the start instead of naturally evolving to be faster.

tl;dr: GCC based languages are fast; So far LLVM when done right.

C and UNIX are a product of the time at Bell Labs.
But unfortunately, the process of starting over from scratch and making a modern OS is a monumental task.
sunk-cost sucks.

C targets the C abstract machine.

which is a PDP-11

because tag based systems are only useful for two things
1) sorting memes
2) sorting hentai

Lisp is the most powerful programming language.

Have a look at z/OS.

I see.

But what if I want something as optimized/fast as C?

I know Python is much slower then C.

Also C++ is a mess.

I see.

I see, I understand.

So I guess I should go with PHP or Python.

Are they similar enough?

>PHP
never learn PHP
even its own creator considers it a mistake

>But what if I want something as optimized/fast as C?
There are plenty of to-c langs out there. /dpt/ love to exaggerate that any lang that's not EXACTLY as fast as C is useless, but a few ms or even seconds here or there are absolutely irrelevant in exchange for safety and quality of life features.

But I was going for webdev and C for hobbie.
WordPress is programmed in php.

I see.

PHP is nothing like Python. PHP is one of the most unforgiving and inconsistent languages out there.

I see.

By sepples you mean C++, but this language is a mess. I think I'll skip this one.

I was going to make simple games as a hobbyist with C. So, besides Python, what do you recommend?

PHP is so bad it's harder than Assembly imo. Not a good first language unless you want to be discouraged.

Common Lisp.

php is something that happened as an unfortunate consequence of peer pressure
Some guy was making something that was supposed to be something like CSS, I think, and people using it forced him to hackjob it into a "programming language."
He had no idea what he was doing and it's a disaster because of it.

Do not use it if you do not have to.
Even javascript, which was created in three days and is an absolute shitfest, is better.

That's crazy. lol
Yeah, I'm skipping this one.

So I'll start with Python.

Okay, thanks. I hear a lot of people talking about Lisp. Is it imperative? I thought it was functional.

It doesn't seem that simple, but I'm willing to try.
I'm not 100% sure on what to use to index relations etc.

JavaScript. But I think you're grossly overestimating Python's slowness. Most programs will finish instantly as far as your human eyes are concerned. If your Python is slow you're either writing algorithms with bad complexity or doing some massive data crunching that should be done in FORTRAN anyway. Keep in mind people have written Minecraft clones in Python.

it's multiparadigm
you can write in an imperative style if you wish