AMA: Explaining my 750 line compiler+runtime designed to GPU self-host APL
This is fantastic! I can sort of grok your code at a high level but only enough to appreciate it; not to do much with it as that would require investing a bunch of time.<p>Questions:
1. Did you find anything really surprising? Some new algorithm or idiom or something that was surprisingly easy?
2. Is it worth applying some of the same tricks in compilers for other languages?
3. Have you considered using the same &quot;frontend&quot; to create an APL-&gt;Scheme translator? That might have more of a pedagogical value. Scheme has a great macro system and it is a HLL so can be a good IL at the very least -- I can then translate the compiler itself to Scheme and study :-)