Smalruby: Visualizing Ruby with Bidirectional Transpiration
summary
A web app that bidirectionally converts Scratch blocks and real Ruby runs entirely in the browser using a forked Scratch editor plus the Prism WebAssembly parser; no server roundtrips. The conversion is a ~23,000-line pipeline handling 43 AST node types and 32 extension converters, with a 15-level precedence table to avoid extra parentheses and proxy-sniffing to survive minification. Round-trip fidelity uses metadata comments to restore original source. Extras include a furigana mode for Japanese readings and a DNCL mode to convert to the university test pseudo-Python.
AI-written summary · about
chapters (10)
- 0:00Introduction and motivation
- 3:08What is Smalruby
- 7:18Implementation details
- 11:32Ruby to block conversion
- 15:41Scratch to Ruby mapping
- 18:43Round-trip fidelity
- 19:05Furigana mode
- 22:10DNCL mode
- 25:14Impact and adoption
- 26:42Future of programming education
related talks
45mSmalruby : The neat thing to connect Rubyists and Scratchers
35mWriting web application in Ruby
40mReinvesting in Ruby
51mForbidden Fruit: A Test of Ruby's Parse Tree
29mRuby Internals: A Guide For Rails Developers
33mThe Ruby Racer: Under the Hood
01h 04mLightning Talks
25mCrash course in transpiling Ruby
