HN
Today

I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours

Simon Willison leveraged Codex CLI and GPT-5.2 to port a full HTML5 parser from Python to JavaScript in under five hours, demonstrating unprecedented AI coding capabilities. This feat, achieved with minimal human intervention, involved the AI passing thousands of tests and generating thousands of lines of code. The story resonates on HN for its striking illustration of AI's potential to revolutionize software development, sparking discussions about efficiency, ethics, and the future of programming.

22
Score
1
Comments
#9
Highest Rank
6h
on Front Page
First Seen
Dec 17, 12:00 AM
Last Seen
Dec 17, 5:00 AM
Rank Over Time
910109912

The Lowdown

Simon Willison undertook a fascinating experiment, successfully porting Emil Stenström's JustHTML, a pure Python HTML5 parser, to JavaScript using cutting-edge AI tools. This ambitious project, executed with remarkable speed and efficiency, highlights the burgeoning capabilities of AI-driven development.

  • The core task was to translate JustHTML, which uses the comprehensive html5lib-tests suite, from Python to a dependency-free JavaScript library.
  • Willison utilized OpenAI's Codex CLI with GPT-5.2, instructing it with only a few prompts, including one to design the API and another to implement the project incrementally.
  • The AI operated largely autonomously for 4.5 hours, consuming millions of tokens, and producing 9,000 lines of JavaScript across 43 commits.
  • During this time, Willison engaged in other activities like decorating a Christmas tree and watching a movie, only intervening to restart the AI after a token allowance reset.
  • The resulting JavaScript library, simonw/justjshtml, successfully passed 9,200 html5lib-tests and included a playground interface and comprehensive documentation, all generated by the AI.
  • The estimated cost for the tokens used was $29.41, covered by a $20/month ChatGPT Plus subscription, making the development cost effectively zero. This experiment underscores that frontier LLMs can perform complex, multi-hour coding tasks with minimal supervision, especially when a robust test suite is available. It dramatically illustrates the plummeting "cost of code" and opens critical discussions around the ethics, legality, and future of AI-assisted software development, prompting questions about authorship, intellectual property, and the very nature of open source contributions.