█

AI/TLDR

Piotr Sarnacki · 2026-10-11 · notable

Piotr Sarnacki — AI rewrites still need you to think

Piotr Sarnacki load-tests DHH's AI-written Rust and Elixir rewrites of Campfire and finds the gaps came from choices nobody made in the prompt. The essay reached 271 points on Hacker News.

GitHub avatar of Piotr Sarnacki, author of 'I'm sorry, but you still have to think'

A Rust developer tests AI-written rewrites of the same app and shows why the prompt's missing decisions matter more than the language.

What is it?

In 'I'm sorry, but you still have to think', Piotr Sarnacki looks at Campfire Once, which DHH had an AI agent rewrite from Ruby to Rust, and later to Elixir and Go, without reading the code. Sarnacki argues that when a prompt is not specific, design choices such as backward compatibility, memory limits and losing notifications after a crash become 'a coin flip'.

How does it work?

Sarnacki reviews the generated code and reruns the load tests. The Rust version drops parts of backward compatibility and swaps Redis for in-process queues, and makes blocking database calls inside async tasks; the Elixir version runs all SQL in one process. He says the original benchmarks were closed-loop, so they measured throughput but not behaviour when users arrive at a fixed rate.

Why does it matter?

At a steady 100 requests per second, his tests show Rust delivering about 14% of events with no HTTP errors, while Elixir delivered about 60% but timed out on about 23% of POSTs and grew unbounded mailboxes to 1.8 GB. His conclusion for anyone shipping agent-written code: 'you still need to know what you're doing', and one metric is never enough to compare systems.

Who is it for?

developers who let coding agents write production code

Sources · 2 outlets

Tags

  • ai-coding
  • software-engineering
  • benchmarks
  • rust
  • elixir
  • backpressure
  • opinion
  • piotr-sarnacki
  • hacker-news

← All releases · Learn AI