I really like base-2 prefixes in writing, e.g. 1 KiB, 2 MiB, 3 GiB and so on. It's way more explicit.
However, SI units are k M G and so on. Switching between lowercase k and uppercase Ki keeps tripping me up.
Related Posts
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!
I'm considering switching my personal servers (on Digital Ocean) from Ubuntu to Debian. I essentially just need something running Docker for most of my projects.
Debian seems to require upgrading less often. Any opinions?
In LSP, a position is represented as a line number and a column offset (in Unicode code units): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
This is pretty elegant. You'll get the correct line regardless of encoding bugs, and the editor already knows the line number so it's cheap to compute.