Recent Posts

Clamping Angles, Especially Without Trigonometry

12 minute read

Sometimes you need to clamp angles, and it’s a bit harder when they’re actually vectors.

I wish #[non_exhaustive] worked with struct update syntax

3 minute read

It’s pretty annoying that in Rust, #[non_exhaustive] structs don’t support “struct update” / “functional record update” syntax (the syntax that powers Stuff { a: b, c: d, ..blah }).

Why is there no realloc that takes the number of bytes to copy?

2 minute read

I’d like a variant of realloc that takes the number of bytes that should be copied, in the case a copy is needed.

Miri Feature Wishlist

8 minute read

Miri is an evaluator for rust that detects many kinds of undefined behavior. Here are some things it could (possibly) do that would catch bugs I’ve had/seen before.

Introducing “Codelets”

3 minute read

In an effort to post more, I’m going to start posting shorter (and frankly, lower effort) blog posts known as “Codelets”.

Futex-likes

5 minute read

Most major OSes offer some form of futex-like functionality at this point. Some of these are a bit obscure and hard to remember, though, so I thought I’d write some stuff about them down so that I can refer to it or link it later.