Skip to content

Latest commit

 

History

History

2

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Episode 2 - Snakes And Gears

YouTube video thumbnail ▶ Watch now on Youtube!

Let's talk about Python and Rust. I used to do a lot more Python than I do now, but I still love it for its beauty.

One of the first things I was missing in Rust when coming from Python were List Comprehensions. It took me a while to figure out, that the Rust way - using iter(), filter(), and map() - actually is a better fit for the language. I want to show you how to port Rust list comprehensions to Rust.

If you like to get notified about new episodes, please subscribe to my channel 😊.

Keywords: iterators, map, filter, Entry API, List comprehensions

Things I mentioned during the show

  • Reading files using the Rust Cookbook.
  • DevDocs is a nice Rust documentation viewer. Also supports a ton of other languages and works offline.

Things I should have mentioned (but forgot)

  • Iteration patterns for Result & Option
  • Experimenting with Python is much cooler with Jupyter (or IPython) notebooks. I've added an example to the code section.
  • If you really need list comprehensions, you could use cute, which is a set of macros that make this syntax possible.

Meta

Resources and licenses

Support!

Preparing, recording, and editing an episode takes a substantial amount of time (around 30 hours total). I do all of this next to my fulltime dayjob. If you want to show your appreciation and help me keep the content free for everybody to enjoy, please consider sponsoring me on Github - no matter the amount. ❤️