New Rustacean – learning the Rust programming language show

New Rustacean – learning the Rust programming language

Summary: A podcast about learning the Rust programming language—from scratch!

Join Now to Subscribe to this Podcast

Podcasts:

 Bonus 1: Polyglot Programming Promises and Perils | File Type: audio/x-m4a | Duration: 8:28

Bonus 1: Polyglot Programming Promises and Perils

 e006: Modularize this! | File Type: audio/x-m4a | Duration: 18:22

Designing APIs, and using packages (“crates”) and modules Notes Today, we are talking about modules, packages, and APIs in Rust. Taking a bit of a breather after some pretty hard material the last few weeks. For reference, the Rust book section on Crates and Modules will be very helpful. Corrigenda I accidentally called this episode 5, instead of episode 6. *Whoops.* Just before the 15:00 mark, while discussing libraries, I referred to “e006.md” when I meant to say “e006.rs”. Slips of the tongue inspired by the fact that Rust (delightfully) uses Markdown for its documentation. Sponsors - reddraggone9 - Chris Patti (Podcast.__init__) Become a sponsor - https://www.patreon.com/newrustacean - https://venmo.com/chriskrycho - dwolla.com/hub/chriskrycho - ttps://cash.me/$chriskrycho

 e005: Allocate it where? | File Type: audio/x-m4a | Duration: 18:30

Returning functions from other functions, and thinking about the stack, the heap, and reference types. NOTES This episode, we look at returning functions from other functions, and as part of that discuss some basics about the stack and the heap—and why we need to care about them for returning functions. The functions themselves are not especially interesting; they just show you the basic form you use to return functions from other functions, and how to then use them in another function. You’ll want to take a detailed look instead at the documentation for each (or just read the source!), because that’s where the meat of the discussion in this week’s code is. SPONSORS - reddraggone9 - Chris Patti Become a sponsor - Patreon.com/newrustacean - Venmo.com/chriskrycho - Dwolla.com/hub/chriskrycho - Cash.me FOLLOW - New Rustacean: - Twitter: @newrustacean - App.net: @newrustacean - Email: hello@newrustacean.com - Chris Krycho - Twitter: @chriskrycho - App.net: @chriskrycho

 e004: Functionalized | File Type: audio/x-m4a | Duration: 17:07

Functions, methods, closures, and function as arguments! NOTES This week’s episode covers the basics of all sorts of functions: normal functions, methods, and closures. Closures - An explanation (in Ruby) by Martin Fowler - Rust book - Rust by Example - “What is a closure?” (Progammers Stack Exchange) ‚Äì the first answer is the best, but the second answer may be a helpful stepping stone for people just getting their heads around this and coming from OOP languages like C++ or Java (even though I disagree with the explanation in some ways). - “What is a closure?” (Stack Overflow) – careful, thorough answer using JavaScript as an example. LINKS - Exercism (hat tip: Lechindanier on GitHub) - Rust Learning - Rust and Swift (viii) FOLLOW/SUPPORT - New Rustacean: - Twitter: @newrustacean - App.net: @newrustacean - Patreon.com/chriskrycho - Dwolla.com/hub/chriskrycho - Email: hello@newrustacean.com - Chris Krycho - Twitter: @chriskrycho - App.net: @chriskrycho

 e003: No. more. nulls. | File Type: audio/x-m4a | Duration: 16:51

No More Nulls - Date: October 21, 2015 - Subject: Enumerated (`enum`) types, pattern matching, and meaningful return values. # Notes Today’s episode discusses, in order: - Enumerated types, with an eye to the difference between structs and enums, and to the differences between enums in C and in Rust. - Pattern matching, with a focus on using them with enumerated types and some discussion about how they differ from switch blocks in C-like languages. - Using the Option and Result enumerated types with pattern matching to provide meaningful returns from functions safely. ## Order There is a specific order to the examples below, and it is _not_ the automatically-alphabetized order rendered by rustdoc. Instead, you should work through in the sequence they appear in the source: 1. RelatedishThings 2. demonstrate_basic_enumeration 3. demonstrate_match 4. get_an_option 5. demonstrate_option 6. get_a_result 7. demonstrate_result

 e002: Something borrowed, something… moved? | File Type: audio/x-m4a | Duration: 17:12

Something borrowed, something… moved? * Date: October 12, 2015 * Subject: The struct data type constructor, and the basics of Rust’s “ownership” concept and “borrowing” and “moving”. * Audio: * M4A * MP3 * Ogg Follow/Support * New Rustacean: * Twitter: @newrustacean * App.net: @newrustacean * Patreon * Email: hello@newrustacean.com * Chris Krycho * Twitter: @chriskrycho * App.net: @chriskrycho Notes Today’s episode discusses, and the associated source code demonstrates, a few basic behaviors of structs… including borrowing! After taking a short look at one of Rust’s basic approaches to creating new types, we dive into a fairly thorough overview of how borrowing works in fairly run-of-the-mill Rust code. This is a basic introduction, and as such I’m not getting into things like heap-allocated memory (Box) or dealing with move semantics with threads or closures. (I haven’t actually figured those out well enough yet to write something like this for them!) As usual, you’ll want to have the src open to see what I’m doing with the components documented below. Links * rustfmt – a tool for formatting Rust code * repo * “rustfmt-ing Rust` * Reddit discussion * RFC for incremental compilation * Text of the RFC * GitHub pull request

 e001: Document All the Things | File Type: audio/x-m4a | Duration: 17:06

Documentation in general, and rustdoc and cargo doc in particular. Document all the things! * Date: October 3, 2015 * Subject: Documentation in general, and rustic and cargo doc in particular. * Audio: * M4A * MP3 Follow/Support * New Rustacean: * Twitter: @newrustacean * App.net: @newrustacean * Patreon * Email: hello@newrustacean.com * Chris Krycho * Twitter: @chriskrycho * App.net: @chriskrycho Notes This is a mostly-empty module, and it is intended as such. Why? Well, because almost all the sample code exists in these comments, which serve as the show notes. If you listen to the episode or take a look at the source files, you’ll see how it works! The components below are included solely so you can see how the docstrings work with each kind of thing. Make sure to click on the names of the items: there is more documentation there. Again, take a look at the source to see how it looks in the context of a file module. Note that this module-level docstring uses rather than `///`-style comments. This is because this docstring is documenting the item which contains it, rather than the following item. Per [Rust RFC 505][1], the preferred approach is always to use the "following" form (`///`) rather than the "containing" form (), except for module-level docs like these. (I will be following RFC 505 throughout.) Links * Rust and MSVC tracking issue * Other documentation tools: * Predecessors: * Python’s Sphinx tool * Oxygen * JSDoc * JavaDoc * Other new languages with Markdown tooling * Julia has a built-in documentation system * Elixir has ex_doc * Rust 1.3 release announcement * Rust’s package hosting: crates.io * Crater for testing for backwards compatibility * Semantic versioning * “Stability as a Deliverable”: Rust official blog post on version stability, backwards compatibility, and release channels. * The Rust book chapter on rustc

 e000: Hello, world! | File Type: audio/x-m4a | Duration: 17:11

Hello, world! * Date: September 24, 2015 * Subject: The host, the language, and the show! * Audio: * M4A * MP3 Today’s show is pretty meta. You can skip it if you just want to start with something more technical, but I thought listeners might want to know a little about the origins of the show and my own background, so that’s what you get today. Next time, we’ll be tackling the rustic command in some detail. This is an almost-empty module: we aren’t doing any fun code samples yet. I included the standard “Hello, world!” example, because how could I not? However, at some point in the future, there will be much more detailed code samples available: * in the GitHub repository for the show * in the show notes attached to each episode Hopefully, the result will be a pretty helpful bunch of side content along with the audio of the podcast itself.

Comments

Login or signup comment.