Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
The reality of the situation, no matter how hard the memfags refuse to take Stroustrup's dick out of their mouth, is that we have to wait 10 to 15 seconds for photoshop to load - a process that should be nearly instantaneous- and that's on a good day.

And a whole lot of other missing the forest for the trees...
You seem to be laboring under the misunderstanding that the tools are responsible for shit code. Programmers are responsible for shit code, and would be writing shitty assembly if they didn't have whatever god forsaken internal toolkit Photoshop is now written in. C++ obviously wasn't an issue when Carmack was making Doom 3 run on a fucking Xbox.
 
The reality of the situation, no matter how hard the memfags refuse to take Stroustrup's dick out of their mouth, is that we have to wait 10 to 15 seconds for photoshop to load - a process that should be nearly instantaneous- and that's on a good day.
When you modify the Photoshop source code so that 1. memory is never freed and 2. all allocations are done in an arena (there will be no segmentation because of 1.), the startup time of Photoshop will still be awful. CPU cycles are wasted in more ways than one.
 
Autistic screeching

I have a reaction image for this post. I just don't know whether to pull it from memes/this-is-bait or memes/retarded-wojaks.

I'll just assume you're retarded and ignore the tingling on the roof of my mouth.

Yes, my lad, you got it. You've cracked the code. The shower analogy was particularly enlightening -- it should be plastered 72pt. Impact white-over-black on every CS101 college course's first slide deck. Please let us know how to apply arena bumping deallocation to resources that are, y'know, not memory.
 
Conceptually, everyone here understands why it's a stupid idea to take an entire shower for every single strand of hair you have. And yet some have no idea how that applies to "resource acquisition" and memory management. Because you don't know what you don't know.
Yeah, if you need the same resource in multiple iteration of a loop, don't reaquire it every single fucking time, but rather acquire it once outside the loop and reuse it. If it's some subfunction that needs the resource, just fucking pass it in.
The same is done with memory. Allocate a block of memory and store data in there that only needs to exist within the lifetime of that arena. When you're done, set a pointer offset back to zero. Boom. Done.
How would that work with file descriptors? Sockets? Other resources that aren't just memory?
Terrified that you'll access a resource that no longer exists? Design your code so that even in failure, it will still carry on.
It should crash and burn visibly, rather than being subtly wrong.
Computing really is this simple, and yet complete fucking retards have turned what was once a beautiful and elegant artform into bloated, over architected diaper-soiling prevention that still manages to make you soil your diapers anyway.
That, I can't disagree with
I have a reaction image for this post. I just don't know whether to pull it from memes/this-is-bait or memes/retarded-wojaks.
How about bait made by a retarded wojack?
 
I want to go even further and say that webdevs should never have access to system sockets, ever. It's bad enough with the odd, though mostly harmless 127.0.0.1 access attempts.
Similarly, there are many devs that shouldn't be let near HTML/CSS or JS. I had to clean up their monstrosities afterwards.
There are plenty of retard software engineers that work in every field.
Surely there's a middle ground. For example, every time I update apps on my phone and see 300+ MB package sizes, shit being laggy or just another pretend app that's actually a browser wrapper, I start thinking of murder. Does that mean I shouldn't? Well, silly me, that developer just values his time and defecated some Javascript on my Android device to get Real Work done. Stiff upper lip and keep scrolling.
It isn't "the developer values his time" it is "their employer doesn't want to employ an iOS, Android and a Web dev".
There is no toolkit that works with iOS, Android and Web other than Electron and other similar projects e.g. Titanium.
Compound that with many users don't actually understand what a web browser is, and they've been conditioned to install an app for everything, means that the only viable option unless you want to employ three times as many engineers is wrapping a web app.

Most modern jank btw isn't because of JavaScript itself. One of the biggest offenders it is often poor DOM manipulation and/or selection, often which cause large page redraws, the second being fancy CSS effects. All of this is easy to identify and optimise, the issue that nobody will pay for it. Features are always prioritised over everything else.

e.g. One of the reasons YouTube is so slow on many older devices is because of "ambient mode", older iGPUs cannot handle playing a video with a layer that has alpha transparency behind it. My old Dell 6410 with some shit-tier intel iGPU can manage like 10FPS@720p on YouTube with ambient mode on, if I turn it off I get a normal viewing frame rate.
 
Last edited:
Intelligent memory management looks nearly identical to how the CPU manages the stack. Does it go through, row by row, and "release" every single "resource" used? NO. It resets a pointer back to the beginning of the stack. Boom, done.

The same is done with memory. Allocate a block of memory and store data in there that only needs to exist within the lifetime of that arena. When you're done, set a pointer offset back to zero. Boom. Done.
How do you think containers like std::vector work? Do you think there is some phantom destructor called for trivially destructible objects? Or that it keeps reallocating on each insertion/deletion?

you don't know what you don't know.
You don't have to be so harsh on yourself.
 
I wish I could avoid the frontend entirely.
I normally hide from the frontend these days because I hate NPM. Everything now requires it or one of the forks/clones of it. Every package pulls in like 10,000 dependencies. There have been several times over the last few years when NPM packages have been infected, and I get a big fat warning in JetBrains that I've narrowly avoided installing some malware because I was using some out of date version of lib.

Moreover, JavaScript build systems are often this Rube Goldberg machines. I used to spend half my time fixing the build system because some developer decided that he was going to change from CommonJS to AMD (or some such shit) because he got bored that week.

I've decided to solve this by the tried and true method of "stick the error output into Claude and hope it can fix it". Before AI, often I would just end up doing the "try stuff until something works" approach.
 
Last edited:
I normally hide from the frontend these days because I hate NPM. Everything now requires it or one of the forks/clones of it. Every package pulls in like 10,000 dependencies. There have been several times over the last few years when NPM packages have been infected, and I get a big fat warning in JetBrains that I've narrowly avoided installing some malware because I was using some out of date version of lib.

Moreover, JavaScript build systems are often this Rube Goldberg machines. I used to spend half my time fixing the build system because some developer decided that he was going to change from CommonJS to AMD (or some such shit) because he got bored that week.

I've decided to solve this by the tried and true method of "stick the error output into Claude and hope it can fix it". Before AI, often I would just end up doing the "try stuff until something works" approach.
The only frontend thing beyond static html/css I actually like is htmx. The rest I prefer to write myself. Just vanilla javascript. No libraries, no frameworks.
 
The only frontend thing beyond static html/css I actually like is htmx. The rest I prefer to write myself. Just vanilla javascript. No libraries, no frameworks.
I don't like HTMX myself, however plenty of people do like it.

I do prefer vanilla JS. CSS frameworks are fine IMO such as bootstrap, especially when you are making some intranet or internal tooling. Stick a company logo on the top and use a colour scheme that is close enough and it is normally fine.

The issue is that many programmers don't understand how to do inter component communication on a site (basically an event emitter), what events get triggered when the page loads / unloads, event delegation etc. Like it or not React is the standard now. It is just easier to learn it, rather than fight it.

Also, there are many APIs lacking in the browser so normally you need to add libraries. Some of the stuff that is missing is fucking absurd in my opinion. I forget what feature was added this year and I thought to myself "People have needed to work around this limitation in 20 years, and only now they bothered making an API for it". Some libraries only work properly with JS build systems, so at some point any non-trivial site/app will need a JS build system.
 
I have a reaction image for this post. I just don't know whether to pull it from memes/this-is-bait or memes/retarded-wojaks.

I'll just assume you're retarded and ignore the tingling on the roof of my mouth.

Yes, my lad, you got it. You've cracked the code. The shower analogy was particularly enlightening -- it should be plastered 72pt. Impact white-over-black on every CS101 college course's first slide deck. Please let us know how to apply arena bumping deallocation to resources that are, y'know, not memory.
They've been watching Jonathon Blow clips on YouTube. The give away is the Photoshop taking 10-15 seconds to load. Jonathon literally said that exact fucking line on one of streams.

Jonathon Blow sometimes has some excellent points, but the man literally said on his Stream he could solve global warming. Blow has delusions of grandeur.
 
Programmers are responsible for shit code
And programmers don't just emerge from the Aether. They come from ecosystems, educational systems, status quo, culture. And it just so happens that the very same thinking that lead to abominations like RAII and OOP also leads to shit programmers. Because it enforces a certain way of thinking.

Carmack 100% would understand exactly what I am talking about, whether or not he had to use C++ for a project before. Even then, he coded in an intelligent, data-driven way, dubbed "C-style C++".
the startup time of Photoshop will still be awful. CPU cycles are wasted in more ways than one.
It has to load a million objects before doing anything useful: "RAII" in action. Jeets are of course part of the problem too but there's no point mentioning how stupid jeets are because it's a universally understood fact of life.
Please let us know how to apply arena bumping deallocation to resources that are, y'know, not memory.
It's really not that difficult. You store data in the memory block that covers the lifetime of that data. If I only need data for the lifetime of a function, I store it in the scratch arena for that function. If I need data for the lifetime of a program, I store it in the main arena. Simple.
It should crash and burn visibly, rather than being subtly wrong.
It doesn't have to be subtle. You can very explicitly deal with whatever arises. It just shouldn't lead to a catastrophic failure of the entire program. RAII and other baby-sitting methods are a cheap bandaid for poor architecture that doesn't address the root cause of the problem. And when they do crash, which they always do by the way, it just makes tracking down the issue that much harder.
How do you think containers like std::vector work? Do you think there is some phantom destructor called for trivially destructible objects? Or that it keeps reallocating on each insertion/deletion?
std::vectors call a destructor every time an element is removed. You're literally proving my point. Did you not know this, or are you actually retarded?

***********************************

The simple fact of the matter is that 99% of the whataboutisms that memfags bring up when defending RAII or OOP simply aren't an issue with data-oriented programming. The problems you think you've solved were actually problems you yourself created to begin with. Not only are those non-existence problems not an issue, but everything about a program improves with this critical shift in paradigm from object-oriented to data-oriented.
 
Last edited:
They've been watching Jonathon Blow clips on YouTube. The give away is the Photoshop taking 10-15 seconds to load. Jonathon literally said that exact fucking line on one of streams.

Okay, so? Mike Acton said Microsoft Word takes 10 seconds to load. Were they wrong? Does this somehow invalidate my experience of photoshop and word taking inordinate amounts of time to load? Shall I name any other mainstream program that used to work fine in the 90's and 2000's but now is a laggy, bloated piece of shit? The fact that everyone is having the same universal experience of shitty software speaks volumes in and of itself.
 
They've been watching Jonathon Blow clips on YouTube. The give away is the Photoshop taking 10-15 seconds to load. Jonathon literally said that exact fucking line on one of streams.

Jonathon Blow sometimes has some excellent points, but the man literally said on his Stream he could solve global warming. Blow has delusions of grandeur.
oh speaking of blow
i would love to try out jai one day - cant wait for the release!
i have watched some of tsoding's jai vods and the language looks really pleasant to use
 
Lol so I just deployed a little project I'm working on and while watching the logs, I got a lot of this:

Code:
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://admin.mysitewhatever.net/manage/env HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://web.mysitewhatever.net/config/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://cdn.mysitewhatever.net/config/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://dev.mysitewhatever.net/backend/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://portal.mysitewhatever.net/.env.save HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://staging.mysitewhatever.net/.env.swp HTTP/1.1" 404 "-" "(Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://static.mysitewhatever.net/backend/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://admin.mysitewhatever.net/admin/env HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://web.mysitewhatever.net/backend/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:58 2026] "GET http://staging.mysitewhatever.net/.env.copy HTTP/1.1" 404 "-" "(Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://cdn.mysitewhatever.net/backend/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://dev.mysitewhatever.net/server/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://portal.mysitewhatever.net/.env~ HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://static.mysitewhatever.net/server/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://cdn.mysitewhatever.net/server/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://admin.mysitewhatever.net/actuator/env/aws HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://web.mysitewhatever.net/server/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://staging.mysitewhatever.net/.env.1 HTTP/1.1" 404 "-" "(Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://dev.mysitewhatever.net/public/.env HTTP/1.1" 404 "-" "(Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36)"
10.0.1.87 [Thu May  7 00:47:59 2026] "GET http://portal.mysitewhatever.net/.env.swp HTTP/1.1" 404 "-" "(Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Mobile/15E148 Safari/604.1)"

Like immediately. At first I just thought they must periodically check this cheap VPS IP address I'm using. But that doesn't make sense because I'm hosting a few other projects under different domain names.

Either I screwed up my configuration (possible) or this domain name I'm using (it's not mysitewhatever.net but something similarly nondescript) is already on some list somewhere.

Also this is an important lesson for why you don't do COPY . . in your Dockerfile.
 
i would love to try out jai one day - cant wait for the release!

Well, you're gonna have to wait. You don't really have a choice.

Jai is the strip club of programming languages. You can look but you can't touch.

Really bizarre way to develop a language, but whatever. I guess the scarcity marketing effect is working for Jai for how gassed up it seems to be. But whenever I want to screw around with a new language I pick one that already has a compiler just waiting for me to use it, no sign-up sheets required.
 
How would that work with file descriptors? Sockets? Other resources that aren't just memory?
Now look, you have a perfectly valid point here about the utility of generalized dynamic extents, but on the other hand:

where there is a will, there is a way.

(I hadn't even considered the possibility of file descriptor arenas and this post made me ponder how they would be implemented. Granted, you can only really have a single one without adding overhead with dup2, since there's no way to tell all the fd-creating system calls where to put it initially. Although you could start doing some *really* exotic stuff with unix sockets...)

A riddle for my fellow smart-alecks: Unix has two garbage collectors. One can be invoked by calling _exit. How can the other one be invoked?
 
Back
Top Bottom