Hacker News new | ask | show | jobs
by akira2501 623 days ago
Compilers are just translators. Which is why it's not too hard to write a compiler in the language that the compiler itself implements.

An assembly quine is an odd thing to even ponder.

1 comments

Sort of. The very first compiled binary of any new language has to first be written in a language that already has a compiler, and the very first compiler of any high-level language at all had to be written in assembler.

Ultimately, if you can't write a Quine directly in logic gates, which you can't because no microprocessor can output another microprocessor, you need something external to the "universe" of the language.

> has to first be written in a language that already has a compiler

You only need an interpreter for that language.