intertwingly

It’s just data

Two Compilers, One Moment


Two compilers, started a month apart. The first by Ruby's creator. The second by someone with no knowledge of the first.

Spinel — March 16. Roundhouse — April 17. Both compile Ruby in some sense. Both are AI-assisted. Both are products of practitioners with deep but differently-shaped expertise. The interesting question isn't which one is right. It's what changed in the surrounding landscape that made now the moment.

What changed

Prism. A robust, embeddable, official Ruby parser is a hard prerequisite for serious compiler work. Both READMEs name it as a dependency. Infrastructural investments characteristically enable categories of projects rather than any single one — Prism is the canonical example.

The empirical lesson on type inference. Public reports from Stripe and Shopify's Sorbet adoptions noted that the overwhelming majority of typical Rails application code types with minimal annotation. Writebook — at the upper end of Basecamp's metaprogramming taste — has one send and one class macro across the entire app. The ground for whole-program inference is now empirical, not speculative. I've argued elsewhere why that matters even for dynamically-typed targets.

Agentic engineering. Implementation cost has dropped enough that compiler-shaped projects are tractable on horizons of weeks. Spinel went C → Ruby → self-hosting Ruby subset across roughly five weeks. Roundhouse is 275 commits in eight days. Both are evidence; I've already argued the implication.

Each precondition alone might not provoke a project. Together, they make this the kind of moment where independent attempts cluster.


Two answers

Spinel. A self-hosting AOT compiler that reads Ruby source, performs whole-program type inference, and emits standalone C — then native binaries. No external annotations. Single target — native code — pursued in depth: an 11.6× geometric-mean speedup over miniruby across 28 benchmarks, 86.7× on Conway's Game of Life. The exclusion list is small and explicit: no eval, no send/method_missing/define_method over runtime data, no threads. The bounded value space is "Ruby, faster," and it's substantially Ruby. Spinel — the gemstone often mistaken for ruby. The name fits.

Roundhouse. Treats Rails as the specification rather than Ruby as the language. A compiler-shaped pipeline (parser, typed IR, lowerers, target-specific runtimes) with six emitters, each carrying a target-specific value thesis — Rust, TypeScript, Elixir, Go, Python, Crystal. Reads schema, conventions, and inference; reaches for RBS where helpful. Built on the ruby2js / Juntos / Railcar lineage. The runtime is Rust, not Ruby — not self-hosting.


What the differences reveal

Different sub-questions, both legitimate. Spinel and Roundhouse draw the same metaprogramming cliff — no eval, no dynamic send, no define_method over runtime data — from opposite directions. Spinel asks: how Ruby-faithful can a compiler be at the cost of program coverage? Roundhouse asks: how much program coverage and target reach can be had at the cost of Ruby fidelity? Same line, different starting questions. Both were unanswerable five years ago. Both are answerable now. That two practitioners independently chose different sub-questions is itself information — the moment is rich enough to support multiple non-overlapping bets.

Overlapping inputs, non-overlapping value. Roundhouse's runtime is written in compiler-runtime-shaped Ruby — small classes, no metaprogramming over runtime data, statically determinable structure — exactly the shape Spinel is purpose-built for. Where input domains overlap, Spinel is the right tool: single target, language-runtime expertise, optimization tuned for native binaries. Spinel will compile Conway's Game of Life faster than any Roundhouse target ever will. Where the domains don't overlap — Rails apps; six targets; target-specific value (Rust for speed, TypeScript for edge, Python for ecosystem) — the projects are doing different things, and Roundhouse won't try to compete on Spinel's ground.

One open question, two beneficiaries. Spinel is testing a hypothesis the broader Ruby ecosystem hasn't settled: how much type information can be recovered from idiomatic Ruby alone, without external annotations. Roundhouse benefits from whatever Spinel learns — the first real Roundhouse test compiled a blog with no annotations needed; schema plus conventions plus inference was sufficient — but Roundhouse's architecture doesn't depend on the answer. RBS is available as a hedge; the architecture works either way.


Two answers. One moment. Probably not the last cluster.


Roundhouse is open source: dual-licensed MIT / Apache-2.0. Issues and discussion welcome.