Hacker News new | ask | show | jobs
by jcoglan 5763 days ago
I wrote a Scheme in Ruby that has macros last year: http://github.com/jcoglan/heist. It's an interpreter, not a compiler, and is extremely dynamic: all functions, macros, special forms are just treated as function calls by the parser. Macros are just a subtype of functions that accept and return syntax nodes before eval-ing the output, and this is done at runtime while running all your regular code.