Post B1eeinyfp7VZzb3MWG by lanodan@queer.hacktivis.me
(DIR) More posts by lanodan@queer.hacktivis.me
(DIR) Post #B1ealfD0TyzfqfrhD6 by whynothugo@fosstodon.org
2025-12-26T22:04:41Z
1 likes, 0 repeats
It’s extremely annoying that so many APIs in Rust (both the language and the stdlib) panic instead of returning an error. At least there are linters for many of these, but we do need to enable those lints manually.
(DIR) Post #B1eb9rXQIIbB2MxBHk by lanodan@queer.hacktivis.me
2025-12-26T22:09:51.044189Z
0 likes, 0 repeats
@whynothugo Reminds me that few times I've wanted to check Hare's stdlib to make sure error handling is done well.At least I think the few I accidentally landed on got better.
(DIR) Post #B1eeimw9gztqlUrpxI by whynothugo@fosstodon.org
2025-12-26T22:41:40Z
0 likes, 0 repeats
@lanodan The nomem changes address a huge deal of errors. Slice indexing and alike is still panicky instead of fallible.
(DIR) Post #B1eeinyfp7VZzb3MWG by lanodan@queer.hacktivis.me
2025-12-26T22:49:43.884203Z
0 likes, 0 repeats
@whynothugo Yeah nomem and is a very welcome one but that's like a big noticeable change.More thinking of small ones like one I hit once was path/filenames not being always valid utf8 (I blame shift-jis).
(DIR) Post #B1ehOBWBPBSwmcaOiu by whynothugo@fosstodon.org
2025-12-26T23:13:05Z
0 likes, 0 repeats
@lanodan The stlib only supporting utf-8 path names is a big mistake IMHO. I have old back-ups in DVDs which can't be accessed with anything written in hare. It seems like a very high-level decision for such low-level interface.
(DIR) Post #B1ehOCk2r89GZu4yy8 by lanodan@queer.hacktivis.me
2025-12-26T23:19:39.502579Z
0 likes, 0 repeats
@whynothugo Yeah, I also think so, like there's at the very least a missing level of abstraction between syscalls and stdlib for those.Plus paths rarely need to be treated as true strings so always encoding/decoding as utf8 doesn't makes that much sense either.
(DIR) Post #B1gBAWCUu2tqepjnay by whynothugo@fosstodon.org
2025-12-27T13:07:48Z
1 likes, 0 repeats
@lanodan Yeah, syscalls ought to take a byte slice, and leave the rest to the call site.