/dpt/ - Daily Programming Thread

old thread: What are you working on, Sup Forums?

Other urls found in this thread:

akaribbs.mooo.com/
youtube.com/watch?v=xF0-LGoXtaw
piston.rs/
reddit.com/r/rust_gamedev
twitter.com/NSFWRedditImage

>muh data structures
>muh algorithms

Designing a simulation for bacteria* evolution

*not meant to represent real-world bacteria

Also great pic

LOVE THIS MEME

>muh datatypes

I'm slowly recreating Sup Forums in C!
akaribbs.mooo.com/

My new host VPS doesn't seem to support the clock() function.

what's your excuse for being in /dpt/ right now

putting off going to sleep
Have to wake up at like 8 to buy my girlfriend a calculator for her test at 9:30.

>haskell

>Also, what the fuck am I supposed to do about that one user who keeps asking where his "mummy" (you) is?

He'll stop eventually. I hope.

Source code when senpai?

I made the mistake of signing up for an online C++ class.

>java

kuk

CGI is cool.

The worst it can happen is that people start singing. youtube.com/watch?v=xF0-LGoXtaw

If it's online, that means the class is supposed to be bullshit.
Take a chill pill. You're not going to be mallocing and freeing while dynamically passing function pointers to pthreads.

Worst case scenario, you're a fuckup that doesn't understand how pointers and references work.

cringe

Mostly boredom.

who /learning c++/ here?

on vectors right now. this is truly an amazing language

>You're not going to be mallocing and freeing while dynamically passing function pointers to pthreads.
Of course not. You're not supposed to use malloc or free in C++, and you use STL threads instead of pthread.

Creating an algorithmic trading platform in the world's best language: Rust.

Just wanted to take a moment to share this truly beautiful piece of autogenerated LLVM-IR representing one particularly well-nested type.

What language are you doing this in?
Are you using genetic algorithms?

Rust is better in every way

That looks like C++ error messages.

...

>who /learning c++/ here?
Yep, I've been using C++ Primer Plus book and everything is okay so far.

But I don't have much time to read it during the day because of OOP Database bullshit from uni.

he's saying it's better at being a shit language

is a vector that holds another vector the same as a 2 dimensional array?

C-fags and their stupid allocation schemes on suicide watch.

A vector of vectors will be "jagged".

The only thing I'm having trouble with is the installation of the IDE's, etc.
Netbeans Compiler and Visual Studio Express are all that's at the school for major tests.

I'm gonna go to bed and wake up tomorrow, cause I think all this shit isn't processing in my brain right now.

I'm writing js right now, ask your questions.

Compiles to LLVM, enforces compile-time safety checks, zero-cost abstractions, actively developed language

It simply can't be beat.

How did you become a faggot?

if you cant even get your IDE up and running then might as well shit yourself and call me scotty

Easily

Upvoted

Can you guys please take the "meme language kys" shitposter back?

Learn Rust

>English
meme language

Instead you get to use new and delete and delete[], and std::thread which is more or less the same bullshit as pthreads with the added convenience of all that in the mutex library.

who /ai/ here?

Some naked faggots are running around killing each other with sticks and stones. Shitty game 0/10

I nest my shit like nobody's business

It wouldn't be a shit game if it was written in Rust

are there even any game engines written in Rust?

DELETE THIS

piston.rs/
reddit.com/r/rust_gamedev

am i using pointers right?

int a = 5;
int* b = &a;
cout

>one literally nobody has heard about
>link to reddit

captcha is FAGET

>Instead you get to use new and delete and delete[]

Nah, "modern" C++ doesn't even involve new and delete.

I really can't muster any interest in modern C++. It's too hideous, *wildly* too complex[1], and all of the foot-shooting-avoidance is now about following some heuristics to make sure your reference-counting wrappers are done correctly.

[1] C++ seems to take the stance that unlimited cognitive load should be placed on the programmer in the name of eeking some tiny fractional improvement in run time. Personally, I've hardly ever run into any meaningful performance problem in the software I've written, and I've seen far too many software engineers focus on idealized performance long before even the most rudimentary prototype was in place. Gimme some of that syntactic sugar, baby.

Reddit's where the serious programmers go to hang out.

I guess
If it doesn't print 5 try

>can't even make a minimum wage tier burger flipping robot
>""""AI""""

Yes. Not usefully, but correctly.

>Reddit's where the serious programmers go to hang out.

/r/programming is the only place I've been that's *more* toxic than Sup Forums. It's really kind of amazing. It's like a microcosm of why the industry sucks so much.

>Ask a question
>Butthurt when it's answered

captcha is FUCKO

>implying i asked the question
>implying you are not a faggot
captcha is 105

thats what im doing and yes it does

that was easy as fuck, i dont understand the confusion with pointers for some people

Fuck /r/programming

/r/rust is where it's at

also hackernews is out there; that's where the actual professionals go to have conversations.

Hackernews > Reddit > fagchan

That's why you should use Rust instead.

and force even more people out of jobs? eventually AI will weed out all the retards tho

This guy know's what's up

See, this is what I'm talking about.

I meant the compilers, not the IDEs.

IDE's are fine, fuck.

>also hackernews is out there; that's where the actual professionals go to have conversations.

Eh. It's where all the Bay Area try-hards in hopes of impressing GP's hordes of YC sycophants.

For every one person on HN, there are probably 50 - 100 very capable career software engineers working on "old, boring" technology at unsexy companies where they produce real-world value.

It's honestly exactly what user wants. Yes, it sacrifices a TINY bit of performance potential, but also opens up new optimizations while significantly decreasing cognitive load.

If only it had dependent types with an SMT solver. Wink, wink.

what are you even using AI for and why are you calling it AI instead of big data or computer vision or someshit

Does Rust have some bunch of jackoffs in a "committee" prioritizing legacy compilation over improved productivity, like C++ has?

Goddamn, fucking Stroustrup and his, "oh you can do it any way you want! Except the one way you want, you can't do that! I'm obsessed with iterators, aren't you?" bullshit.

Oh, and you want a language spec? That will be $25. Fucking C++.

Alright, you cunts, you convinced me to *look at* Rust. Not saying I'm going to actually start using it, because WTF, I'm going to join the hordes of hipster shitheads raking in $100k for fiddling with butthole-easy Javascript.

I mean, the language's only been out for a year now... C++ probably wasn't used for any game engines for a few years too

im making Cortana's secret lesbian friend for my gentoo

This is acceptable.

>learning an impure language
When will bakanon learn?

Babies first sprite based 2D game in C#, what is the current lib of choice?

DirectDraw (does it still exist?), SDL, Unity?

Linearity and affinity make mutation pure, and all notable side effects can be boiled down to (specified by) mutation.

>all notable side effects can be boiled down to (specified by) mutation
non determinism

Such as? PRNGs fall under mutation.

it was all just a meme, they said

And things like reading from /dev/random can use a linear "world" object, threading it through in much the same way that IO works in Haskell.

So I guess it wouldn't be an impure language, but "pure" doesn't have to mean the restrictions of Haskell, which is my point.

>restrictions of Haskell

Immutability.

first for APL

>restriction

>not using a pure object oriented language that foregos the use of "primative" types and uses message passing for all actions

>message passing
>not a side effect

just because you pass explicit state as a function parameter doesn't mean you don't have state and effects

it does though

kill yourself

i get it, you don't understand

You said we should be using a pure language. You didn't say in what way it should be pure. Ruby's pure object orientation is much nicer than Haskell's pure functional approach.

You're right, I didn't say programming language either! What a funny fucking reply!

...

>everything is an object

A class that renders JavaScript (X) with reactjs.net for my C# networking library, that way I can send html directly from my back end with components that contain data directly from my database. Server side rendering seems like the way to go to get the best results from seo without PHP.

It all ends out as under 10 lines of C# code and the JavaScript is virtually all copied and pasted from preexisting code which was appended with jQuery in an Ajax callback. Now I'm directing nginx straight to the service for that location.

There's no WDG so I'll post here.

you're delusional

>methods are properties of objects

why doesnt this work? trying to capitlize strings in a vector

for (auto i : strings)
strings[i] = toupper(strings[i]);

Nice buzzword salad meme.

for (auto& str : strings)
str = toupper(str);


ranged for loops do not give you an index

i think i have to use a normal for loop because i need to go to each character and upper case it