Glean 拾遗
Recent picks

2picks · chronological

07-10

Rewriting Bun in Rust: 535K Lines, 11 Days, 64 AI Agents

Bun's creator Jarred Sumner recounts how he used Anthropic's Claude Fable 5 to rewrite Bun's 535,496 lines of Zig into Rust in 11 days. The motivation: Zig's manual memory management caused numerous use-after-free, double-free, and memory leaks when mixed with JavaScriptCore's GC. Instead of an incremental port, he orchestrated 64 Claude agents in parallel using dynamic workflows and adversarial review. 100% of Bun's test suite (over 600k assertions) passed on all 6 platforms. The rewrite fixed 128 bugs, reduced memory usage by up to 90%, shrank the binary by ~20%, and improved throughput by 2-5%. The article details the workflow, common porting mistakes (e.g., debug_assert! side effects, slice overruns, comptime format differences), and how Rust's Drop systematically prevented memory leaks. A first-hand account of using cutting-edge AI to accomplish a year-long team project in less than two weeks.

bun.com · 65 min · Agent Engineering · AI Engineering · Code
06-21

Ponytail: Lazy Senior Dev Inside Your AI Agent, Cuts Code Bloat by ~54%

Ponytail is a rule plugin for 14+ AI coding agents (Claude Code, Codex, Copilot CLI, etc.) that injects a lazy-senior-dev mindset. Before generating code, it forces the agent to climb a ladder: does this need to exist? Can the standard library or native platform feature do it? Can it be one line? Only then writes the minimum viable solution. Benchmarked on real Claude Code sessions editing a real FastAPI + React repository across 12 feature tickets, it cuts lines of code by 54% (mean), tokens by 22%, cost by 20%, and time by 27% while keeping 100% safety on validation, error handling, security, and accessibility. Ideal for developers tired of AI bloat and over-engineering.

github.com · 12 min · Agents · AI Engineering · Code Generation