Ben sets out to learn Rust by only reading it, while Matt wonders if you can learn to land a plane from a book. Also: is snark a portmanteau?
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.
Matt GodboltHey, Ben.
Ben RadyHey, Matt.
Matt GodboltHow are things?
Ben RadyGreat.
Matt GodboltIt's that time of the week when I say, hey, Ben, and then you say, hey, Matt, and then we talk about something.
Ben RadyMm-hmm. Yep.
Matt GodboltHave you any idea what that thing should be? Because, you know, I've planned carefully and I have nothing, as per.
Ben RadyRight. No, I do have a thing. I started doing a new thing this week.
Matt GodboltOkay, let's talk about yours. All right. What are we going to talk about?
Ben RadySo, careful listener of this podcast may recall that I have talked before about having a period in my career where I tried to learn a new programming language every year. This year's new programming language is English. It's all the rage. But in addition to that, the...
Matt GodboltOh, I've heard, or American or English?
Ben RadyThe English. It's proper English, right?
Matt GodboltEnglish. Oh, okay.
Ben RadyI mean, you got to put some U's in some places, I guess, if you really want to call it English.
Matt GodboltYeah. Well, I certainly do. And far fewer Zs than you would put in, and you would call them Zs.
Ben RadyBut, you know. Right. Some S's instead of Z's. I think that's, but is this like the German translation, where you just take all the spaces out?
Matt GodboltThat's right. Yeah.
Ben RadyThat's, yeah.
Matt GodboltI think that's pretty much what German is. German is just English, but with random capital letters in the middle of the word and no spaces between words.
Ben RadyYou just...
Matt GodboltYeah.
Ben RadyExactly.
Matt GodboltHave we, is there anyone we haven't offended yet? Let's just...
Ben RadyLet's keep going.
Matt GodboltOkay. But yeah, programming in English. Programming in English.
Ben RadyYeah. So that was...
Matt GodboltSo tell me about your new language you're programming in, which I mean... yeah.
Ben RadyWell, so I've kind of, just as I've had on my list, and I say jokingly that, you know, the hot new programming language is English.
Matt GodboltYeah. Yeah.
Ben RadyI've had a number of programming languages on this list of, like, you know, if I ever get back to this practice, because I kind of fell out of it, because I was sort of like, what language could I learn that would allow me to do something that I can't do in an existing language, right? Like, you know, if you've never built a web application before and you don't know JavaScript, then JavaScript is a way, yeah, it's like, I can do this.
Matt GodboltThen you're probably right. That's interesting.
Ben RadyI couldn't do this before, right?
Matt GodboltOkay. Or like an HDL for, like, you know, hey, I'm programming an FPGA and I can make lights blink in a new and exciting way, but I can't write this in Java.
Ben RadyRight.
Matt GodboltAnd so maybe I need to learn something else.
Ben RadyYes.
Matt GodboltAnd it's a paradigm shift that goes alongside the language.
Ben RadyYes.
Matt GodboltIt makes you think, I mean, what is it, the Sapir-Whorf hypothesis thing that says, you know, the language you first learn sort of tempers however... and my first language was, you know, machine code and assembly.
Ben RadyMm-hmm.
Matt GodboltSo that definitely has tempered my entire...
Ben RadyMm-hmm.
Matt Godboltexperience in my career.
Ben RadyMm-hmm.
Matt GodboltBut there are definitely languages that force you to think in different ways, be it like a Prolog-type language, and it first bends your mind and you go, oh, I see, you can specify things this way. Or a Lispy thing where you're exposed to the fact that the representation is the language and all that good stuff.
Ben RadyYes.
Matt GodboltSo yeah, English though, but I'm pretty familiar with English.
Ben RadyYeah, yeah. Well, OK, so the spoiler alert: the language that I am trying to teach myself, basically starting this week, is Rust. And I have used Rust before. But the sort of new idea around all of this is in the way that I teach myself this language.
Matt GodboltRight.
Ben RadySo previously, the way that I had always done this was I came up with some project, right? And that was sort of the relationship between, like, hey, I'm going to learn a new language to be able to do this kind of thing. And I'm going to learn that by doing the thing. And then I will, you know, learn the language and then I will be very confident that I can do the thing, right? And...
Matt GodboltLike, I want to write a ray tracer, I go write it in Rust and I get my, you know, maybe you've done that 10 times before, or it's something completely new. Like, yeah, I get it. Yeah.
Ben RadyAnd the, you know, Sapir-Whorf hypothesis reason for doing that is also a good reason. I've told people, you know, people ask me for advice on, you know, what should I do in my career, how should I be a better programmer, and I would, I still give this advice out, I'm like, how many programming languages do you know? You should try to learn more of them. Because two things. One is you will be able to do more things. And also it will expand your mind in terms of how things work.
Matt GodboltIt's...
Ben RadyYou know, I love Clojure as a programming language because it's fun. I wouldn't inflict it on anyone right now, other than sort of as a learning exercise, but it's a fantastic learning exercise. If you've never used a Lisp before, it's awesome.
Matt GodboltIt's funny you mentioned that, because when I first moved to this country, one of the first things I ended up doing was working with one of our mutual friends on a system that was all in Clojure.
Ben RadyMm-hmm.
Matt GodboltAnd I was completely, well, it took me a while to get over the hump of, what the heck is this? Why are we doing this?
Ben RadyRight.
Matt GodboltIt seems like we're doing it on hard mode.
Ben RadyRight. Okay.
Matt Godbolt...to, oh no, this is pretty neat, to the penny dropping and me going, like, oh, I get this now. I see functional programming languages as being useful. I see Lisp-like languages. I see. Wow. And, you know, I have not chosen to go back to it, but I do feel like I'm enriched as a programmer by having had that experience.
Ben RadyYeah. Yes. Yes. Yes, yes. And it's an intersubjective experience, to use one of our favorite podcast words, because if you have used a Lisp before, then you can talk to someone else who has used a Lisp before and be like, this is just Let Over Lambda, and then they'll know what you mean, right?
Matt GodboltRight.
Ben RadySo those are many reasons to learn programming languages, and I highly recommend that people do. What I am doing this week is I am attempting to learn a programming language not by building something that is, I think, you know, a representation of what would be good for that language. In fact, I am trying to learn a programming language by not writing any code at all. What I am trying to do is learn a programming language by asking Claude to teach me the language and quiz me on whether or not I know it. And I am just going back and forth...
Matt GodboltOh.
Ben Radylike taking snippets of code, being like, what does this do?
Matt GodboltThat's...
Ben RadyOkay, explain this, explain that, explain that. Okay, now quiz me on all of the concepts that you just taught me and see if I get it right.
Matt GodboltWow.
Ben RadyAnd then I ask follow-up questions, all of that.
Matt GodboltThat's not what I thought you were going to say at all. I just figured you were going to say, yeah, I asked it to write the thing for me and I skimmed the code afterwards. And I was about to bring up all the kind of badnesses of, like, you know, the quote, I forget who, is it Karpathy?, but it's one of, I think you've retweeted it, something along the lines of, like, you know, LLMs let you outsource thinking, but not knowledge, right? and, like, or experience, that kind of feel. And that's, like, I'm definitely feeling a bit of that in my day job right now. It's like, oh yeah, I don't necessarily know this as well as I should do. I'm very effective at what I'm doing, but if someone comes, yeah.
Matt GodboltBut no, you're so, yeah, tell me more. Tell me more about this approach. Yeah.
Ben RadyWell, yeah. And a lot of this sort of comes from, it would be bold to call this a realization, because I don't really know that it's fully true, but my suspicion is that it is going to be increasingly important for software engineers to read code in the future.
Matt GodboltI think that's, I mean, even as you get more senior, I think that's become true, as you end up mentoring more folks and they ask your opinion of code and whatnot.
Ben RadyYeah.
Matt GodboltAnd, you know, maybe you spend more time, yeah, either explicitly reviewing PRs or just over people's shoulders helping them. So yeah, I think reading code is, yeah.
Ben RadyRight.
Matt Godboltimportant.
Ben RadyIt's always been important. It's always been very important. I think it's going to become even more important.
Matt GodboltRight.
Ben RadyAnd I...
Matt GodboltWhat, until we teach the robots to just review it? And then at what point will that flip? Then it's like, we're writing code and the robots are telling us not to do it that way.
Ben RadyI mean, so the code is always, I think, at this point, I think I could say that the code is always going to be the actual source of truth, right? Like, there's enough well-worn, and you can certainly point out some situations in which source code and what the machine is actually doing do not line up in a consistent way.
Matt GodboltRight. Right.
Ben RadyLike, that is certainly possible, but it is, I think, much less likely than the delta between what the code is doing and what the English that created the code in a prompt is doing, right?
Matt GodboltYep.
Ben RadyLike, the code is, it's...
Matt GodboltI think that's a fair assessment. Yeah, yeah.
Ben RadyYeah, it's like a really good source of truth if you're going to pick a source of truth for, like, what is this program actually doing, right?
Matt GodboltYeah.
Ben RadyAnd so being able to read that is really important.
Matt GodboltIt's funny, actually. So somebody tweeted at me or whatever, not tweet, but, you know, the current whatever Hachyderm thing, with the thing that, like, someone was saying, you know, like, oh yeah, LLMs will be to code as C is to assembly code. Nobody looks at the output of a compiler. Ha ha ha ha. And of course it's like, at Compiler Explorer, you know, like, everybody here, you know this, the reason this exists is so that we can, because we don't trust it and we do do this.
Ben RadyYeah. Yeah. Yeah. Right.
Matt GodboltSo yeah,
Ben RadyYeah.
Matt GodboltI think that backs up your point. I think there's always a need to look one layer below, right?
Ben RadyYeah.
Matt GodboltWe've talked about this before, the various layers of things.
Ben RadyRight.
Matt GodboltAnd, like, each abstraction or layer brings something to the party, right? And you learn to trust it in different ways. But ultimately, you need to be able to, like, look down and go, ah, no, whatever.
Ben RadyRight.
Matt GodboltAnd yeah, for those folks who say, you know, we just give it English and we just get a binary out at the end of it, it's like, no, the differentiability of the intermediate forms of, say, code is useful. I mean, we typically don't diff the binaries to get anything useful out of it, right?
Ben RadyRight.
Matt GodboltThat doesn't seem useful. But the thing that generates the binary...
Ben RadyRight, right.
Matt Godboltlike the concepts from that make sense, that I can look at as something I've asked the AI to do and say, is this a reasonable way of achieving what you did given what was working before? And I trust...
Ben RadyMm-hmm.
Matt GodboltSo yeah, anyway, so you've been, yeah, reading code is an important skill.
Ben RadyMm-hmm.
Matt GodboltThere we are. I've just remembered where we're going with this. Yeah.
Ben RadyYeah, so this whole exercise is an experiment in: what if I learned a programming language by reading it? Now, I think you and I have talked before about both of our brains really working best when we sort of get down into the nitty-gritty and, like, step by step build a thing. And that's how we really, really, really understand something. And so I am trying to push myself to grow the skill of being able to have, like, ideally an equivalent level of understanding of code that I am just reading.
Ben RadyAnd I'm trying to start that, like, you know, I may not get there, but just move in that direction. I'm trying to start that by this experiment of, like, can I say that I am fluent in Rust and...
Matt GodboltMm-hmm.
Ben Radyhaving written basically no Rust, right? Like, can I achieve that? I don't know that I can, but that's what this journey is all about.
Matt GodboltI am very skeptical that you could do any more than you could read every book that says how to drive a car and then get in and, or land a plane, or, you know, those kinds of things, right?
Ben RadyMm-hmm.
Matt GodboltThey feel like things that you have to do a little bit to be able to do well. But then, there may be humans that do this. I mean, there are very bright people out there who learn and think in very different ways than the way that I do.
Ben RadyYeah.
Matt GodboltSo, you know, I remain skeptical, but I think what you're doing is really interesting.
Ben RadyYeah.
Matt GodboltSo how's it going so far? I mean, it's been, like, how many days? You've only been doing this a couple of days.
Ben RadyI've been doing this for like three days and it's going really well.
Matt GodboltAll right.
Ben RadyAnd one thing is that, of course, like, Claude, and I'm sure the LLM of your choice would do this, is shockingly good at coming up with good pointed questions to test my understanding, because it knows what my understanding is, because it taught me all those things. Right. So, and the other thing that has been really nice is being able to compare it to other languages, kind of getting back to our earlier point about, like, those concepts that you bring in from other programming languages.
Matt GodboltAh, yeah.
Ben RadyI'm like, what would this look like in Python? How does this compare to Java? What would this look like in Ruby? You know, how does this compare to JavaScript? And, like, finding all those little things where you can, because I feel like a lot of people learn this way, where they map, right? They're mapping concepts from one thing that they know.
Matt GodboltRight, right. You're sort of like, X but not the Y part, or something like that.
Ben RadyRight, yeah.
Matt GodboltYeah. So are you physically writing any of this? Are you purely reading it? Because I could imagine it being, you know, like the best tutor, where it's grading you and asking you and even setting you little challenges and saying, okay, now write something which command-line parses and does blah, blah, blah, blah.
Ben RadyI have not written. Mm-hmm.
Matt GodboltBut you've not written anything.
Ben RadyI have not written anything. Now, it wouldn't surprise me if Claude kind of invents a "write me a function that does this" kind of question. And I will just do that if it does that.
Matt GodboltUh huh. Right.
Ben RadyBut I am not prompting it to do that. And thus far, everything has been basically like, explain what's wrong with this code, right? Or explain why this works, right? And it's been very good. It's been very good.
Matt GodboltHow, you know, the sycophancy of these things leads me to think that maybe it would be a little bit forgiving to you. You know, "well done, yes, you got it right, oh, just this one minor thing", and you look and, like, no, that's terribly important. You know, how...
Ben RadyIt does say things like, well, you got it mostly right, but here's the thing that you missed. And it's like, oh, you got the concept right, but here, this thing is wrong. I haven't been able to, because I haven't developed enough of an understanding yet. And, like, again, the last time I wrote Rust was like 10 years ago. So at this point, I've basically forgotten...
Matt GodboltOkay. You've forgotten most of it. Yeah, you understand...
Ben RadyI mean, I remember the basic structure of the language, and it's like, yeah, there's no...
Matt GodboltIt looks a bit like C, with the types the opposite way around to normal, and then something something borrow checker.
Ben RadyYeah. Yeah.
Matt GodboltThere you go, right, Rust.
Ben RadyYeah. It's like, you know, there's no inheritance and, you know, you lend and borrow, and there's no garbage collector and there's no free, right? But, like, I haven't gotten deep enough into this to have found a situation where it failed to point out something that I had said that was wrong. Like, in retrospect, I realized that something was wrong.
Matt GodboltOkay.
Ben RadyAgain, I'm three days into this, so it may be not surprising that I haven't hit that yet, but it's definitely something that I am concerned about.
Matt GodboltOf course.
Ben RadyAnd also just on the obvious thing of, like, how do you know that the LLM is right, right?
Matt GodboltOkay.
Ben RadyLike, you know, that's a base-level skepticism that everyone should have with any kind of exercise like this.
Matt GodboltYeah, that's true.
Ben RadyYou're learning from, you know, whatever LLM, how do you know it's not giving you bogus information?
Matt GodboltYeah.
Ben RadyOne of the things that I think is going to be unavoidable, probably, with this is I need some external validation of the concepts that I'm learning. And obviously the thing that I would reach for is, well, go write a frigging program and then you'll know.
Matt GodboltYeah, yeah, yeah.
Ben RadyBut I'm trying to, like, not do that if I don't have to do that.
Matt GodboltWell, this seems timely, but, a website that some people refer to after my last name has got an MCP now.
Ben RadyRight. I probably will. But... No.
Matt GodboltSo you can just add the endpoint of your choice. I will use compiler-explorer.com slash MCP. And then all the languages and all the execution and everything are available to it. So you could tell your LLM, I mean, obviously it could also write the stupid thing locally and run your own local Rust toolchain and all that good stuff.
Ben RadyNo. Interesting.
Matt GodboltBut for small snippets, it might be useful to say, hey, I can do this on the go. You can add it in, like, the web version of your favorite LLM tool if you're having just a regular chat with it, and it can go off and do the needful things there. Which has been an interesting journey in, how do you give LLMs what they need without overwhelming them with tokens, kind of thing, on my side, but that's a whole other story.
Ben RadyYeah. Yeah. Yeah.
Matt GodboltI don't want to derail too totally, but yeah.
Ben RadyFilling up way too much context.
Matt GodboltYeah.
Ben RadyOne of the more interesting elements of this is, you know, previously, when I had been doing this, you know, learning a new language by building a project, it was very much like, okay, I'm going to get my laptop and I'm going to sit down, I'm going to plug in the monitors and put on some music and I'm going to sit down and I'm going to code. And that was, like, a very focused activity that was restricted in when and where I could do it, right?
Matt GodboltRight, yeah.
Ben RadyNow I can do this on the train home. I just pull out my phone, pull up the chat that I have running with Claude and be like, okay, what does this operator do here?
Matt GodboltYeah.
Ben RadyLike, what is this thing? And then you just kind of keep it going.
Matt GodboltNo, that for me has become very valuable.
Ben RadyRight.
Matt GodboltThe ability to essentially continue useful knowledge work while on the move, be it through remote control of a session that I've got running somewhere else, be it through exactly as you describe. I've got a number of long-lived projects that have me trying to understand... I'm laughing because it's so sad, trying to understand, you know, how 1980s television signals were encoded and decoded, for reasons we'll talk about hopefully on another podcast.
Ben RadyYeah.
Matt GodboltBut yeah, and that is very valuable. And you can say, yeah, I've just been thinking about this thing, like, walking the dog, what about that? How does that bit work? How do you know that this is true? And then it's a useful thing. And, you know, 10 years ago, 15 years ago, maybe even 20 years ago, you would just Google it, right? It would be a Google search and you would find it.
Ben RadyYeah. Yeah.
Matt GodboltAnd then you'd be like, oh, this is cool, and you'd find someone's blog page that talks about that thing and you scroll down till you find it.
Ben RadyMm-hmm.
Matt GodboltAnd then, you know, maybe 10 or 15 years ago, you start looking at the synopsis thing that appears at the top, this pre-AI, like, hey, did you mean this thing? Oh, I did, actually. Fine. I got the answer to it, which obviously... had its own bag of problems, you know, like, well, now Google aren't actually sending you to the webpage that had the information on it, which means that they don't get the hit.
Ben RadyRight. Yeah.
Matt GodboltNow, of course, you do get the AI summary at the top, which, it's funny, I think, I don't know if you perceive this or not, but the tide seems to have turned from "we hate this" to mostly indifference and occasional "oh, that was handy." Certainly dinner-table conversations with my family have gone from "well, this is stupid, ha ha," to "oh, it says this," and you're like, oh yeah, that's fair.
Ben RadyYeah.
Matt GodboltBut yeah, all these things are really valuable ways of being on the move and being able to continue doing something. But I wonder if that comes with a different problem of, you know, burnout, right? We've talked about this before, where you're managing 12 different chats and trying to make progress and whatever.
Ben RadyUh-huh.
Matt GodboltAnd now you can't get away from the stupid thing.
Ben RadyMm-hmm.
Matt GodboltYeah. Yeah.
Ben RadyMm-hmm.
Matt GodboltSorry, that was a real derail, but yeah.
Ben RadyNo, it's not. I mean, it's all related to this, right?
Matt GodboltYeah.
Ben RadyIt's, I was going to say, if this works, and then it's like, how would I know if it worked?
Matt GodboltYeah, what will be, yeah.
Ben RadyRight? Like, well, yeah, kind of.
Matt GodboltHow do you test this, right?
Ben RadyI mean, it's sort of like, okay, I claim that I am fluent in a programming language. What do you use to back up that claim?
Matt GodboltIs there a distinction between fluidity to read and fluidity to write, too? Because, I mean, like, so, fluidity to read, to me, means that you understand everything that you will likely see in the language, and you are capable of then applying your sort of experience and your intelligence and your...
Ben RadyYeah. Yeah.
Matt Godboltyou know, I guess experience, right, to say, I think this is a good way of doing this, this seems fine to me, there are no issues, there are no bugs, the tests are good, all that stuff, right. And that is still fundamentally different from, given a blank page, make a Rust project that does X.
Ben RadyYeah.
Matt GodboltThat does seem like a different skill set.
Ben RadyCertainly, at any time in the past, if somebody had come to me and they had said, well, I am a C++ expert, but in reading only, I would have been like, ha, oh, wait, you're serious.
Matt GodboltYeah.
Ben RadyRight, right?
Matt GodboltYeah, yeah, yeah.
Ben RadyLike, like, what? So...
Matt GodboltIs it like, you know, like a foreign language, to go back to our original language thing?
Ben RadyYeah, like, you can hear it but you can't speak it, something like that? Yeah.
Matt GodboltYeah, you know, like, or, you know, reading, I could read a book in French, say, and you'd be like, that's one thing.
Ben RadyYeah.
Matt GodboltBut if you drop me in Paris, I'd be a bit SOL, really, you know?
Ben RadyRight. I mean, maybe it is just as simple as that, that they actually are just separate skills. And if you learn one, you'll get better at the other one incidentally, but you actually do have to learn both skills, right?
Matt GodboltI...
Ben RadyLike, that probably is the simplest way to think about it.
Matt GodboltSo the thing that I would wonder that you might miss, one might miss, in a read-only training model like you're doing is, you know, those kinds of things where, like, the 15th time you've done something, like, there must be a better way to do this.
Ben RadyMm-hmm.
Matt GodboltAnd then you experiment yourself with different ways of doing it.
Ben RadyMm-hmm.
Matt GodboltLike, hey, can I use reflection to, oh, yeah, I can. Wait a second, I don't have to declare this stuff at all, I can pull it out of the structures or whatever.
Ben RadyMm-hmm.
Matt GodboltLike, you know, reflection is top of mind because C++ has just gained it. So I'm thinking of all the silly things you can do with it. But, like, when do you have those galaxy-brain moments of inspiration? If you're just reading, it seems too passive to me for you to kind of go, like, I've read this 40 times, there must be a better way, and then be able to come up with that better way. Having only ever read code. And, you know, I don't know if, I don't know if I believe that, I'm just thinking out loud.
Ben RadyWell, here's a thought experiment. So let's say that I do this, and then I do what I would normally do. And I just sit down and I write a Rust program, right?
Matt GodboltYeah.
Ben RadyHow would you be able to tell the difference versus what I would have done before, right?
Matt GodboltHow would you, yeah.
Ben RadyLike, congratulations, you wrote something in Rust. That was your original plan for every other language that you've learned.
Matt GodboltYeah, yeah, what would you...
Ben RadyWhat would be the difference? Like, do I do it faster? Do I have, like, fewer questions?
Matt GodboltYeah.
Ben RadyLike, the result would be the same, right?
Matt GodboltYeah, that's a good point.
Ben RadySo, like, how do you tell that the reading exercise actually made any difference at all? Like, maybe I could feel it, that'd be about it.
Matt GodboltWell, I mean, I suppose, but if you did sit down and then you realized, actually, I can't write something, then you can sort of do the opposite.
Ben RadyRight, you could, yes, yes.
Matt GodboltYou can say, like, okay, yeah, I am proficient in reading, and it would be a cluster... for me to actually sit down and write anything more complicated, because, you know, like, I can't create something. I suppose it's, you know, and I'd say there's a reason why book authors are not also book critics, in the same way that book critics, you know, there are sort of, like, none of them...
Ben RadyYeah, yeah.
Matt GodboltI'm sure there are a number of authors who can critique their own work and other people's work and whatever, but, like, there's a sort of creative process that's happening in the construction of something new...
Ben RadyMm-hmm. Mm-hmm.
Matt Godboltthat perhaps it's hard to tickle when you're just reading.
Ben RadyYeah.
Matt GodboltI'm not saying you couldn't, you know, like, I've certainly, if someone sends me a PR and I look at it, I'm like, no, no, no, no, there's a completely new way of doing this, let me sketch it out for you, then I'm doing that part. It's not like that doesn't happen, but, like, it seems like the activation energy to start doing that is much higher than, yeah, that seems okay to me, you just got the comments in the wrong place, kind of feel, right?
Ben RadyYeah.
Matt GodboltYeah. And I don't know whether or not that...
Ben RadyThis also seems just, like, more, almost like an academic way to do this, principled, maybe, but maybe not with the right principles, where it's like, you know, no, first you should learn all of the operators and the keywords and how everything is structured.
Matt GodboltYeah.
Ben RadyAnd then, and only then, I mean, it's like programming in the 1950s maybe worked like that, I don't know.
Matt GodboltRight.
Ben RadyI'm just making stuff up right now.
Matt GodboltFirst, you have to learn where to put the holes in the punch card.
Ben RadyRight. Like, you're just, it's like this unnecessary ordering of learning that I have never done and wouldn't recommend, but I'm just kind of trying it. And it would be, actually, you know, I think the more interesting outcome of this, the much more interesting outcome of this, is that I do this, and I do this for, like, three months, and then I sit down and I'm like, okay, now I have something that I want to build in Rust.
Matt GodboltRight.
Ben RadyAnd it's like, this is just like if I had started clean slate. Like, none of the things that I've learned in the last three months have, like, maybe I saved myself three days' worth of work, right?
Matt GodboltRight.
Ben RadyThat would be a really interesting outcome from this, to say, like, no, there really is...
Matt GodboltYeah, I mean...
Ben RadyThere's no substitute for just building stuff.
Matt GodboltI would, yeah, this, it seems like reading is a valuable skill, full stop. And I think, obviously, your experience and your tastes and your sensibilities already put you way, way up in the, like... you know, you're looking for certain patterns, and you're like, whether you express it with curly braces or indentation or lambdas that you apply or whatever it is, it doesn't matter. Syntax is the easy bit, really.
Ben RadyRight, right.
Matt GodboltSo maybe, you know, this is not necessarily a fair fight, because maybe for you, most of it is the syntax, and then after that you're like, yeah, sure, I need to do a visitor pattern here.
Ben RadyYeah.
Matt GodboltI know how to spell that now in Rust-land or whatever. Or, you know, you've seen enough code that shows you that there is some other way of doing it in Rust that isn't the visitor spell, whatever, you know.
Ben RadyMm-hmm. Mm-hmm.
Matt GodboltSo either way, it's going to be an interesting experiment. And I think also, your instincts are right that the readability of a language, as in your ability to be able to read, parse, critique code, understand code, is by far going to be more useful going forward. And so if you find it difficult to then write code, well, at least you can poke holes in your own work fairly easily.
Ben RadyYeah.
Matt GodboltBe interested in how that comes along.
Ben RadyYeah.
Matt GodboltYeah.
Ben RadyOne of the, sort of maybe the last point here, is, in addition to the language itself, I have also been asking it questions and prompting it to ask me questions (although this has not gone as well) about the ecosystem.
Matt GodboltRight. Right.
Ben RadyBecause, you know, Rust ecosystem is, like, legendary, right, in its consistency, you know, cargo and all of that.
Matt GodboltRight.
Ben RadyBut I was like, okay, you know, again, a lot of this is really easy when you do comparisons. I'm like, what's the, is there a Rust equivalent to, like, the Java Flight Recorder, which would let me, like, see the state of all variables and memory and heap and look at all the threads and see what their stacks look like? And they're like, nah, it's like, you can do, like, GDB integration and you can debug and stuff like that, but that's not really there.
Matt GodboltRight.
Ben RadyI'm like, all right, what are the logging frameworks like? And it's like, oh, well, here's some options for logging and things like that. But I feel like there's a whole, you know, again, I feel like these days a lot of our podcasts are just recounting other podcasts. But surely at some point in the history of this podcast I have uttered the phrase, the difference between computer science and software engineering is: computer science is solving problems with computers. And software engineering is solving the problems you create when solving problems with computers. And the software...
Matt GodboltThe second derivative.
Ben RadyYes, exactly. Exactly right. And so the software engineering side of Rust, and sort of the blocking and tackling of how do I actually, like, run something and debug it and observe it and recover from crashes and do all the other things that you have to do when you're running software... Like, that's a critical part. And I think that's one of the things that you really get very well from writing a project.
Matt GodboltYeah.
Ben RadyLike, you get kind of a little narrow slice, like, you don't necessarily get the broadest view from doing that, but, like, if you're like, oh, I built a thing and it does X and I went and I learned how to do it well, something that I'm happy with, like, that aspect of the software engineering of that language really, like, clicks and is super valuable. And so I am definitely not expecting to get any of that from just reading code, because a lot of it is, like, okay, staring at the stack trace being like, what is wrong with this thing?
Ben RadyI don't even know how to figure out what is wrong with this thing.
Matt GodboltYeah, right, right, right. I heard, though, that if you write in Rust, there's just no bugs. That's what I heard.
Ben RadyOh, well, maybe that'll...
Matt GodboltThat was, that was the word.
Ben RadyIf it compiles, then you can't possibly have any bugs? Yes.
Matt GodboltThat's right.
Ben RadyRight.
Matt GodboltThat's right. Sorry, that's slightly more snipey than it sounds, snarky than I mean it to be, because, you know, like, this is just top of mind for, like, folks in the C++ community, where, you know, Rust obviously has a lot of benefits over vanilla C++, and, you know, it keeps being touted out.
Ben RadyMm-hmm. Mm-hmm.
Matt GodboltIt's no... It is still possible to have logic errors in Rust, right?
Ben RadyYes. You can just have the wrong understanding of the problem.
Matt GodboltIt's not a...
Ben RadyNo language is going to save you from that.
Matt GodboltYeah, or an infinite loop. You know, again, no one's going to stop you from writing an infinite loop.
Ben RadyThat's exactly right.
Matt GodboltSo...
Ben RadyFun side fact. Did you know that snark was a portmanteau, or is a portmanteau?
Matt GodboltNo, what is snark...
Ben RadyIt is a portmanteau of snide remark.
Matt GodboltGet the heck out. I figured it was Lewis Carroll, you know, the Hunting of the Snark.
Ben RadyYeah.
Matt GodboltAnd then it came from that somehow. Although I believe a whole bunch of words came from the nonsense poems that Lewis Carroll wrote, including, oh my gosh, there was a list of them the other day.
Ben RadyMaybe.
Matt GodboltAnd I was like, oh yeah, that makes sense.
Ben RadyOh.
Matt GodboltBut yeah, I mean, so what two words is portmanteau made from?
Ben RadyAnd, you know, the tragedy and missed opportunity is the two words that it's, why, why would you not do that?
Matt GodboltIsn't it just... I mean, I think it's the appendage on the foot of someone from Portman. That's terrible.
Ben RadyWe used to have this term, AR redundancy. I forget where that came from.
Matt GodboltOh.
Ben RadyIt was for things like pin number and ATM machine.
Matt GodboltOh. Oh, yeah, yeah, yeah, yeah. Oh, my gosh.
Ben RadyIt stands for acronym redundancy.
Matt GodboltOh. Yeah, that is definitely red... red. The thing is, out of context, if you just say pin, you might be referring to the sharp bit of metal that you, you know, hold things together with sometimes. But anyway, this seems like we've reached the natural end of our experiment.
Ben RadyAll of the notifications in my, dear listener, I'm sorry for all the dings and bings and buzzes and everything that just happened.
Matt GodboltI know. A bigger noise earlier was me throwing my phone as far away as I could because it kept making noises.
Ben RadyYeah.
Matt GodboltAnd also, I apologize that I left Slack on. And so if any other dings have come through, and I'm only apologizing, really, to our listener and me in a few hours' time when I edit this. But, cool.
Ben RadyYeah.
Matt GodboltWell, this sounds like an interesting experiment. We're going to have to...
Ben RadyYeah.
Matt GodboltWe should put a pin somewhere, aha, and that's not the...
Ben RadyRight.
Matt Godboltthe other kind of pin, in the calendar sometime, to revisit this and see how this worked out, because this is an interesting way of learning.
Ben RadyYeah. Yeah. Yeah. Definitely.
Matt GodboltYeah. Especially the thing on the train, you know, continuing to keep making good use of time.
Ben RadyRight.
Matt GodboltI mean, I use that. Like, a Brilliant thing, I'm not sponsored. But, you know, that's another thing that I'm doing to try and remind myself enough of the maths that I need, plural, to help my children do whatever they need to do, although they've really surpassed me now. But yeah, no, that's cool. All right, friend.
Ben RadyYeah.
Matt GodboltWell, before I ramble any more, I will bid you farewell, and we'll chat some more another time.
Ben brings a 1976 letter from Bill Gates, and Matt brings the after-effects of last night's pub. The hat gets out of the rabbit, a squirrel is briefly involved, and nobody downloads a computer.
Ben's friend is locked out of their AWS account and Matt's AI has decided he's a hacker. The escape route runs through a cheap computer, a mesh network, and Neal Stephenson.
Matt records from the wrong continent and explains how he taught his computer to be a 1950s television. Ben guesses his way to the secret of the colo(u?)r burst and wins today's podcast.