Hacker News with Generative AI: Low-Level Programming

Fixing C Strings (thasso.xyz)
It’s well-known that null-terminated C strings are bug-prone and unsafe to use. They’re the stereotypical footgun. I’ve been tinkering in a bare-metal environment recently, writing all code myself, including the common types and routines you find in libc or similar. In all the code I wrote, there is not at single null-terminated string, and I have yet to encounter a bug related to bounds checking on strings or buffers.
Bit-permuting 16 u32s at once with AVX-512 (blogspot.com)
The basic trick to apply the same bit-permutation to each of the u32s is to view them as matrix of 16 rows by 32 columns, transpose it into a 32 u16s, permute those u16s in the same way that we wanted to permute the bits of the u32s [1], then transpose back to 16 u32s. Easy:
Learn Rust the Dangerous Way (cliffle.com)
LRtDW is a series of articles putting Rust features in context for low-level C programmers who maybe don’t have a formal CS background — the sort of people who work on firmware, game engines, OS kernels, and the like. Basically, people like me.
A "hello world" program in machine code on DOS (uninformativ.de)
Ask HN: Going low-level – what to learn next? (ycombinator.com)
Verified Rust for low-level systems code (github.com/verus-lang)
Ray tracer in a boot sector (github.com/nanochess)