11 ms·
This really only works if the programs you want to preserve are already written in C or can be transformed readily into comprehensible C source, which is not th
by Banana699 4y ago
This really only works if the programs you want to preserve are already written in C or can be transformed readily into comprehensible C source, which is not the most elegant or comprehensible language even in the best of times. What if you want to preserve Python ? now you have to type the entirety of Cpython before you even get to write the main preserved program (in python). What if you want to preserve browser JS ? (for a taste of why this might be useful, see the conversation on Flash. You can crticize and hate it till the cows come home, but it's a substantial part of human cultural heritage regardless.), now you need to type in a browser or at least a JS engine on top of the JS program. For a self-hosted compiled implementations of languages like Haskell or Rust, you would type in an irrelevant bootstrapping compiler in C first then type in the self-hosting compiler then type in the program. That's... tedious and unscalable.
The amount of work you would spend to think and implement workarounds for all of this is better spent thinking and implementing language-, OS-, and hardware- independent specifications and VMs that are minimal and long-lasting, to better support a huge variety of the software and media and languages that make up our cultural heritage now, C being just one language among many.
-------
You mention in an aside that a C interpreter would better suit preservation efforts than a heavy-duty overkill like today's optimizing C compilers, that's a good idea, naive interpreters are easy, much more so than complex compilers or runtimes. BUT, C is horrifically full of undefined behaviour and implementation-defined behaviour, and the spec is a natural language document so even if a behaviour is defined it's not really *defined* in the mathematical well-behaved sense, because you know how natural language is, you're always one tricky test case away from a bug. This is important, you never know you're depending on this or that behaviour until the applications fails or runs very strangely when running on another toolchain.
That's why I argue we need formal specifications and VMs, and minimal ones at that. Indeed, we need a hierarchy of such specifications and VMs, becase hierarchies are efficient at compressing an otherwise-exponential amount of data (think of deep neural networks or search trees, why are they so efficient?). A sequence of bootstrapping minimal VMs is better and easier to preserve than one large heavy VM, eggs and baskets and all. Furthermore, designing new VMs and specifications specifically for preservation would force us to think about the framework we use to formalize and talk about them : maybe we can use $HOT_NEW_THING fresh from CS academia, or maybe we can use a natural numbers- or a boolean circuits- based approach, as those things are not fancy and easier to explain when you don't have a lot of shared context, they are - in a sense - the "bare minimum" you need to understand or talk about computers.