wr
hn
Top
New
Best
Ask
Show
Jobs
Back
R
RyanVail
Joined 8 months ago
Karma
2
Submissions
2
Member since
Feb 12
View on Hacker News
Recent submissions
Comment · 1 month ago
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.
Comment · 6 months ago
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.