Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

ADSP: Algorithms + Data Structures = Programs

ADSP: Algorithms + Data Structures = Programs artwork

Episode 106: Jane Losare-Lusby on Rust!

Dec 2, 202232 minAudio

In this episode, Conor and Bryce talk to Jane Losare-Lusby about the Rust Programming Language. Link to Episode 106 on Website Twitter ADSP: The Podcast Conor Hoekstra Bryce Adelstein Lelbach About the Guest: Jane Losare-Lusby is currently on both the Rust Library Team and the Rust Library API Team. She is also the Error Handling Project Group Lead, the Rust Foundation Project Director of Collaboration, and a Principal Rust Open Source Engineer at Futurewei Technologies. Show Notes Date Recorded: 2022-11-02 Date Released: 2022-12-02 https://cheats.rs/ Rustacean Station: Error Handling in Rust with Jane Losare-Lusby Are We Podcast Yet with Jane Losare-Lusby ADSP poll about becoming a Rust podcast Conor’s Tweet about /cpp vs /rust ADSP Episode 101: C++ Developers Try Rust! C++23 std::views::zip Rust std::iter::Iterator::zip Rust Clippy Rust Traits C++20 Concepts Esteban K ber on Twitter Rust unsafe Rust miri This Week in Rust Rust Analyzer Rust std::iter::Iterator::flat_map Rust std::iter::Iterator::enumerate Intro Song Info Miss You by Sarah Jansen https://soundcloud.com/sarahjansenmusic Creative Commons - Attribution 3.0 Unported - CC BY 3.0 Free Download / Stream: http://bit.ly/l-miss-you Music promoted by Audio Library https://youtu.be/iYYxnasvfx8

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

Jane Losare-LusbyI remember I had he had instilled in me a respect for ML and something like an interest, but I'd never really gotten into it. I'd never really actually taken the time to learn. And so I see this, I'm like, oh, that sounds like something really interesting. Like I I want to do, I want to learn about this. And so it's like, yeah, let's do Rust. And very quickly fell in love and started using it for everything I could.

ConorWelcome to ADSP the podcast, episode 106, recorded on November 2nd, 2022. My name is Connor, and today with my co-host Bryce, we interview Jane Lazari Lesby and talk about the Rust programming language.

BryceSo I uh I ended up not being late, Connor. I mean, I could I I could have 100% not been late.

ConorThat was late. That was late.

BryceIt's just five minutes later. That was late.

ConorThis is a first. Wait, I'm recording. Is everybody recording? This is your narrator, Connor, here. Unfortunately, not everyone's mics were recording. Thanks. I'm blaming Bryce because Bryce was late. Bryce threw us off our game. But Jane's mic, we got sorted out in a few minutes or so. So if you're thinking to yourself, how come Jane's not saying anything? That's because we didn't have her audio recorded. But hopefully, it isn't too confusing. Because this needs to be on record.

ConorThis is the first time, and it's terrible. The first time we have a Rust individual on, someone from the Rust community.

BryceI gotta turn the AC off or the audio is gonna be terrible.

ConorOh my goodness.

BryceOkay, continue.

ConorI apologize, Jane. I take I take this podcast very seriously. I feel less bad about recording a whole set of podcasts without Bryce now. Because he uh Wait, wait, what was that?

BryceWhat was that?

ConorYes, Bryce. Well, well wait. This is gonna be this is gonna be a rough, a rough takeoff.

BryceHave you listened to any of the ADSP episodes just Okay, so you So I could have been 100% on time, um, but I knew I needed to stop for ice cream on the way home.

ConorSo it wasn't even something important. How many so I've know you've I know you've been on Are We Podcast yet, and you've been on Rust Station Station. Have you been on others outside the Rust community as well? You've only listened to you've listened to less than two like episodes, or you mean podcasts?

BryceIt's all right, Connor. Not everybody listens to podcasts.

ConorI mean it's okay.

BryceIt's just uh It's like you invite we invite Jane on this podcast, and the first thing you do, Connor, is you're like, what it what you don't listen to podcasts? Duh.

ConorIt's not I understand that some people don't listen to podcasts, but I was expecting her to say that oh, I've been on 12 podcasts or something, you know, a bunch of Python ones, a bunch of C ones, and uh and so I actually I've I've listened to a handful here and there. I was just shocked to hear that uh you listened to less than two. All right, wait.

BryceSo I have a bit of a problem.

ConorCan we introduce our guest first?

BryceNo, I have a bit of a problem.

ConorSo, dear listener, you just heard me ask can we introduce our guest first? And then you heard and that was all Bryce telling us stuff that's unimportant. I hope you're gonna include the no. Let's get to formally introducing Jane, though. So, Jane, uh I don't know a percentage of our listeners are Rust developers. I'd probably say what do you think, Bryce? 25% maybe have dabbled in a bit of Rust, because I'd say it's like 75 to 90% C. And so because of that, some of them will have exposure to Rust.

ConorUh, but Jane is a number of things. She's a collaboration director for the Rust Foundation. We're catching you right at the end of your Rust library and library API team terms. And previous, so you are a Rust developer full-time now, I think. And previously a C developer, uh, which is fant fantastic for this podcast. And so just to fill you in, how did this all happen? I guess the last time we recorded, I started talking about how we were gonna launch a poll because I've started working on a little Rust library.

BryceConnor and I are kind of, I don't know, done with C.

ConorI'm like joking, but you can't say that. You can't say that. We're definitely not done with C. I might be, fast forward like a couple months from now. We put out a poll. We actually don't even know how that's doing. Last time I checked, it was the poll was to inform Jane, because our listeners know. It was uh, what do you prefer to our listeners? A, we turn this temporarily into a Rust podcast. B, Connor starts a new Rust only podcast, or C both, and I think it was like 38A, 36B, and C was whatever the remainder of that was.

ConorSo we're gonna be temporarily, for like, I don't know how many episodes, the next 10, 20, gonna be turning this into a Rust podcast. And uh we thought we we started like live, we weren't uh I was live coding and I was just oh yes, we have to update. The first thing we tried to do was get the first element from a vector.

BryceThe first thing Connor tried to do.

ConorCorrect. And since then, and and so initially I thought it was you had to go into iter.next dot unwrap. But then Bryce, while we were doing this live, Bryce was like, why can't you just do bracket zero bracket? Bryce realized the reason I never tried that was because in C, the way I would do it is just vector dot front. And when I tried to do that, I found the next method. And in order to use that, you have to do iter and then unwrap. But then on Twitter and on Reddit, multiple people have pointed out to me.

ConorHave to say, the Rust community, a lot nicer than C community so far. Just just just from what I had, I had well we're gonna wait to go on a tangent. We're gonna wait to go on a tangent, but multiple people pointed out that there was also a third method called first. So that is the actual equivalent of uh front on VEC, but that's implemented on slice. And the way the trait system uh works is that you know, if you implement the traits, it's not always as obvious finding methods that are implemented on your structs, aka vector. Uh I might be getting some details wrong there.

ConorAnyways, the point is that's the that that was our last episode. Um, at least that we recorded. So that was episode 101. And then in the midst of all this, Bryce was kind of making fun of me. He's like, we can't air this, you look like an idiot. And I was like, first of all, Bryce, I don't know anything about Rust. This is just like how anyone learns a language.

BryceUh I don't think I said that for beta. You didn't say this is the part where Connor's gonna edit in me saying it for beta.

ConorNo, you did you didn't say it, but you implied that I would be ashamed of what had happened.

BryceYeah.

ConorAnd I said, no, that's just uh that's how learning a language goes. All right. Little technical difficulty.

BryceSpeaking of speaking of things that people should be ashamed of, at some point on this episode, I need to talk about the Shinkansen uh Android app.

Jane Losare-LusbyLike the Japanese bullet train?

ConorYes, yes. Alright, we will we will maybe get to that. Anyways, we're wrapping up this so that we can get uh Jane to tell us her story from C to Rust. And actually, you can go all the way back before C if there was stuff before that as well. The point is, we've slowly started turning into a Rust podcast, and it was a little bit of a a stumble on our first tackle at it. And so uh I think it was Bryce that said, you know, why, why, why are we what are we doing here? Why, you know, usually people just go and talk to people that know what they're talking about, and uh I he pointed that out.

ConorI said, Well, that's uh that's a very valid point. And now here we are, a couple episodes later, talking to someone that actually knows what she's doing. Uh, and we're gonna split this up into a couple different episodes. So, the first one, if you want, you know, tell us your path that brought you to Rust, and then you can talk to us about working on the library stuff, why Rust is so awesome, why are the people in Rust so nice? I mean, what did the C, I'm not sure. You probably don't follow me on uh actually do follow me on Twitter.

Jane Losare-LusbyI tweeted I don't use Twitter much anymore.

BryceGo on.

ConorOkay, so you probably wouldn't have seen this. I I tweeted two different screenshots from posting episode 101, which I titled C developers try Rust, because I wanted to, you know, clickbait everyone in to listening to it. The Rust people, they were having a good laugh and they were like, hey, you should go try posting because I I posted it, I cross-posted on both slash Rust and slash CPP. Oh god. The Rust people were like, oh, this is great. Here's a bunch of feedback, you know, you've made a bunch of mistakes, but you're just learning it's okay. And then there was like a sub thread where they were like, you should go post this on C. And I was like, I already did.

ConorAnd there's like Godspeed. Good luck. You're you know, you're doing the Lord's work. And then the the post to C got, I should, I should bring it up and read it. Actually, I'll just go find the tweet. It's uh it's so funny. Um, here, let's go to my profile.

Jane Losare-LusbyI hope I'm bracing unnecessarily.

ConorNo, no, it's it's it's definitely necessary. Um, and what's funny is that I tweeted so one of the people, um, so uh S T L AK Lowade, who works for Microsoft as a library implementer on C. He commented, has there anyone that's listened to this that can summarize if there's anything about C? And what's funny is the same day I tweeted out a quote or like a screen capture of him commenting on a PR that merged in zip to C23, which obviously Rust already has, because as Rust is a very lovely language and they know the important things to have.

ConorUh, and so at the same time, as I'm like being like, hey, yay, this is so awesome, and that got a bunch of retweets. He's on this thread asking, does this have anything about Rust? The first response, total length of the podcast is 22 minutes, until seven, minute seven, it's literally just blubbering about random topics, Twitter, and other useless stuff. Oh my god. And then and then uh they proceed to summarize that we're comparing vec.front uh to sort of angle bracket zero, angle or square bracket zero, square bracket, and sort of saying some other deriding stuff.

Jane Losare-LusbyAnd uh very uplifting stuff, you know, encouraging, supportive.

ConorOther people said they cringed. Anyways, uh I I take this stuff in stride.

BryceI I love the I mean I I I cringe as we record this.

ConorUm that one's at least fair. The end of that story is that we promptly were removed from we got we got kicked off of CPP, uh, because apparently, if it's not directly about C, it has no space. And might I add, because Jane doesn't know this, we are the number one active C podcast out there. I think we should just get like whatever we talk about, unless if it's like our movie recommendations, which admittedly, we have done episodes about that stuff. I think that like C devs trying to make their way through Rust, sure it's not about C, but it point is Rust people, lovely, C, I won't call them not lovely, except for those couple people who did say some mean things.

ConorAnyways, over to you, Jane. Take us back to when you were born or whatever, you know, when when you were uh when you were 13, whichever age you'd like, and uh the story of how you got to Rust.

Jane Losare-LusbyWell, I'll start with, you know, I got into programming right before college and took a CS degree, and C is basically the main language I learned in my program. Um and so went into my professional life doing C coding. I would not say that I was ever any level of expert or particularly engaged with C. It was like at that point, it was mostly just a job. Um, and so like I learned about like L values and R values like embarrassingly late in my C career and things like that.

Jane Losare-LusbyAnd so, like, definitely would never have classified myself as a C expert. Like, even like towards when I started learning Rust, I was still like not someone who frequently leaned on templates or many of the fancier features of C. And I'm sure me saying that's a fancier feature is like your C viewers are like, oh my god, she's not really a C programmer.

ConorI think the nice ones are very forgiving, but I have seen on Reddit, like, oh, you don't know this feature? Well, then you don't know C.

BryceAnd I'm just like I think I think all the true experts would agree with you. Like all the all the beginners, all the beginners and all the true experts would would agree. It's only the the intermediate folks, like the folks in the middle of the curve who would be like, oh no, everybody knows how to use templates, they're so easy.

Jane Losare-LusbyYeah. I appreciate that. Um and then so into my third job professionally at a place called scale computing that does like clustered hypervisor shenanigans. Um we were doing like maker nights or and we were doing a project to this is like the story of how I got introduced to Rust, just you know, in so I before I go too deep into this tangent, it's like where the hell is she going? Um and so we're we're doing this project to make a like literal red button to start the test suite that is like within our own like process called the Canon, which just like tests every test against every hardware variation of cluster we have, um, like multiple times because it's a bunch of like inconsistent tests that have spurious failures.

Jane Losare-LusbyUm and so we wanted to make like a comical red button that would be able to like you give it a build and it would and you hit the button and you like turn the key and it makes some like silly sound effects and sends a JSON request to the server and gets it started. Um and for that project, we're like, what do we want? How do we want to implement this thing? Like we can, and the options were like, we could do Python, which we all know and we know it would work. Or and then what my friend Josh was like, we could try out Rust, and uh none of us know Rust.

Jane Losare-LusbyUm so I was like looking it up and I remember seeing the uh Wikipedia article where it says something along the lines like this language is like superficially resembles C and C, but like semantically or syntax, not no semantically, it's actually more akin to the ML family of languages. And from one of my earlier jobs where I had worked on quadcopters with some like Caltech professor people, um, that had like one of them was I would I would say lovingly describe as a functional programming weenie.

Jane Losare-LusbyUm very into fun, OCaml, and a bunch of these program and like I remember him having me do like a big project in S XSLT to do like take an XML document and generate C and Java and Python for a bunch of like struct parsing for telemetry data. I remember I had he had instilled in me a respect for ML and some like an interest, but I had never really gotten into it. I'd never really actually taken the time to learn. And so I see this, I'm like, oh, that sounds like something really interesting.

Jane Losare-LusbyLike I I want to do, I want to learn about this. And so it's like, yeah, let's do Rust. And very quickly fell in love and started using it for everything I could, mostly tooling for like actual like we had like a bunch of bash scripts for like helping with remote development and just general workflows stuff that I was always angry at because bash just has horrible error handling. And if you know anything about my Rust involvement, I'm one of the other things I do is I'm the lead of the error handling project group.

Jane Losare-LusbyThese are related factors. Um, so I got into basically like rewriting all this developer tooling from Bash with horrible error handling into Rust where I would put a like a lot of effort into the error handling, and ended up still being frustrated with kind of the state of error handling at that time. Um, and looked into it, figured out kind of what the problems were, and started making changes and proposals to the language itself. And that has since more or less snowballed into being more deeply involved.

Jane Losare-LusbyI guess there's like a there's like a step in the middle I missed where when I was learning the language, one of the ways that I wanted to improve my experience or improve my um my knowledge was by like doing contributions to to the open source project and like working with people who were actually like experts just to kind of get um firsthand exposure to people who really knew what they're doing. And so I did a bunch of uh contributions to Clippy, the the Linter, and uh ended up joining the Clippy team before I joined any of the other teams.

Jane Losare-LusbyUm but yeah, the from from the Clippy team, I get I did error handling, and then because of the error handling, I joined the Libs team. And I think between those was when I started on the foundation, and then kind of fast forward, and that's where I am now. It's just been a steady snowball of deeper and deeper involvement.

ConorI was gonna say the first obvious question for me and for the listeners is why did you fall so deeply in love with Rust? And can others too, if they want to?

Jane Losare-LusbyI I think I yeah, obviously, I think other people can definitely fall in love with it. Um I think the the big things for me is it has it feels like it has fewer sharp corners. And like it lets I feel like it lets me offload more kind of like of the like the things I have to think about onto the language and the like the the type system than I felt like I could in C. And I'm sure some of the C stuff was just like personal inexperience.

Jane Losare-LusbyUm, but with Rust, it while it was like definitely a lot to learn up front, um I the trait system feels like a lot more intuitive and it just it makes a lot of sense to me. Uh, I know that C now has concepts, I think, which are like them.

ConorOkay. They fall short of what Rust traits are.

Jane Losare-LusbyYeah. And so like having the trait system made like generic something that actually made like a lot of sense in a way that templates were never really obvious to me. Um like I couldn't I I had seen I'd worked on code that had like spinae shenanigans, but I'd never been able to like fluently output spinae stuff myself. Um and but like being able to just have like just add a where bound, like require that it has this interface, and then now you can work like with that type like it has that, and it does, because the compiler will make sure that only types with that interface get passed in another side.

BryceUm C ⁇ can do at least that much, but the problem that C has, and this will probably be something that you'll appreciate, is that if your thing doesn't satisfy the requirements, uh C concepts don't really have a good model for how to tell you it doesn't satisfy it in this particular way. Um and so you don't really get a clear diagnostic. You're just like, hey, you didn't satisfy this one concept. And if that concept is something like you know, regular, which is a concept that's composed of a bunch of other concepts, you're gonna go spend hours trying to figure out exactly how you failed to meet these requirements.

Jane Losare-LusbyYeah, the compiler diagnostics are definitely, I think, uh a big plus for Rust. Like they have the as Esteban shout out does really great work, as do many other people who work on the compiler's error messages. It's not the the error handling I do has nothing to do with that, and so I have like nothing but respect, and it's no credit as mine.

BryceI I I find it interesting that um what you haven't said thus far is the whole memory safety thing. And I think especially from the C world, a lot of people are like, oh, that's like the feature of Rust. Like, and I mean I think that was uh certainly one of the main motivations behind the origins of the Rust project, but it seems to me like Rust has sort of grown grown beyond that. Um and uh like the thing that's appealing, most appealing to Rust about me is sort of like the um uh the values of the language, um, like its goals, you know, having having sort of ease of use and simplicity be a goal, um, the focus on you know diagnostics, um, on on onboarding new users, um, the the strength of its uh evolution process, how modern it is.

BryceLike that's all what's attractive to me about Rust. And that's you know, has nothing to do with the memory safety thing. But I think a lot of C people just assume, oh, it's all about the memory safety.

Jane Losare-LusbyYeah, I think I I definitely I I think I take the memory safety for granted sometimes. And so it's like it's not even something I worry about very often. And there's definitely context where it's like super important, but I just I just don't even like to work in a memory and safe environment. Like I guess there's a lot of anxiety that I don't have to worry about as well. That it's just I feel like the the compiler has my back. I mean, as soon as I touch unsafe, that anxiety comes back, but then I it's like a much more scoped anxiety, and I'm able to like like send it to like a bunch of friends or run it through Miri, and there's like a bunch of ways to kind of still make sure that everything's good in that regard.

Jane Losare-LusbyRun it through what? Miri, the interpreter. Uh yeah, it's the it's like the the implementation of the abstract machine, and it will it's stacked borrows. There's all of Ralph Jung Ralph Young's uh PhD work has gone into that and it's it's got some amazing technology in it.

BryceWe learned something new. Yeah.

Jane Losare-LusbyIt's ext it's slow though. I think they're speeding it up, but it's still pretty slow. So you're not gonna run like whole ass like web servers through it or anything, but you can You can do tests and especially on libraries, you can verify unsafe abstractions pretty nicely with Miri. Yeah, community is a big one. I I think that like that was a huge difference for for me personally with C and with Rust. It was like I never really figured like I'd I'd wanted to do open source contributions for years before like I got involved in Rust, but never really found uh like a way to do it or like comfort get like jumping in.

Jane Losare-LusbyAnd like once I got involved in Rust, I started following This Week in Rust, which is their like weekly podcast. And especially back when I started, they were really good about putting like lots of good first issues from like the repo and some of the associated projects like Clippy and Rust Rust uh Rust format and things like that. And just like seeing that like kind of that steady call for action, like kind of making it easy to find places to jump in, really kind of made the difference between um being anxious and like kind of hesitant, or like just being like, you know what, okay, I'll give this a shot.

Jane Losare-LusbyAnd it definitely wasn't like a a completely bumpy, unbumpy ride. There were definitely like a few PRs where I opened it up and just like kind of got crickets. And so it took me a little bouncing around to find a part of the project that where the reviews kind of came along faster. Um, and you know, where I wasn't anxious and just worrying that people weren't replying because I was doing something wrong, just you know, on me. Um, but eventually I did find that with Clippy.

ConorSo yeah, clip Clippy. I just discovered Clippy today. Shout out to Mike Dom, who just randomly pinged me today on Discord, and I guess knew that I had said something on Twitter um about trying out Rust a little bit. And like, yeah, like I mean, there's so much amazing things I could say about Rust, but Rust Clippy, I was like, oh, first I gotta go install it. And then so I ran some, you know, command line thing, and then it was like it's already installed. Like I did Rust up earlier, so it was already there.

ConorAnd then I just did Rust. What did I do? I did cargo Clippy, and then it gave me a bunch of lint stuff. One of them was actually something I Googled earlier. I had one of these, uh, you know, I wanted to see if X was either zero or one, so in the bounds of zero or one and not outside of it. And there's a couple different idiomatic ways to do this in different languages, like Python, you know, blah blah blah. Anyways, it doesn't matter. I had just was like, screw it. I couldn't really find a stack overflow, like idiomatic thing. There was a couple different answers. So I was like, Oh, just do the naive thing.

ConorAnd then Rust uh cargo clippy, it it tells me, like, oh, you should do like uh exclamation paren zero dot dot equal one n paren dot contains and then my value. I assuming that exclamation mark means it's like a compile time uh range or something. Anyway, I don't even know what it was going on, but I was like, wow, that's amazing! Like it literally gave me the idiomatic version of what I wanted of something that I Googled for and like couldn't find the answer. And then they've just got a dash dash fix, which is like the first thing I checked is I like that was me.

ConorDo I really?

Jane Losare-LusbyOh my god, I added I added cargo cliffy fix, yeah.

ConorThank you, Jane. It was it was wonderful. And then I told I instantly committed it to this my little toy repo, sent it to Mike, and then Mike was saying, Oh, I actually uh I like to you know manually fix them to sort of get it more ingrained in my memory. And I was like, I you know, I reviewed everything, it was basically just deleting a bunch of unnecessary clones, changing some into its into its, which you know, full disclosure, I don't understand the difference. You know, I'm like, I and that's the thing about do you want to know? Do you want to know?

BryceWe'll get we'll get the like no, no, no. I want to know.

ConorI I basically feel like I'm sprinting most of the time, even though I don't know Rust at all. And this is something that John uh or JT Jonathan Turner said on a Go versus Rust panel is that like because it's got so much safety baked into the language, when you do like PR reviews and stuff, you don't actually have to worry about like a whole set of like code review things. And when he said that, I realized it's like, wow, it's like I don't actually know what I'm doing, but like you're kind of allowed to run with knives in Rust because like the compiler won't let you stab yourself or shoot yourself in the foot.

ConorLike, not for everything, I'm sure. I'm sure there's some ways you can run into panics and whatnot, but like I see logic errors and stuff.

Jane Losare-LusbyLike it's that's not like bug-free code, but exactly.

ConorBut there's a whole set of things where like you're always going to shoot yourself and see your C. And here, here I am. I'm just like sprinting with the knowledge that I have from every other language, and then every once in a while I run into something where I'm accidentally moving and you know, I haven't figured out the the fact that it's moved by default, but like I'll get stuck on that for like 10 or 20 minutes and then I'll fix it. I'll be like, okay, now I need to know that I have to do dot copied on this thing if I am coming from a slice or something. And anyways, then I go back to sprinting with knives, and I'm just like, it's like that's so amazing. It's like beginners, you can just like get a bunch of people that don't really know what they're doing and just say, like, go for it.

ConorAnd like that's that's like pretty novel for like not having to hold a beginner's hand and like half the time click clippy and the compiler, they're just like the compiler messages you're getting is like, would you mean to do this? And I was like, Well, I don't know, but probably. And then like I look into it and I was like, that is exactly what I was trying to do. Fantastic. Anyways, back to you, enter or iter versus into iter.

Jane Losare-LusbyUm, I also just before I get into iter versus into iter, also have you checked out the dash dash explains on any of the errors you run into?

ConorI have not because I feel like I did that once on Rust Playground. And my impression of it is that it just like gives you the same message or something. So clearly, my impression of what that does is is completely incorrect.

Jane Losare-LusbyYeah, no, it there is basically there's a bunch of like long form markdown documents detailing like like basically like mini lessons about like pieces of the language for like that are relevant to error errors. So like if you run into like an error about misusing a trade object and you do like the dash dash explain e, then the number code that represents that that's associated with that error, it'll be like trade objects in Rust work this way and this and this and this. And it gives you like this really nice detailed explanation. Um, and it's a good time. Interesting.

ConorAnd that sort of checks out with something that someone said on um the Rust subreddit is that they said a lot of the times Stack Overflow actually isn't the place to go. It's like rust the Rust docs are so good and like the Rust ecosystem that like a lot of the times you can find the answer in the compiler in the docs or something like that. Um, because yeah, the like accessing the first element didn't have, I don't think even one of the answers was docked first, or maybe it was and I missed it. But um yeah, that's so I will definitely check that out. Maybe one of these, maybe one of these uh episodes, Bryce and I will we'll do a live coding again, except we'll record it and post it to YouTube and then uh we'll we'll be blown away by these explainer explainer messages.

Jane Losare-LusbyUm, have you seen Rust Analyzer yet?

ConorYes, that was one of the I had heard from a podcast that had JT on it that he said like that should be like the number one thing. Yeah, you get like once you rust up and you get cargo, and then you if you hop into VS Code or wherever you are, get the Rust Analyzer. Yeah, it's it's it's very, very, it's a very good language server.

BryceWhat uh what is the Rust Analyzer?

Jane Losare-LusbyIt's the language server. So it's like a query-based version of the compiler, and it shares a lot of the dependencies and implementation with the compiler as well. And so it's like it's just very fast.

BryceWhy do I why do I want it? Like, what is it?

ConorIt's like the equivalent of having Clang D um with like all the autocomplete stuff in in C. Like without that, you're not getting any suggestions, you're not getting any lint hints, you're not getting any compiler hints.

Jane Losare-LusbyIt also has like code actions, so like you can use it to like invert like uh expressions to outline or inline variables, to like take some body of like like a function and like automatically split it out into a separate function, things like that. It also lets you jump around so you can like go to definition on any like type or uh variable, or you can like if you're like on a function, you can be like go to references and a list everywhere that functions used in the code base, and you can like really quickly jump through those, and all there's probably a bunch of other things.

ConorIt's it's really I think it comes with with Rust format as well, which and you can set it up to run Clippy and all sorts of stuff. Yeah. Honestly, it's it's like I get the sense we're well, well, we would I promise we'll get to the iter versus into iter thing. But I feel like like there's other reasons that I'm really liking Rust, but like one of the things is that it's like C, but with guaranteed like a bunch of the sanitizers because the memory safety stuff, and then like built in from scratch, clang format, clang tidy, a bunch of other stuff, C 2023 ranges, and like everything that we're missing in the iter trait.

ConorLike honestly, I basically just used it the iter trait because it's it's so phenomenal. Everything that we want in C is there in Rust. You want enumerate, it's there. You want zip, it's there. You want uh a bunch of other ones, flat map, it's there. You and oh, speaking of flat map or map, the reason Mike Dom pinged me about Clippy was because the message it gave him, it reduced like eight lines of code to a single line that said you have manually implemented option.map.

ConorAnd I was just like, What? How does it oh man, like it's it's you have to see it. I will I will some I will somehow find a way to post that in the show notes of the of the diff, because it's uh it's quite phenomenal. There's some great clippy lets. Tune in next week for part two of this three part interview. Thanks for listening. We hope you enjoyed and have a great day.

Open the transcript file

Hosts and Guests

Guests

  • Jane Losare-Lusby Guest Inferred

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Episode 313: C++26 Reflection vs CRTP, AI, Kids & More with Zach Laine

    Nov 20, 202647 minAudio

    In this episode, Conor and Bryce chat with Zach Laine about C++26 Reflection vs CRTP, AI, kids & more. Link to Episode 313 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP:...

    • Apple Podcasts

    Credit the people on this episode

  2. Episode 312: The C++26 Contracts Fiasco

    Nov 13, 202652 minAudio

    In this episode, Conor and Bryce chat with Zach Laine about the C++26 contracts fiasco. Link to Episode 312 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...

    • Apple Podcasts

    Credit the people on this episode

  3. Episode 311: Career Changes, GPUs & More with Zach Laine

    Nov 6, 202628 minAudio

    In this episode, Conor and Bryce talk with Zach Laine about his career and the career changes he has made. Link to Episode 311 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials...

    • Apple Podcasts

    Credit the people on this episode

  4. Episode 310: Leaving NVIDIA for... ?

    Oct 30, 202624 minAudio

    In this episode, Conor and Bryce talk about Bryce's next chapter and where he is leaving NVIDIA for. Link to Episode 310 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The...

    • Apple Podcasts

    Credit the people on this episode

  5. Episode 309: Default Construction & CppCon 2026 with Jason Turner

    Oct 23, 202629 minAudio

    In this episode, Conor and Ben chat with Jason Turner about default construction in C++. Link to Episode 309 on Website Discuss this episode, leave a comment, or ask a question (on GitHub) Socials ADSP: The Podcast:...

    • Apple Podcasts

    Credit the people on this episode