*Blows airhorn*https://github.com/rust-lang/rust/issues/63997 …
-
-
Oh man I finally found a Rust feature that's so confusing even the people who wrote Rust don't understand what it doespic.twitter.com/zkGjaBUoYj
8 replies 2 retweets 31 likesShow this thread -
Okay so it turns out the actual "abandon hope ye who enter here" section is reference section 12 (Memory Management) not 10 (Types). I don't think I'm reading section 12 today. I guess this was only Purgatorio.
1 reply 0 retweets 13 likesShow this thread -
Here's an actual Rust Advice Question: What's the best-practice-y way to do string manipulation? Is there a section in the stdlib? I need to take a delimited list and generate a list of match/replaces for all instances of a character in each substring. Basic-but-not-trivial stuff
6 replies 0 retweets 10 likesShow this thread -
I ask because every language has string ops in the stdlib but not every language has a situation where the strong ops people use in practice are the ones in the stdlib lol
3 replies 0 retweets 10 likesShow this thread -
So the ? pattern is very natural. But ? can only pass errors unchanged— Say I'm writing a fn that returns Result<_, A>, and it calls a fn that returns Result<_, B> and another fn that returns Result<_, C>. Is there a "good" way to do this, or do I just write a lot of match{}es?
6 replies 0 retweets 1 likeShow this thread -
Okay clearly I have done something very very wrong here but that doesn't mean I know whatpic.twitter.com/F1EJ2Vn745
3 replies 0 retweets 2 likesShow this thread -
UPDATE: The above tweet was worse than I thought. load_lua_file() was returning a LuaResult<LuaValue>, and so was my function, but I put a ? at the end of load_lua_file, ruining everything. Then I tried to unpack the error and made things worse. Leaving the tweet up, for my shame
2 replies 0 retweets 9 likesShow this thread -
… … … alright so. I've been working up to this for weeks. Circling around it. Kinda dreading it. I'm finally going to learn about Rust's memory management model, its Big Idea, it's most frustrating but to its advocates most important feature. … … This is the whole sectionpic.twitter.com/RZcFX5JjzB
7 replies 3 retweets 29 likesShow this thread -
for a systems language you'd expect something more!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

