Slaying the Dragon
summary
Shows how to implement a tiny Lisp in Ruby and compile it to Rubinius bytecode, claiming a working interpreter plus bytecode generator rather than just theory. Uses a regex single-page tokenizer, a reader that turns tokens into s‑expressions, simple AST node classes, and Rubinius’s bytecode DSL to emit stack‑machine instructions. Demonstrates evaluating expressions (e.g. 66 => 36, 1+23 => 7), cites a 56‑language repo, and delivers runnable code called Melody.
AI-written summary · about
chapters (9)
- 0:00Start
- 1:47SLAYING THE DRAGON
- 2:23A GUIDE TO IMPLEMENTING YOUR OWN PROGRAMMING LANGUAGE
- 2:40UNDERSTAND HOW PROGRAMMING LANGUAGES WORK
- 9:04QUICK INTRO TO INTERPRETERS
- 9:39WHAT THE HECK IS A VIRTUAL MACHINE?
- 14:38READER IMPLEMENTATION IS BASED ON THE GRAMMAR
- 15:41ABSTRACT SYNTAX TREES
- 16:56INSTRUCTIONS
related talks
29mRuby Internals: A Guide For Rails Developers
36mCompiling Ruby
41mCoding like it’s 1977: Ruby on the Apple ][
53mCode Generation: ....
43mGrammars, Parsers, and Interpreters, In Ruby
37mRuby ate my DSL!
51mForbidden Fruit: A Test of Ruby's Parse Tree
38mRubyX: Compiling Ruby and it's effect on the community
