AI NewsDev toolsAnnouncement

Richie McIlroy released Tov, a TypeScript-shaped language for coding agents

Richie McIlroy, the author of the Cap screen recorder, released Tov, an MIT-licensed language that reads like TypeScript, compiles to a single native binary and returns machine-readable fixes when a coding agent writes code that will not compile.

AI News

Editorial2 min read

LinkedInX
GitHub repository card for richiemcilroy/Tov

Image: GitHub

Why it mattersAn agent that gets a compile error back as a JSON edit it can apply skips the step of running the code, reading the stack trace and guessing at the fix.

An AI agent writing TypeScript spends much of its day running a program, reading the stack trace and guessing at what to change. Tov is a new programming language, released on 29 September by Richie McIlroy and tagged version 0.0.1, that reads like TypeScript, compiles to one native binary, and when the agent gets something wrong hands back the exact edit that fixes it. It has 717 stars at the time of writing, nineteen days after release.

McIlroy is the author of Cap, the open-source screen recorder, and the README includes Cap's own media server as a worked example that runs on Tov unchanged.

What is actually different about Tov

Code that looks like TypeScript behaves like TypeScript, or does not compile. There is no any, no null, no ==, and integer overflow stops the program. Arrays, records and maps are values, so assigning one copies it and the compiler flags code where TypeScript would have shared the value. A call that can fail is marked try and its errors are part of the function's type. Unions must be narrowed before their fields are used, and a switch must cover every case.

Every error carries a code, a message aimed at a person, and a fixes array that tov check --json returns to a tool. A fix with applicability: safe is a complete edit the agent can apply without further checks. tov explain T0831 describes the rule behind an error code. The README's example shows an unmarked new URL call being turned into try new URL(req.url) from a JSON patch that names the exact start and end positions in the file.

The vendor numbers

The README states its benchmark numbers directly. McIlroy says a Tov program compiles in 42 milliseconds, against 98 for the equivalent Rust build. A web server written in Tov serves 242,000 requests a second on one core in 1.6 MB of memory, against 216,000 at 4.4 MB for Rust's axum and 111,000 at 17 MB for Bun, measured on an M4 Max macOS machine. These are the author's own numbers; no independent run is available yet.

What works today

The README's own status table says Tov is early and changes every day. Command-line programs and web servers work. Records, unions, generics, classes, interfaces and checked errors work. async, await, promises and timers work. fetch() over HTTP and HTTPS works, with streaming, compression and proxies. The Bun server API (Bun.serve, routes, Request, Response) is there, as is a Node-style standard library (fs, path, process), and npm packages install through npm or Bun and are bundled into the binary at build time. Native addons load through Node-API. The target machines are macOS on arm64 and Linux. Windows, TLS sockets and worker threads for npm packages are not there yet, and Tov does not have a package manager of its own.

The install prompt sits at tov.sh, and tov.sh/llms.txt is the language spec written for the agent to read before it starts. Tov is MIT-licensed and the compiler is written in Rust.

Source

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project