HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Crust of Rust: Lifetime Annotations

Jon Gjengset3 HN recommenders · recommended in 3 months, 2020-2023
YouTube
299K views · 6 years ago · tutorial · evergreen

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 as a slow-paced, detailed live-coding session that makes lifetimes click once you are past Rust basics.

C, C++, Rust, Go & systems languagesProgramming language design#rust#lifetimes#livecoding#strings#generics

4 comments from Hacker News

@ly3xqhl8g92023 · in “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

CitesView on HN
@tialaramex2022 · in “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 does a whole video on lifetime annotations, which are something you won't see in most popular languages, but also one on Rust's iterators, which are a familiar concept from both C++ and Swift but don't work quite like either (they're very different from C++ iterators, your Swift experience will help more). I recommend watching specifically a handful on topics you don't feel you understood well, although you could watch all of them especially if you just enjoy Jon's style and have the free time. They're not fast paced, if you wanted "Rust in 60 minutes" this is not that, but each one is actually writing carefully chosen code that runs and talking through what's going on, not just clicking through slides.

RecommendsView on HN
@ashish012020 · in “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.

RecommendsView on HN
@harikb2020 · in “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

RecommendsView on HN
Crust of Rust: async/await2:34:01

Crust of Rust: async/await

Jon Gjengset
246K views • 5 years ago
The Why, What, and How of Pinning in Rust3:03:54

The Why, What, and How of Pinning in Rust

Jon Gjengset
87K views • 7 years ago
Rust: A Language for the Next 40 Years - Carol Nichols55:08

Rust: A Language for the Next 40 Years - Carol Nichols

ChariotSolutions
367K views • 7 years ago
Rust at speed — building a fast concurrent database52:54

Rust at speed — building a fast concurrent database

Jon Gjengset
225K views • 7 years ago
Hacking with Andrew and Brad: tip.golang.org1:02:49

Hacking with Andrew and Brad: tip.golang.org

The Go Programming Language
99K views • 11 years ago
Rust's Journey to Async/Await48:46

Rust's Journey to Async/Await

InfoQ
90K views • 7 years ago
Rust NYC: Jon Gjengset - Demystifying unsafe code29:25

Rust NYC: Jon Gjengset - Demystifying unsafe code

Rust Programming Language
27K views • 6 years ago
Vibe coding complex changes in Rust2:59:08

Vibe coding complex changes in Rust

Jon Gjengset
55K views • 1 year ago
Implementing (part of) a BitTorrent client in Rust4:09:16

Implementing (part of) a BitTorrent client in Rust

Jon Gjengset
115K views • 3 years ago
GopherCon 2014 Inside the Gophers Studio with Blake Mizerany48:19

GopherCon 2014 Inside the Gophers Studio with Blake Mizerany

Confreaks
8K views • 12 years ago
Lars Bergstrom - Beyond Safety and Speed: How Rust Fuels Team Productivity22:19

Lars Bergstrom - Beyond Safety and Speed: How Rust Fuels Team Productivity

Rust Nation UK
18K views • 2 years ago
RustLatam 2019 - Without Boats: Zero-Cost Async IO32:24

RustLatam 2019 - Without Boats: Zero-Cost Async IO

Rust Programming Language
55K views • 7 years ago
Going Native 2012 Keynote Stroustrup1:29:49

Going Native 2012 Keynote Stroustrup

savage309
33K views • 14 years ago
Rant: Entity systems and the Rust borrow checker ... or something.1:01:51

Rant: Entity systems and the Rust borrow checker ... or something.

Jonathan Blow
304K views • 8 years ago
GoingNative 2012 - Day 2 - Clang1:00:54

GoingNative 2012 - Day 2 - Clang

aghuttun
13K views • 13 years ago
CppCon 2015: Herb Sutter "Writing Good C++14... By Default"1:29:06

CppCon 2015: Herb Sutter "Writing Good C++14... By Default"

CppCon
193K views • 11 years ago
"Stop Writing Dead Programs" by Jack Rusher (Strange Loop 2022)43:04

"Stop Writing Dead Programs" by Jack Rusher (Strange Loop 2022)

Strange Loop Conference
468K views • 4 years ago
Hot Code Reloading in C2:16:18

Hot Code Reloading in C

Tsoding Daily
94K views • 3 years ago
GopherCon 2014 Opening Keynote by Rob Pike56:36

GopherCon 2014 Opening Keynote by Rob Pike

Confreaks
38K views • 12 years ago
Lang NEXT 2014 Panel  Systems Programming in 2014 and Beyond1:05:56

Lang NEXT 2014 Panel Systems Programming in 2014 and Beyond

25msr
3K views • 8 years ago