/dpt/ - Daily Programming Thread

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

Attached: sicp.png (1280x720, 1.15M)

Other urls found in this thread:

shivayl.com/portfolio-os
en.cppreference.com/w/cpp/compiler_support
dev.to/graphicbeacon/ever-been-stumped-by-e-t-k-v-in-oo-language-documentation-4hg4
rbt.asia/g/thread/67636370/#67649511
tasvideos.org/
twitter.com/NSFWRedditVideo

Attached: 15377715663789.png (1200x1400, 284K)

first for clojure, lol

Now that C++ modules are confirmed there will be no reason to use any other language for systems programming.

>someone writes a game strictly in a programming language

>all the dialog is hardcoded
>all the items are hardcoded
>all the enemies are hardcoded
Why do people do this?

Attached: 1531041670822.jpg (1000x814, 177K)

Attached: Screenshot_2019-02-24 C++ Modules Might Be Dead-on-Arrival.png (1772x8374, 1.74M)

so you won't modify it

Should I learn git or subversion? What's a good resource for learning them? I'm a brainlet with no experience in version control.

git, svn is pure distilled shit

Learn git. At this point, svn is pretty much dead.

Imagine coping this much.

Python's official documentation is autistic incomprehensible mathfag masturbation. People buy books like because the author actually explains things and gives examples of how things work instead of just throwing a bunch of functions with weird syntax at you and expecting you to just know all their conventions off the back of your hand. Any tutorials they have on their official website have also historically been terrible, again, due to their mathfag bullshit. I still get irrationally angry time some fucking idiot tries to use recursive Fibonacci or lambas (in fact, why not combine them!) in an ostensibly introductory tutorial.

Obviously now I'm older I can just roll my eyes and deal with their bullshit, but when I was younger it was absolute hell. I unironically find it easier to navigate and understand MSDN and their nonsense than anything the Python community has shit out in the past fuck knows how many years. Even the retarded Win32 API or the arcane rituals you need to preform to use their stuff in C++ is nothing compared to bullshit that the Python community regularly pulls and pretends isn't garbage, and that's without them constantly bitching at you about how what you're doing isn't "Pythonic" enough.

I admit they changed a few years ago. Maybe they tossed out all the old garbage and made it good, but I am skeptical.

Attached: d612aa531aea0c54b1dfd6a1ea99a8d23a9f29e3d7cb79257e6bb3951239d4aa.jpg (840x700, 368K)

Have you read your SICP today?

Attached: 1549648334590.jpg (1440x810, 188K)

Methods are just functions which are bound to an object. You can dynamically add, remove, and overwrite them dynamically if you want.

It would be pretty funny if rust dies due to slow compilation speeds compared to sepples.

contributing to coreboot opensource BIOS , mostly for AMD boards (because the latest AMD-without-PSP-backdoor is much more powerful than the latest Intel-without-ME-backdoor, and I don't want to bother with me_cleaner especially since it doesn't guarantee anything) but some stuff is universal

Rusts compilation speeds are pretty poor. Rusts idea of incremental compilation is to just dump a preparsed AST if each module to the disk.

Worst part is the documentation rarely tells you the type of anything explicitly. You are often better off just running it in the repl and inspecting in for yourself.

t. humble c++ merchant

As long as stupid people in programming exist, Rust will stay alive.

>People buy books

Attached: 1509661037951.jpg (611x404, 39K)

Coroutines will save C++20.

Attached: 1550954878270.jpg (880x496, 208K)

What does C++'s coroutines model look like?

both
throw mercurial in the mix too
an darcs if you feeling frisky

it's not dead at all

>too poor to buy books
>there is a pretty librariran qt who is always helpful
Lifes not bad

Good

Attached: Screenshot from 2019-02-24 21-23-16.png (1572x500, 129K)

Reminder to read a lot of books.

>Should I learn git or subversion?
I read that as "Should I learn git or git", I still read it as that, and I refuse to not read it as that.

Attached: b94YP.png (930x953, 78K)

This is pretty horrible.
Does there exist any scheduling approach that doesn't involve ruining families?

you gotta pay the price for zero overhead

nerd

I'm working on a social network for programmers in the form of an operating system as a uni project.

shivayl.com/portfolio-os

>Designed & Developed with :heart: by shivayl

Attached: 1537293469878.jpg (552x453, 30K)

How long do you think GCC or Clang will take to catch up to C++20's ranges, std::format, modules and contracts?

Attached: 47380661.jpg (943x1348, 93K)

haven't used python in a while but I remember always having to find a proper explanation in random blogs I never had these troubles with any other language I worked with

python docs:
def foo(args...)
this function returns true

random blog:
this function needs 3 parameters it can also take 12 optional parameters
the parameters have to be the following types
it can return 5 different values
there 3 specific cases that will raise an error
here's an example on how youd usually use this function

the python community also used to get really mad and jump at the neck of anyone pointing out an issue with the docs (not even talking about the language just the docs)

Considering they were C++17 complete a few months after the standard was published, my guess is around a year from now.

Blog post incoming:

The worst thing about trying to learn how to program is the vast amount of material that could be learnt. I wish there was a list of things you should know for a pre-junior level, junior level, regular level, senior level. I don't wish for any gamification bullshit but it owuld be nice to have something like a checklist that could guide you so you're not lost and start learning some machine learning frameworks before fully understanding OOP first. Or getting into frameworks without understanding all the important elements of your chosen language first.

wow user, you just invented universities

It's well-known what you have to understand to be a junior level programmer. After that it entirely depends on what field you're going into so don't expect to learn or know everything, programming is used for so many different applications even an expert can look like an amateur in an area they're not familiar with. Decide what kind of programming you want to pursue and the answer will be clearer

Sounds like you gotta read SICP.

Attached: 21_0.jpg (1197x1803, 351K)

What they call "university" today is nothing but a glorified trade school, nothing like what was described.

Rewrite kernel is C++ when

don't forget to take your pill grandpa lmao

Considering we already have a bunch of C++20 features not long

How long will Msvc take to catch up?

no one cares

Car myCar = new Car {
Color = BLUE,
Speed = 220,
Wheels = 4
};

:^)

consistent results

>no one cares about the only relevant operating system
ok

>reading a mid 2000 programming book
>"Until recently, the expected year for the next version of C++ was undecided,
and that explains why people usually refer to the next version of C++
as “C++0x” — the year 200x version of C++.
"
>realize he is talking about C++11
The more things change, the more they stay the same, huh

What Lang?

It follows the teach yourself by hacking things together approach. And when you run in to a problem, somebody has probably already had that problem before so just look for that answer elsewhere style of documentation.

Very modern.

>what is cross compilation

Attached: 1547998446687.png (882x1025, 246K)

They still have to get C++11 right.
Likely never. Besides, no one cares.

Microsoft Java.

>It follows the teach yourself by hacking things together approach.
That's the most Unix-y thing ever, amaxing how they don't use muh Unix philosophy as a selling point.

en.cppreference.com/w/cpp/compiler_support

>Ctards discover generics
dev.to/graphicbeacon/ever-been-stumped-by-e-t-k-v-in-oo-language-documentation-4hg4

long long time

ehehe

What is the best C compiler on windows?

>It's well-known what you have to understand to be a junior level programmer

link pls

wow user, as a matter of fact I already graduated years ago with a meme non-STEM degree and I'm trying to switch careers before I become an alcoholic

Attached: thinking.jpg (881x356, 29K)

really makes one think

Attached: Capture.jpg (738x138, 21K)

This isn't even difficult to google at all.

>woman
>pajeet

Attached: 1543577043688.png (128x128, 14K)

>In other words if you see read it as "of Type", so List will be read as "List of String".
>Now looking at that let's say we define a List:
>List fruits = ['apple', 'orange', 'pineapple'];
>So why are particular letters used?
>Simplest answer is convention. In fact you can use any letters you like, achieving the same effect. However the common ones carry semantic meaning:
>T is meant to be a Type
>E is meant to be an Element (List: a list of Elements)

Shouldn't it be List then? he is mixing up elements and types.

heck
I had a script I wrote where you could post from the terminal, to any board/thread, and it had file upload support too
all it required was a terminal with sixel support
however, my laptop that I wrote it on died, and it's 404'd from where it was hosted
rbt.asia/g/thread/67636370/#67649511
would anybody be interested in this if I decided to re-write it?
it would be just disgusting as it was the first time because I haven't improved any

Either works. I've seen T used for both containers and other generics, while I've only seen E with containers.

kinda wanna die desu haha

programming newfig with a brainlet question, how does one stop a running loop when a certain key is pressed? i've searched for half an hour and the only applicable thing that came up was putting the loop in its own thread while the main one listens for the key, but that seems really overkill.

if you don't care about which key specifically, just catch the signal/exception thrown when CTRL+C is pressed/SIGTERM is received

Me too. This is a small sample of the kind of bullshit code I have to work with.
if (!thing.mShowHelp) {
thing.dontShowHelp();
}

It seems programming jobs mostly just boil down to "please maintain this horrible mess, made by some idiot who thought he was really clever". I want to just say fuck it and stack boxes or some other shit.

> The format and format_to functions show much better performance than the other methods. The format function that constructs std::string is even 30% faster than the system's version of sprintf that uses stack-allocated char buffer. format_to with a stack-allocated buffer is ~60% faster than sprintf.

CNILES BTFO

The power of compile time computation.

ugh
nim just isn't for me, but it's still nicer to write than go
but go has such a larger ecosystem, and they've got cross platform builds I think
crystal really needs to hurry the fuck up with 1.0 and a windows release

>optimizing insignificant bullshit
Yeah, CNILES truely BTFO

oh my cope

>I want to just say fuck it and stack boxes or some other shit.
Same, I'm planning on quitting programming and moving to something simpler after I finish paying mortage and have some savings.

Yeah, I know it may seem like I am being ironic, but man am I coping so damned hard. How I just WISH I wasn't missing out on such amazing 60% string formatting performance. My life would be so much better. Cope cope cope, that's all I do. Wow, you got me. You got me GOOD! 2019 and I'm still coping.

worst of all is that I personally am not one of those idiots that only got into this for muh money, but because of actual interest. Then you finally get a job and see the horror that awaits you until retirement. No fucking thanks

You should find a junior programmer to delegate the shit work to.
Then you can be the one creating horrible messes and leaving them for others to maintain.

Or I can use nim, which has had modules all along, with more powerful metaprogramming tools and cleaner syntax.

Attached: megunim4.jpg (800x1132, 113K)

>Using an unstandardized language
Your code is meaningless.

>unstandardized
does giving ISO a bunch of money to buy a piece of paper means that much to you?

use wsl

but I can't force wsl on everyone I distribute my program to

Without a specification it is impossible to determine compiler correctness.

Attached: Unbenannt.jpg (1773x936, 181K)

Me 2 but I'd like to keep it as a hobby or really lax freelancing not like this.

I don't want to spend 8 hours a day programming with undefined requisites that keep changing every day.
I don't want to deal with other people's code. The other day I opened a file with 4 functions, each had around 2000 lines of undocumented messy code written by 'the best' and most experienced programmer of the team.

I would like to learn how to make old school games, especially shooters. Doed anyone know good resources for it?

...

let car = CarFactory::new()
.with_color(Colors::BlUE)
.with_speed(Kph::from(220))
.with_wheels(4);
.with_transmission(Trans::auto)
.build()?;

tasvideos.org/

Oh, thanks

>but it became unwieldy

Become a consultant. It's a lot of fun, you get paid to berate wagies in front of their bosses and call out their shitty design decisions.
Best of all, you don't actually need much technical skill, just dress well and speak confidently to impress middle and upper management.

Car car = {
.color = BLUE,
.speed = 220_KPH,
.wheels = 4,
.transmission = AUTO,
};

You can have a spec without ISO sticking their fingers in it.