|
|
|
|
|
by makapuf
1575 days ago
|
|
It's funny/interesting that an 1kloc implementation of minimal self hosting Go exist, or C/pascal/oberon compilers ; perfect hindsight view etc. You theoretically could (well if nobody does, no you can't) create a nice language and its implementation quickly. |
|
I don't recall in what paper from him I have read this, so take the story with a grain of salt, also open to corrections.
He actually wrote the initial version of the compiler directly in Pascal.
How did he perform such thing, one would ask.
By writing it on paper using a Pascal subset good enough as stage 0, and then manually compiling the source code into corresponding Assembly instructions that he would then actually type into the cards.
So when he finally got the compiler done, it was already bootstrapped from the get go.
Additionally, P-Code originally wasn't designed to be an interpreter, rather to repeat the above process in an easier way across computer systems.
He was initially surprised that others took it to write Pascal interpreters instead of a bootstrapping tool.