Implementing (part of) a BitTorrent client in Rust

Channel:Jon Gjengset · Length:4:09:16 · Published:2023-10-19 · Views:115790

Watch on YouTube

Summary

Jon Gjengset's roughly four-hour live stream implementing part of a BitTorrent client in Rust, following CodeCrafters' test-guided challenge. He builds from scratch and shows idiomatic error handling along the way.

Why HN recommends it

HN recommends it as a comprehensive walkthrough of the build-your-own-BitTorrent challenge and as an introduction to CodeCrafters.

Jon Gjengset did a comprehensive stream going through the Build your own BitTorrent challenge — HN, 2023

C, C++, Rust, Go & systems languages · Software practice, open source & careers · Networking & internet infrastructure

Subtitles (excerpt)

Okay, folks, welcome back. It's good to virtually see you all again. It's been a while since we did one of these implementation streams, but I'm pretty excited. I like writing code and I get to do more of them. This stream is actually inspired by a stream I did previously, which was implementing the fly.io distributed systems challenges. So we didn't do all of these, but we sort of started from the beginning and worked our way through the challenges. It was a really fun way to just... get into distributed systems a little bit and think about some of the problems that come up. And I think we got, did we get through one and two and maybe partially three? So it was fun. There's a bunch more challenges and I thought about doing a sort of part two where I continue those challenges. But. I was sort of hesitant because I also want to leave some room for people to do it on their own without sort of being led through it by the nose. And so instead of doing those, I was like trying to figure out something else to do instead. And then shortly after I did that stream, a company reached out to me. It was like, hey, we actually make coding challenges that are intended for like learning where you build real things.

On Hacker News

Take a watch of Jon Gjengset's vids on this (there's a codecrafters challenge for building out a bittorent protocol that he's going through). - [VIDEO] - [LINK] — joshka, 2023-12
(CodeCrafters team here). Out of curiosity, is there a reason why you prefer video format vs. interactive? e.g out of habit, when I'm having a meal, I like watching "course videos" or streams occasionally. Is yours similar? P.S. Jon Gjengset did a comprehensive stream going through the Build your own BitTorrent challenge [VIDEO] , if you're interested in Rust — sarupbanskota, 2023-11
I found that CodeCrafters is quite fun after watching an video on Youtube[0], and shared it with my friends who might also be interested. The feedback I got was quite similar to the community: - really interesting idea, but - pricing is absurd, not gonna pay 100$ for these, and - their minimal paid plan at 40$/mo is a lie, with a fine print: Available as a one-time payment for 3 months or 1 year … — methou, 2023-11
Oh hey, that's me! A better link is [VIDEO] which has chapter marks and has the power outage in the middle spliced away :p — Jonhoo, 2023-10
I was thinking of `guard` in Swift when I was writing but I haven't used it so I was unsure of its exact semantics. It is a bit of a shame it is only useable on optionals and not on arbitrary types. Nice to see a full pattern matching guard in Rust. I think the terminating `?` operator makes it a bit less necessary as I would guess a large portion of cases where I would want that early-return beh… — zoogeny, 2023-10

Related videos