/dpt/ - Daily Programming Thread

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

Attached: 1543220845606.gif (1050x850, 1.97M)

Other urls found in this thread:

pastebin.com/ieemrpH4
youtu.be/ueYU2O3lmYI?t=6
github.com/ossu/data-science
techempower.com/benchmarks/
youtu.be/2PVRX1ug_fk
words.steveklabnik.com/thank-u-next
fabiensanglard.net/doom3_bfg/
youtube.com/watch?v=Mu0ew2F-SSA
twitter.com/NSFWRedditGif

First for C.

Second for Ada!

what's her name again?

nth for Yuno! (and Nim)

fifth

im making an online game, so far ive figured out how to use sql database and I got a dedicated server running too, the clients can connect and move around, thats it at the moment
i want to make a game with combat like dark souls but its online with other people who are in the same world as you, and I wanna put in dungeon generation too
i think doing that with some friends would be really fun, so im making it so I can play it with people

get gud

Attached: 1402490954895.jpg (480x640, 101K)

Well, she's never been one for safety.

do you think shes been coding her own game in secret for all these years afraid to show it

no

>Webdev
>rust
LMAO, GO is more of a webshit language than Rust is.

Attached: 1333310505490.png (480x640, 365K)

Someone with more resources than you is just going to steal it or rip it off, don't bother

Should I learn Java bytecode or LLVM? I Intel assembly is too OS dependent and I want to make compilers that are actually useful.

Attached: A6B47FE2-8043-4A1C-8C68-DC6F065C4923.png (400x400, 107K)

Im workin on something no one else is doing but involves crypto, so i can get enough funds to start building a 'lab' where I can try to build a workin telsa transformer(the transformer not the coil, 2 totally different things). The reason I want to build a telsa transformer is because it is the only real unlimited energy device. This matters because control of energy supply is how the central banking system controls planet earth, because money is really a measurement of energy and time, when you buy an apple at the store, you aren't buying the object, you are buying the time it took to grow the apple, harvest the apple, and transport the apple to the store, all of which is done with machines that run on finite energy(fossil fuels, nuclear fuels, mexican fuel, etc). You pay for the energy and time. So if a person could increase the energy supply to near infinity, the value of money approaches zero. Ill want to get a good step by step instruction manual going using these schematics:

pastebin.com/ieemrpH4

I want to spread this info without the satanic pedo governments shutting it down so Im workin on setting up a reverse proxy ipfs to aws server, so that I can reasonably assume my instructions cannot be taken down by government(are there better options?). I also want to spread this info quickly so it becomes viral quickly so I am working on an army of liberal 'sleeper' bots(cause anything right of satan is censored now) on various social medias. Ill have them all put out some cryptic message with a link to my site when I get the instructions and reverse proxy ready. People will go to the site that cant be taken down(hopefully), someone will actually build the telsa transformer, itll spread like wildfire, central banking system collapses, and humanity goes to space where me a Spike can finally explore space.

youtu.be/ueYU2O3lmYI?t=6

Attached: red wave.png (300x300, 6K)

oh look it's terry's incarnation

JVM has a single-byte opcode. Super easy to understand.
LLVM is so bloated and gross...

It's Yuuno, you know.

Not sure why you're even considering a primarily VM bytecode like JVM bytecode. Learn LLVM obviously, there are no other sensible choices.

it's not you baka.

I thought GNU Lightning was cool since Racket uses it but OCaml abandoned it and they got .a huge performance bump on their JIT...

Oh shit you're right. Tehe pero~

Attached: 1530359840592.png (63x20, 981)

Uuuuuuuh, is this LLVM? I was expecting something that looks like Assembly. This is higher level than C.

Attached: 15062F28-3CA0-4F71-A311-F5134217B276.jpg (614x546, 118K)

I have retarded question. May I ask it?

You're looking at C++ code there, not LLVM.
Pic related is LLVM.

Attached: 1534671481564.png (821x504, 136K)

No.

okay.

What do I use for a high performance web server? Scala, Erlang, Haskell?

C

is trying to sabotage you, obviously.
Use C++.

How about a 21st century solution instead friends?
Also concurrency is cancer in C/C++, just kys.

>21st century solution
C++17

He's looking at LLVM code, you've posted LLVM IR.

thanks for pointing that out user!

Go

I'm from Peru, 27, studied "CS" and graduated in 2016. The program was shit on maths|theory, either on quality or lack of interesting courses, what I really came out from there was as a Software Dev. I compensated their lack of interesting courses studying some online shit on my time but it doesn't feel enough. At least the title says CS even though I don't think it fits

Did frontend back home (only shit job I could find), and now been working for 1.5 years as a backend dev in e-commerce in NL (better job but still), also trying to learn some shit on the side, but its really draining without presenting a real challenge its a bunch of backend API or database or REST or whatever shit.

I've been constantly trying to make up for the shit university courses with stuff on my own, specially on the maths|theory|data science things that were half-assedly taught or not at all which really interest me, trying to follow some (not all) of github.com/ossu/data-science but it's still I go at slug pace because I can barely dedicate to it some nights or a bit of weekends, most of which I'd rather rest from weeks of shit.

I asked internally at my job about prospects of moving into a data science position and they were like lol but you have no academic background on it you are a backend dev and our data science positions are masters/phds.

I want to do masters for properly formally learning this shit but I need to find an affordable one, some countries are hit and miss, some like France or Germany have really cheap tuition like

You want to work in this ML/DS position? You need a masters or more! We need formal education, not some hobby thing! You are a backend dev for our website not a mathematician or scientist or blah

You want to enroll into a ML/DS/whatever masters? You need verifiable previous *academic* experience in it! Applications are very competitive we only enroll the best of the blah

Online diplomas? Meh, those rank in criteria really low, or even not at all, we look at actual university courses you took (and most of the interesting courses are already archived) (I have 'finished' 15 MOOCs but actually have like 4 'diplomas')

What was your undergrad, CS? But where's the theory/maths courses? Your transcript looks more like Software Eng/Dev, even a mathematician/physicist/biologist/blah has higher chance of admission (was told this literally at a university fair I visited, because those are more 'maths intensive' covering maths my undergrad didn't have but that I've covered myself).

Fucking masters fair guy was almost like "we have so many applicants, it's become very competitive, we're losing so much faculty to private sector so teacher staff is reducing, if you don't fit some of these criteria don't bother applying"

I thought masters were supposed to allow people to do shit they didn't do in undergrad.

so NULL
#define NULL (void *)0
actually creates pointer with an address 0x00000000 which is reserved for the OS,this memory region is protected and does nothing.

LLVM IR is the thing he wanted to look at though. Don't make him misunderstand things.
And no, he's looking at C++ code, which in fact contains zero LLVM API in it.

Learn LLVM.
It's very user friendly with plenty of tools.
It also has a lot of momentum behind it compared to just about anything else.

Is there anywhere to get a simple overview of the datastructures and algorithms used by ptmalloc2 and jemalloc?

Yes. That all you need to think null is and you'd be absolutely fine.
On most platforms null is 0 and isn't a valid address. But there's platforms where 0 is a valid address and you can't be that certain that writing/reading it is gonna be an error.
But those aren't normal platforms and it's mostly historical.

I think there's plenty of good resources by just typing 'ptmalloc2 explained' into Google.
I'm not sure what else you're expecting.

I'm abusing struct layouts and there's nothing you can do to stop me.

I'm calling struct protective services.

in retrospect, this isn't funny

Don't worry, I don't need to stop you. UB will stop you at some point for me, and if it doesn't, it'll haunt you forever in the form of obsure hard to debug bugs.

I just made a clock and I'm very satisfied with how it works. I'm new, but please congratulate me! I want to help you guys achieve wonders!

while (true ) {
System.out.println( hours + ":" + minutes + ":" + seconds);
Thread.sleep(9000);

seconds.next();
if (seconds.getValue() == 0) {
minutes.next();
if (minutes.getValue() == 0) {
hours.next();
} } }

Attached: 1530254083479.png (295x331, 211K)

nigga just have a single variable that tracks how many seconds have past and format based on that

>} } }
No. Just no.

was just so i took up less space posting it here
it looks very nice on netbeanz

Trying to write a firmware implant that can check protocol and OS before modifying the kernel and initializing a hook on the firmware update process. I don't think it's possible.

My 4th year CS professor spent the first two days of the year by putting together a computer and explaining it all to us. I looked around at my class watching in awe and taking notes as he put together a computer and it was at this moment I realize my degree is worthless and I'm going to have to get my masters. Thinking about starting a paid shilling business instead.

Attached: 1517975406031.jpg (480x531, 32K)

>What are you working on, Jow Forums?
Mr. Robot
It looks cooler now. Pls rate

Attached: cool.webm (1280x720, 1.88M)

I had a terrible nightmare thinking that Ada didn't have function pointers. Luckily I woke up and searched it and realized it was just a dream.

Attached: 1497566914156.png (128x99, 21K)

I try to make my vmware worstation pro working like it should, but I have some difficulties installing some distros.
But compared to VirtualBox, performances are really better.
That's fuckin cool !

over engineered programming language.

cured his Parkinsons but now has a limp.
limpy

just because of the powercoord that is holding him back a little.
My last buck converter killed itself yesterday, that's why no battery atm. New ones should arrive today/tomorrow

Thanks for your comment, i'll take it to heart.

techempower.com/benchmarks/

Anything that conveniently does Async IO. Performance of CPU cycles is basically noise when compared to IO.

>Also concurrency is cancer in C/C++, just kys.
Why do you think so? Concurrency is barely any different in C and C++ compared to other imperative languages.

Ada with AWS.

>Concurrency is barely any different in C and C++
wrong. smart pointers alone make concurrency much easier.

People don't like to admit it but Java servlets unironically are benchmarked the highest.

Smart pointers are just reference counted

>smart pointers make concurrency much easier
Oh how foolish. That's not how they work. Smart pointers are only thread safe in their control block aspects.
If they're good for your threading problems you've got an unmanaged heap and are struggling with it. It's an additional problem you layered on top of your existing problem and smart pointers solve it. But the underlying problem is still the same.

retard
he's look at an abstract syntax tree implementation written in c++
and that AST has nothing to do with llvm

Attached: 1526895711813.png (671x603, 168K)

Does anyone have examples of good open source C++ programs?
Something demonstrating what the committee has in mind when they say that you should use their features.
No trivial programs please.
I don't really care which standard as long as it is C++11 or up.

You can't spell trust without rust.

>Does anyone have examples of good open source C++ programs?
Doom3 BFG source code.

Based

>good open source C++ programs?
>good
>C++ programs
not really no.
chances are, it will either be a giant mess of hacks or trivial

youtu.be/2PVRX1ug_fk
You probably want this. I found it helpful.

words.steveklabnik.com/thank-u-next
> What’s really important is this: I’m not proud to be a Mozillian anymore. A variety of incidents contributed to this, but at the end of the day, it’s what’s true. Furthermore, I don’t have any personal opportunity at Mozilla; I recently discovered I’m the lowest-paid person on my team, and Mozilla doesn’t pay particularly well in the first place. In order to have any kind of career growth, I would have to not do the work that aligns with my skills, and what I’m doing now is really how I can have the most impact on Rust moving forward.
Oh no, not you, Steve!

Attached: 27786.jpg (400x400, 23K)

>doom 3 bfg
I would not have expected that. Didn't know that was open source. I'll check it out.
What do you think of the above?

>I recently discovered I’m the lowest-paid person on my team, and Mozilla doesn’t pay particularly well in the first place
For some reason, this hits right in the feels

you are confusing the concept with its implementations. smart pointers are transparent due to c++'s abstraction techniques that C has not. With C, you would still have to handle the referencing counting explicitly.

Anyone can reccomend me a good IDE for java script?

>What do you think of the above?
not C++11

Oh no. That won't do.

>fabiensanglard.net/doom3_bfg/
>Doom 3 BFG is written in C++, a language so vast that it can be used to generate great code but also abominations that will make your eyes bleed. Fortunately id Software settled for a C++ subset close to "C with Classes" which flows down the brain with little resistance
I might have a look at this still. I imagine it's good to make feature recognition more explicit in other code.

take: C with traits is all you need

Attached: 1530611170577.png (1000x1453, 1.15M)

When you say traits, what do you mean?

Are there any neural-network based compilers? Would be an interesting experiment.

ATS improves on C the best possible way.

not in readability and/or simplicity

Reminder that your idol, Carmack, even came out and said it was a mistake to use C++ as C with classes.

what a dumb thing to say

With programs you want to guarantee correctness. So a NN based compiler for a language with a syntactic rules doesn't make much sense. It's a constrained space.
Finding optimizations through a NN is another deal. Optimizing smoke and fluid simulations for visual effects has some good papers on it. It's a better space because you don't look for perfectly reproduced outcome just better outcome. That's harder to distinguish in computer programs themselves.
youtube.com/watch?v=Mu0ew2F-SSA

>tfw too intelligent to work as a Java programmer
>tfw companies are too fucking stupid to employ Haskell programmers
>tfw smarter than anyone else
Hole me, Jow Forums

Attached: 1525216958768.jpg (444x368, 32K)

>Reminder that your idol, Carmack
?
>even came out and said it was a mistake to use C++ as C with classes.
Sure. But I'm not taking this as THE way to write programs.
What did he mean when he said that? More or less features? Gamedevs are known to be OOP hostile now. I'd like a source.

this, but unironically

> smarter than anyone else
> dreams about being a wagecuck

You don't need to be OOP hostile. You need to know how to allocate data sequentially for cache locality. Some things can still be OOP but others need special attention.

>You don't need to be OOP hostile
Why are you telling me this?
Tell this to the game programmers, Christ.

Carmack is an FP weenie, you shouldn't take anything he says seriously

I built a raytracer recently and now I want to use the raytracer and write my own engine of sorts for a graphics scene I can move around in, so it would be the first steps towards making a game engine of sorts. So basically I want to render a graphics scene, then if I press the forward arrow key for example the scene would re-render with the camera forward a little more so I could move around. The problem is I'm not 100% sure where to start, for the raytracer I just wrote one single image out to a file, but now I need to use some gui library and write out the image to the gui, and be able to detect key strokes and update the gui with a new image when I press the forward arrow key for example. I have been looking into this and I've been thinking about using the C++ QT library, I've never done and desktop application program or anything with gui before though so if anyone has experience with anything like that I would appreciate some tips, is QT an ok library to use for something like this?

Why am I so fucking lazy. When I have a decent idea or trying out something new and interesting I can code all day long. But when all I have is a boring todo list then every item on that list feels like a chore.

Programming is a chore.