TempMail Ninja
//

Terence Tao Revives Retro Java Applets Using AI Agents

7 min read
TempMail Ninja
Terence Tao Revives Retro Java Applets Using AI Agents

In July 2026, world-renowned Fields Medalist and UCLA mathematician Terence Tao demonstrated that the frontiers of artificial intelligence are not just for proving unsolved theorems, but also for preserving the internet’s fading history. Through a series of rapid, agent-assisted coding sessions, Tao successfully resurrected approximately two dozen interactive mathematical Java applets that had sat dead on his website for nearly two decades. By leveraging modern AI agents—specifically Anthropic’s Claude Code CLI—he bridged the gap between retro internet archaeology and contemporary software engineering, showing how easily old code can be brought back to life.

Originally launched in 1997, Tao’s personal academic homepage at UCLA was a quintessential Web 1.0 artifact. Maintained entirely by hand using the Unix editor vi on his departmental account, the site was a labyrinth of text-heavy directories, lecture notes, and travel schedules. Among its most unique features was a suite of Java 1.0 applets designed around 1999 to help students and researchers visualize complex mathematical concepts. When modern web browsers phased out the Java plugin around 2008 due to mounting security vulnerabilities, these interactive tools died. They remained frozen on his server as digital fossils until Tao decided to migrate his entire web presence to a modern, maintainable GitHub Pages repository.

The Graveyard of Web 1.0: Why the Applets Mattered

In the late 1990s, Java applets were the gold standard for adding interactive graphics to the web. For mathematicians, they provided a rare medium to turn static, abstract formulas into dynamic, real-time visualizers. Tao’s collection of defunct applets was not just a historical curiosity; they represented years of pedagogical design.

The library of revived software includes several highly specific modules:

  • The Honeycomb Applet: Co-written with mathematician Allen Knutson in 1999, this applet visualizes “honeycombs” of order n. These geometric objects parameterize Littlewood-Richardson coefficients (the multiplicities in tensor products of U(n) representations) and describe the eigenvalues of sums of Hermitian matrices. It is notoriously difficult to code by hand.
  • Ten Complex Analysis Visualizers: A suite of tools built for university courses mapping functions on the complex plane, rendering Möbius transformations, and tracing complex contour integrals.
  • Six Linear Algebra Interactive Tools: Visual aids written under Tao’s supervision by Kim Chi Tran in 2002, covering Gaussian elimination, matrix calculation, linear transformations in ℝ², and Gram-Schmidt orthogonalization.
  • The Besicovitch Set Explorer: A tool designed to visualize Kakeya/Besicovitch sets (sets of minimal volume containing a unit line segment in every direction).

When the Java plugin was deprecated, rewriting these applets from scratch was simply too time-consuming. For decades, they lay dormant—until modern agentic workflows offered a third way between manual rewrites and broken automated transpilers.

The Digital Restoration Bench: How Terence Tao Saved Web 1.0 Heritage

To execute the migration, Terence Tao did not rely on rigid mechanical translation tools, which often generate unidiomatic, unreadable code. Instead, he pointed a terminal-based AI agent at the directory containing his old files. The agent was tasked with analyzing the original .java source files alongside the companion HTML pages that embedded them, extraction of the original intent, and synthesis of a modern reimplementation.

The engineering workflow followed a strict “spec-first” recipe:

  1. The agent read the raw, quarter-century-old Java 1.0 source files.
  2. It drafted a precise, human-readable specification of the applet’s behavior, detailing field-by-field state management, rendering logic, and user input bounds.
  3. It refactored the entire system into vanilla, framework-free JavaScript utilizing modern HTML5 Canvas, completely eliminating third-party dependencies.
  4. It linked each resurrected applet to a unified, clean CSS template to provide a cohesive visual style.

This approach preserved the unique mathematical design decisions of the original code. For example, in the Honeycomb Applet, the underlying software does not store the physical lines of the honeycomb directly. Instead, the only state variable is a “dual hive”—a triangular integer array. Every single vertex, edge, and hexagon is derived dynamically on the fly from hive differences. The AI agent successfully mapped this elegant abstraction into JavaScript without human intervention. Furthermore, the agent easily added visual enhancements, such as colorizing the previously monochrome Besicovitch set visualizer with dynamic color gradients and interactive HTML sliders.

Uncovering Decades-Old Bugs in Hand-Written Code

While Large Language Models (LLMs) are often criticized for their tendency to introduce subtle logic errors, the balance sheet of this restoration project yielded a highly unexpected result. Across the porting of nearly two dozen distinct mathematical applets, Tao identified only a single, minor bug introduced by the AI agent. This was an event-handling mismatch in a complex analysis module where dragging a cursor outside of the primary canvas boundary resulted in erratic behavior.

In contrast, the AI agent identified two bugs in Tao’s handwritten 1999 Java code that had sat undetected for 27 years:

  • The Honeycomb Boundary Glitch: A bug in the boundary checks for the “shrink/enlarge to the legal maximum” actions, which prevented the hexagon from reaching its absolute limit.
  • The Stale-State Pointer Bug: An error in the elementary complex mapping engine where dragging the pointer off the canvas suppressed rendering of the range-plane window until the user refreshed the entire page.

By discovering two long-standing bugs and introducing only one minor event-handling issue, the AI agent’s migration process achieved what Tao described as a “net wash” in code quality. For one of the greatest living mathematicians, having his personal code audited and improved by an automated terminal agent was a striking proof of concept.

Fulfilling a 27-Year-Old Dream: “Inkscape for Minkowski Space”

Emboldened by the speed and accuracy of the porting process, Tao decided to tackle a project that had defeated him in 1999: an interactive special relativity simulator. Back in the late ’90s, he had attempted to write a Java visualizer that would act like “Inkscape, but in Minkowski space”. The objective was to allow a user to draw a physical trajectory, introduce observers, and watch how the entire diagram deformed under Lorentz transformations.

However, the cognitive load of manually keeping track of 1+1-dimensional coordinates, relativistic Doppler shifting, and multiple observers simultaneously grew too complex, and Tao abandoned the project. Twenty-seven years later, utilizing “vibe coding” with the AI agent, Tao completed the interactive Minkowski spacetime diagram in a single afternoon.

The modern, fully functional special relativity applet features:

  • Independent Lorentz-boostable reference frames.
  • Live readouts for energy, momentum, and proper-time variables.
  • Real-time calculations of relativistic Doppler color shifts based on relative velocity.
  • Worked pre-set scenes to visually explain classic physics paradoxes, such as the Twin Paradox, the pole-and-barn paradox, and the moving light clock.

In the same sitting, Tao directed the agent to build a dynamic visualization tool for Gilbreath’s Conjecture in number theory. Built as a companion to a recent paper co-authored by Zachary Chase, Zach Hunter, and Tao, the applet allows users to input any custom sequence (such as prime gaps) and watch the triangular array of absolute differences construct itself with parity and magnitude coloring, providing a powerful visual explorer for open questions in number theory.

The Pragmatic Paradigm: The AI as a “Second Worker”

The broader developer community has spent years debating whether AI agents are a security threat or a replacement for software engineers. However, Tao’s experiments offer a highly grounded, practical framework for how domain experts can interact with these tools. Rather than fully outsourcing his workflow, Tao treats the AI agent as a highly competent, tireless “second worker”.

This division of labor is defined by clear risk calibration:

If a mathematical argument or a formal proof (such as Tao’s work formalizing proofs in Lean) requires absolute certainty, the tolerance for AI hallucinations is zero. However, for “non-load-bearing” tasks—such as secondary visual aids, digital housekeeping, website migration, and educational applets—the downside of a minor software glitch is negligible. By recognizing where the guardrails can be safely lowered, Tao was able to complete decades of delayed maintenance and realize long-shelved creative projects in a matter of hours.

For the retro tech and digital archivist community, this project sets a powerful new precedent. The vast web of early-2000s interactive media—previously written off as dead due to the demise of Flash, Silverlight, and Java applets—can now be systematically restored using agentic AI. By acting as an empathetic, spec-driven translator, the AI has shown that the past can be brought forward into the modern browser era, beautifully preserving the web’s lost interactive history.

TN

Written by

TempMail Ninja

Digital privacy and online security expert. Passionate about creating tools that protect users' identity on the internet.