Porting JustHTML HTML5 Parser from Python to JavaScript Using Codex CLI and GPT-5.2
By
pbowyer
Master baker tier. Every paragraph earns its place on the tray.
Summary
The author describes successfully porting JustHTML, a standards-compliant HTML5 parser originally written in Python, to JavaScript using Codex CLI and GPT-5.2 in just 4.5 hours. The resulting JavaScript library (simonw/justjshtml) is dependency-free, passes 9,200 tests from the html5lib-tests suite, and imitates the original Python API. The article details the technical process, challenges encountered, and impressive results achieved with AI-assisted coding tools.
Key quotes
· 5 pulledI decided to try porting JustHTML from Python to JavaScript with the least amount of effort possible, using Codex CLI and GPT-5.2. It worked beyond my expectations.
I built simonw/justjshtml, a dependency-free HTML5 parsing library in JavaScript which passes 9,200 tests from the html5lib-tests suite and imitates the API
The entire process took me 4.5 hours, from starting with the Python code to having a working JavaScript library that passes 9,200 tests.
What surprised me most was how well GPT-5.2 understood the structure and intent of the Python code, making intelligent decisions about how to translate Python idioms to JavaScript equivalents.
This experience has convinced me that AI-assisted programming tools have reached a point where they can dramatically accelerate certain types of software development tasks.
You might also wanna read
How AI-Assisted Coding Enabled Shipping a Go Service Without Prior Language Expertise
A technical architect shares his experience using AI tools (like GitHub Copilot and ChatGPT) to build a working service in Go, a programming
How AI Coding Models Are Outpacing Our Context Control Systems
The author reflects on how their coding process has evolved over the past year while using AI models to write code. They note that while mod
Building a Software Factory with Claude Code: From AI-Assisted Coding to Agentic Development
This article provides a comprehensive guide on building a software factory using Claude Code and other AI coding tools. It covers the evolut
Building a Software Factory with Claude Code: From AI-Assisted Coding to Agentic Development
This article provides a comprehensive guide on building a software factory using Claude Code and other AI coding tools. It covers the evolut
Agentic Engineering: The disciplined alternative to vibe coding in AI-assisted development
The article discusses the evolution of AI-assisted programming, contrasting the "vibe coding" approach (coined by Andrej Karpathy) — where d
10 Lessons for Agentic Coding: Navigating Programming When Code Is Cheap
The article discusses the emerging paradigm of "agentic coding" — using AI agents (like Codex, Claude Code, etc.) to write code when the cos
