Crust of Rust: Lifetime Annotations
Why Hacker News recommends it
Recommended as a slow-paced, detailed live-coding session that makes lifetimes click once you are past Rust basics.
What it is
In this first Crust of Rust episode, Jon Gjengset live-codes an example that needs multiple explicit lifetime annotations. Along the way he covers string types and generics over a custom trait.
Recommended by 3 HN commenters across 3 different months, 2020 to 2023.
What Hacker News said
Recommends harikb · 2020-06 · on “There’s plenty of room at the Top: computer performance after Moore’s law”
Anecdotal - One of favorite YouTube live-streaming personalities, Jon Gjengset[1] is a Ph.D student at MIT CSAIL. His talks are very detailed[4] and captivating[3] [1] [LINK] Talks [2] [LINK] [3] [LINK] Rust Details(my favorites) [4] [this video]
Recommends ashish01 · 2020-09 · on “My Favorite Rust Function Signature”
I also used to feel the same way. But listening to [0]Crust of Rust: Lifetime Annotations by Jon Gjengset helped me understand its need. [0] [this video] really helped me understand it.
Recommends tialaramex · 2022-09 · on “Next steps for Rust in the kernel”
So, with "good working knowledge" of C++ and Swift, you probably aren't going to have too much trouble with the basics, if anything you might worry that there's some subtlety which you're missing when actually nope, whatever just seemed easy maybe actually was that easy. [ For example move really is as simple as Rust makes it look, it is a headache in C++ because they added it to a finished working language ] Several people suggested books/ web pages let me suggest some videos: Jon Gjengset's "Crust of Rust" Youtube videos are good once you reach the point where you can write more than "Hello, world!" with some confidence but certain specific things aren't clicking. [this video] For example, Jon
Cites ly3xqhl8g9 · 2023-02 · on “Why I Use C When I Believe in Memory Safety”
Rust seems nice when you see someone like Jon Gjengset writing it [1], however when actually writing it yourself you discover that your errors have errors which only show some kind of alien fishing when you Google them. Perhaps ChatGPT could help here, it's quite useful/pleasant for trivial quizzes, however I asked it recently how to handle a file upload using actix-web and it hallucinated some really nice methods, too bad they aren't in the code base. [1] [this video]