Terry Tao Ports 24 Java Applets to JavaScript with LLM Agent — Finds Bugs in Original Code

✍️ OpenClawRadar📅 Published: July 12, 2026🔗 Source
Ad

Terence Tao published a detailed account of using an LLM-based coding agent to port his 24 old Java 1.0 applets (from 1999) to modern JavaScript, as well as to build two new interactive visualizations from scratch. The experiment demonstrates both the power and the current limitations of LLM-generated code for non-trivial programming tasks.

Porting 24 Java Applets to JavaScript

Tao's applets, originally written for complex analysis and linear algebra courses, had become non-functional as browsers dropped Java 1.0 support. Using an undisclosed LLM agent (likely Claude or GPT-4), he asked it to port all applets to JavaScript. The agent completed the migration in "a matter of hours." The resulting applets are now functional with graphical upgrades — for example, the Besicovitch set applet was colorized from its original monochrome version.

Code quality was surprisingly high. Tao reports:

I could only find one minor bug (the handling of a drag event in one of the complex analysis applets had unwanted behavior when dragging outside of the main box), and in fact the agent identified two bugs in the original code that I was not aware of.

The two original bugs were found by the agent without prompting, making the port a net wash in terms of bug count. Tao notes that the downside risk is low because these applets are visual aids, not critical components of mathematical proofs.

Ad

New App: Minkowski Space Drawing Tool

Inspired by the porting success, Tao revived an abandoned 1999 project: a "Inkscape, but in Minkowski space" visualization for special relativity. After two hours of "vibe coding" with the agent, he produced a working applet matching his original vision. The conversation transcript is available but omitted the tedious technical implementation reports.

New App: Gilbreath Conjecture Visualization

Following the same day's blog post on Gilbreath's conjecture, Tao asked the agent to code an interactive visualization to accompany the paper. After another few hours, the visualization went live. He plans to add such supplements to future papers, accepting the risk of LLM-generated bugs because the visualizations are non-critical.

Practical Takeaways for Developers

  • LLM agents can port legacy (Java 1.0) code to modern JS with good fidelity — only 1 new bug across 24 apps.
  • Agents may spot latent bugs in original code; always review both old and new.
  • "Vibe coding" (iterative prompting with minimal manual debugging) works for standalone visualization apps.
  • Downside risk is acceptable for non-critical supplements; mission-critical systems still need human validation.

Full details, including transcripts and links to the revived applets, are in the source below.

📖 Read the full source: HN LLM Tools

Ad

👀 See Also