Remarkable, sobering discussion of how hard it is to write bytes to a file robustly: https://danluu.com/deconstruct-files/
APIs are subtle, filesystems have different safety modes, they sometimes discard errors, not everyone complies with POSIX, and sometimes hardware doesn't meet its spec!
miniblog.
Related Posts
Anthropic used Claude to write a C compiler in Rust (CCC). I've really enjoyed following the discussion.
The initial post shows how they wrote the harness with GCC as an oracle and a prompt specifying a design using SSA. The author has clear domain expertise.
https://www.anthropic.com/engineering/building-c-compiler
Futhark's design is deliberately trying to stay simple to keep long term design sustainable.
The author also has an interesting discussion of relative versus absolute paths in import syntax, and how relative paths can make local analysis easier.
Go has a wonderful, accessible discussion of how it does inlining today, the downsides, and the plans for 1.22: