7 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
The author describes how they ported the JustHTML HTML5 parser from Python to JavaScript in just 4.5 hours using Codex CLI and GPT-5.2. The resulting library passes over 9,200 tests, mimics the original's API, and highlights both the potential and ethical concerns of using AI for software development.
If you do, here's more
Simon Willison details his experience porting the JustHTML library from Python to JavaScript using Codex CLI and GPT-5.2, completing the task in just 4.5 hours. JustHTML, a project by Emil Stenström, is a standards-compliant HTML5 parser written in pure Python. Willison's goal was to create a dependency-free JavaScript version that mirrors JustHTML's API while passing 9,200 tests from the html5lib-tests suite. He documented the process, which involved minimal initial prompts and several follow-ups to refine the code.
The project kicked off with Willison cloning the necessary repositories and initiating Codex CLI. He prompted the AI to analyze the Python code and draft a specification for the JavaScript version. After reviewing the spec, he directed Codex to implement a basic version that could parse a simple HTML document correctly. The iterative process allowed him to monitor progress in real-time via GitHub, even while attending to family activities. By the end, he had a fully functional library that included unit tests, a playground interface, and comprehensive documentation.
Willison's insights into the capabilities of large language models (LLMs) highlight how AI can streamline coding tasks. He recorded extensive token usage during the project, estimating that if he were charged for the tokens used, the cost would have been around $29.41. However, since he utilized his ChatGPT Plus subscription, there was no additional expense. The project illustrates not just the efficiency of AI in software development, but also the potential for rapid prototyping and deployment in programming.
Questions about this article
No questions yet.