← Experiments
A series of experiments · Oct 2026

Rewritesone shipped product, rebuilt under different rules

Same pixels. Same database. Different rules.

Basecamp's ONCE Campfire is a Rails chat app. Basecamp rewrote it in seven languages and published the harness that checks and times every version. These are three more, all in F#, each built by Claude Code agent workflows under one rule, each checked screen by screen against the original and timed on Basecamp's harness beside Rails, Rust and C, in the same sessions.

3
rewrites, three rules
6
apps in the same sessions
KLOC
Rails, room page
Code against speedsame sessions · 16 clients
Code against speedBackend lines of code (KLOC, log scale) against room-page requests per second (log scale), six Campfires in the same sessions.481632641282k8k32k128kbackend KLOC →room page req/s →portonCracktheDotNetWayRailsRustC
26.5theDotNetWay, the smallest rewrite
2.19×onCrack against C
4.83×room-page spread, same language
01 — The three

One language, three rules.

The port came first. The other two fork it and change one thing: what each is allowed to do. Each has its own page, and every number on those pages links to the file it came from.

01 · the port

The F# port

Translate it, byte for byte.

The ruleDo the same work per request as Basecamp's Rust port, and render every screen byte-identical to it.

Translated crate by crate from the Rust port by phased agent workflows: its own front server, SQLite layer, HTML writer and HTML5 parser, all in F#. It matched every parity screen byte for byte, then ran 1.24-1.33x the Rust port it was translated from. Basecamp's Rust has since added full-page caching, so on today's harness the port does 0.71× Rust on the room page.

F#ASP.NET CoreFalcoOwn front serverOwn SQLite layerhtml5ever port
39.2KLOC
7.20×Rails, room page
0.71×Rust, room page
214/214states byte-identical to Rust
Open F# port → Source ↗
F# port card drawing
02 · onCrack

onCrack

Same pixels, no speed limit.

The ruleDo any work you like, as long as every screen stays pixel-identical to Rails and no one ever sees a stale page or someone else's.

Versioned page caches that re-check the session and room membership on every hit, group commit for concurrent posts, cache hits answered by the front server, gathered Cable writes, and a Cable log that keeps every reader. The fastest of the six in every workload, and in Basecamp's 1,000-client Cable test it cut 0 clients where Rust cut 902-959. It pays in memory, and it is the largest of the three.

F#Versioned page cacheGroup commitFront-server hitsGathered sendmsgNative AOT
43.0KLOC
34.2×Rails, room page
3.39×Rust, room page
944/944screenshots equal to Rails
Open onCrack → Source ↗
onCrack card drawing
03 · theDotNetWay

theDotNetWay

Let the framework do it.

The ruleWrite it the way a .NET team would: the standard piece for every layer, hand-written code only where Rails parity demands it.

Forked from the port and rebuilt one layer at a time behind the pixel gate: Kestrel and ASP.NET Core middleware for the front server, EF Core with Dapper on the hot reads, Falco.Markup views, AngleSharp for HTML, WebSockets with Channel<T> for Cable, HybridCache for pages. The smallest of the three and smaller than Rust; slower than Rust, C and onCrack.

F#KestrelEF CoreDapperFalco.MarkupAngleSharpHybridCache
26.5KLOC
7.08×Rails, room page
0.70×Rust, room page
4,918/4,918pixel cells equal to Rails
Open theDotNetWay → Source ↗
theDotNetWay card drawing
02 — How they differ

Same language, 4.83× apart.

The language was held constant, so these differences come from the rules. Layers first, then the numbers, all from the same benchmark sessions.

F# portonCracktheDotNetWay
The ruleSame work as Rust, byte-identical screensAny work; pixel-identical and never staleThe framework's piece for every layer
Started fromBasecamp's Rust port, translatedThe F# port, forkedThe F# port, forked
Front serverHand-written (Thruster's job)Hand-written; answers cache hits itselfKestrel + ASP.NET Core middleware
DataOwn SQLite layer, SQL by handOwn layer + group commitEF Core; Dapper on hot reads
ViewsOwn UTF-8 writer, fragment cacheSame, plus whole-page cacheFalco.Markup + HybridCache
HTML parserPort of html5everPort of html5everAngleSharp
CableOwn WebSocket serverOwn; one sendmsg per batch, keeps every readerASP.NET Core WebSockets + Channel<T>
Lines of code (KLOC)39.243.026.5
Room page, req/s35,619169,08834,989
… against Rails7.20×34.2×7.08×
… against Rust0.71×3.39×0.70×
Post a message, req/s9,51615,1492,901
… against Rails23.7×37.8×7.24×
Room page with a writer, against Rails11.9×58.3×11.7×
Screens checked against the original214/214 states byte-identical to Rust944/944 screenshots equal to Rails4,918/4,918 pixel cells equal to Rails

Lines of code by upstream's counting rule, applied the same way to all three (the count); Rails, Rust and C from onCrack's count under the same rule. Screens are each project's own final gate, and the gates grew: the port checked 214 states against Rust, onCrack 944 screenshots against Rails, theDotNetWay 4,918 cells (three browsers, four viewports, light and dark).

03 — Six ways

Requests a second, six Campfires, one harness.

Basecamp's once-campfire-verification harness ran all six apps in each of four sessions: 3 rounds of 8 seconds at 16 clients, the app on 4 CPUs and the load generator on 4, every response checked and every post audited. Each cell is the median of 6 rounds; the fastest in each row is shaded and the rewrites are outlined, with their multiple of Rails beneath.

Measured in one Linux VM on an Apple M4, so the absolute rates are not comparable with Basecamp's published figures on a Ryzen; Rails here is current Rails (ca9b963). Source, sessions and every round: the six-ways benchmark.

04 — The method

A rewrite counts only if it can't be told apart.

Same loop each time. The rule changes; the gates don't.

Reference

Pin the original

Rails and Basecamp's Rust port, pinned as submodules, with the Rust port's parity harness and golden vectors.

Rule

Pick one constraint

Same work as Rust; any work at all; the framework's way. Everything else stays: the database, the cookies, the pages.

Claude Code

Build in phases

Agent workflows design each phase, build it unit by unit, and hand it to an independent, adversarial verifier.

Gates

Prove it's the same

Screenshot, accessibility-tree and DOM parity on every seed, a cookie round trip and a database differential with Rails, then Basecamp's harness.

Chris Kluis set each rule, made the calls and decided what shipped. Claude Code did the translating, building, testing and measuring.

05 — Next

More languages, the same gates.

Nothing here is specific to F#. The recipe needs a shipped product, a reference implementation, a pixel gate and its makers' harness. More languages are planned; each will join the table above under the same gates and the same sessions. Basecamp's own comparison covers Django, Laravel, Express, Elixir, Go, Rust and C.