News for hackers. Stuff that matters.
Re:Let’s Build a Compiler (1995) by barrkel on Saturday September 25, 2010 @01:06PM (#1727338)
A problem is that the closest language, in terms of abstraction stack, would probably be C, and people who know C wouldn't benefit as much from it, because C users these days tend to be older and more experienced, and because far fewer beginners start out with C. Pascal has always been more beginner friendly. Ironically, the most maligned part of Pascal historically - its type safety - has long since won the day, albeit with polymorphism that Pascal lacked.

In theory, it might be nice to do something along the lines of Ruby, Python or Javascript, but those languages are, I think, too far removed from the CPU opcodes to get the same effect. Meta-circular interpreters, like in Lisp etc., are cute and are good for explaining the fundamental semantics of the language, but there's still an awful lot of magic baked in, in the same way that a C compiler written in C can embed the meaning of '\n' as a '\n' literal constant in the source itself. Of course, that magic may be subverted, most famously in the trusting trust essay:

http://cm.bell-labs.com/who/ken/trust.html

Re:Let’s Build a Compiler (1995) by kragen on Sunday September 26, 2010 @03:40AM (#1728760)
I wrote a metacircular compiler-compiler that generates parsers in PostScript: http://github.com/kragen/peg-bootstrap and a bootstrapping compiler for a very simple Forth-like language: http://github.com/kragen/stoneknifeforth (although I need to fix it so it will run on current kernels; apparently I cut some corner in the ELF spec...)