"New Rustacean" podcast—Bonus 1: Polyglot Programming Promise and Perils


#1

Hello! I’m a software developer who’s written (in order) Fortran, C, PHP, Python, and JavaScript over the last seven years—and now I’m adding Rust to the list! I’m also a podcaster, and the two interests have collided: I’m doing a podcast about the experience of learning Rust from the ground up, titled (appropriately enough) New Rustacean.

Points of interest:

  • The show notes for the site are all built with Rust itself: they’re documentation comments, and I render them by running cargo doc.

  • I’m writing the episode content as I work things out in my own experiments with Rust. This really is about being new to Rust—but it’s also technical, and as I get deeper into the language, the show will follow.

My tack on the show is basically to explain why something is interesting or important, and then talk a bit about how it works in Rust

  • The first episode, e000: Hello, world!, introduces the approach I’m taking to the show.
  • The second, e001: Document All the Things, discusses the importance of documentation systems, and looks a bit at rustdoc and cargo doc.
  • The published episode notes are all publicly available on GitHub. Pull request away if you find an error!

You can subscribe either via direct RSS feed or via iTunes. Episodes will come out roughly weekly, but of course life happens—I’m working full-time on a Masters degree, and I’m a husband and dad, so it might get bumped from time to time.

I would love to hear your feedback and suggestions. In addition to this thread, you can interact with me about the show elsewhere:

If you like the show, I’d hugely appreciate a rating and review on iTunes so that (a) other folks interested in Rust will find it more easily and (b) it will help boost the prominence of Rust in general!


New Rustacean e008: Just like something else—generics and traits
#2

Here’s a fun end to the weekend: e002: Something borrowed, something… moved?

Direct download links:

Again, I welcome your thoughts and feedback—the response last week was super encouraging!


Edit: see note below about the audio at the end of the episode.


#3

Greats stuff! Thanks for doing this :slight_smile:


#4

My pleasure!

Note to any listeners: if you got the version of e002 that sounds like I lost my mind near the end… just re-download it. (Sleep deprivation is bad, kids.) :stuck_out_tongue_closed_eyes:


#5

Listened to Episode II this morning, it was great!

One very, very small nit: C is always pass by value, never pass by reference. The trick? References are themselves values. This is sometimes called “pass reference by value”. This is of course a minor quibble in a trivia question about a non-Rust language, so well done regardless!


#6

Huh—I did not know that! I’ve been writing C for over 6 years now, and I learn significant new things about it every week. It’s astounding.


#7

Well, it’s a few days later than I was hoping, but as I said in the first episode: life happens. Here’s e003: No More Nulls, with a discussion of enums, pattern matching, and meaningful return types with Option<T> and Result<T, E>. (I couldn’t come up with anything extra punny for this one. Alas!)


#8

Listening to the first episode now, already fantastic stuff. Love that you’re opening with some language heritage as well :slight_smile: I used to be a C/C++ guy, then moved to .NET and fell in love with F# before also falling in love with Rust (and now I use these two languages almost exclusively in my projects). I really like the perspective you’re bringing to the table in the podcast and the style is spot-on. I’ll definitely be recommending these to my friends and colleagues interested in taking the plunge!


#9

Thanks; I’m delighted to hear you’re enjoying it. If I were goin to tackle .NET, F# would be my main point of interest. I’ve looked at it a fair bit over the last year, along with dabbling in Haskell and Elixir. That’s made it enormously easier to come to Rust, I’m sure.


#10

Yeah, you’d have no issues with it coming from Haskell and Rust, haha. It’s still a bit painful to use on anything other than Windows with VS (particularly with managing project files, which is so bad I started a project in Haskell to remedy it), but it really is a lovely language. One advantage over Haskell, for instance, is the fact that you have access to a lot of readily-available GUI frameworks that exist in .NET already, which is probably why I enjoyed it so much right from the start. I think it’s an extremely interesting case for including “programmer compatibility” in a language’s design goals without sacrificing too much of the ML heritage - another thing I think Rust really nails (and is probably done better in Rust actually, even though I think a lot of that comes down to syntax in this case).

Anyways, sorry to derail the thread a bit; loving the podcast so far, keep it up :smiley:


#11

Thursday night, I put out e004: Functionalized!, in which I talked about functions, methods, closures, and function arguments—all in the context of types and functions-as-types in general. As usual, I’d love to hear your thoughts!


#12

Now out: e005: Allocate it where?, with a discussion of returning functions from other functions, and some introductory comments on the stack and the heap and Box::new.

I’m having a blast with this!


#13

Hey Chris! Just listened to episode 5. Great stuff as always.

One small nit that’s kind of important though: you said something like

Vecs are always heap allocated.

While this is sort of true, there’s a distinction here that matters.

let v = vec![1, 2, 3];

Here, there’s two kinds of allocations: the Vec struct itself is allocated on the stack, but its data, the three elements, are on the heap. So a very small change is

The data of a Vec is always heap allocated

is a bit more accurate. Does that make sense? I can go into more detail about what exactly and why if it doesn’t.

Anyway, great show!


#14

Thanks, Steve! That’s a great clarification and I’ll add it to the show notes. I had it in mind, but didn’t get it out clearly.

Turns out doing this kind of technical content in a podcast is tough. Fun, but tough.


#15

Absolutely. :slight_smile:


#16

In this week’s episode, I talked about designing APIs, and using packages (“crates”) and modules in Rust. Lots of fun! Take a listen: e006: Modularize this!

Pay no heed to the part where I accidentally called it “episode 5” at the beginning of the show: my one-year-old had hand-foot-and-mouth disease last week and therefore I was ridiculously sleep-deprived when I recorded this. :wink:


#17

I was out of town last week and am about to be again… so I went with a “softer” episode on the general subject of polyglot programming, with an amusing/embarrassing anecdote from a technical interview I had a few weeks ago to illustrate. Take a listen: Bonus 1: Polyglot Programming Promise and Perils.


#18

What with finals, I haven’t finished scripting my episode on tests yet… but I did record an episode about dealing with old code—refactoring, cleaning up, and paying down technical debt. Take a listen to Bonus 2: Legacy Code!


#19

I’ve just published e007: Testify!, on testing and benchmarking, and with a side/prefatory discussion of attributes. Glad to be back on track now that finals are done! As always, thoughts and comments appreciated.

Edit: so… Travis is currently experiencing a backlog because their container is out of capacity. Whoops! Combine that with the fact that I had to switch to nightly Rust to do benchmarks and forgot that in the first build for this, and, well…