This site just passed one hundred thousand reads. It started as a public notebook that almost no one read. The plan hasn’t changed: one post a month, no quick takes, only deep dives into things I care about. If you have read even one, thank you. That number is you. Visitors stay five and a half minutes on average. Reddit and Hacker News send almost nine in ten of them; every search engine…
Optimizing code starts with measuring it, and a measurement is only useful if it is repeatable: a 2% improvement is invisible under 5% of noise. Yet on an untuned machine the same binary can easily run several percent faster or slower between runs. In this post we take a tiny benchmark and tune the machine step by step, re-measuring after every change, until runs become deterministic. 1 A noisy…
This site is now reachable over Tor as a hidden service, at a .onion address that resolves only inside the Tor network. 1 Tor relays and encrypts your traffic as it passes through thousands of volunteer-run servers, so that no single party can link who you are to what you are doing; a hidden service extends that anonymity to the server itself. It’s built by the nonprofit Tor Project , which…
Over the last decade I’ve been playing with dozens of servers from multiple providers. These are the steps I’ve been perfecting to get up to speed fast and feel right at home on a new machine. Wrote it down here mostly as a personal reference, but hopefully useful to someone else too. Hardware, distro, and DNS § Clean Linux install with one large root partition plus big swap. 1…
Although the notion of area is intuitive, its mathematical treatment requires a rigorous definition. This post introduces the Riemann integral, and proves the fundamental theorem of calculus—a beautiful result that connects integrals and derivatives. Riemann integral § Given a bounded 1 function \(f\colon[a,b]\to\mathbb{R}\), we can approximate the area under its graph by rectangles.…
A single-producer single-consumer (SPSC) queue is a great example of how far constraints can take a design. In this post, you will learn how to implement a ring buffer from scratch: start with the simplest design, make it thread-safe, and then gradually remove overhead while preserving FIFO behavior and predictable latency. This pattern is widely used to share data between threads in the…
Ever looked at std::any and wondered what’s going on behind the scenes? Beneath the intimidating interface is a classic technique called type erasure: concrete types hidden behind a small, uniform wrapper. Starting from familiar tools like virtual functions and templates, we’ll build a minimal std::any . By the end, you’ll have a clear understanding of how type erasure works…
Ever wondered why your “clean” polymorphic design underperforms in benchmarks? Virtual dispatch enables polymorphism, but it comes with hidden overhead: pointer indirection, larger object layouts, and fewer inlining opportunities. Compilers do their best to devirtualize these calls, but it isn’t always possible. On latency-sensitive paths, it’s beneficial to manually…
1 Mathematician and engineer based in sunny Dublin, passionate about low-latency, high-performance systems. Currently working in algorithmic trading at Susquehanna. Previously designed and built systems at Amazon serving 10M+ monthly active customers, developed semantic caching for LLMs at Sopra Steria, and conducted quantitative cybersecurity risk analysis at Deloitte. Holds a BSc in Mathematics,…
After nearly a decade, I’ve rebuilt my personal site from scratch—a blog on software, self-hosting, and lessons learned along the way. This first post is backdated to when I originally launched a site on this domain, back in 2018. What? —A personal blog. Posts aim to be concise, practical, and rigorous. Why? —To give back to the libre software community. To keep a record of…