RSSAmplifier

Blog

bitonic's blog.

Often in error, never in doubt.

mazzo.liRSS feed ↗10 posts

Latest posts

A vibe-coded alternative to YieldGimp

2026-02-17 A vibe-coded alternative to YieldGimp If you’re a UK tax resident, short-term low-coupon gilts are the most tax efficient way to get savings-account-like returns, since most of their yield is tax free. This makes them very popular amongst retail investors, which now hold a large portion of the tradable low-coupon gilts. YieldGimp.com used to be a great free resource to evaluate the…

Hidden benefits of undefined behavior

2025-10-17 Hidden benefits of undefined behavior I was reviewing some code at work, and something jumped at me when reading some arithmetic: static inline int64_t int32ToDecimal9 ( int32_t i ) { return i * 1000000000 ; } If you’ve had the good fortune of dealing with C or C++ for extended periods you would have recognized the problem. i * 1000000000 will be performed with 32-bit precision, which…

Open sourcing TernFS, a distributed filesystem

2025-09-25 Open sourcing TernFS, a distributed filesystem A few days ago we open sourced TernFS, a distributed filesystem which has been used in production at XTX for a couple of years now. The project took up a big chunk of my waking hours for a year and a half, and I’m extremely happy that we are now sharing it with the world. You can find a blog post describing it on XTX’s tech blog , and the…

How to store Go pointers from assembly

The standard Go toolchain comes with an assembler out of the box. Said assembler is highly idiosyncratic, using syntax inherited from Plan 9 and choosing its own names for platform-specific instructions and registers. But it's great to have it readily available. More mundanely, Go comes with a garbage collector. This post explains how to make these two components play nice, if we want to…

`inline-verilog`: Execute Verilog circuits from Haskell

2025-06-09 inline-verilog : Execute Verilog circuits from Haskell Like for most of the past 13 years, early June meant attending ZuriHac . The event was as pleasant and well organized as ever. While talking to Ed Kmett he half-jokingly mentioned that it would be useful to have a Verilog analogue of inline-c , especially to test Verilog circuits against Haskell functions. A few hours later I had…

Waiting for many things at once with `io_uring`

When doing systems programming we often need to wait for something to happen. Common examples might be waiting for some data to come through a socket or waiting on a lock. We also often want to wait on any of several conditions to become true. A web server might be handling many sockets at once, waiting for any number of them to become readable or writeable. This short blog post is concerned with…

CRC-32C tips and tricks

In a companion blog post I talked about how to effectively combine Reed-Solomon coding and CRCs. To do so I presented a few functions to manipulate CRCs. In this post I'll explain why and how they can be implemented.

CRCs and Reed-Solomon coding: better together

In my latest filesystem-themed post I discussed a technique to perform distributed resource management more safely. This time I'll explain how one might effectively combine _Reed-Solomon coding_ and _cyclic redundancy checks_. The first gives us redundancy (we can lose disks and still recover our data), the second protects us against data corruption.

Message authentication codes for safer distributed transactions

I've been developing and quickly deploying a distributed system, which is a class of software where bugs are expensive. A few hundred petabytes later, we haven't lost a single byte of data, also thanks to a simple trick which catches a large class of bugs when delegating responsibilities to possibly buggy software. It's a neat use of cryptography beyond security, so here's a small description.

How to stop Linux threads cleanly

Stopping a Linux thread is a surprisingly annoying affair. In this post I present common pitfalls and some solutions -- although no truly satisfactory method exists.