3 ms·
They do go into some detail of the steps involved. Basically, it seems as though the system unravels itself, going from simple things to more complex.
by Koshkin 2y ago
They do go into some detail of the steps involved. Basically, it seems as though the system unravels itself, going from simple things to more complex.
- binarymax 2y agoThanks, but perhaps I should have been more clear in my question. How can something self-compile if it doesn't have a compiler to start with? Does the onramp source contain some machine code that is a compiler already?
- Koshkin 2y agoIndeed it does! It all starts with a hexadecimal code which is converted by a tool into the machine code for some simple VM; there seem to be a few more steps, where one thing is used to build another, etc. It is in this sense that this particular system is said to be able to “compile itself.”
- prizzom 2y agoI think the missing piece here is that onramp contains the definition of a very simple virtual machine. One that the reader could implement themselves (though a reference implementation is also provided). After it incrementally builds on itself all the way up to a fully functional C compiler.