Simon Willison

parse_number() as a SQLite extension: C vs Rust

Simon Willison investigated adding a `parse_number()` function to SQLite as a C extension versus a Rust extension. He compared performance, code complexity, and binary size, finding the Rust version (321 KB or 298 KB) was faster than the 14 KB C version, but a custom C implementation could match or beat Rust’s speed. The study included benchmark results over 2 million rows for mixed, integer‑only, and decimal‑only data sets.

Simon Willison
Nov 16

llm 0.37.3

The release of llm 0.37.3 is a bug‑fix update that addresses an issue caused by the latest Homebrew package of SQLite (3.54.1). The new SQLite version changed the behavior of JSON functions, causing LLM’s logging code to break; the fix involves wrapping the JSON array in a json() call. The update restores correct functionality for LLM’s JSON handling.

Simon Willison
5d ago

Quoting Daniel Stenberg

During a three‑week period, the agents converted 185,000 lines of C code into 340,000 lines of Rust code, merging over 300 commits into the curl project. They added more than 200 bugfixes—none of which were present in the Rust rewrites—and fixed several vulnerabilities. In the following month, another 200 bugfixes and additional vulnerability fixes were made.

Simon Willison
Aug 24

Your executable is a SQLite database

Farid Zakaria shows how to create a SQLite database file that can be executed directly as a Linux binary. By setting the SQLite file format’s 4‑byte application ID to "SELF" and arranging ELF components into SQLite tables, a small C interpreter can extract and run the necessary parts. The technique can be registered with the kernel via binfmt_misc so any file matching the pattern is automatically executed.

arXiv AI
Jul 15

GRID: Grammar-Railed Decoding for Enterprise SQL Generation

arXiv:2607. 11951v1 Announce Type: new Abstract: Large language models can write SQL, but enterprise deployment demands more than plausible text: outputs must be syntactically valid, must respect per-role and per-schema policy, must carry provable (not best-effort) guarantees, must not slow down as generations grow, and must leave a compliance-grade record of every decision.

By Mohsen Arjmandi
Simon Willison
Sep 11

Soft-deprecating re.match()

Python’s upcoming 3.15 release introduces a soft deprecation for the re.match() function, encouraging developers to avoid using it in new code. The function is now available under the clearer name re.prefixmatch(), which reflects its behavior of anchoring at the start of a string but not at the end. In most cases, re.search() or re.fullmatch() are recommended instead.

Simon Willison
Oct 30

dbreunig/nesformer

Drew Breunig has embedded a working emulator for the Nintendo Entertainment System’s 6502 CPU into the weights of the Qwen3.5‑4B language model, allowing NES ROMs such as Super Mario Bros to run—albeit slowly—directly within Qwen. The project builds on inspiration from Divyansh Agrawal’s qwenputer and uses Opus 5.5 prompts and a 15‑year‑old NES CPU conformance test suite to validate the emulator. Breunig invites exploration of whether smaller, faster models could achieve standard NES clock speeds and encourages community participation in building a CLI to run ROMs with the embedded weights.