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.
 
Back
Top Bottom