Live data from Hacker News

A Gopher Meets a Crab

miren.dev

11–20 of 79 posts

Re: A Gopher Meets a Crab

#11
post #3

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.

I know what Result is.

Re: A Gopher Meets a Crab

#12
I 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

#13

I 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?

I’ve learned a ton of new things this way, even in a stack that I know really well. Ditto on all sorts of new little command line tricks that I was unaware of before.

Re: A Gopher Meets a Crab

#15
post #3
post #2

The 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?

It's not like people regularly decide this is a good return type. Just because Claude isn't good at designing code or what have you doesn't mean rust is bad/weird.

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

#16

I 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

#17

Um? 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….

People really are forgetting how to think. While reading this blog post I almost immediately flipped into teaching confused freshmen taking the course that wasn't their major mode.

Re: A Gopher Meets a Crab

#18

Was anyone else expecting OpenClaw over gopher protocol?

Yep, I did. While I don't use OpenClaw, I built a small MCP tool for my AI to use Gopher in a minimal harness, and it's been useful. Gopher is almost an ideal protocol for AI, none of the token verbosity of HTML. But I admit in my case, it's mostly being used to access weather data on Floodgap's Groundhog, because the format published on Gopher is much easier to parse & access than the paywalled government APIs in Australia. Claude occasionally uses Veronica to do a search instead of a web search as well.

Re: A Gopher Meets a Crab

#19

I 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.

Which would be all the time? At which point you might be better served by learning from a source that has any guarantees of being correct and doesn't hallucinate. Like text books that have had several editions and are free on the Internet.

Re: A Gopher Meets a Crab

#20
post #3
post #2

The 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?

it is indeed pretty weird. clippy has a lint against this iirc. it's recommended to just create a custom error type, even if its just an empty struct or a single-variant enum

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)

Post reply on HN