Rachel Barker
rachelplusplus.me.uk
Rachel Barker
@rachelplusplus.me.uk
Computing environmentalist, amateur musician, general-purpose nerd.
Previously worked on AV1+AV2 @ Google, now consulting @ Monocot. She/her.

Blogs at https://www.rachelplusplus.me.uk/
Combining those lets you remove (almost) all uses of malloc (and non-C equivalents like Box<T>) from a heck of a lot of programs, which makes life so much easier.
December 26, 2025 at 2:36 PM
But what if you want to return an allocated object to your caller? You can't use a locally scoped arena for that, for the same reason you can't return a pointer to a stack-allocated object. But you can solve this by having a second arena bound to a wider scope, eg. a single frame in a video game
December 26, 2025 at 2:36 PM
Arenas can support a stack of scopes, with automatic unwinding of each scope once it's finished. You can bind those scopes to function calls (especially easy in C), or to whatever logical subdivisions of your program you want, giving you a nicer replacement for alloca and variable-length arrays.
December 26, 2025 at 2:36 PM
Reposted by Rachel Barker
For anyone who is out of the loop on that reference, I am a deeply uncool nerd
6:00
YouTube video by Dream Theater - Topic
youtu.be
December 24, 2025 at 10:20 PM
Reposted by Rachel Barker
Found it
December 23, 2025 at 10:27 PM
Wait, it's more than that: f-strings are documented as aligning numbers to the right and everything else to the left by default. Which is both internally inconsistent, *and* inconsistent than the old %s formatting which right-aligns everything by default.
December 13, 2025 at 12:23 PM
*can't just manipulate the exponent if you have to deal with infinities / NaNs / subnormals, to be clear
December 7, 2025 at 2:52 PM
I forgot that you can use ldexp with a mantissa that isn't in [1, 2) :P

I suspect the "why" is because of a combination of supporting large exponents (can't use `x * (1<<n)` if n=100) and edge cases (can't just manipulate the exponent). So it's slow in software, but shouldn't be too bad in silicon.
December 7, 2025 at 2:51 PM
But why *shouldn't* I be able to write `1.5 << x`, and have it translate to a single instruction which just alters the exponent (+ handles any special cases)? Why do we instead have to write `1.5 * (1 << x)`, and have that translate to three instructions, including a generic floating-point multiply?
December 7, 2025 at 2:31 PM