December 16, 2025
Deck the halls, ship the code
I Ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in 4.5h
AI ports a whole HTML tool while he decorates a tree — commenters split between awe and side‑eye
TLDR: An AI tool ported a Python HTML parser to JavaScript in hours and passed 9,200 tests, all while the developer decorated a tree. Commenters are split between cheering a new era of test‑driven porting and debating real‑world accuracy, performance, and whether AI‑assisted copying is legal or ethical.
Simon Willison hit a literal “YOLO” switch on an AI coding tool and, while trimming a Christmas tree and watching a movie, it cranked out a 9,000‑line JavaScript HTML parser that passes 9,200 tests. The repo is live: simonw/justjshtml. The crowd reaction? Equal parts confetti and courtroom.
The hype camp is loud. Even Simon jumps in saying this proves a new kind of project is “massively more feasible” when you’ve got rock‑solid test suites like html5lib-tests. One commenter flexes history trivia: before today’s AI, Firefox’s HTML5 parser was written in Java and then mechanically translated to C++—so automated porting isn’t brand new, just faster and flashier now.
But the skeptics are caffeinated. A sharp reply warns that “passing tests” isn’t the same as behaving exactly like real browsers, and points to speed‑first parsers that trade accuracy for performance. Others side‑eye the ethics: is an AI‑assisted port skating close to copying? One commenter brings up the “is it legal—and even if it is, is it ethical?” question, while another argues that if tests and specs are complete, the AI result should be “no better, and no worse” than a human team’s.
Meanwhile, the jokes write themselves: the “—dangerously‑bypass‑approvals—” flag is getting meme’d as the “hold my eggnog” button, and the 1.4M tokens eaten by the model? “AI drank all the Christmas cookies,” quips one wag. Tech miracle or test‑suite party trick? The thread can’t decide, and that’s the fun.
Key Points
- •Simon Willison ported Emil Stenström’s JustHTML from Python to JavaScript, creating the justjshtml library.
- •justjshtml is dependency-free, imitates JustHTML’s API, and passes 9,200 html5lib-tests.
- •GPT-5.2, run via Codex CLI, generated 9,000 lines of JavaScript across 43 commits in several hours.
- •The process consumed 1,464,295 input tokens, 97,122,176 cached input tokens, and produced 625,563 output tokens.
- •The effort leveraged the HTML5 specification and the html5lib-tests suite, with context from projects like Servo’s html5ever.