this post was submitted on 30 Sep 2025
220 points (96.6% liked)

Programmer Humor

26650 readers
2000 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] boonhet@sopuli.xyz 3 points 12 hours ago (1 children)

That’s memory not hogged by a single program, making me able to use it for other stuff.

But it's not unused memory.

People have this weird fetish with free memory. Remember all the idle app killers on Android, etc?

Besides, if I'm playing a game, I WANT it to have preloaded assets so I don't have to wait for them to load from the NVMe. I also don't want the developer to spent half their time reducing memory usage by 10 kilobytes - I'd much rather that time is spent on making the game do more things.

I wait for the OOM killer to fire up before saying, “it’s full”.

Then you're already different from most the "everything uses too much memory these days" folks. Most look at the Windows task manager which shows 14 gigs in use out of 16 and go buy more - because Windows dared use 8 gigabytes of cache that it was completely willing to free if another program asked for it.

In fact, I should be panicking right now:

               total        used        free      shared  buff/cache   available
Mem:        32789900    21931604      283888     2760372    13429988    10858296
Swap:              0           0           0

Nearly no free memory!

making it hard to even use the clang tools on large projects.

I hope you're not claiming that to also be wasted memory. clang/LLVM is a pretty complex toolset and does damn near close to magic to optimize the binary it shits out.

[–] ulterno@programming.dev 1 points 12 hours ago (1 children)

I hope you’re not claiming that to also be wasted memory

Yeah, I'm not.
And I'm not talking about the optimising compiler part, but about the continuous code analysers that give warnings and completions to the IDE on the fly.
That was just an example to show how low 8GB is nowadays.

But it’s not unused memory.

Its unused until I decide to run said second program to use it.
⇒ Unused memory is not useless, but usable.

What you were saying earlier would have been the equivalent of, "the other clothes kept in my wardrobe are useless", when you clearly have the option to use the clothes in that wardrobe.

[–] boonhet@sopuli.xyz 2 points 12 hours ago (1 children)

But the thing is, you can't use all your clothes at once, your memory CAN all be useful in the moment, hence no need to be anal about leaving it unused.

In your example, those tools are providing you with insight and you could turn them off. They have to index a bunch of files and build models of them in memory.

Then when you actually run your compiler, it's helpful that your OS has probably "wasted" some RAM keeping source files cached after a few runs, even the ones you haven't edited recently.

[–] ulterno@programming.dev -2 points 11 hours ago

you can’t use all your clothes at once

I just have to explain each and every facet of this silly little analogy to you because you really just only want to stick to your line of , "unused memory is useless".
Alright, I will.

You can use the other clothes to:

  • wear multiple layers
  • lend them to your friends or whomever wants them

It can be a shared wardrobe, like in events and such:

  • then, having remaining clothes means, others can come and take them

Unused memory is not useless.
It gives an option to others whether or not to use it.

And caching stuff really has nothing to do with having used Python vs C++ or Rust or whatever.
That is a totally different option.

If your program is taking up more working memory, you then have less memory for the caching, that you are calling "good".


~~In your example, those tools are providing you with insight and you could turn them off. They have to index a bunch of files and build models of them in memory.~~

~~Then when you actually run your compiler, it’s helpful that your OS has probably “wasted” some RAM keeping source files cached after a few runs, even the ones you haven’t edited recently.~~

I am not going to even try to explain it to you how far that is from what I mean by the words the you can go up and read.


And when creating a framework for scripting, you need to be careful about the features, least you end up forcing single threading everything. (See X4)