Implementing (part of) a BitTorrent client in Rust

preview_player
Показать описание


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

Рекомендации по теме
Комментарии
Автор

I think this is the first time I've stopped one of your videos and started actually doing it myself, rather than sitting passively and taking it in. The moment you started doing lists I just felt that this was I problem I needed to try to tackle on my own before seeing someone else do it.

MasterHigure
Автор

I will gladly spend all my time watching you go through every challenge on that site 😂

albertlie
Автор

This is the kind of programming content, one craves for on youtube! 👏

KuldeepYadav-jwjn
Автор

I like the way you write a code and tell what the code syntax means, like "rest, until ..len". I learn Rust syntax and libs much faster than reading their docs. Great stuff!

matts
Автор

At 2:32:57, you were still passing `t.announce` to `Url::parse` instead of `tracker_url`. That's why it looked like it was stripping off the query params.

cpetzold
Автор

Your thought process is highly insightful and engaging to observe. Thanks for great content. And yeah, topic like that are incredibly interesting (live coding of X). I'd be more then happy watching you'r implementing any kind of DB engine, the same stuff as those folks from codecrafters suggest (clone of docker, git etc), browser engine, SQL parser, interpreter or any possible real thing from the fundamental technology we use every day. For example I'm studying Rust, and trying to fill the gaps in my CS knowledge and indeed, building the real things are incredibly powerful approach. And again, watching you doing things, studying your way of thinking and using the language and tools is a real treasure.

sergeylypko
Автор

I love the idea of teaching you by building something that already exists. I am definetly considering doing this on my own.

MatthewDickensmjd
Автор

Best Rust content on YouTube.

Please do part 2!

blob
Автор

I discoverd Codecrafters thanks to your stream. I decided to implement it on my own and only watch your video when I'm absolutely stuck. Funny enough I spent the most time in many of the places where you were such as the issue with json Value not liking the bytes array and then URL encoding these bytes. I hope Codecrafters can improve on this, like maybe do not run the previous steps in their tests and pull in a create for URL encoding for bytes.

scriptozavr
Автор

Please keep doing "impl" rust streams, you are fairly unique in this respect.

worldanalytics
Автор

Now _that_ was an incredible livestream

buildyourownx
Автор

You might like the "Dark Reader" FF extension ;) awesome content as always!

beebakrizzle
Автор

Please say you plan to continue this your videos and the way you break things down really helps me see alternative ways of doing stuff.. that said I think a quick refactoring of those calls in your main function would have really cleaned stuff up lol

cchance
Автор

For dark mode, you could add a CSS rule: `html, img, video, iframe { filter: invert(1) hue-rotate(180deg) }`
This inverts the whole page, and then reverts any images back to normal.
Easy to put in a bookmarklet:
`javascript:(function(){var s=document.createElement('style');s.innerText='html, img, video, iframe{filter:invert(1)

MizardXYT
Автор

Nice, the replay is here! Couldn't be there during the live stream. Good topic.

timvw
Автор

the zero copy trick shown in this video seams very neat but it requires unsafe. I would love a video where you explore this type of optimizations and if/why they are ok and when.

Dimkar
Автор

At one point you said that the fat pointer to you unsized struct stores the length of the last field, but the pointer to byte slice would contain the length of the entire thing, so I don't think your unsafe cast is valid. Though I would expect it to be off-by-8 not off-by-7. 😅

juchemz
Автор

1:23 That's just sponsorship minus the good part of money 😂

VivekYadav-dsoz
Автор

Great stream! Thanks a lot! Looking forward for part 2… 😅

rodelias
Автор

Looking forward to part two, if you make one!

smallclover