In the spirit of this question, I'd like to ask a similar question, but about compilers, not about interpreters.
What is the conceptually smallest compiler that can compile its own code?
When I say "conceptually smallest" I mean that it uses only very basic concepts and builds up from there, rather than that it contains very short code. An example of why this is an important distinction is OTCC a very tiny C compiler which is small because it's obfuscated, not necessarily because it is conceptually simple (it may also be conceptually simple, but I don't know; it's obfuscated).
I would also like to add that the following also might be a very conceptually small program, but it doesn't actually tell us anything about what's going on, so it's not really what I'm looking for either:
(writefile argv[2] (generate (parse (readfile argv[1]))))
What I'm really looking for is a language that is:
- Turing complete.
- Capable of compiling itself.
I'm interested in this because
- it would be an interesting case study and
- it could be useful as a starting point for bootstrapping compilers.
If it doesn't exist, I may just write it myself. :)