/dpt/ - Daily Programming Thread

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

Attached: hidamari_dpt_waifu2x_traps.png (1618x1308, 1.95M)

Other urls found in this thread:

github.com/topics/python
youtu.be/M_tMD5bTbLM
gist.github.com/DavidBuchanan314/b9230fe7d335a1caf90483dbb00a5375
github.com/orangeduck/Cello
en.wikipedia.org/wiki/Magic_SysRq_key
files.catbox.moe/ainamh.pgm
twitter.com/NSFWRedditVideo

--- OFFICIAL /dpt/ LANGUAGE RANKING GUIDE ---

>Server scripting
Python
>Server programming
Go
>Desktop applications
TypeScript + Electron

Prove me wrong

Attached: aa0.jpg (1280x720, 48K)

Making an SDL2 game in C, any tips?

Gonna start looking at app development with Kotlin now. Wish me luck boyos

Lisp is the most powerful programming language.

Ditch SDL2 and go for "raw" native windowing system libraries. It's what all of the cool programmers do.

Whenever students ask me about learning C

I tell them, don't just start out to "learn C"
instead, find a problem that interests you
and try to solve it using haskell

I know this is bait but I'm still really upset.

Attached: 1496121488553.jpg (1280x720, 82K)

Not bait. those languages are the best for those tasks, and you can't prove otherwise

Godspeed, fellow Kotlinite. It's quite a pretty language. Just don't go crazy with them it?.also{ it?.run{ x ?: return}}'s. It'll seem cute at the time but not so much when you have to review it or step through it.

based

thanks bro, I'll remember your advice.

So why exactly are you running interpreted scripts server-side, anyway?

What the fuck is this foo(wtf) you keep posting?

...

I think what he means to say is that there are a lot of applications you may want to construct but also have no reason to pull out the big guns, and Python often fits the bill.

...

That's not me.

>implying Jow Forums isn't one person

Well you just responded to me and I didn't write your post so there's at least more than 1 person.

working on a platform for IPFS uploads, written in go. tryna basically make a better version of mega.nz. Gonna be a failed startup someday, maybe I'll make a meme-tier medium blog about it.

What would you use instead?

>mega.nz.
in my book, there are really only three/four languages: python, haskell, go, and assembly. most other shit is just halfway bullshit

Erlang/Elixir is much better than Go for server programming. It is fault tolerant and allows hotswapping.

ignore the >mega.nz on this post

how do I know that Jow Forums isn't just me and some other guy, and that other guy is really determined to annoy the fuck out of me by posting nothing but anime

>IPFS
>startup
you've failed from day -1 because your idea makes absolutely no economic sense.
You would offload your storage to the entire swarm, but the entire swarm would have free access to all of the files. You could only make money as an IPFS connected storage node that people can upload anything to, which the developers of IPFS have already accounted for, so you'd be doing... nothing?

having said that feel free to open source it so that I can steal the design to build a scalable [anything] in IPFS.

Trying to put together a quick local website for producing a a chain of regex and less-linear scripted logics for converting one string to another. Mostly to semi-automate a bunch ad hoc of "create Unit Test scaffold from Code" and "create explicit SQL query/ hash lookup/ whatever from data set" from a data set and things like that. Plain regex has been getting me 80%, but I've been running into to many dependent clauses and I think I can construct a set of rules that will get me closer to 97% there easy enough.

erlang is badass I retract my earlier statement

I'll never understand how someone can lurk Jow Forums for years and years and legitimately dislike anime.

Attached: 1419998965117.jpg (510x518, 96K)

but you do know

Attached: 1530617577816.gif (754x371, 2.14M)

Maybe it is

Attached: 1521413903973.png (752x1063, 688K)

you don't understand what I'm building but it's not that

Imagine falling for bait this easily

>IPFS
>mega.nz
gee I wonder what it could possibly be?

ActionScript, MSWLogo and Cinnameg

Attached: 12415125.jpg (800x800, 134K)

Do you already have experience with 3D rendering? If so, there's literally no difference between this and your previous work, except basic game design shit, which I'm assuming you know given you're designing a game.

>imagine falling for the bait bait.

Imagine falling for the falling for the bait bait bait

imagine falling for the bait^n bait

Imagine being a gay nigger

No, but seriously, what does it mean? I googled a list of C++20 features and none them look very much like what people are posting. Which is all the more concerning.

Like is some kind of templating being hijacked in some fucked up way or am I missing one of the major features that justifies this yet-more-syntax-bloat?

I've been posting here from anywhere between 2012-2015. It's not that I don't like anime, I specifically don't like weeaboo culture.
I'm fine with anime. If it's dubbed, it's one of the things I put in the background. But full grown adults watching anime like it's the center of their lives make me feel disgusted

Attached: weebs.png (500x667, 444K)

Class template parameters. You can now pass in constexpr classes as non-type template parameters.

>dubbed
Disgusting. Get out.

>If it's dubbed, it's one of the things I put in the background

Attached: madoka.jpg (680x680, 82K)

bunch of reasons. look at tensorflow, ansible, certbot, docker-compose, salt, supervisord
Found that all just by looking at

github.com/topics/python

Because almost all anime is terrible and being around people who like it only makes the anime seem worse? You know, now that I think of it among all the boards I go to only 2 buy into the whole Moeblob animushit thing, one is /v/-related and you can see how those guys got Stockholm syndrome'd, but Jow Forums being anime-obsessed, I'll never get.

>people enjoying a hobby disgusts me
Normalfag detected.

>Watching dubbed anime
Imagine doing this to yourself

>but Jow Forums being anime-obsessed, I'll never get.
Perhaps you should leave

There are good dubs
citation: youtu.be/M_tMD5bTbLM

people (kero the wolf) have "fucking dead roadkill" as their hobby.
doesn't mean you shouldn't be disgusted

Nah?

thats pretty disgusting

That's a fetish.

99.99% of dubs are ear screeching trash.
Japanese voices and language is just far better to listen to.
Even if the show does have decent subs, the original Japanese voiceover will always, with no exception, be far superior to listen to.
>inb4 but muh subs!
Learn Japanese or stop being an ironic weeb

>He browses a website that disgusts him
Why?

based

How long until C++ finally comes out of the closet and admits it really just wants to be an interpreted language, and this whole "compiling" thing has just been a phase?

nice desu. Remember, avoid mutable variables. Also, nullable types should be used sparingly, only in cases where there truly is a reason for something to be returning "nothing" as a status indicator. Kotlin is a beautiful and very effective language, godspeed.

>mfw he has finally figured me out, but I know he's never going to leave

Attached: tumblr_pbg3mbY6cu1xz9074o7_400.jpg (333x333, 27K)

gist.github.com/DavidBuchanan314/b9230fe7d335a1caf90483dbb00a5375

Someone try compiling this and post image.
>tfw ramlet

>How long until C++ finally comes out of the closet and admits it really just wants to be an interpreted language, and this whole "compiling" thing has just been a phase?
C++ has never in any way wanted to be an interpreted language.
It's always emphasized zero cost abstractions which pretty much requires compilation.

presumably when people are saying "best programming language for x context", they mean for you to personally use that language to produce a program to accomplish some task that needs doing.
Tensorflow aside I don't think any of those have anything to do with python scripts that you write yourself.

I'm too dumb to check if this is trying to erase my C drive or something.

it's just math. writing to stdout can't execute anything.

That's where you're wrong

took about 30 seconds on my T410s with 8GB. Output file is about 4K but it has a bunch of invalid characters. Pretty cool though.

no other place on the internet has a large community and my cynical humor

Attached: The-Simpsons-Sr-Burns-Don't-Forget-You're-Here-Forever_thumb[3].jpg (606x406, 43K)

post proofs
>inb4 piping stdout to bash

Attached: 1494786151678.jpg (250x250, 15K)

but all C++ is anymore is a clusterfuck of templates, which are preprocessor directives. Since the C++ preprocessor is turing-complete, how much really is there at this point to draw the line between most C++ code, and an interpreted DSL?

Proved it yourself already

Seg faulted at about 5GB of ram used. I have like 16 or something..

Attached: Capture.png (564x96, 5K)

huehuehue

>which are preprocessor directives
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh no
>Since the C++ preprocessor is turing-complete, how much really is there at this point to draw the line between most C++ code, and an interpreted DSL?
The point of the """""""""""""""""""""""""""""""""""""""""""""""""""""""""""C++ preprocessor""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" (templates) is that it's specifically run at compile time.

Clang or GCC? Clang uses just ~6GiB on my machine but GCC shits itself way into 8GiB + swapping. Changing M4 to 5 or 6 causes even clang to fail.

The output is a PGM image, you have to redirect it to a file, not to terminal. Then convert to png to upload to Jow Forums.

Attached: out.png (64x64, 691)

>people just accidentally made entire server/cli/automation libraries using python
>that doesn't mean python is the best for scripting server/cli/automation libraries
No other language is more useful than python for server scripting.
Hell, python is used in a lot of other places other than server applications
Debian and Ubuntu preload python because their operating system contains tools using it (unattended-upgrade for example)

Aren't you supposed to use MSVC on Windows?

>this compile-time codegen isn't a language preprocessor
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuhhhh
>the point of templates is that they run at compile-time
so it's a language with the specific purpose of generating C++ code? there is a DOMAIN wherein the SPECIFIC purpose of a given LANGUAGE is to generate and generalize C++ code?

MSVC doesn't even have C support.

ooooh fuck that makes more sense, yeah the PNG came out right. That's really cool. I love me some good preprocessor tricks, and this might be the most impressive I've ever seen.

yes it does.
t. person who compiles and tests a simulated version of an operating system kernel written in pure C at work using MSVC

>>Desktop applications
>TypeScript + Electron
You know, all memes aside, why is Desktop application development so fucking shit? I guess I was spoiled because when I was a wide-eyed youth the whole world revolved around desktop programs and now most use-cases that aren't Photoshop or 3DStudio Max can't give half a shit to optimizing desktop performance because they have a web app that's "just as good" and a mobile app that they know is shit but rakes in the money anyway. But here I am sitting here looking at my options to write this graphically-intensive, non-video-game application and looking around. I look at C[++] and I shit that is 20 years out of date and all things modern are either DYI, proprietary, or bad open-source rip-offs of proprietary things. So I look to JVM-based and you got a choice of "15 years out of date" or "modern thing that's kind of good, oh, unless you want to optimize graphical performance for non-standard rendering techniques, then fuck you." And everything else is either pointing back to these two or just flat out don't give a shit.

And then I look at the GUI tools that web developers have access to. It's a fucking Babylon compared to what I have. You know, as long as you run it in the browser, sandboxed behind 10 layers of access-protection and 20 layers of interpretation and unoptimized JIT compilation degrading the performance

Just seems... so backwards to me.

>preprocessor tricks
github.com/orangeduck/Cello

Update: trying M6 on my ThinkPad. i5-560M with 8GiB of RAM. I'm posting on my phone because my computer is unusable at the moment. My mouse updates about every 30 seconds. Latest Linux kernel, latest GCC.

Move over plebs, I have 32GB of RAM.
Right now clang is using up 30GB of RAM with 26GB working memory, and is presumably constantly swapping in and out.

I need to come up with a programming project idea for my Java class. One thing I came up with was taking the Steam and Discord APIs and making making a program that combines them both. Anyone have any other ideas of similar complexity?

Attached: mHk9zGP.jpg (660x495, 73K)

Laptop is still easily usable.

Attached: Annotation 2018-11-13 234542.jpg (1815x820, 285K)

>my computer is unusable at the moment. My mouse updates about every 30 seconds
en.wikipedia.org/wiki/Magic_SysRq_key
But OOM killer should step in soon.

Nuklear or Imgui

Attached: 1538603877811.jpg (400x403, 107K)

stdout

gtk

Don't do this if you're not M

It finished but I can't convert the resulting PGM to a PNG. The setting was M6 and the result is a ~7KB file.

Attached: Annotation 2018-11-13 235435.jpg (804x423, 81K)

files.catbox.moe/ainamh.pgm
whatever you guys figure it out

Everything single languages was designed for a task. JavaScript, in the words of the creators (think it was Brandon rich), was designed to make a monkey on the screen dance. Overtime HTML, CSS, and JavaScript grew to extend beyond that. It wasn't making a monkey dance, but to provide a rich customer experience. EVERYONE goes on the internet, so a lot of money was spent on customer experience. The smartest people in the world spent a ton of man hours designing improvements to HTML5, CSS3, and ECMAScript 6. On top of that, you have user libraries that allows for easier ways of doing the same thing. Hence people started porting all of this to desktop applications and smart phones.
Closest thing you got to electron for C++ is GTK or QT. Prefer GTK because it has a friendlier license
If you need higher intensive calculations, vulkan is your guy
Realistically, I wouldn't recommend the clusterfuck known as GTK, and I sure as hell wouldn't recommend touching the WinAPI/X server mess. So if you can, just use electron. V8 is faster than you think

This is probably a Windows encoding issue. Can Windows even handle standard output as a binary stream?

Attached: 1438222456091.jpg (540x394, 100K)

Why are you not using a language created by a based Japanese man?

Attached: index.jpg (225x225, 5K)

elixir > ruby

Because i use a language who's entire ecosystem is a singke japanese man.

Attached: common_lisp_wallpaper__retina_with_original_svg__by_pocket7878-d9301iq.jpg (1131x707, 42K)

you were right, pipe doesn't handle binary streams by default for some reason
$enc = [system.Text.Encoding]::ASCII
$str = .\a.exe
$enc.GetBytes($str) | Set-Content out.pgm -Encoding Byte

Attached: out.png (64x64, 878)