Hacker News new | ask | show | jobs
by pjmlp 1573 days ago
Wirth was even more drastic in what concerns writing bootstraped compilers.

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.

1 comments

I've never been megalomaniac enough to think I could design a new language. But I did once write a Pascal source-level debugger; I think the compiler was Intel Pascal (long time ago). It taught me a lot about how the compiler worked, and how the language worked.

I've used to suffer quite badly from Impostor Syndrome, and that project did a lot to alleviate my symptoms.

I never shared the project with anyone else; it was never completely finished.

Nice story, thanks for sharing.

My hard drive is full of unfinished projects, started to learn about programming language, or try out new design approaches, quickly abandoned after the initial goal was achieved.

Regarding imposter syndrome, two guidelines that have helped me in such situations, are "only repent for paths not taken", "failure is better that not knowing at all".

Obviously those quotes aren't from me.