Remix.run Logo
jffhn 9 hours ago

Also, the four fallacies of local computing:

- The CPU is infinitely fast.

- RAM is infinite.

- CPU caches don't exist.

- Cache lines don't exist.

mojuba 9 hours ago | parent | next [-]

- The computer is plugged to an infinite source of unlimited power

This was big before the mobile era and is true to this day to an extent. Many mainstream languages created in the 1990s (I call them "the children of the 1990s") were designed with this fallacy plus the ones you listed as a basis: JavaScript, Python, Ruby, Java, etc.

gf000 6 hours ago | parent | next [-]

Java is basically the "greenest" managed language out there, so not sure putting it into the same list for energy efficiency is warranted. Though of course energy efficiency is fundamentally linked to memory usage, not destructing/collecting dead objects will increase memory usage but increase efficiency.

https://www.sciencedirect.com/science/article/pii/S016764232...

kator 6 hours ago | parent | next [-]

Reading your link IMHO in today's world I would set a basic rule, if you're touching >20% of a Java codebase you should refactor to Rust. With AI-Native development practices it's worth the SDE time to refactor, replace the underlying subsytem and reduce your fleet by 50% or more.

gf000 2 hours ago | parent | next [-]

Unless you are doing something very specific where rust is truly the best choice, I have to disagree.

Rust has overly strict locking (otherwise it couldn't determine safety) that makes certain concurrent algorithms harder to implement, its concurrency model is significantly more complex (for an absolutely good reason, it's a low-level language where the developer should be in control), meanwhile for many applications Java can just have you write ordinary blocking code and they will automagically turn into non-blocking.

For most domains Java has a richer "industry-strength" library ecosystem, and absolutely not even close observability tools. So not really sure what would one win for e.g. a typical backend service doing web and db requests.

mcculley 29 minutes ago | parent | prev | next [-]

I encourage my competitors to refactor a working codebase into a different language.

inigyou 3 hours ago | parent | prev | next [-]

You hate Java so much you think AI code is better? You're not even getting memory safety from the deal, because Java already has it.

nine_k 2 hours ago | parent | prev [-]

JIT gives you almost native performance. AI rewriting tools give you none of the knowledge of running the thing in production. A couple of noticeable mishaps could cost more than halving your fleet saves.

vrighter 2 hours ago | parent [-]

better than native, sometimes, due to the ability to profile and do profile guided recompilation at runtime

rusk 6 hours ago | parent | prev [-]

Indeed, the Java mobile platform had power consciousness baked in 25 or so years ago.

rusk 6 hours ago | parent | prev [-]

Was big before the AMD athlon. First commodity GHz processor was also the first to make obscene power demands.

adornKey 8 hours ago | parent | prev | next [-]

Today even tiny CPUs are really fast. Locally you have to mess up badly to run into trouble. But of course people will do exactly that...

Most real world problems still can be solved with 32-bit software, so the last ~20 years running out of RAM always counted as "using defective hardware". AI workloads now make things interesting again, but it's not that easy to hit the ceiling with real world workload.

Cache is indeed very important. Optimisations like that are gone when you go for distributed computing. Sometimes adding a single nop can do wonders. I wonder how many percent of developers have something in their toolbox to profile for that.

rusk 6 hours ago | parent [-]

Arguably cache concerns are distributed computing concepts moving closer to the core. Same with concurrency semantics. These were far more exotic concepts when the fallacies were first written.

Very easy to hit the 3GB limit imposed by 32-bit architecture for any non trivial data processing app but luckily 64-bit is firmly established for at least 10 years

necovek 9 hours ago | parent | prev [-]

Disk never gets filled up.