How would we compile our code if all our binaries disappeared?
How would we compile our code if all the binaries in the world disappeared and we had only the source code? At first you might think "It's all okay: I have my Roslyn code here", but wait! It's in C#! So you look at an older C# compiler which is in turn written in, say, C++, but wait... and so forth. Would you end up soldering yourself an ASM compiler?
How would we rebuild current software, if we had all the current hardware and all software source code, but no actual software? Would we follow the same path as before, or would we take some shortcuts and end up having, for example, managed code earlier? Would we skip unmanaged code entirely and end up having a Singularity-like OS? Would we build our new bootstrappers and compilers so that they can use our existing (and probably, by the time we get things running, ancient, code) or would we write everything from scratch?
This post was sourced from https://worldbuilding.stackexchange.com/q/18295. It is licensed under CC BY-SA 3.0.
1 answer
We'd get on the phone to some of the people who did it the first time.
No, seriously. We have a lot of experts in this field who are still alive, and they may well hold enough knowledge between them to build a working BIOS. From there, we can carry on the process a lot faster than it was done the first time: we simply consult the next set of experts for the next bit of knowledge, which we use to construct the next level of software up.
Eventually, this process gets up to the experts at Microsoft and all the big computer companies who make and maintain the languages we use today, and they simply press F5, compile the language's source, and provide us with a fresh new set of binaries.
The bigger problem here is redistribution. If everyone's binaries have disappeared, you need to either reconstruct every computer, or have everyone buy a new one. And then for some of the new languages that aren't pre-installed, you need to beef up your distribution servers so they don't crash when everyone tries to get a copy at once.
0 comment threads