Still better than deciphering C++ soup of characters.
A Gopher Meets a Crab
21–30 of 79 posts
Re: A Gopher Meets a Crab
#22I 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
#23The 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…
Re: A Gopher Meets a Crab
#24The 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…
Off topic but using “shape” like this is LLM coded
Re: A Gopher Meets a Crab
#25The 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…
Off topic but using “shape” like this is LLM coded
Re: A Gopher Meets a Crab
#26Still better than deciphering C++ soup of characters.
std::expected and the utility functions for it (and_then(), or_else()) are pretty much the same, though? Or am I completely misunderstanding something?
Re: A Gopher Meets a Crab
#27I 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?
So getting an LLM to write an example project then dissecting the code and interrogating those choices, seems like a very good way to learn the idioms of another language.
Re: A Gopher Meets a Crab
#28I 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
#29Earlier quoted context omitted.
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.
This isn’t like learning JavaScript and then expecting to be an expert in Prolog.
Re: A Gopher Meets a Crab
#30I 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?
Not the author but this seems a good approach to me because you learn more about a language from implementing a project in it. This is especially true when you already have experience in a language from the same paradigm (like Go and Rust are). So getting an LLM to write an example project then dissecting the code and interrogating those choices, seems like a very good way to learn the idioms of another language.