HNHacker News
TopNewBestAskShowJobs

RyanVail

2 karma · joined February 12, 2026

submissionscomments
RyanVail··on Comparing reflection capabilities of C++, Zig and C3
Zig doesn't have attributes, but you could just create a thin wrapper struct over an inner type and use setter functions that throw errors on invalid values. Personally I prefer this over attributes because it forces you to handle possible error states from the callers of the setters, instead of relying on you remembering to call `validate` on your types.
RyanVail··on Fits on a Floppy – A Manifesto for Small Software
Actually with Opus you can compress a three minute song to 1.44 MB without it sounding absolutely terrible. I definitely don't have the best ear for music, but when I compared a three minute song I compressed with Opus at ~67kbit/s with the original, I couldn't tell the difference.