/dpt/ - Daily Programming Thread

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

Attached: 1554206042457.png (1702x2471, 599K)

Other urls found in this thread:

en.wikipedia.org/wiki/Rust_(fungus)
youtu.be/KU6UFcbJcyQ
nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html
github.com/datenwolf/linmath.h/blob/master/linmath.h#L368
twitter.com/SFWRedditImages

why are rust trannies so obsessed with C?

C is the big man in town so everyone attacks it. Forth and Ada forums are the same way, always making easy comparisons to C.

>C is the big man in town
so C is LITERALLY the patriarchy?

I'm gonna use rust

For you all .NET users is there a point of using that shitty Controller Model View Layout garbage instead of just using C# as the REST backend and doing the site frontend completly separated

...

post yer code

Attached: scrot.png (920x820, 209K)

Attached: file.png (723x482, 149K)

font and palette thanks

Dead thread with people still learning php in 2019 and every third post is how do i learn html css js

>not checking the return value of malloc
You should stop using C/C++. Try JavaScript of Python.

>still learning php in 2019
clueless retard that doesn't know how powerful PHP 7 is
lmfao

Sup, /dpt/.
What's your preferred way of writing down personal documentation or project notes?

I need something to improve my note-taking workflow. I want the format to easily be edited as plain text (or have cross-platform support for the editor) and synced across devices without pain.
The best I can come up with is "a bunch of markdown files in a folder".
Is there anything better out there for me?

Attached: 1280px-Markdown-mark.svg.png (1280x788, 11K)

No point learning a language that is 100% web oriented when you can learn others that will do the backend job as good as PHP AND allow you to write a bunch of other things like C#,Java etc.

just use plain text document

Attached: 3.jpg (580x672, 64K)

org-mode for 90% of stuff, using readthedocs theme with export to HTML
mdoc for manpages
HTML
markdown never ever ever

>Razor
Cringe

Attached: 1544523438452.png (1132x632, 1.01M)

MVC is so fucking retarded
I'm so happy I won't have to deal with that crap ever again

Attached: scrit.png (3840x1080, 2.54M)

impressive waste of screen estate

I fucking hate it too, if i say to my boss that i wont use this shit and instead just make the frontend in React or something will he get mad at me

If it helps the second monitor isn't event pointed towards me.

no I mean how your editor is actually like 70% code and the rest is clutter

it's not pointed towards you?
do you get up and walk around and watch YT at those times?

What do you need the cwd temp for?
Why are you using some random path library instead of std::filesystem?
Why are you using some random threading library instead of std::thread?
Why are you using a static function and passing the data as a shitty void pointer instead of just using a lambda?

oh user that's nothing

Attached: 5.jpg (1253x726, 130K)

MVC is fine when you keep it simple
its shit when you start overblowing and go full MVC autism
M V C is a perfectly reasonable separation of concern.
everything else should be FP

error("too many levels of indentation").
nothing to do but pull a fire alarm and flee the building.
leave your computer behind. it's tainted anyway.

>What do you need the cwd temp for?
I don't
>Why are you using some random path library instead of std::filesystem?
Not targeting c++17 yet
>Why are you using some random threading library instead of std::thread?
SDL_Thread is just so I can try and get a windows compatible thread.
>Why are you using a static function and passing the data as a shitty void pointer instead of just using a lambda?
Because the documentation shows it like this

Attached: image.webm (1152x648, 2.81M)

>Using an OS that doesn't have overcommit

No it's just turned off. Youtube autoplaying on it.

>too many levels of indentation
no such thing

Thanks by the way. Going to switch to stl and ditch libs. I am coming back to this project after a few weeks.

>using indentation at all
wew

how do I use python then

>inb4 you dont

you dont

why are retards so obsessed with rust trannies?

ever heard of CockroachDB?
it's a time-series database with... I don't know what technical advantages.
you'll only ever hear of it on hacker news, where reliably this conversation happens:
a: this is a stupid fucking name
b: you should only care about the technology! actually the name is good because it caught your attention! if it's the best tool for the job you should use it even if it revolts you!
the very last thing the CockroachDB devs can complain about is that "retards keep talking about the name". They asked for it. Steve Klabnik asked for similar controversies with Rust, over and over again. The dining philosophers example is still all Marxists, isn't it? Support, oppose it, but at the very least don't whinge about the controversy even existed.

Attached: file.png (1268x839, 59K)

sorry man, i really don't care about the ideological bullshit you bring into programming languages

>Forth and Ada forums are the same way, always making easy comparisons to C.
I don't know about Forth, but I really don't see Ada users complain about C. Maybe they did a decade ago, but now it's pretty dry.

>the ideological bullshit you bring
the people saying "this is a stupid fucking name" aren't bringing any name-ological bullshit into time series databsaes. CockroachDB brought it. Likewise, Steve Klabnik brought the ideological bullshit into Rust. If you want to complain, complain to him. If you don't care about ideological bullshit, then don't complain to him. But don't complain that other people care.

Are you the Jow Forums poster from yesterday who went ape shit over someone calling Rust bad?

no

so you are
dilate and kys
rust isnt even safe

unsafe {
call_c_function("Rust is safe");
}

retard

>complain to him
Didn't he quit Rust when he heard he wasn't paid as much as other people at Mozilla? Does he still hold a similar role?

He's still #15 for commits.
>being so beta you continue to help the company and language who outs you instead of starting your own lang

take your meds
there is more than 1 poster on this shitty website

what's open source?

no there isn't, user
it's only (You) and me on here

Attached: 1543101921955.jpg (349x199, 16K)

>starting your own lang
I don't think its realistic to expect a lone programmer to write a language with the features rust has. Presumably he likes those.

unsustainable and ungrateful job that won't pay your bills?

I hope you down think uniqueness types are exclusive to rust.
But a lot of languages were started by single person fed up with whatever.

>running tests at work
>Every fucking repository has its own docker image and container shit
>Spent half an hour getting one test to pass
More like cocker. Fucking hell.

don't*

something you use server-side and/or put on your resume

exactly

rust is cute
proof:

cute crab

Why would you think I think that's an obstacle? And its not about what exists in other languages and what doesn't it's about the amount of effort to implement something.

docker is literally cockblocking you

>viper
My ni-
>T90
Why did you even apply?

When's sepples getting a cute mascot? I want a plush

it already has bjarne

I think Rust is such an odd name for a security and reliability oriented language. I can't think of anything that should be called Rust as a brand name.
Is this what was rambling about?

Attached: a1c394280f0797da290728db5c8616e6.jpg (640x449, 99K)

where do I get a plush of Bjarne tho?

here you go m8

Attached: mitty_plushie_by_hoppip_dcfy7yb-pre.jpg (1192x670, 105K)

I vote for this. Comes in various levels of disfigurement.

Attached: cat.png (200x209, 34K)

If you ever watch the talks, a lot of them also bring up en.wikipedia.org/wiki/Rust_(fungus)
the whole community is so odd

I have a script that runs the tests and then sends a notification to my phone. I just lay on the nearby sofa until they all finish.

>the whole community is so odd
What do you expect when most of your userbase is pretending to be women?

Hi, a mathlet /ic/, here.

I'd like to learn how to render "perspective" in python with lines. Basically, drawing lines that'd look something like youtu.be/KU6UFcbJcyQ but being able to change it "dynamically" with changing vanishing points or generating more complex grids or rotating etc. I'm from an ESL family and just artist so I can't explain it any better. I'm also looking for something that wouldn't be too complex to understand as programming is my side hobby to art and art's probably as time consuming as computers (or even more as we're expected to sketch 24/7).

Attached: crab.jpg (275x183, 10K)

That mangaka really loves horribly mutated loli and loli suffering in general.

Sup /dpt/. I've been recently working in the transcription of a code I have from Python to C++ with to sole purpose of learning.

I want to use some functions declared on a C header, so I included said header under
extern "C"{
#include header.h
}

However, when compiling I get the an "undefined reference to function" error.

Where am I messing up?

Attached: sum stuff.png (345x222, 8K)

Attached: 1565296071044.jpg (847x1024, 86K)

Attached: 1535441286915.png (1200x675, 988K)

Have you tried Matplotlib?
This might help you:
nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html

Awe. I'm reading into that, but what about generating stuff like in my picture? I guess I'd need to know some underlying mathematics for that, right?

Attached: 6ebaeab9.jpg (760x570, 35K)

Yes, that's just mostly math, not programming, you're looking into matrices and projection.

dude if you dont even know enough linear algebra to solve that problem yourself I got very bad news for you..

perspective matrix multiplied by 3d vectors of verticies.

>edit .cpp file
>program recompiles quickly

>edit .h file
>takes forever to recompile

Attached: that feel.png (645x773, 5K)

>lmao let's just include everything in everything, what can go wrong?

.cpp affects one object
.h can possibly affect all objects depending on what refers to it.

Headers are the worst shit ever invented.
garbage like defs.h or defines.h

Is there any easy way to learn that or a cheat sheet how to use projection and matrices?

>dude if you dont even know enough linear algebra
I can safely say that I don't I know it at all, but I'm willing to learn the required minimum.

Are you compiling the C functions yourself?

amazing that people still use module-less languages in the current year

Can we just kill all the fucking trannies already?

Use a library. github.com/datenwolf/linmath.h/blob/master/linmath.h#L368

can't we just send all the poltards back to t_d already?

and all the trannies and sjws back to r.eddit and lgbtq already?

Know what sucks about c--? The documentation. For instant how do I look up a default value to use with std::error_code

Can we all just hold dicks and program for a little while and discuss programming.

cppreference