fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

11K
active users

"I prefer a lack of magic for my programming [production systems]" the dev says while they write in a language for a compiler they don't understand, with algorithms in the standard library they couldn't implement, performing processor specific optimizations they've never heard of, to run on a virtual computer whose amount of allocated RAM and CPU is mostly a polite fiction, where it will eventually be reduced to a microcode before running on a processor that simulates the software out of order.

@hrefna Oh, I love this observation.

I’ve been very guilty of protesting against “magic” in the past. On reflection, I think what I’m wary of is leaky abstractions. I want to be able to reason about my code/software, and I’m fine with magic as long as it doesn’t interfere with the reasoning.

So thank you for making me dig into this.

Gerbrand van Dieyen

@samir @hrefna The problem with magic is that it leaks, spills over and doesn't compose.

@gerbrand @hrefna Yeah, it’s all leaky eventually (Spectre is a great example), but when we’re complaining about magic, we’re almost never complaining about `malloc` lying to us about available memory, are we?

@samir

Spectre and malloc are both great examples.

Really at some point you just accept that everything you are writing is pseudocode that mostly runs in a way that approximates what you expect and is _good enough_. Most of the time.

Until it isn't.

@gerbrand

@samir

You also don't have to scratch very hard in compiler optimizations either before you start running into it causing actual real problems or unpredictable behavior in production code.

Not even in a JIT either. In a standard AOT compiler.

That's without getting into Tomasulo's algorithm or how modern branch predictors work.

@gerbrand