Earlier quoted context omitted.
Result Is pretty weird, though, no? Why would you want a unit value / error type?
It’s the equivalent of Haskell’s Either, with Option being the equivalent of Maybe. They’re fairly well-defined idioms.
A Gopher Meets a Crab
11–20 of 79 posts
Re: A Gopher Meets a Crab
#12Re: A Gopher Meets a Crab
#13I feel like having an LLM write code in a language you aren't familiar with and then inspecting the results is kind of like hiring someone to speak Spanish for you and then being confused at the weird words they are using. Like, what would make you want to do this?
Re: A Gopher Meets a Crab
#14Re: A Gopher Meets a Crab
#15The weird-looking Rust isn’t really Rust being weird, it’s the type telling the truth. Result >, Elapsed> That’s three independent “not the happy path” channels: timeout, stream closed, and websocket error. The nicer version is not a cleverer match. It’s choosing a domain error shape and converting into it one layer at a time: let timed = tokio::time::timeout(duration, receiver.next()).await; let next = timed.map_err…
Result Is pretty weird, though, no? Why would you want a unit value / error type?
Sure this is something someone can do but it's suggesting the caller doesn't care about why it failed and doesn't need anything from it's success. It's a choice but it's not a typical one. Maybe the fact that it looks weird and there is no comment is a clue that this isn't high quality code.
People really should be more skeptical of LLM coding. Claude is not as amazing as marketing makes it sound. It is amazing in that it can write code and follow specs sometimes, but a lot of quality gets lost along the way without close supervision by someone who knows better
Re: A Gopher Meets a Crab
#16I feel like having an LLM write code in a language you aren't familiar with and then inspecting the results is kind of like hiring someone to speak Spanish for you and then being confused at the weird words they are using. Like, what would make you want to do this?
Re: A Gopher Meets a Crab
#17Um? Person vibe codes Rust. Output is stupid. The conclusion is either a) Vibe coding produces bad code b) Rust is weird Somehow we’re supposed to accept b as the answer? Give me a break….
Re: A Gopher Meets a Crab
#18Was anyone else expecting OpenClaw over gopher protocol?
Re: A Gopher Meets a Crab
#19I feel like having an LLM write code in a language you aren't familiar with and then inspecting the results is kind of like hiring someone to speak Spanish for you and then being confused at the weird words they are using. Like, what would make you want to do this?
If you already speak French or another Romance language it isn’t a bad idea to just have a conversation in Spanish directly and then ask for clarifications anytime you don’t understand.
Re: A Gopher Meets a Crab
#20The weird-looking Rust isn’t really Rust being weird, it’s the type telling the truth. Result >, Elapsed> That’s three independent “not the happy path” channels: timeout, stream closed, and websocket error. The nicer version is not a cleverer match. It’s choosing a domain error shape and converting into it one layer at a time: let timed = tokio::time::timeout(duration, receiver.next()).await; let next = timed.map_err…
Result Is pretty weird, though, no? Why would you want a unit value / error type?
this lets you implement `std::error::Error`, which you really should to make it less painful when you want to erase the type (`std::error::Error` is `dyn`-compatible)