Introducing Rubyfmt
summary
A Ruby formatter is being built that claims no configuration and aims to be correct and fast. It parses with Ripper for correctness (not whitequark/parser), prototypes in Ruby proved too slow (106 ms small file, 415 ms on a 2,000-line file), and it now uses a Rust native extension fed by JSON to hit a <100 ms goal for ~3,000-line files. Distribution avoids gems and bundler because startup time kills interactivity.
AI-written summary · about
chapters (15)
- 0:00Start
- 4:57No formatting related configuration options
- 8:22TDD results in better code
- 9:07This is another way of discussing tradeoffs
- 9:33My Principles
- 9:50Do one thing well Correctness beats simplicity Speed is needed at any cost
- 15:27Support one consistent style
- 20:48Disadvantages
- 21:18Running Ruby is slower than not running Ruby
- 22:30Rubyfmt uses ripper to ensure compatibility
- 24:24How fast is fast enough?
- 25:18100ms on 3k lines of Ruby code is the goal
- 27:13bundle exec
- 32:18an entire set of tooling in Rust to work with Ruby source code
- 33:40Sweating the details








