.plan-26-47: One ring to rule them all, but not on Windows

Label crawlers go places, musing on software engineering, and enjoying a new classical LoTR album.

https://anil.recoil.org/notes/2026w47image

1 Tessera happenings

The geotessera-r library I mentioned last week is almost ready for release! I just need to figure out the R packaging system as I've never done one of those before. I also cut geotessera 0.11.1, which adds support for routing reads through the perma-caching Zarr proxy from last week.

1.1 IUCN webinar video available

The video of David Coomes and me presenting Tessera at the IUCN impact mitigation webinar is also now up on YouTube, if you missed it live.

1.2 The UK label catalogue on Foundry

The UK label database I started a few weeks ago has grown quite a bit, and now lives on an internal (password-protected, for licensing reasons) server that I've been showing to Michael Dales and Aneesh Naik to get their feedback. It's currently at 600 major data layers (!) for the UK from 74 sources, with around 75 million vector features, all mapped into PMTiles and GeoParquet with their provenance and licences attached. The broad classes are:

What's been really fun is building autoresearch loops for Tessera downstream tasks against these labels. The site now has explorers for UK land cover, tree species and canopy change, early ghost roads, daily road traffic, and even SDMs for the chances of catching each of 22 freshwater fish species in every river reach. I'm really excited about the prospect of systematically evaluating these against the sorts of habitat maps that Michael Dales and Aneesh Naik have been producing. The water labels are also proving useful for the hydrology work that Tom Kelly is doing, as he's been writing up what data rainfall–runoff models need.

Now with 3D lidar and children's education results, among other things
Now with 3D lidar and children's education results, among other things

2 Was software always too complex for humans?

After yet another week of AI drama and security issues, I pushed out a polemic on whether "software was just too complex for humans to tackle". I've been musing on whether we will (probably sooner than we think!) end up deriving all executable software from formal specifications.

It got some great responses, including Ian Betteridge giving permission to break his law of headlines. First Michael Dales argued back that LLMs are just an accelerant of an existing systemic problem:

We build software beyond the limits of our capabilities to understand/manage, and we have done so willingly in the seek of other forms of success beyond correctness. -- Michael Dales, November 2026

Michael's obviously quite right that not all software is written to be "correct" (for some strict specification). The trouble is that we can't easily indicate its intended lifetime. Isn't it weird that one of my weekend shell scripts, and firmware for an embedded pacemaker, are basically managed and (often) licensed the same way? We're going to need ways to mark what code is for and how much it should be trusted.

I'm still chewing through Michael's point that before going full formal-spec-heavy we first need to do a better job of acceptance. Cyrus Omar's work on Hazel allows for iterative, interactive refinement of specifications which seems similar to an acceptance testing process. (Incidentally, Cyrus Omar will be delivering next week's departmental seminar on a similar topic)

There was lively online discussion too. Several commenters called the idea of deriving everything from specifications naive:

Formal specifications can work in controlled environments like math or small software projects with a tight group of contributors to subscribe to specific goals and constraints. But the vast majority of software is not like that, it exists because it does something that people find useful for some real world purpose, and those real world purposes are messy and unspecifiable. -- dasil003 on Hacker News, November 2026

This is true of much business logic, but other domains are more tractable. With networked protocols, the key trick is that a formal spec doesn't have to pin down one correct behaviour, but can instead describe the range of allowable actions. For example, in our formal spec of POSIX filesystems from 2015, we wrote that renaming a file onto a non-empty directory can validly return any of EISDIR, EEXIST or ENOTEMPTY depending on the order an implementation makes its checks, or of course readdir returns entries in any order. Rather than picking one behaviour, the formal spec validates the 'shape' of the responses:

A sound specification must be loose enough to accommodate all such variation (looseness should not be confused with the question of whether a specification is precise: we want a mathematically precise model, but one that admits a range of allowable behaviours). -- SibylFS: formal specification and oracle-based testing for POSIX and real-world file systems, SOSP 2015

This approach let us check lots of real traces across Linux, macOS and FreeBSD against one formal model. Network protocols are admittedly a sweet spot here, but you gotta start somewhere...

Not everyone was convinced by the ecological diversity argument either:

What evidence is there that a diverse system is better than a homogenous one? This is pretty non-sensical. -- prestonvasquez on Hacker News, November 2026

There's some (if not a lot of) evidence, and also a commonsense intuition. A recent CHI 2026 paper is quite a dense read full of jargon, but it points out the Morris worm as an early example. That worm never took down the entire Internet in 1988, since it could only infect VAX and Sun-3 machines (hah!) running Berkeley Unix.

Bruce Schneier revisited this in 2010 and noted that while a monoculture is dangerous, diversity is also costly:

Sure, it would be great if a corporate IT department ran half Windows and half Linux, or half Apache and half Microsoft IIS, but doing so would require more expertise and cost more money. [...] A single operating system locked down by experts is far more secure than two operating systems configured by sysadmins who aren't so expert. -- Bruce Schneier, The Dangers of a Software Monoculture, 2010

Bruce's other objection was that a couple of operating systems and two or three router vendors only buy a very limited amount of diversity, compared to the millions of genomes in a biological population. In the intervening years, coding agents change all that! The cost of maintaining many implementations and the expertise needed to lock each one down is dropping like a rock. I'd be amazed if we don't have multiple usable full operating systems inside of a year, possibly plucking code from Linux.

I'm "blogging out loud" here to get my thoughts together, so thanks everyone for taking the trouble to give me feedback! I'm struggling to keep up with the socials right now, so I've also added a social comment tracker to this site so it's easy to see it all in one place.

3 But crafting software isn't entirely dead yet...

Having sounded the software doomtrain earlier, there's still a lot of work left in artisanal programming interfaces. I've been working on getting Eio's Windows backend to align with the (quite POSIX-biased) portable layer of Eio. This is primarily because Jon Sterling wanted Forester to work well on Windows, and I'm a Forester user and so the completionist in me wants to get it done!

Also, Patrick Ferris put tons of time into the Eio Windows backend and I want to make sure his efforts are usable in the wild by finishing "the last 20%". Windows, however, is just full of legacy interfaces that are often decades old, so my understanding remains imperfect at best...

3.1 Switching to Windows IOCP

I've finally opened a PR for my long-running attempt to switch Eio_windows to use IO completion ports. This builds on Patrick Ferris's original IOCP bindings, which I've extended for feature completeness and to deal with the many Windows quirks.

The structure I settled on is similar to the Linux one, with each Eio domain getting its own completion port for file, pipe, TCP and UDP operations. Completions are delivered directly back to the submitting scheduler, so it's fairly performant in multi-domain settings as well. Cancellations, as always, are quite fiddly since both the fds and associated buffer must stay live until the kernel completes the operation. Median throughput on an 8 vCPU Windows VM (kindly set up by Mark Elvers) is consistently faster than Eio main, and I expect a future OxCaml port will be even faster:

Workload Main IOCP Gain
Cached file read, 64 MiB 70.7 MiB/s 128.4 MiB/s +82%
Sandboxed open/stat/close 743 ops/s 1,204 ops/s +62%
One-byte TCP round trip 1,709/s 2,652/s +55%
TCP transfer, 512 MiB 298.0 MiB/s 392.4 MiB/s +32%

I used Forester 6.0 (which went into opam last week) to test all this on Windows and it works with everything I can throw at it (including executing LaTeX subprocesses!) with a couple of small fixes (1, 2).

Thomas Gazagnaire has been a big help here too. Recording Eio's real Windows behaviour against the model in his new chaos engineering libraries turned up a bunch of bugs in the Windows backend (and what appear to be a few in OCaml's Unix library), most of which my branch fixes.

3.2 Windows IoRing goes nowhere

Since io_uring has been such a win on Linux, I also built experimental ocaml-ioring bindings to the Windows I/O ring API.

In theory, this is extremely similar to the Linux shared rings and follows the same queue and completion model. The similarity extends to supporting registered file and buffer tables. Unfortunately, despite my best efforts I just haven't been able to get any performance benefit out of them in real applications vs using IOCP, even for sustained batch transfers! The IORing APIs also only cover file operations, so IOCP is still needed for sockets regardless.

So I'm regretfully just going to put these bindings on ice, but if you do manage to make IORing go vroom on Windows, please let me know! Probably just some scheduler tweaking or something needed.

3.3 Hardening the Linux io-uring interfaces

Thomas Leonard also released Eio 1.7, which includes fixes for several obscure but important sandbox escapes. Over in ocaml-uring, we've been applying a series of hardening fixes to the bindings, such as rejecting NUL bytes in paths and excess buffers. I also fixed signal handling in Uring.wait and zero-initialised the statx buffer. These are mostly edge cases, but important for robustness in a busy system.

3.4 Using this in my home router

The popular home router maker GL.iNet disclosed that attackers had exploited a vulnerability in its GoodCloud remote management service to install malware on some connected routers and KVMs. Luckily, on a hot tip from Sadiq Jaffer, Dave Scott, Nick Ludlam and I had already been switching to Flint 2 routers, but running upstream OpenWrt rather than trusting some random vendor firmware!

The brand new recoil.org Tangled organisation has two very experimental repositories so far. Our openwrt tree tracks the latest upstream 7.4-rc1 kernel with the wifi drivers ported across, and recoilwrt flashes it onto a router along with a simple OxCaml service installer.

I'm using the latter to drop in a DNS and WireGuard layer from my monorepo, building on the OxCaml packaging and (very satisfyingly) using Eio+io-uring in my home network. Our continued efforts to self-host the Recoil collective from the ground up are gathering sufficient pace that what we started in 1997 might actually finish by 2027...

Can you believe this extremely organised home router setup is running OxCaml
Can you believe this extremely organised home router setup is running OxCaml

4 Literature scanning

4.1 Andrea Manica becomes a Turing AI Pioneer

Big congratulations to my colleague Andrea Manica in Zoology, who is one of 17 new UKRI Turing AI Pioneer Interdisciplinary Fellows! I'm the "AI mentor" (yes, that does sound silly) on his new project on "Predicting future biodiversity changes by integrating multiple lines of evidence at scale".

Sadiq Jaffer, Sam Reynolds and I have been enjoying working with Andrea's group on integrating our Evidence TAP literature database. Andrea and Calum Maney from UNEP-WCMC are working on reverse parsing the graph layouts found in papers, which extends the Parsosaur extraction towards scientifically useful semi-structured outputs from illustrations in old papers. Graphs contain a lot of the historical quantitative evidence in ecology, so I'm looking forward to running this across the wider Taposaur corpus as it matures.

4.2 Switching away from Ceph to local disks

A few weeks ago I started moving some of my home directories onto our Ceph cluster to find out if a network filesystem is practical to use these days. It's still very noticeably high latency...

For the tens of millions of small files in our paper corpus, it's difficult to use a network filesystem. Mark Elvers has been rebalancing the metadata servers behind our large Ceph cluster, and draining millions of strays, but response times are still painfully slow for bulk processing. I'm switching over to local SSDs for the Evidence TAP workload instead, with an offline rsync to Ceph to use as a live backup.

I'm very excited that the first of Rob Macfarlane's Reith lectures is out. He's rotating through the four elements, and in "EARTH: The Ladder and the Web" he argues that a 'human superiority complex' has brought us to the brink of planetary catastrophe. I had the pleasure of dining with Rob at Pembroke a few weeks ago, and he's every bit as passionate in person. Three more to go!

My Pembroke colleague Albert Cardona also had an interesting thread on what, if anything, has changed in scientific publishing in the last 15 years. Back in 2011, the journal divisions of Elsevier, Springer and Wiley reported bumper profits, and researchers found that secrecy over 'big deal' contracts stopped universities realising they were overpaying. Albert reckons academics continue to foolishly judge papers by the journal prestige, and that open publishing really has to break through. I haven't heard much after the Royal Society's future of publishing meeting, so I wonder if this has petered out while publishing outputs grow exponentially.

Music-wise, I'm listening to Anna Lapwood's amazing new Not All Those Who Wander Are Lost classical album of Tolkien tracks. Congratulations to her on getting to number 1 in the classical album charts!