Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

5 results for “HTML5 Parser”

Newest and most relevant first

swift-justhtml

AI-assisted porting of the same HTML5 parser across languages is now a repeatable pattern, giving developers dependency-free parser options in Swift, JS, OCaml and Python with comparable benchmark data.

A developer named Kyle Howells has released swift-justhtml, a free HTML5 parser (software that reads web page code) for the Swift language. It was built using AI coding assistants, or 'vibe-coding', and checked against the html5lib test suite. It joins similar versions already made for Python, JavaScript and OCaml.

This is the fourth AI-built port of the JustHTML parser, now targeting Apple's Swift ecosystem. Benchmarks show Swift parsing in 1,313 ms versus Rust's 303 ms and Python's 4,189 ms, so performance-conscious teams still favour Rust. For iOS and Mac developers wanting a dependency-free HTML5 parser, this is a viable option; others gain little.

swift-justhtml is a dependency-free HTML5 parser for Swift, built by Kyle Howells using AI coding agents validated against the html5lib-tests suite, following prior ports to Python, JavaScript and OCaml. Benchmarks report total parse time: Rust html5ever 303 ms, JavaScript 1,035 ms, Swift 1,313 ms, Python 4,189 ms. Swift thus trails the JavaScript port by roughly 27%.

Simon Willison’s Weblog →

AoAH Day 15: Porting a complete HTML5 parser and browser test suite

Introduces 'vibespiling' as a named practice for AI-assisted code porting and raises unresolved copyright questions for anyone porting open-source code with agents.

A programmer named Anil Madhavapeddy used AI coding agents to translate an HTML5 parser called JustHTML from Python into the OCaml language, coining the term 'vibespiling' for AI-powered porting. The result, html5rw, passes the same html5lib-tests browser test suite as the original. He credited the original author with a joint licence and hesitates to release it to OCaml's package repository.

Anil Madhavapeddy produced html5rw, an OCaml HTML5 parser AI-ported from JustHTML, passing the html5lib-tests suite. He licensed it jointly with original author Emil Stenström and is uncertain about releasing it to the opam repository, arguing a redundant AI-ported library could displace human maintainers whose unpaid creativity sustains ecosystems. Organisations adopting agent-driven porting face the same authorship-credit and maintainer-relations questions.

Anil Madhavapeddy AI-ported Emil Stenström's JustHTML parser (which Simon Willison had separately ported to JavaScript) into OCaml as html5rw. It passes the html5lib-tests suite, the standard HTML5 conformance test set. Licensing is a joint licence with Stenström; the transitive Rust dependency licence was not yet traced. No benchmark numbers beyond test-suite pass status are given.

Simon Willison’s Weblog →

firefox parser/html/java/README.txt

Very little changes for readers today; this is a TIL note explaining that Firefox's HTML5 parser is maintained as Java and translated to C++, trivia rather than news.

Simon Willison describes a surprising detail about how Firefox works. Its HTML5 parser, the code that reads web page markup, is written in the Java programming language, then automatically converted into C++, the language Firefox actually ships. The conversion uses a script oddly housed in the W3C's HTML validator repository. It is a curiosity for programmers, not a change that affects anyone.

No product launch, pricing or risk implications here. Willison notes Firefox's HTML5 parser is maintained as Java in the Mozilla repository, then translated to C++ via a custom script, and that the translation tool lives in the Nu Html Checker repository powering W3C validation. The main value is historical context from John Resig's 2009 post on Henri Sivonen introducing the parser.

Firefox's parser/html/java directory holds the HTML5 parser as Java source (javasrc), converted to C++ by running 'make sync; make translate' after cloning the ~8GB mozilla-firefox/firefox repo. The cpptranslate tool, e.g. CppVisitor.java's startClassDeclaration(), emits #define and #include directives and lives in the validator/validator repo behind validator.w3.org/nu/. History: Henri Sivonen introduced the parser in 2009.

Simon Willison’s Weblog →

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

A single $20/month subscription and eight prompts produced a fully tested 9,000-line JavaScript port of a Python library in 4.5 hours, showing multi-hour unsupervised agent coding now works.

Simon Willison used OpenAI's Codex CLI with the GPT-5.2 model to convert a Python program, JustHTML, which reads HTML web code, into an equivalent JavaScript version. The computer did the work largely on its own over about 4.5 hours, passing 9,200 of the industry's standard parser tests while Willison decorated a Christmas tree and watched a movie. The result is a free, reusable tool that anyone building websites or software can now use.

Willison ported the JustHTML Python library to JavaScript in about 4.5 hours using GPT-5.2 via Codex CLI, spending roughly $29 of tokens at API rates, included free in his $20/month ChatGPT Plus plan. The output was 9,000 lines of JavaScript passing 9,200 html5lib-tests in 43 commits. His takeaways: code production is nearly free, but questions of copyright, ethics and production trustworthiness for agent-built ports remain unresolved. Teams doing routine porting work are the ones affected.

Willison ran GPT-5.2 in Codex CLI with --yolo mode to port JustHTML (a Python HTML5 parser) to JavaScript, producing justjshtml: a dependency-free library passing 9,200 html5lib-tests (tokenizer 6,810/6,810, tree 1,770/1,782, serializer 230/230) across 43 commits. Eight total prompts; token usage was 2,089,858 input plus 97M cached plus 625,563 output, estimated at $29.41 at API prices. He attributes success to reducing the task to a robust test suite, 'designing the agentic loop'.

Simon Willison’s Weblog →

JustHTML is a fascinating example of vibe engineering in action

JustHTML is a usable pure-Python HTML5 parser today, and its development is a concrete case study that expert-directed AI agents can produce production-quality libraries.

A Swedish developer, Emil Stenström, released JustHTML, a free Python library for reading and extracting data from web pages. It passes all 9,200+ tests from the official browser-industry test suite, a strict quality bar. What makes it notable is that he built it over several months using AI coding assistants that wrote most of the code, while he made the design decisions. Willison argues this shows how experienced programmers should work with AI.

JustHTML is a free, open-source Python HTML parser that competes with the inconsistently maintained html5lib by passing all 9,200+ official conformance tests at just 3,000 lines of code. Its real significance for decision-makers is the process: one experienced engineer, using VS Code Agent mode with models like Claude Sonnet 3.7, Gemini 3 Pro and Claude Opus, delivered a production-grade library in months of off-hours work. Teams ignoring agent-assisted development are losing that productivity gap.

JustHTML is a pure-Python HTML5 parser (no C extensions, Pyodide-compatible) passing all 9,200+ html5lib-tests and achieving 100% test coverage in ~3,000 implementation lines plus ~11,000 test lines. Stenstrom wired the html5lib conformance suite into an agentic loop from the start, designed the TagHandler API himself, then rewrote from scratch as a port of Servo's html5ever, using a custom profiler, benchmarks and fuzzer with Gemini 3 Pro to outperform existing pure-Python parsers.

Simon Willison’s Weblog →