4 ms·
"Don't abstract your code into functions! Just copy and paste it all over the place. That way, when you need to change the behavior of one of them, the rest don
by dTal 6y ago
"Don't abstract your code into functions! Just copy and paste it all over the place. That way, when you need to change the behavior of one of them, the rest don't break!"
/s
Abstraction is good. Surely anyone can see that having one copy of code is superior - technically, and from a standpoint of elegance - than duplicating it once per program. A huge amount of effort has gone into making this infrastructure work. This isn't just about disk space, or memory, or the ease of patching - it's about composability. I like that I can override behavior with LD_PRELOAD. If we think of our systems as a collection of unrelated, opaque blobs, then static linking looks seductively simple; but if we think of them as a network of interacting code that transcends application boundaries - vivisected and accessible, like a Lisp machine - then static linking is a repulsive act of violence against deeply held aesthetic principles.
If dynamic linking doesn't work well - if we've messed it up - that's a sign we should try harder, not give up.
- jart 6y agoYou're forgetting the dream of MULTICS. Modern MMUs grant each program dominion over its virtual address space and white picket fence like the American Dream. It doesn't inhibit cooperation between program processes which can totally happen over IPC or network mechanisms. Sort of like how you don't need a farm in your backyard to eat food. You just go to the food store and pay them money. What you appear to want is a collective farm where code is reorganized into a communal state where no boundary is sacred and that MMU you paid good money for isn't worth the silicon on which its printed.
- CyberDildonics 6y agoReinventing QNX will be cutting edge for decades.
- jart 6y agoWhich reinvented 5ESS MERT which was the intended purpose of UNIX, which reinvented MULTICS. It's about more than real time reliable systems though. It's about software freedom too. Ask yourself: "Am I authorized to pick an arbitrary pointer address, and store what I want there?" If the answer is "no, you can't, because some DLL or SO or DYLIB file might have been randomly loaded there" then you are not using a Free as in Freedom operating system.
- CRConrad 6y agoIn its own way quite a cool and valid vision... For a Lisp machine, or some other future micro-kernel (and pretty much micro-everything?) operating system. Not for Linux, though, because that's not the kind of operating system Linux is.