Let's write an esoteric language in Ruby!
summary
Implementation claims a working Ruby Piet interpreter called Rpiet plus a graphical debugger that runs under JRuby with JavaFX. Starting interpreter takes ~147 seconds on a prime-detection benchmark. Replacing image reparse with a graph interpreter doubles speed and reduces instructions from 197 to 76. Converting the graph to an IR and then transpile to Ruby yields about 70× speedup. Tooling includes profiler, control‑flow graphs, an assembler and an ASCII image format; the debugger and optimizations do work.
AI-written summary · about
chapters (17)
- 0:00Esoteric languages intro
- 1:04What is an esolang
- 2:11P language overview
- 5:48P program execution
- 7:35RPit implementation
- 8:59P program examples
- 9:21Porting P to Ruby
- 11:48Original interpreter challenges
- 12:52Abstract syntax graph
- 14:19Benchmarking prime detection
- 15:23Graph to instructions
- 17:30Optimizing instructions
- 19:42P to Ruby transpile
- 22:31Performance and conclusions
- 23:54Lessons from P and Ruby
- 24:58Tools for P
- 25:44Q&A
related talks
22mImplementing An Esoteric Programming
29mRuby Internals: A Guide For Rails Developers
45mUsing Ruby to Generate Faster Ruby Code through Partial Evaluation
43mGrammars, Parsers, and Interpreters, In Ruby
33mRuby the Hard Way: Writing Bytecode to Optimize Plain Ruby
22mInvariants in my own Ruby: some things must never change
32mExperiments in sharing Java VM technology with CRuby
41mCoding like it’s 1977: Ruby on the Apple ][
