Programming thread

PHP is used for some older high-end websites (KiwiFarms)
Fixed that for you.

This is all because someone he knew got a mild level of public humiliation for having described something as "pretty fucking gay" in like 2001 or whenever. I don't know what you call this behaviour but I don't like it.
I call it pretty fucking gay.
 
I'm re-learning C++ because I'm Mad at the Internet.
C++ is my comfort zone in programming, you know why? If you want to do something high-level in C++, it's almost always enough to take exactly one framework and study its documentation, and off you go. Want something low level? Go read excellent Microsoft docs on Win32 or linux.die.net for Linux.
With JS/Python/Java, I just get horrified: you're immediately bombarded with tons of library names. You open up an example, there is JaCoCo, ChaiChai, Cacao, Spring, whatever else. Why the fuck are they here and what are they? Oh anyways people can use these old runtimes lololo take these polyfills! Don't forget to update your dependencies and run npm audit every time because at least one of your million dependencies always has a security vulnerability!
At least Rust has a security advisory team that does it for free but it's still the same scenario mostly: there are 2~3 frameworks that are enough for you to get started, oh Mr. Cargo called, he wants to download 300 dependencies for your hello world, this won't take long....
 
C++ is my comfort zone in programming, you know why? If you want to do something high-level in C++, it's almost always enough to take exactly one framework and study its documentation, and off you go. Want something low level? Go read excellent Microsoft docs on Win32 or linux.die.net for Linux.
With JS/Python/Java, I just get horrified: you're immediately bombarded with tons of library names. You open up an example, there is JaCoCo, ChaiChai, Cacao, Spring, whatever else. Why the fuck are they here and what are they? Oh anyways people can use these old runtimes lololo take these polyfills! Don't forget to update your dependencies and run npm audit every time because at least one of your million dependencies always has a security vulnerability!
At least Rust has a security advisory team that does it for free but it's still the same scenario mostly: there are 2~3 frameworks that are enough for you to get started, oh Mr. Cargo called, he wants to download 300 dependencies for your hello world, this won't take long....
I'd include Golang in the horrifying trend. I was looking at hosting my own GitLab at home, and they have a way to deploy to Kubernetes, which I should learn more about. Anyway, the "Operator" to deploy gitlab pulls in 137 Go modules. Yes, I'm aware there are simpler deployment methods but really...

Be horrified: https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/go.mod
 
I'd include Golang in the horrifying trend. I was looking at hosting my own GitLab at home, and they have a way to deploy to Kubernetes, which I should learn more about. Anyway, the "Operator" to deploy gitlab pulls in 137 Go modules. Yes, I'm aware there are simpler deployment methods but really...

Be horrified: https://gitlab.com/gitlab-org/cloud-native/gitlab-operator/-/blob/master/go.mod
Haskell is terrible about this too. Pandoc might be the only useful thing written in the language, but it depends on half the remainder of the Haskell ecosystem, pulling in over seventy packages if you try to compile it.
 
C++ is my comfort zone in programming, you know why? If you want to do something high-level in C++, it's almost always enough to take exactly one framework and study its documentation, and off you go. Want something low level? Go read excellent Microsoft docs on Win32 or linux.die.net for Linux.
With JS/Python/Java, I just get horrified: you're immediately bombarded with tons of library names. You open up an example, there is JaCoCo, ChaiChai, Cacao, Spring, whatever else. Why the fuck are they here and what are they? Oh anyways people can use these old runtimes lololo take these polyfills! Don't forget to update your dependencies and run npm audit every time because at least one of your million dependencies always has a security vulnerability!
At least Rust has a security advisory team that does it for free but it's still the same scenario mostly: there are 2~3 frameworks that are enough for you to get started, oh Mr. Cargo called, he wants to download 300 dependencies for your hello world, this won't take long....
Agree. C++ just feels right to me. I've tried other languages in the past, but the only other one that felt "right" to me was Lua. Lucky for me, Lua has a damn good C API, so I can just do shit.

Another thing that Python and other langs like it always seem to fuck up, package management. `pip` is god-awful. For some retarded reason, it's broken on my system completely and I have to go in and out of venvs to get it to even print out the --version. Adding libraries to your C++ project is as simple as you want to make it really, and they're not dragged off into some .directory where you have to go through a dozen Stackoverflow posts just to figure out where they are.

Shit pisses me off, and I do more debugging the LANGUAGE than I do anything else, not even my shitware. I dunno, I guess it doesn't hurt to stay in the older languages, they're more robust and they often have tons more documentation. With Rust, for example, anything more than printing "Hello, World!" is a mess. It looks great on the surface, a breath of fresh air for retards like me with all the crates and stuff, but it's complicated as all hell.
 
  • Lunacy
Reactions: args
This is all because someone he knew got a mild level of public humiliation for having described something as "pretty fucking gay" in like 2001 or whenever. I don't know what you call this behaviour but I don't like it.
This has been a fact of life for a long time. In the past it was more explicit. "Oh look, the nobles are pledging their loyalty to the king because they know they will lose their title and their privileges if they don't". These days the powers-that-be rely more on trickery and guile so the willfully ignorant all get to pretend this isn't what's happening.

There is nothing new under the sun.
 
  • Thunk-Provoking
Reactions: PedoSec
C++ is my comfort zone in programming, you know why? If you want to do something high-level in C++, it's almost always enough to take exactly one framework and study its documentation, and off you go. Want something low level? Go read excellent Microsoft docs on Win32 or linux.die.net for Linux.
With JS/Python/Java, I just get horrified: you're immediately bombarded with tons of library names. You open up an example, there is JaCoCo, ChaiChai, Cacao, Spring, whatever else. Why the fuck are they here and what are they? Oh anyways people can use these old runtimes lololo take these polyfills! Don't forget to update your dependencies and run npm audit every time because at least one of your million dependencies always has a security vulnerability!
At least Rust has a security advisory team that does it for free but it's still the same scenario mostly: there are 2~3 frameworks that are enough for you to get started, oh Mr. Cargo called, he wants to download 300 dependencies for your hello world, this won't take long....
C++ has this problem in spades. Never have a minor version bump in some Qt library or Boost library and break half your system? And immediately force a restart?

Hell, at least with interpreted languages, they'll at least still start up if there are small mismatches in versions, giving you a bit of time to gracefully migrate. Shared library versions in compiled libraries don't permit that, at least not without doing sketchy shit like symlinking the wrong version in place. (I'll be honest, I've done that a couple of times before.)
 
C++ has this problem in spades. Never have a minor version bump in some Qt library or Boost library and break half your system? And immediately force a restart?
You're missing the point here. The issue you're pointing out here is about how wrong library versions break software that isn't linked with it, which is a problem of _dynamic linking_, not about the language itself. I was talking about _writing_ a program in C++. If you bundle your DLL files(which all sane software should) it won't break from a system library update. Linux people are very stubborn about dynamic linking although it bites them in the ass all the time.
Hell, at least with interpreted languages, they'll at least still start up if there are small mismatches in versions
This is also the issue with global dependency storage(à la pip), not writing a program in the language. The issue I mentioned is _dependency hell_, i.e. you need a million 5 line dependencies from Mr. Raj and you basically have no control over it when you choose a framework and you don't know what went wrong in the dependency chain when shit doesn't work. C++ mostly has tested and reliable _big_ dependencies which is way better than a million untested small dependencies IMO. Runtime errors are also evil.
 
You're missing the point here. The issue you're pointing out here is about how wrong library versions break software that isn't linked with it, which is a problem of _dynamic linking_, not about the language itself. I was talking about _writing_ a program in C++. If you bundle your DLL files(which all sane software should) it won't break from a system library update. Linux people are very stubborn about dynamic linking although it bites them in the ass all the time.
Of course we are. It saves disk, ram and in frequently used libraries/functions it may even be likely that it's already in CPU cache when another process needs it further increasing performance.

If you want to bundle all your libraries in something like Flatpak just link the program statically and call it a day.
 
You're missing the point here. The issue you're pointing out here is about how wrong library versions break software that isn't linked with it, which is a problem of _dynamic linking_, not about the language itself. I was talking about _writing_ a program in C++. If you bundle your DLL files(which all sane software should) it won't break from a system library update. Linux people are very stubborn about dynamic linking although it bites them in the ass all the time.
Whether it's prudent or not, it's a reality of C++ programming on Linux.

But you're missing my point as well.

I see Boost and Qt as their own form of dependency hell. It's very difficult to use just one Boost or Qt library without dragging in the whole thing, and it's not unheard of for programmers to indeed use both of them in a project.

It's much nicer to be able to pull in exactly what you need for a given project, no more and no less. Libraries that are designed to be used standalone are more convenient for that purpose.

Like yeah, five line libraries are pretty gay and npm is notorious for that. But I have no problem pulling in dependencies if they really do some substantial work, even if they end up pulling in more libraries themselves.

At that point, you should be pinning the versions of the libraries and their dependencies to known stable versions, or using the package manager's vendoring feature or some shit. (If they don't have a way of doing this, then that's a big flaw in the package manager.)
 
  • Like
Reactions: Geranium
Of course we are. It saves disk, ram and in frequently used libraries/functions it may even be likely that it's already in CPU cache when another process needs it further increasing performance.

If you want to bundle all your libraries in something like Flatpak just link the program statically and call it a day.
Adding on to this, when a library is patched for security reasons, all programs that link to the library benefit in a timely manner.

Having said that, I just recently went through DLL Hell because some Debian maintainer decided to put two versions of Boost in the repository side-by-side. So it goes both ways.
 
  • Feels
  • Like
Reactions: Geranium and Marvin
Anyone have any fun shit for Haskell? I ended up picking it up after being recommended it in this thread and I really like how it handles things like lists and syntax. Haven't done too much with it, so figured I'd ask here especially for anything involving machine learning and AI projects.

I'm probably under utilizing things like Hoogle as well.
 
Anyone have any fun shit for Haskell? I ended up picking it up after being recommended it in this thread and I really like how it handles things like lists and syntax. Haven't done too much with it, so figured I'd ask here especially for anything involving machine learning and AI projects.

I'm probably under utilizing things like Hoogle as well.
I don't know anything about machine learning or AI in Haskell, but an interesting beginning project that maps well to a functional language like Haskell is a simple ray tracer.

I don't know Haskell myself, but I have dabbled in SML and Ocaml. They have a similar type system, but they have a more typical execution model (basically in Haskell every value is implicitly a promise a la node or python promises).

Functional languages map well to things like ray tracers because you're basically doing a lot of recursive, functional processing of a tree structure.

Here's an old C++ vs Ocaml comparison of a ray tracer:

Actually, now that I think about it, I'm sure there's actual Haskell ray tracers out there, but I still would say that article is a very good explanation of the overall concepts.
 
Reposting this comment about Rust from r/programming because I laughed way too hard at it:

Thinking of using Rust as a web backend?

Imagine that TypeScript is like a shitty but versatile truck. It will do all sorts of weird shit, including a godawful toolchain and bundling system, but it is well supported by the community and it will handle whatever you throw at it. A huge pothole in the road? It will somehow manage to come out the other end but it won't be pretty. It will get to the finish line slowly but surely.

Imagine Go as a nice a quick, but flawed sports car. It's got some really weird weird shit going on, but it's undeniably quick and well let you get to the finish line in comfort as long as you have the skill to stop it flipping the fuck over at the slightest touch. That's because it is not forgiving and will ruin your life if you're not ultra competent at software architecture concepts.

Now imagine Rust as a sexy fast formula 1 race car. It is geared to be as performant as possible, yet has the sleek, sexy feel that C and C++ lacks. It literally converts every electron coursing through your computer to gold. It's so good. It's so damn sexy.

Now imagine the Rust car at the starting line, revving its engines. People are cheering, so excited it will win. They're popping the champagne already.

Except the Rust car is not on a racetrack to the finish line. It's a racetrack up your asshole. The car goes in. Then out. Then in. Then out. At incredible speed. Blood is everywhere and you're basically crying at how amazingly fast it is, it's so damn cool. Yet your ass is getting ruined.

And that's why you don't develop your web backends on Rust unless you know exactly why the fuck you're doing it. There are very real, excellent use cases for Rust that make it the natural winner. But by god if you're using it cause you feel like a leet hacker and it's hype, weighting it as an equivalent choice to something like Ruby on Rails or nodejs, then my god you're screwed.
 
Programming has been full of trannies and weirdos forever. You're literally not a normal, well-adjusted person if you do this for a living.
In college the people who ran the computers I don't remember any trannies. Now faggots, there were lots of faggots. Admittedly it was the early 1990s.
 
Programming has been full of trannies and weirdos forever. You're literally not a normal, well-adjusted person if you do this for a living.
It's been full of weirdos forever. Being a disgusting troon is just the in vogue branding for weirdos these days. Many cases exist where yesterday's shut-in weirdo is today's barely-shaven man in a dress and maybe lipstick, see for reference: any number of lolcows.
 
It's been full of weirdos forever. Being a disgusting troon is just the in vogue branding for weirdos these days. Many cases exist where yesterday's shut-in weirdo is today's barely-shaven man in a dress and maybe lipstick, see for reference: any number of lolcows.
I wouldn't even say it's been full of weirdos forever. Most programmers are normal enough, just slightly eccentric and nerdy but functional human beings. The troon problem in programming is only really a problem in the open source community and even then they are an outspoken minority. People that think all programmers are troons are retarded normalfags that don't know how to code and love being untalented hacks.
 
I wouldn't even say it's been full of weirdos forever. Most programmers are normal enough, just slightly eccentric and nerdy but functional human beings. The troon problem in programming is only really a problem in the open source community and even then they are an outspoken minority. People that think all programmers are troons are retarded normalfags that don't know how to code and love being untalented hacks.
Big blue had a troon problem back in the 60s. I wouldn't say troons are exactly a new thing in the realm of computing - it's just they've become significantly more visible in recent years.
 
Back