
Passionate about computers, books, and writing — https://teapawt.net/t.co/ONrBoLjeZL. he/him
Sydney, New South Wales
Joined April 2016
- Tweets11.2K
- Following390
- Followers460
- Likes27.7K
Ryan James Spencer retweeted
🤖 Made with AI
In between meals and football games, I found time for a personal project this Thanksgiving - a programming language designed for agent-written software, named Truss github.com/finiteloop/truss.
Traditional programming languages were designed for the ergonomics of human authors, effectively optimizing for the convenience of writing code. Truss, in contrast, assumes code is no longer written by hand, but instead written by AI agents.
Rather than optimizing for authoring convenience, Truss requires quite a bit of reasoning at authoring time to verify a program's correctness and performance. That tradeoff is sensible for agent-written software because it is not a burden to the software engineer and the one-time token spend can produce software with enduring robustness.
Popular programming languages like Rust are a small step in this direction, providing compile-time memory safety — making Rust code a bit harder to write for humans, but a fantastic language target for AI. Truss takes this idea a few steps further, formally verifying behaviors well beyond memory management.
I think we will probably rewrite most software written before AI because that software is imperfect, insecure, and slow. I would like to have software that is provably correct, verifiably secure, and incredibly fast, and I would like to be able to use agents to produce software of unparalleled scale and complexity that has those qualities.
Truss is just a prototype, but I was hoping to start a conversation about the platforms we need to design to achieve that vision.
Ryan James Spencer retweeted
I built a 74 KB bare-metal hypervisor that puts a 2B LLM BELOW Linux in Ring -1, catches a fatal Kernel panic mid-crash, patches the broken machine code live in RAM, and keeps Linux running without a reboot.
Left window is standard Linux dying instantly from a Ring 0 NULL-pointer write (*(u32 *)0 = 0xDEADBEEF). Right window runs the exact same crash command under my custom Type-1 AMD SVM hypervisor (x86-64 NASM assembly + zero-libc C, 0 host OS).
Instead of crashing, Ring -1 freezes Linux before it can panic, runs a GRPO-trained MiniCPM5-2B (Q4_K_M) across 24 AVX2 cores in 11.1 seconds, overwrites those 11 faulting bytes in guest .text physical RAM with 11x NOP (0x90) via NPT, and calls `VMRUN`.
Linux prints SURVIVED NULL-DEREF! and uptime never resets.
We used a tiny /proc/surgeon_crash test module to trigger clean Ring 0 crashes side by side. On 122 unseen fault scenarios (including unsafe spinlock crashes it must refuse to patch), this GRPO checkpoint hits 97.54% pass@1 with 0 dangerous patches (vs 16.39% on base).
Full NASM + C source code (75,424 bytes binary) is live in my llm.asm repo (MIT, link below).
I deleted Linux completely, baked Qwen3-0.6B into a 24 KB pure x86-64 assembly OS, and it runs up to 54% faster than native Linux llama.cpp.
The entire Multiboot OS binary (asm-llm-os.elf) is 24,252 bytes, written from scratch without Linux, Windows, C, Rust, or libc. It boots in 74 to 94 ms straight into 64-bit Long Mode, wakes every CPU core over APIC, maps the 614 MiB Q8_0 weights directly from physical RAM, and drops you into a live multi-turn KV-cache chat over VGA, PS/2 keyboard, and serial.
I ran head-to-head CPU benchmarks against llama.cpp (Q8_0, -ngl 0) on the same AMD EPYC 7642:
- 1 thread hits 23.67 tok/s vs 16.63 (+42%)
- 4 threads hit 78.89 tok/s vs 51.08 (+54%)
- 8 threads hit 118.08 tok/s vs 80.79 (+46%)
- 16 threads hit 134.94 tok/s vs 103.03 (+31%, 136.6 peak)
On a diskless 0 GB Proxmox VM (2014 12-core Intel Xeon E5-2670 v3, 2 GiB RAM), it boots straight to the prompt in under 5 seconds (95 ms kernel boot) and runs live out of RAM at 78 tok/s decode and up to 111.5 tok/s prefill, with a hybrid BIOS+UEFI ISO builder included too. Output stays bit-exact across thread counts and matches all 64 greedy tokens against PyTorch FP32 (0.99965 cosine).
The 14.7 KB Linux ELF build (FAST_Q8=1 INT8xINT8 AVX2+F16C) also beats llama.cpp by 18% to 36% from 1 to 40 threads, and booting bare metal with 2 MiB huge pages squeezes out another 10% on top.
Repo, ISO builder, and Proxmox setup guide are in the reply below.
Ryan James Spencer retweeted
half the rules in most prompt files were written to babysit a model that no longer exists.
delete them and see what actually breaks. usually less than you think teapawt.net/thorstenball/status/21…
Ryan James Spencer retweeted
Fuzz testing a deterministic system hits different: You get time travel debugging and multiverse exploration for free.
Make (the core of) your system deterministic
Ryan James Spencer retweeted
CVE-2026-69420: Computers are vulnerable to denial-of-service by being shot with a gun
Ryan James Spencer retweeted
It is a weird weird year to be a formal methods expert.
Some unorganized thoughts on the new @AnthropicAI and @theoremlabs post on formal verification (anthropic.com/research/forma…):
- This is very cool.
- The main innovation is verifying a later stage of the program. Normally provers take the source code, LLM it into a theorem language, and then prove that, which means you have to make assumptions about source semantics and compilation properties. It's very easy to make a mistake in translating and prove the wrong thing!
What they instead do is compile the code into assembly, and then (if I understand this correctly), compile that assembly into a theorem language (which they call LPS). So as long as the compiler is faithful you can skip the whole divergence problem.
- I'm glad they clarify that you still have to trust the translation process, the "hardware, OS, OCaml" compiler, the LPS model, and also assume that the program is single threaded with fixed memory. The single biggest source of errors in formally verified code is when the proof assumes something that isn't true in practice. It's really, really important to state your assumptions!
- I'm not clear why they need to compile the fuzzer into the theorem. Is it to act as a description of valid inputs and workload? Maybe to embed assertions in as theorems?
- Holy crap, 180 million lines of Rocq. Is that more Rocq than exists in the world already? I notice they say a 600,000 line proof corresponds to roughly 20k CPU instructions. That would be like, 1-2k lines of source code at most? Really goes to show how inefficient this approach is and how it only works because you can throw LLMs at the problem.
- This, probably deliberately, doesn't address the single biggest gap in AI-based verification: AIs cannot come up with good properties. Doesn't matter if you're doing unit testing, property testing, formal verification. I always assumed this was a "frontier labs haven't trained for it yet" thing, but if Anthropic hasn't talked about that here, maybe they've tried and haven't been successful yet. That's interesting to me.
Instead, they take a known universal property (this code doesn't crash or get flagged by UBsan) and prove that instead. Still very useful, but makes it harder to generalize to proving arbitrary things about arbitrary programs.
- Anybody reading the official post should also read their expert review appendix (www-cdn.anthropic.com/files/…). It points out some interesting things, like the fact that most of the code the LLM wrote wasn't used in the proof (over one billion lines of Rocq), that they had to prove the equivalence between fuzzed and unfuzzed programs, and (this is most interesting), some experiments find that the LLM-method of proofwriting may not scale to more complex things.
- Also read the description of LPS (github.com/theorem-labs/oss-…) to understand the limitations of the assembly -> Rocq compilation. In particular, it does not handle concurrency at all (which is one of the main use cases for formal methods!) or OS signals. Also it can't prove things about program arguments with slash characters, meaning they can prove stuff about `rm foo` but not `rm foo/bar`.
- The official skill (github.com/theorem-labs/oss-…) doesn't tell us much about the nature of FM and AI. Probably too much for me to hope of any skill.
- Some of the article's specific caveats and throat clearings make me think someone at Anthropic reads my stuff ( ͡° ͜ʖ ͡°)
Ryan James Spencer retweeted
I put together a minimalistic pure-Rust, CPU-only implementation of the recent LFM2.5-8B-A1B language model from @liquidai that you can directly link into your Rust projects😎
github.com/maximecb/bebelm
Ryan James Spencer retweeted
You may have already heard, but the core SQLite team is working on Vec1 — native vector search (ANN) in SQLite.
It supports Euclidean (L2) and cosine distances, and uses SIMD for fast vector operations.
Vec1 is already feature-complete. The only things left are improving test coverage and making some optimizations.
sqlite.org/vec1
Ryan James Spencer retweeted
I just released mold 3.0.0! This is the first Rust version of mold, rewritten from C++ with performance on par with 2.42.1. The goal of mold 3.x is to close the remaining GNU ld compatibility gaps and make mold the default linker in Linux distros. github.com/rui314/mold/relea…
Ryan James Spencer retweeted
This summer, I published the constmap data structure. It is available in Python, C, Rust, Go. (And it is interoperable too!)
If you have large unchanging maps from strings to integers, then you should give it a try. It is a common problem in machine learning.
In the simplest version, we just expect that all queries are in the set. In the verified version, we check that the key is in the set (at a small extra cost).
In the last versions, I have introduced variant that I call 'paired verified' which is about 20% faster than the prior verified variant. And I have also added 'get_many' variants for when you want to query several keys at once (for better performance).
In Python, it will use much less memory than a dict, be much faster... and you can store it to disk and share it with your friends who use Go, Rust, C, C++...
NOTE: Port to other programming languages are invited.
github.com/lemire/fastconstm…
github.com/lemire/rsconstmap
github.com/lemire/constmap
Ryan James Spencer retweeted
Overscale style on mystyleshaus.com/sref-codes/…
Ryan James Spencer retweeted
Your processor can execute many instructions at once, but can it process more than one branch per cycle? Let us find out!
Ryan James Spencer retweeted
some thoughts
teapawt.net/ibuildthecloud/status/…
Ryan James Spencer retweeted
transformers are almost surely injective, meaning, you can recover the exact input text from hidden states
parameter settings where two different prompts land on the same hidden state form a measure-zero set under Lebesgue measure, so random init misses that set with probability 1 (gradient descent never pushes you back into it either, so injectivity survives the entire training run)
@EmanueleRodola's group proves this specifically for the last hidden state at the final layer, but it goes further than that: any hidden state only depends on its own causal predecessors in that forward pass, so it knows all of them too (hidden state at position 5, layer 7 knows everything about the hiddens at positions 1-4 across layers 1 through 6)
arxiv.org/abs/2510.15511














































