Top all-time · #2364
sunfishcode's blog
Personal blog · blog.sunfishcode.onlinesystemsprogramming
sunfishcode's blog is a personal blog at blog.sunfishcode.online about systems and programming. Since 2021, 32 different Hacker News readers have linked it 46 times, most often “Bugs in Hello World”. It is still writing: the last post was on 2025-03-11, and you can follow it by feed.
Too few sampled comments (7) to say how often HN recommends it.?
Why HN links it
HN readers link this blog for technical deep dives on C and POSIX pitfalls, such as the 'Bugs in Hello World' analysis, plus posts on WASI, the component model and thread-safe setenv.
Summarised by Claude from a sample of 7 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
A blog by sunfishcode
Most-linked posts?
- Bugs in Hello World5 people · 5 mentions · first linked 2022-03-09
- Cap-std, a capability-based version of the Rust standard library4 people · 4 mentions · first linked 2021-06-15
- Errors from `Close`4 people · 4 mentions · first linked 2024-09-10
- WASI Preview 2 Launched3 people · 3 mentions · first linked 2024-01-25
- WASI API: Capabilities and Filesystems3 people · 3 mentions · first linked 2024-07-09
- Guarding Against Broken Encapsulation3 people · 3 mentions · first linked 2021-09-10
- Rust programs written entirely in Rust2 people · 3 mentions · first linked 2021-09-07
- Eyra Does the Impossible2 people · 3 mentions · first linked 2023-11-16
- Is everything a file: the unrecognized complexity of files2 people · 2 mentions · first linked 2022-11-17
- Embrace the Kinda: WebAssembly Is a Kinda2 people · 2 mentions · first linked 2023-05-31
What Hacker News says?
I am not sure either follows. But it depends how we even define "older languages", especially considering differences between python 3 and 2, are they the same age (based on the original python release) or are they treated for their respective release version? Just taking some simple release dates [1] or wikipedia I found: Ages of "Yes" group: 49, 36, 22, 26, 26, 12, 31 Ages of "No" group: 11, 14, 33, 7, 32, 45, 26,…
Comment linking /bugs-in-hello-world/
on “Bugs in Hello World”Submitted Bugs in Hello World as a story · 527 points
HN discussionDepending on the language, this simple code actually has a bug: https://blog.sunfishcode.online/bugs-in-hello-world/
Comment linking /bugs-in-hello-world/
on “AI-designed chips are so weird that 'humans cannot understand them'”Submitted Porting Rust's Std to Rustix as a story · 224 points
HN discussionAnother good write-up which gives more context to this release, and it touches on POSIX in relation to the component model. https://blog.sunfishcode.online/wasi-preview2/
Comment linking /wasi-preview2/
on “WASI 0.2.0 and Why It Matters”Submitted Rust programs written entirely in Rust as a story · 159 points
HN discussionI'd like to see wasi:filesystem evolve beyond preopens (which would avoid "ghosts" like this) as described in this blog: https://blog.sunfishcode.online/capabilities-and-filesystems...
Comment linking /capabilities-and-filesystems/
on “Proof of Concept showcasing WASM program access files outside node:wasi's dir”Submitted Writing into Uninitialized Buffers in Rust as a story · 129 points
HN discussionEyra is a new implementation of libc in Rust that addresses this in its default configuration: "Eyra solves this by having setenv etc. just leak the old memory. That ensures that it stays valid for as long as any thread needs it. Granted, leaking isn't great, and Eyra makes it configurable with the threadsafe-setenv cargo feature, so it can be disabled in favor of the thread-unsafe implementation. " https://blog.sun…
Comment linking /eyra-does-the-impossible/
on “Setenv Is Not Thread Safe and C Doesn't Want to Fix It”Submitted First-Class I/O as a story · 81 points
HN discussionBut Rust doesn't declare it safe to modify the environment in general. It declares it safe to modify the environment using std::env::set_var, which uses locking internally. The docs explicitly note that there's potential unsafety if non-Rust code modifies the environment: "Note that while concurrent access to environment variables is safe in Rust, some platforms only expose inherently unsafe non-threadsafe APIs for…
Comment linking /eyra-does-the-impossible/
on “Setenv Is Not Thread Safe and C Doesn't Want to Fix It”Submitted Errors from `Close` as a story · 53 points
HN discussion> reading from stdin isn’t challenging, nor writing to stdout. Unless you're Kernighan and Ritchie, who semi-famously wrote a buggy hello world program and used it to educate a generation of C programmers: https://blog.sunfishcode.online/bugs-in-hello-world/ Obviously an exaggeration, but when's the last time you checked the return value of printf? I know I don't. And that's not even a memory safety bug, just basic…
Comment linking /bugs-in-hello-world/
on “It's time to get the Posix elephant off our necks”Submitted WASI Preview 2 Launched as a story · 16 points
HN discussionSubmitted Guarding Against Broken Encapsulation as a story · 10 points
HN discussionSubmitted WASI Preview 2 Launched as a story · 9 points
HN discussionSubmitted WASI API: Capabilities and Filesystems as a story · 7 points
HN discussionSubmitted No Ghosts as a story · 6 points
HN discussionSubmitted Cap-std, a capability-based version of the Rust standard library as a story · 6 points
HN discussionSubmitted Cap-std, a capability-based version of the Rust standard library as a story · 5 points
HN discussionSubmitted Rust programs written in Rust, without Libc as a story · 4 points
HN discussionSubmitted Rust programs written in Rust, without Libc as a story · 4 points
HN discussionSubmitted Errors from `close` as a story · 3 points
HN discussionSubmitted WASI 0.2 Launched as a story · 3 points
HN discussionSubmitted Cap-std, a capability-based version of the Rust standard lib (2021) as a story · 3 points
HN discussionSubmitted No Ghosts as a story · 3 points
HN discussionSubmitted What Is a WASM Component? as a story · 3 points
HN discussionSubmitted Bugs in Hello World (2022) as a story · 2 points
HN discussionSubmitted Capabilities and Filesystems in WASI as a story · 2 points
HN discussionSubmitted Bridging between source languages, in WASM as a story · 2 points
HN discussion