File:Implementing (part of) a BitTorrent client in Rust.webm

Summary

Description
English: In this stream, we're doing the "implement BitTorrent" challenge from https://app.codecrafters.io/join/bittorrent?via=jonhoo in Rust. Essentially, we're implementing a BitTorrent client from scratch by following a test-guided set of steps. This is a way of learning I really like (and encourage others to try), and after this stream I'm comfortable saying that this is also a good _implementation_ of that learning mechanism — props to CodeCrafters!

It's worth noting that this is not a sponsored stream, at least not directly. I got no money to make it. CodeCrafters reached out to me after the fly.io distributed systems challenges video (https://www.youtube.com/watch?v=gboGyccRVXI) and suggested I might be interested in trying their thing and, crucially, giving my honest opinion of what they'd built. Since I deeply believe in this learning path, and want to help those enabling it, I took them up on it! I _do_ get a referral bonus for those who choose to sign up for this through the link above after watching the video (so please use it if you do decide to sign up), but hopefully that's an informed choice after watching this :p And you can of course always just stick to their free challenges! The BitTorrent challenge is also available openly here: https://github.com/codecrafters-io/build-your-own-bittorrent

Also, I managed to fix the code for the "download a piece" bit at the end, and it was indeed mostly a (set of) off-by-one errors. You can see the final changes here: https://github.com/jonhoo/codecrafters-bittorrent-rust/compare/f71ed3d223acbceaa42fea220f774f9aba8f56c9...HEAD

0:00:00 Introduction 0:03:15 Project setup 0:04:33 Decode bencoded strings 0:10:58 Decode bencoded integers 0:18:28 Decode bencoded lists 0:36:39 Decode bencoded dictionaries 0:40:42 Parse torrent file 1:24:24 Calculate info hash 1:38:55 Piece hashes 1:41:35 Discover peers 2:35:13 Peer handshake 2:52:55 Download a piece 4:07:05 Concluding thoughts

Live version with chat: https://youtube.com/live/fhEHBQog-Cc?feature=share
Date
Source YouTube: Implementing (part of) a BitTorrent client in Rust – View/save archived versions on archive.org and archive.todayCategory:Media from YouTube
Author Jon Gjengset

Licensing

This video, screenshot or audio excerpt was originally uploaded on YouTube under a CC BY license.
Their website states: "YouTube allows users to mark their videos with a Creative Commons CC BY license."
To the uploader: You must provide a link (URL) to the original file and the authorship information if available.
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Attribution:
Jon Gjengset
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Category:CC-BY-3.0#Implementing%20(part%20of)%20a%20BitTorrent%20client%20in%20Rust.webm
Category:Media from YouTube#Implementing%20(part%20of)%20a%20BitTorrent%20client%20in%20Rust.webm
This file, which was originally posted to an external website, has not yet been reviewed by an administrator or reviewer to confirm that the above license is valid. See Category:License review needed for further instructions.
Category:License review needed (video)#153341514 Category:Uploaded with video2commons Category:Videos of Rust (programming language)
Category:CC-BY-3.0 Category:License review needed (video) Category:Media from YouTube Category:Uploaded with video2commons Category:Videos of Rust (programming language)