/dpt/ - Daily Programming Thread

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

Attached: 1555920674681.jpg (1539x1123, 1.88M)

Other urls found in this thread:

open.spotify.com/artist/3xWktqKQxBAu4LXqLufJwW?si=elVhvzEOSDy40v8abtRexA
en.wikipedia.org/wiki/Abel–Ruffini_theorem
en.wikipedia.org/wiki/Root-finding_algorithm#Finding_roots_of_polynomials
psychocod3r.wordpress.com/2019/04/20/writing-an-emulator-for-the-mix-architecture/
github.com/Microsoft/BosqueLanguage
tutorial.math.lamar.edu/Classes/Alg/FindingZeroesOfPolynomials.aspx
freemusicarchive.org/file/zips/
archive.rebeccablacktech.com/g/search/tripcode/!!FrQCaIaTfJw/
twitter.com/NSFWRedditVideo

The people who complain about C++ in these threads have never written software that anyone cares about.

lisp is the best programming language

You have a rpi, right user?

Attached: Pic-2019-04-22--13_14_37.png (1920x1080, 2.65M)

im building a new srartup in html..
but somehow the for loop dont work

I fervently hate C++ and I've written software that has many users. Given the nature of open source distribution works, I can't accurately say how many, but it's packaged by at least Arch, Debian and Fedora; probably a few others too
I'm not going to say what it is though, as that comes off as too arrogant.

I build software that I care about, user. Isn't that enough?

Nobody cares about your gay little Debian package, user.

Name or didn't happen

My dad can beat up your dad.

Fucking around with docker containers desu
also while we discuss, post some musix you listen to while programming or doing anything tech related.

open.spotify.com/artist/3xWktqKQxBAu4LXqLufJwW?si=elVhvzEOSDy40v8abtRexA

nobody here has written software people care about
reimu is a good choice for the OP

Wanna learn JavaScript with me?

Attached: ec466024995b4b03a14468ed634b354b.jpg (736x1104, 64K)

>Wanna stab yourself in the foot with me?

No, thanks.

>>why OOP sucks
>>every single week
OO is awesome though not because of programming language theory or novel features but rather what you can do with it and how easy you can pull it off. almost everything else is barely maintainable and focuses on everything but the usability and end result of why would anyone use a programming language (hint: not admiration or jerking off).
If those langs want to prove they are actually useful and not just talk, they can start by having decent tools and good libraries for every purpose. They can't though (and they won't) because all they can do is be the pajeets of programming languages that can't do their jobs well and shit on everything except where they should, the loo.

Attached: consider the following.jpg (600x400, 50K)

Silly user. JavaScript rocks!

Attached: 30624651111_a208332080_h.jpg (1068x1600, 142K)

It's clear by reading your post that you have no idea what you are talking about.

It's also painfully obvious you are too retarded to use Google if you unironically think other languages don't have libraries for different purposes.

OOP wouldn't suck this much if the industry wasn't so retarded. The industry tries to force everyone to conform their brain to one paradigm when there are others that would fix some problems way better than OOP ever would. This is turning our generation of programmers into codemonkeys that are literally too stupid to understand anything else than OOP.

Trying to argue the contrary will only prove that I am right and that you cannot think of problems in any other way than OOP. In that case you are fucked, or you need to explore other programming paradigms to understand what I'm saying here. Not that you care.

Attached: business-man-with-noose.jpg (1300x951, 103K)

>It's clear by reading your post that you have no idea what you are talking about.
>The industry tries to force everyone to conform their brain to one paradigm
I am sorry your retarded. The industry is so full of different shit but you cannot blame it for not being to your liking (because everything you like is shit even by industry standards).

General programming question as applied to C++:
When one has the choice between providing a callback function and a function object, could one use a function object as a closure?

I'm writing a simple console command thingy, and it occurred to me that function objects might have more flexibility than callback functions if you want a command to execute at a later time with the present state.

>tfw people asking how to donate to my project

Attached: 1551028400461.jpg (750x866, 427K)

dumb frogposter

It's not about the industry being to my liking you moron, it's that the industry system is inherently flawed when it comes to paradigms. When you have an industry that boils down to "we use OOP because that's what everyone uses and you will keep using it", you know it's internally fucked.

But continue dodging the point, it's amusing.

But urho3d isn't made in lisp

Your abuse of terminology makes it impossible to tell what the hell you're actually talking about.
But whatever it is you're trying to do you probably want to use std::functions.

yes & lambdas do this

Excellent OP image but would've been miles better if it was Marisa instead

Attached: 1493581876870.png (1280x960, 283K)

(i'm assuming you mean what C++ calls a functor, a class with an operator())

Why is she so perfect?

Attached: 1550867279071.png (800x998, 372K)

>"we use OOP because that's what everyone uses and you will keep using it"
but that is just what you want to believe, deluded undergrad.

found the PHP developers

because they have an artisan taste?

You cannot justify OOP in 75% of cases it's brought up yet the industry will force you to do so.

You literally cannot explain the popularity of Java and OOP other than a self-perpetuating cycle of popularity, because if you get down to it, you know that OOP is not appropriate for a large number of problems. You only think it's okay, because that's the only way you every thought about problems.

Simple yet appealing design
Colorscheme is compatible with 16 color terminal
Sticks to the Unix philosophy

bad management is a big part of it
because they're mentally ill retards without taste

Attached: 1550314843063.jpg (500x707, 60K)

What's the best way to find all rational roots of a polynomial equation?

Attached: __hakurei_reimu_touhou_drawn_by_yutaka_saki_shu__sample-81270decb1cdb5f96306380ef99dfcac.jpg (850x1096, 194K)

Approximation:
Newton
Formal:
Galois

en.wikipedia.org/wiki/Abel–Ruffini_theorem
en.wikipedia.org/wiki/Root-finding_algorithm#Finding_roots_of_polynomials

Or maybe you can convert your polynomial to a polynomial over Z (by replacing X by n*X with n an integer). And by iterating over integers to find a solution of your new polynomial (zeros of a polynomial are bound).

>You cannot justify OOP in 75% of cases it's brought up
no, you don't want to believe the justification. it works fine for everything and the tools are great. having syntax that compacts 100 lines into dozen obfuscated lines or that isn't understood by half the team isn't good justification to use something else. the industry is doing great to keep itself from falling.

sweet jizzus shit, that's like... everything. I hereby apologize for my terminology misuse/abuse, but that's the thing(s) I was picturing.

Bless.

Basically, I have a weak C background and I'm trying to make some non-horrible code for an interactive command line where at some point in the future, I'm not the only person writing functions for the various commands.

I think what thou hath sayeth hits the spot(s).

if you want to take a function as a parameter, use a template
if you want to pass a function, use a lambda
if you want to store a function, use std::function

ofc this specific example would be dumb compared to &fun
[](int x) { return fun(x) }

>It works fine for everything

Yeah, I was right the first time. You are a moron.

It's not because you don't understand a syntax that nobody else can. The world doesn't revolve around you.

>I'm the smartest dude in the world and I can back that claim up, b-but I won't b-because...
please

>the entire industry is using something I don't like therefore they are all morons(no, not me! everyone else!)
>it is not like nobody uses non-OO crap because they don't want to learn a few dozen operators or every possible quirk with the language and its limp tools
Also, I never claimed 'nobody' can understand it but most functional langs are obscure anyways.
I don't understand why you had to switch to reddit spacing though but I am guessing it is to accommodate your autism.

>OO is awesome
>Everything else is unmaintainable
Is OOP more maintainable than procedural programming? Give me a single argument.

>most functional langs are obscure anyways

Attached: brainlettttt.jpg (800x450, 44K)

Not the guy you replied to, but still..

OOP is not "better" or anything like that than functional programming. However it helps to work on context sensitive data since the Functions (class methods) have a more direct association to the actual data, which makes it often better to understand the relationship between the algorithm and the data.

But functional programming has also its advantages for example better scalability in multithreading scenarios.

This: psychocod3r.wordpress.com/2019/04/20/writing-an-emulator-for-the-mix-architecture/

>Micro$oft releases a new language
>it's functional, nice
>it's typed, nice
>has typescript syntax, so it's easy for majority of people to use, nice
>it's written in typescript, oh no no no no..
>it runs on node.js, HA HA HA HA HAAAAAAAAAAAAAAAAAA

github.com/Microsoft/BosqueLanguage

it's retarded

Who summoned me?
It doesn't take a genius to realize C++ is bloated trash.

what a fine mix of COPING and SEETHING

this is a good post, though some of this is more about nominal typing than OOP in particular
the power gap between reimu and the vastly inferior marisa is so enormous that even yukari couldn't cross it

Procedural programming != Function programming
Procedural programming is basically how people programmed.

When it comes to functional programming I know almost nothing about it, but I usually hear more people talking about how great functional programming is than seeing anything done in it. Where are the video games written in a functional language?

I'm not going to post touhou OPs any more if you keep up this stupid roleplay.

Attached: 1527056827122.png (641x490, 306K)

How new are you, son?

functional programming is not very efficient

>seeing anything done in it
>where are the games
is there a single "argument" against FP other than "muh vidya"?

Attached: 1550928102268.png (318x318, 133K)

Rational Root Theorem. tutorial.math.lamar.edu/Classes/Alg/FindingZeroesOfPolynomials.aspx

Just factor the first and last coeficients, and try ± all possible ratios (primes and composits).

>Havent written anything that works or have felt confident in even opening up the text editor in a week
how do i make it stop, its been going great since the start of the year but now im thinking of dropping out
>inb4 stupid frog poster

Attached: small pepe meme.png (251x201, 7K)

Kill yourself, you stupid frogposter. You don't inb4 your own posts, and why the fuck did you even post that reddit cancer if you knew you were going to be called out as reddit cancer?
That just adds a whole new level to your stupidity.

Attached: 1543088326562.jpg (168x58, 5K)

frenly frogposter

Attached: 1552646892374.png (1267x785, 97K)

BENIS :DDDDDDDDDDDDDD

PS: leg looking good, but i have no idea how to handle design le coxa joint. For now ill built a ros node around that pwm controller which i just coded

Attached: benis.webm (1280x720, 2.75M)

#rent free

just do it ;-)

>being this frustrated about frogs
people like you are half the reason to post frogs :^)

i do, but i cant solve the simplest things. Im using a graphic library for school that has been outdated and discarded for atleast 3-5+ years
Especially since its almost all self taught im having a hard time (and even though im a head of the rest of the whole class (yes my teacher mentioned this in a lab for some reason) Im still going to be behind soon since im aiming for a HD mark)
thanks for reading blog frens, good night

It's implemented in TypeScript... Which itself runs as JavaScript... NodeJS is a build (and maybe runtime) dependency... eww

That's probably just the prototyping phase, I'm more concerned about the language itself, looks hideous

>tripfagging as a waifu
holy fuck gas yourself please

> You don't inb4 your own posts
Why?

Debugging lazy ELF loading in my operating system. I just realized that my MMX-optimized memcpy() gets fucked because both kernel and userspace uses it but the MMX registers are not properly preserved across ring transitions.

Attached: Screenshot at 2019-04-22 16-50-49.png (1920x1080, 343K)

I need 10,000 songs from freemusicarchive.org, anyone here know a quick way? I know the directory where zipped albums are stored and tried wget -r -np -nH --cut-dirs=3 -R index.html -e robots=off -A zip freemusicarchive.org/file/zips/ but it just comes back with a 404

your selfu

>didnt even generate a novelty tripcode
0/100

>Micro$oft releases a new language
Why?

Attached: 1e5vlg.jpg (591x336, 26K)

it looks like it's just some dude's research project

To correct the shortcomings over other languages.

MS research has been doing this for years though?

>No pawprint patterns
Outdated Reimu

>But functional programming has also its advantages for example better scalability in multithreading scenarios.
I am sorry but this is utterly wrong. There are no fast functional programming langauges and that goes for single and multi thread/core/cpu scenarios.

>github.com/Microsoft/BosqueLanguage

Looks more like a TypeScript dialect than its own language.

Attached: wtf is this.jpg (540x750, 55K)

K sperg, ty for your opinion

There's literally no reason to do it, though, C/C++ have already covered all use cases

>C/C++ have already covered all use cases
I really, really want a /dpt/ - no boomers edition

I would learn javascript if it involved obtaining a living doll like from Rozen Maiden to help you learn it.

Attached: Suigintou_looking_at_a_faggot.jpg (700x442, 67K)

nobody summoned you
archive.rebeccablacktech.com/g/search/tripcode/!!FrQCaIaTfJw/
all your posts are shit

>literally just a map function

Attached: 1545477714583.png (871x751, 95K)

>Microsoft has introduced the concept of 'Functors'

Attached: 1554686920616.png (434x521, 43K)

You could also just google "functional programming multithreading" and read articels before talking bullshit

lol, this is a joke right

Do not forget, M$ does marketing for people who are ignorant, and it works for decades.

For me it's the Chen.

Attached: 1554179345535.png (2000x1410, 406K)

Based Microsoft

>fn
>not lambda

ruined

>writing out "lambda" every time you want a lambda

He's probably talking about (\
fn is a bit more accessible desu

redpill me on elm

It has Haskell syntax