first they had machine code
then they wrote the assembler in machine code
then they rewrote the assembler in assembly
and assembled it with the machine code assembler
then they wrote the C compiler in assembly
and assembled it with the assembly assembler
then they rewrote the C compiler in C
and compiled it with the assembly C compiler
then they had the C compiler
and everything else was written in C
(note: this is a massive oversimplification and ignores much of the history of programming languages, but it at least gets across the idea of how bootstrapping is done)
Also the first version of a new compiler (the one written in another language) is often skeletal, implementing only the features necessary to compile the full version (written in its own language), which is then immediately used to recompile itself.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
first they had machine code
then they wrote the assembler in machine code
then they rewrote the assembler in assembly
and assembled it with the machine code assembler
then they wrote the C compiler in assembly
and assembled it with the assembly assembler
then they rewrote the C compiler in C
and compiled it with the assembly C compiler
then they had the C compiler
and everything else was written in C
(note: this is a massive oversimplification and ignores much of the history of programming languages, but it at least gets across the idea of how bootstrapping is done)
Also the first version of a new compiler (the one written in another language) is often skeletal, implementing only the features necessary to compile the full version (written in its own language), which is then immediately used to recompile itself.
Indeed. And the machine code is created as part of the physical CPU design.
And then we fucked it all up by writing the JavaScript interpreter.
Blame the Brave CEO