RSSAmplifier

Blog

Bit Bashing

Yet another programming blog. Thoughts on software and related misadventures.

bitbashing.ioRSS feed ↗9 posts

Latest posts

Simulating Airband AM Radios

Please enable JavaScript to view equations powered by KaTeX . Warning: Contains many annoying sounds. In a slight departure from my usual code monkey content, let’s talk about airplanes! And radios! For the last several years, I’ve spent most Saturdays playing (and occasionally working on) BMS , a modern 1 combat flight sim where you and your friends blow stuff up in virtual F-16s. Any co-op game…

Arc Troopers: Adventures in Async Rust

The trouble with arguing about software design is that there’s precious little room between “too short for a useful example” and “too long; didn’t read”. Good examples are concise, but many important problems are too complex to reveal themselves in small snippets. Let’s talk about something complex—Async Rust. We’ll need a concurrent Rust program, so let’s invent a dumb archive format that…

Concurrency in Haskell: Fast, Simple, Correct

After nearly a decade of building embedded systems in C, C++, and Rust, I’ve somehow ended up writing Haskell for a living. If you’d asked me about functional programming a few years ago, I would have told you it was self-indulgent academic baloney—and then I stumbled into people using it for real-time systems where microseconds can mean literal life or death. I’m too old to try to convince people…

Unsafe at Any Speed: Tradeoffs and values in the Rust ecosystem

So, I’m building something dumb in Rust, and I need the dumb thing to talk to the Internet. This should be simple 1 —I just want to send a handful of GET s and PUT s. I guess I need an HTTP library. Lucky for me, Rust has an amazing ecosystem—Cargo and crates.io are easily some of of my favorite language features—but this also means a dizzying set of options. A quick search reveals dozens of HTTP…

Garbage Collection for Systems Programmers

Let’s talk about one of the most performance-sensitive programs you run every day: your operating system. Since every speedup gives you more computer to compute with, an OS is never fast enough, so you can always find kernel and driver developers optimizing the bejesus out of their code. Operating systems also need to be massively concurrent. Not only is your OS scheduling all userspace processes…

Async Rust Is A Bad Language

But to get at whatever the hell I mean by that, we need to talk about why async Rust exists in the first place. Let’s talk about: Modern Concurrency: They’re Green, They’re Mean, & They Ate My Machine Suppose we want our code to go fast. We have two big problems to solve: We want to use the whole computer. Code runs on CPUs, and in 2023, even my phone has eight of the damn things. If I want to use…

Stating the Obvious: Error Handling

I’ve been at this software nonsense for over a decade now. While the idea that I have anything all figured out is hilarious, I hope I’ve at least noticed some useful patterns—things that work and things that don’t—across the projects, peers, languages, and systems I’ve seen. Let’s try to distill some basics that I wish I knew when I started. In what’s hopefully the first in a series of…

Modern LaTeX

It’s been a while. Life has been… interesting the past few years. I hope you’ve been okay. I’m getting back to writing about all this crazy software stuff—more to follow soon. In the meantime, I also wrote a short introduction to L a T e X ! Forty years after its inception, it’s still an amazing piece of software for creating beautiful writing. But you shouldn’t have to learn a bunch of arcane 80s…

What every systems programmer should know about concurrency

At the start of November, I published What every systems programmer should know about concurrency , a short primer on the topic. Many thanks to Anthony Williams, Fedor Pikus, Paul McKenney, and all of you for your fantastic feedback! In light of it, I’m happy to announce the paper’s first major update. It adds two sections: one discusses the differences between blocking and lockless algorithms,…

Bit Bashing · RSS Amplifier