Programming thread

Question: why are all the shitty programming languages the most popular?
I think knowing how things are done in C gives you an idea of what's behind all the "magic beans" higher-level languages provide you, so you can use them wisely.
The fact that a processor can change "00011010" into a symbol is magic beans to me.
 
Last edited:
  • Like
Reactions: Merrick
Absolutely, but do people still do that stuff? A lot of the worst abuses of OOP are due to people trying to write other languages in C++. These days I think people are more willing to just use another language - plus the C++ standards people are more willing to add features into the language, for better or for worse.

The last Factory I came across in the wild must have been from 20-year-old code.
I gather you didn't have a dubious pleasure of using Spring framework :)
 
I have never seen a single java program in my life that was not a bafflingly slow resource hog. The smartest people in the world can't seem to make it run fast outside of benchmarks. What hope to common business coders have?
Back in the late 90's and early 2000's, hardware vendors (including Sun Microsystems themselves) made some major bank selling dedicated "Java engine" hardware. I remain convinced that Java is as pants-shittingly inefficient in memory use and performance as it is largely because the committee that cursed us with this abomination was comprised entirely of people who had expensive hardware to sell to people who complained about Java's footprint.

Imagine dick waving about whether C# or Java is the faster language. SMDH.
It's especially disappointing since it ignores the bigger problem both languages have in common: they're both wholly owned and controlled by companies who are absolute cunts. Oracle is pure evil incarnate and always has been, and Microsoft has slowly been transitioning from "pure evil incarnate" to "Clark Griswold leading the pajeets" levels of incompetence. They're both still malevolent though.

We're stuck in a future where processors and compilers of co-evolved while the languages have remained the same. Can you imagine what a processor optimized for Erlang or Java would have looked like?
I thought I was the only person left in the world who knows what Erlang is. You've made me so happy! ❤️

Learn C++. Good luck.
My nigga. C++ is a blast, and perhaps I'm just a masochist but I enjoyed learning it. Being fluent in it has also been a boon in distinguishing myself from other "senior" level applicants when looking for work. If you're asked in an interview how you'd go about building a cross-platform desktop application to do some arbitrary "trendy" thing, they won't disqualify you for saying you'd build it in Electron. But you'll get an approving nod and a quiet bump to the top of the list if you say you'd rather build it in C++ and Qt. There's still a lot of value in shipping a computer program that doesn't require a 100MB fucking runtime just to present a login window and a settings panel.

I don't like FP or OOP, you retard. Enjoy writing shit software.
You'll go far with this attitude. Nowhere good, mind you, but at least it'll be an entertaining voyage.
 
I have found good reason to not program in 32 bit, because Windows 64 bit can only emulate 32 bit software using WoW64, which reduces the efficiency of using 32 bit software from a native 32 bit operating system by 5%, and rebuilding the code for a 32 bit application to 64 bit increases efficiency anywhere from 5% to 15%.
My nigga. C++ is a blast, and perhaps I'm just a masochist but I enjoyed learning it. Being fluent in it has also been a boon in distinguishing myself from other "senior" level applicants when looking for work. If you're asked in an interview how you'd go about building a cross-platform desktop application to do some arbitrary "trendy" thing, they won't disqualify you for saying you'd build it in Electron. But you'll get an approving nod and a quiet bump to the top of the list if you say you'd rather build it in C++ and Qt. There's still a lot of value in shipping a computer program that doesn't require a 100MB fucking runtime just to present a login window and a settings panel.
How does C++ or regular C compare with Rust?
 
Last edited:
whatever you do with it, be warned that Rust's compile times are legendarily atrocious. People really underestimate how much of a detriment that can be to productivity.
So if Rust is supposed to be superior to C, then why does it take so much compile time?
 
1619402980063.png


By "many" they mean "an infinitesimally small amount". Almost nobody uses rust for anything professional.

My contention with Rust is that it seems to be designed around being a 'systems programming' language that takes away the responsibility of memory management from you and puts it on the compiler. If a programmer does not know how to properly manage memory, he probably shouldn't be doing systems programming in the first place. It's nowhere near as hard as it used to be.

Modern C++ offers much simpler and more effective memory management techniques. I haven't written a new or malloc in years.
 
  • Agree
Reactions: moocow
My contention with Rust is that it seems to be designed around being a 'systems programming' language that takes away the responsibility of memory management from you and puts it on the compiler. If a programmer does not know how to properly manage memory, he probably shouldn't be doing systems programming in the first place. It's nowhere near as hard as it used to be.

Modern C++ offers much simpler and more effective memory management techniques. I haven't written a new or malloc in years.
Why is it easier now than it used to be?
 
Why is it easier now than it used to be?
because it used to be all that you had at your disposal was stuff like raw object/array allocations (new, new [], malloc, delete, delete [], free, realloc). Those were notoriously difficult to manage for even high level experts. I've seen actual geniuses screw those up pretty regularly.

Now, everything has been standardized with std::shared_ptr, std::unique_ptr, std::vector, and so on. Those do the classic memory allocations, but they have tools that manage that memory for you and 'cleans up' after itself safely. They're not any less efficient than raw memory management either provided you understand how they work under the hood. They're not foolproof, but they greatly assist in making robust systems and they're hard to mess up if you're experienced.

You still need to have discipline to not do stupid things like taking a raw pointer to the middle of a vector (which can cause corruption), but that's where I say "if you don't know to not do that, you probably shouldn't be doing systems programming".
 
  • Like
Reactions: Knight of the Rope
because it used to be all that you had at your disposal was stuff like raw object/array allocations (new, new [], malloc, delete, delete [], free, realloc). Those were notoriously difficult to manage for even high level experts. I've seen actual geniuses screw those up pretty regularly.

Now, everything has been standardized with std::shared_ptr, std::unique_ptr, std::vector, and so on. Those do the classic memory allocations, but they have tools that manage that memory for you and 'cleans up' after itself safely. They're not any less efficient than raw memory management either provided you understand how they work under the hood. They're not foolproof, but they greatly assist in making robust systems and they're hard to mess up if you're experienced.

You still need to have discipline to not do stupid things like taking a raw pointer to the middle of a vector (which can cause corruption), but that's where I say "if you don't know to not do that, you probably shouldn't be doing systems programming".
How does this compare to C#?
 
How does this compare to C#?
apples and oranges. C# is garbage collected. You don't have to do memory management at all*

*That's not completely true, but that would be a much deeper discussion than I want to get into on a forum thread. Memory is always *safe* however. You won't crash because you tried to use something that was previously deleted.
 
Question: why are all the shitty programming languages the most popular?
I think it's more something like,
{current language = popularity/(taste - history) = popularity/preference}. You have a pedigree of programmers who are trained one way and are not confident in other systems and there are diminishing returns if you try to be adequate at many systems (languages). What comes in the future need to be similar enough to the past, even though that has nothing to do with the efficiency of the task. For example, I've often thought that closing } // main are not as good as
Code:
function main
// code
end main
There are some languages that come close. I see this in Java and C++, programmers labeling the scopes with comments. It soft of feels right to because you have three closing } and it's not clear what is what. Arguably it would be more efficient to have the language require this kind of labeling as part of the syntax, but I'm sure there are programmers who won't see the point in the change and won't want to use the meme. Maybe it's the same difference between int main and void main. There are many good examples of times when a new meme comes out and some programmers like it and others feel that it's religiously heretical to start using it. The question you might want to be asking is, "Why is Java so much like C++?"
So if Rust is supposed to be superior to C, then why does it take so much compile time?
Rust compiles statically linked binaries by default. C usually dynamically links against the system C library. Rust also doesn't have a standard ABI, they currently use C++'s. Having the same ABI as C++ isn't bad, but lacking the standard means that doing dynamic linking isn't going to be well supported. As an aside, Rust also lacks a good way to do runtime code loading because doing so violates Rust's runtime guarantee of memory safety. Really it's just another monad type thing, but Rust is a more immature language in these ways. Developer compiles should normally be faster then --release compiles for Rust.

I wouldn't say Rust is 'superior' exactly. C is really fine for most programs that aren't expected to run for months on end. To create good C that can run like a tank you need to invest in the resources that kernel development teams have. I know a lot of people, including normies, never restart their computers and leave their facebook open for weeks. Web Browsers were really never designed to function like that, so moving to a language that has stricter resource usage rules makes sense if you are limited to a small team of developers.
 
  • Like
Reactions: Shoggoth
Back in the late 90's and early 2000's, hardware vendors (including Sun Microsystems themselves) made some major bank selling dedicated "Java engine" hardware. I remain convinced that Java is as pants-shittingly inefficient in memory use and performance as it is largely because the committee that cursed us with this abomination was comprised entirely of people who had expensive hardware to sell to people who complained about Java's footprint.
You have to remember back in those days x86 still wasn't the ISA lingua franca it is today, and the differences in latency between CPU instructions and memory loads weren't as big as they are today. Processors got a lot faster while memory didn't. Processors got branch prediction and deep pipeplines, while memory just got bigger. Caches didn't grow proportionally to processor speed up as well.
This created an unfortunate situation where Java's model of everything as an object (i.e. pointer) was becoming more and more costly. It wasn't by design, IME.
There's a lot of work today on improving the performance of Java, a lot of hope hanging on record types which promise memory contiguity.
I thought I was the only person left in the world who knows what Erlang is. You've made me so happy! ❤️
Who else can achieve 6 nines of up time? Have you heard Facebook is working on a typed Erlang compiler?
My nigga. C++ is a blast, and perhaps I'm just a masochist but I enjoyed learning it. Being fluent in it has also been a boon in distinguishing myself from other "senior" level applicants when looking for work. If you're asked in an interview how you'd go about building a cross-platform desktop application to do some arbitrary "trendy" thing, they won't disqualify you for saying you'd build it in Electron. But you'll get an approving nod and a quiet bump to the top of the list if you say you'd rather build it in C++ and Qt. There's still a lot of value in shipping a computer program that doesn't require a 100MB fucking runtime just to present a login window and a settings panel.
I think you are a masochist :)
btw, if you asked me this question in an interview you'd get the annoying answer that "it depends" on the time frame and expertise.
Electron < JavaFX < Qt
So if Rust is supposed to be superior to C, then why does it take so much compile time?
Zero cost abstractions always have a cost somewhere. If it isn't in run time, it can be at compile time. The compiler is very clever.
My contention with Rust is that it seems to be designed around being a 'systems programming' language that takes away the responsibility of memory management from you and puts it on the compiler. If a programmer does not know how to properly manage memory, he probably shouldn't be doing systems programming in the first place. It's nowhere near as hard as it used to be.
It does both. You can always reach for unsafe operations but they need to be clearly deliniated. But once you're out of unsafe-land you want your code to be as safe and as verifiable as possible.
 
I thought I was the only person left in the world who knows what Erlang is. You've made me so happy! ❤️
If you get outside of the normal codemonkey business projects, it's used quite a bit. I programmed in it for 3 years on a gov TS project which I obviously cannot go into detail about, but let's just say it was shit involving "critical defense communication under extremely low baud rates". Shooting the shit around base with other gov contractors (if you have a TS clearance but still private sector, you're in a small pool so you know a lot of the other ppl), they all knew of or worked on previous Erlang projects.

Because of that little bit of Erlang experience, I had dropbox people pounding my phone for months asking for interview/relocations.
 
Back