Dave Hudson's projects, blog, and notes

Current projects

Humbug

Humbug is a project that explores building a secure and reliable operating system for human/AI collaboration.

Traditional operating systems are designed to securely use and share hardware resources. The best ones attempt to protect users from buggy and malicious software. The weakest link in this security chain is the human user, who can be tricked into running unsafe software or leaking access to sensitive data.

The introduction of AI suddenly makes this a lot more complicated. Our default model of the last few decades was an unpredictable human interacting with what should be a predictable system. With AI participant our unpredictable human is suddenly dealing with an equally unpredictable AI too.

We need to rethink our approach to security, privacy, and trust.

[find out more]

Menai

Menai is a compiled, pure functional programming language designed specifically for use by an LLM rather than a human.

Inspired by Lisp, Menai is designed to offer LLMs a powerful, sandboxed programming model that can be safely used without supervision. It features a custom optimizing compiler and an infinite-register virtual machine.

[find out more]

More projects

Find all my earlier projects in the projects section.


Latest blog posts

Menai: a pure functional programming language (12 months on)

Published: 2026-08-31

In September 2025, Claude Sonnet and I started designing and building a programming language with the idea that it could be used safely by AIs to perform deterministic operations in agentic workflows.

The key element of this was "safely".

Anyone who has ever watched Large Language Model (LLM) AIs write Python scripts will have likely seen cases of them unintentionally wandering into the realms of doing something dangerous because of some unintended side-effect. Enabling a general purpose capability to execute Python code also exposed risks from prompt injections, with bad behaviour being intentional instead of accidental.

The core idea behind the language was that being "safe" meant not allowing the language to do any I/O operations. Any I/O or stateful operations would have to be invoked by something outside of it.

Instead of having I/O in the language, we could provide context in the form of data, a computation would be run, and then the results would be returned back to the caller. For example, we might pass a 9x9 sudoku grid to a program that would solve sudoku puzzles. When the program completed it would either return a solved grid, or an error if either the grid was malformed or was unsolvable.

Significantly, by placing the I/O out of the control of an AI we could enforce safety checks on the results of the computation after it has run. We could decide to reject the result before it could do any harm, rather than hoping no harm could occur.

12 months on, the language is now called Menai, named after the historic Menai suspension bridge, near where I used to live.

From the outset, the language has been embedded into the tool framework of the Humbug project. Humbug's tool framework gives AIs access to terminals, editor buffers, conversations, files, etc., allowing them a huge number of data sources. More recently this has been extended, allowing AIs to use Menai programs to transform files and editor buffers, enabling complex and token-efficient edit operations.

About a month ago I separated Menai from the Humbug project as I figured it could be useful in quite a number of other projects. At the time of writing, it is now at v0.3.1 in its stand-alone form.

[read more]

Humbug comes of age

Published: 2026-01-06

I've been building Humbug for over a year, and it's one year this week since I released v0.1. For all that time I've been planning for a future v1.0 of Humbug, but no specific version felt like it warranted such a big bang change.

I started Humbug with a view that it could help engineers, product managers, security analysts, etc. all collaborate with AI in a new sort of tool.

That vision has worked out far better than I imagined. I now use it daily for building and testing software, for reviewing design ideas, editing and critiquing specifications, assessing third party code, and even maintaining my blog site. With lots of agentic features, and 100k net-new lines of code (with many hundreds of thousands more that came and went), the v0 prefix has been feeling increasingly stale.

The obvious thing would be to move to v1.0, but I've been starting to realize that aside from being rather arbitrary, I couldn't see an obvious way I'd ever move to a v2.0 in the future. Semantic versioning just doesn't feel right.

[read more]

I decided to design a functional programming language for LLMs to use

Published: 2025-09-24

LLMs are famously bad at counting letters in text. They're not very good at complicated maths, either, but they are pretty good at writing programs that can do these things. If they have tools available, they sometimes resort to writing Python scripts to do this sort of work, but those risk the AI doing weird or potentially dangerous things. If we could give them a safe programming environment, however, that would be pretty awesome.

For a long time I've wanted to build a pure functional programming language because I could see a lot of uses for it. For LLMs, though, this would offer the safety I had in mind. The language can be very expressive but sandboxed. It doesn't need access to filesystems or networks, for example. Instead, it can rely on the LLM setting up any inputs and interpreting the outputs.

Previously, I've put off trying to build this because it would have taken months to get everything I wanted. Now, of course, I could use an LLM to help me build this (Claude Sonnet).

[read more]

Building an open-source agentic terminal

Published: 2025-09-14

In the last year we've seen a few agentic development tools being released, but most of them have been proprietary so it hasn't been easy to work out what's going on inside them. I figured it would be interesting to build something open source and to help me understand them better.

A lot of software engineers love terminals and I'm no exception (I have 6 open as I'm writing this), so I thought an agentic terminal would be fun to explore!

I wanted to enable both an AI and a human user to be able to interact with a terminal, run commands, and check results. This would give the human user an assistant to help with tasks in the terminal, but would also allow the AI to come up with creative ways to help meet user requests where using shell commands would be a good way to help.

In this post, I'll walk you through how I went about building this, why I built it the way I did, and how I used AI to help do this more quickly.

[read more]

A path to an AI operating system

Published: 2025-08-11

I'm going to try to convince you we need to rethink some of our ideas about operating systems.

That's a pretty bold concept, given that all our major operating systems have been around for a very long time. They've been very effective, and have become progressively more capable as hardware has evolved. Importantly, as the base of our software stack, operating systems are the single most difficult thing to change because that entire software stack depends on their stability.

Even so, my argument is the AI era has already changed a few fundamental assumptions significantly enough that we need to reconsider some things we've not questioned in years!

[read more]

More blog posts

Find all my blog posts in the blog section.


Latest open source research notes

2026-08-30: Menai performance update and Menai v0.3

Published: 2026-08-30

I made the last few changes to Menai v0.3 (and then v0.3.1 when I spotted a mistake). These are now published to GitHub and PyPI.

As a lot of the work has been performance-related I wanted to capture the latest numbers for menai-benchmark.

[read more]

More open source research notes

Find all my open source research notes in the notes section.