Embedded - 457: Rubber Duck Phase Cancellation

Episode Date: August 17, 2023

Chris and Elecia chat about their ongoing efforts to create and learn. Then they answer some listener questions.  Duck quacks do echo but the echoes seem to align in phase so that there is no interru...ption making the echo sounds like an extension of the quack (Mythbusters episode in which Jamie says “Quack, damn you!”) Elecia continues to work on Making Embedded Systems, 2nd Edition. The early release copy is available on the O’Reilly Learning System. Classpert is offering an asynchronous cohort for Elecia’s Making Embedded Systems course.  You'd be going through the class with others and there will be discussions and mentor (and Elecia’s) help on the Discord. No live classes but you get access to the best bits of the previous live classes. Class starts in September. Tickets are on sale for the tenth annual Hackaday Supercon is Nov 3-5, 2023 in Pasadena, CA. Someone there will be giving out stickers. More details to follow on that front.  Elecia is enjoying OrigamibyBoice Crease Pattern Class YouTube series. (It is a prereq for The Plant Psychologist’s Origami Design Class.) Last week’s newsletter (sign up here!) had tidbits about learning the Kalman filter. Some of that came from Elecia’s blog post about it, some were fresh.  There doesn’t seem to be a good introduction to semantic webs in linguistics. Here is a too-dense article about Semantic Maps as Metrics on Meaning from a Linguistics Discovery Journal. If you like the show and would like to support the show, we now take Ko-fi donations (https://ko-fi.com/embedded), as well as Patreon and reviews in your favorite podcasting app.  Transcript

Transcript
Discussion (0)
Starting point is 00:00:00 Hello and welcome to Embedded. I am Elysia White alongside Christopher White. Today it is just us talking to each other, but we have a lot to talk about, including a lot of your questions. Like? Like, like, oh, um. If a duck quacks in a canyon, does it really not echo? It actually does echo, but because of the frequency of the duck's quacks, it resonates at the same frequencies,
Starting point is 00:00:36 which means the echo sounds just like the quack. I think you just made that up. I did not. There is actually a paper about this. Echo is time-delayed, right? Right, but because of the way that the chasms usually... Uh-huh. Because of the chasms that get the echoes.
Starting point is 00:00:51 Do you think it's a phase cancellation thing? It's definitely a phase cancellation. Do you think it's a duck phase cancellation thing? You're just trying for the title early, aren't you? If we get it out of the way early, we can just stop. Okay, then yes, it's a duck phase cancellation thingy. Cool. Okay, well, that was
Starting point is 00:01:07 all I had. Cool. Well, we'll see everybody in a couple of weeks. It is August, so they can't really expect much from us. Let's start with a question we had last time from a Guy Randy in which
Starting point is 00:01:24 he said, I recall an episode where you talked about installing an antenna to your dad. How is that going? Didn't we already cover this question? We did, but a whole month has passed. Duck phase cancellation thingy. Is that what you had? Okay. That's not going to be the title. It sure as hell is going to be the title. How is that going? So, oh, it's interesting.
Starting point is 00:01:51 So my dad's hardware was delayed for a long time because he ordered it assembled. So he just got that and he needs to get an antenna. I have not started assembling my radio, which is the same radio he got, but I chose to solder it. And since I am having slight amounts of trouble motivating myself to do things, I have not got started on that. But hopefully, once I work up the energy, I can get that done in a couple days. So, yeah, that project is taking a long time. But you have been working on things. Well, the longer problem is learning Morse code. Okay.
Starting point is 00:02:26 And so you've learned almost all the letters at this point. Except for like X. It's highly qualified. Yes. But you told me X, Y, Y, Z. No, Y, Y, Z. Oh, I see. It doesn't have an X.
Starting point is 00:02:39 Okay. If you ask me a letter, I can probably tell you a letter. But not if you ask for X. X, I think, is... Look, I'll just look it up right now. No, that doesn't count. Anyway, I've been using something called the Koch method, which a lot of people recommend.
Starting point is 00:02:56 And the idea is you learn them at kind of a high speed. So the letters can be transmitted at a speed, right? Right. The dots and the dis can come out at a certain speed per letter. Yeah, okay. Yes, exactly. Right. And the number of, obviously, the faster the letters go,
Starting point is 00:03:19 the more you can transmit in a given amount of time. So it tries to teach you a small amount of letters at a time and builds them up. So the app I have starts out with like two or three letters, like K and R and maybe M. Yeah, it was only a couple. And you just do that for a while at the full speed, and then it spits them out and you copy them down
Starting point is 00:03:40 and it says how many you got wrong. But there are multiple speeds here. There's the letter, the da-da speed, the inter-letter speed timing. Those are the only two that are... And the inter-word speed. Inter-word timing is not controllable. Not yet because you aren't using words yet because you're doing random things. No, that's just not a thing that's set anywhere that I could find.
Starting point is 00:03:59 Oh, okay. But the inter-letter spacing is controllable and I made a mistake. So the first time I started learning it, I could turn that way down because it made everything easier, and I was learning the letters at full speed. And so you had something like, da-da-da, space, space, space, da-da-da. Highly exaggerated. Yes. But it was more of, you know, 20% slower than 8 times slower. But yes, that's the idea.
Starting point is 00:04:26 And so mistake number one was doing that. So I didn't realize that was a mistake until I turned that off and couldn't copy anything. Because before you had... And now you have... No. If you turn off the spacing, the natural spacing that you're supposed to have between letters is so short. It's just did-a-did-a-did-a-did. Not even that. Let's say you had, for the sake of argument, using the letters you've chosen, which are S and S.
Starting point is 00:04:58 It's only S so far. I was hoping to add O at some point. Let's do S and E. Okay. Sorry, S and I. I is is did it and s is did it so somebody might say sit might be with the it's called farnsworth the inner letter spacing so you turn that up it might be did it did it da would be sit okay but if you turn the farnsworth off and you start listening it might be did da-da-da-da-da. Actually, I'm not even doing it fast enough.
Starting point is 00:05:29 The way I've been hearing it in the app is da-da-da-da-da-da. And so it almost sounds like those first two letters are squished together, which means it's kind of ambiguous. Is that S-E or is it five? Five is five tits. Or it could be two E's and an I. Right. There is a little bit of interletter spacing, but if you've been making it expanded to learn,
Starting point is 00:05:52 it's hard to train your brain to hear it because it's a little fast. So I did that and collapsed. So it was like, and then I asked some hams on Mastodon, and they said, oh, yeah, don't use that. And then turn down the speed because the default default speed I think a lot of people recommend is 20 words per minute letter speed, which is way too fast. And so I turned down to 12. So now I'm at 12, no quote Farnsworth spacing, no inner letter exaggerated spacing, and started
Starting point is 00:06:19 over from the beginning. And I got to the point where that was okay. So I felt pretty good. But that was random letters. Random groups of letters. Which we thought was hard. Naturally, yes. Because you're like, okay, these letters don't make sense. I'm getting a T and then a Q and then a W. It just isn't. You can't predict the word that's coming because it's not a word. So you figure, oh, when the words come, I'll be able to
Starting point is 00:06:44 kind of get a sense for what's happening. But! Wrong. So the app I have was configurable to do random letters in groups of two to eight. So it would, you know, give you two letters, and then maybe three, and then maybe six, and then maybe four, and they'd be
Starting point is 00:07:00 spaced by word spacing. Fine. So I got through to the end with that, and was doing okay, like 99, 95% accuracy most of the time. I switched to words. I went to a different app that just did the BBC News and set the timings the same. Could not copy
Starting point is 00:07:16 anything. The letters are coming out at the same speed. What went wrong? Do you have any idea what went wrong? Well, I know what went wrong because we you have any idea what went wrong? Well, I know what went wrong because we talked about it. What went wrong is, as you suggested with sit, that now you're using shorter letters all the time.
Starting point is 00:07:36 Exactly. And it's easier to get them confused. Because usually if you have less used letters, they're longer, but things like E are very short. Longer or more complex. Like they may not be long, they may not be super longer, but they might have, you know, they might be did it da for like you instead of did it for E. And so common words, common words are going to have E's next to I's or A's next to E's, short, short things like you're saying with lots of maybe repeated small.
Starting point is 00:08:09 E is just a dip, right? Yeah. And T is just a dot. Yeah. And so if you think about SOS, the da-da-da, da-da-da, da-da-da. Yeah. Is that SOS or is that E-E-E-P-T-T?
Starting point is 00:08:22 There's enough inner letter spacing. There should be. That one's not hard. That one's not too hard. Because you're shifting between a big obvious group of DAs and an obvious group of TIs. But what about, say, A, which is da-da. Oh, so that's just E-T.
Starting point is 00:08:37 A versus E-T is a little bit ambiguous. So you got to, yeah. So it was really frustrating. Anyway, we've gone on about this for 10 minutes. Welcome to Morse Today to help you learn how to do your Morse encoding. Anyway, I ran aground on that. It was very frustrating realizing I was kind of back at square one. So now I've changed the app.
Starting point is 00:08:56 I found a way to have it give me common English words randomly. So I've been doing that. That's been a little bit better. There's other things in the app that give kind of fake conversation stuff that you can transcribe. So I've been doing that a little bit. But it's been a long process and you have to keep doing it because it's kind of like, it's not something you're going to remember forever. So if you take a few days off, you have to kind of crawl back up. A lot of the cognitive psychology things say that that crawl back up, it goes a lot faster, of course.
Starting point is 00:09:28 And it's one of the best ways to learn. It's actually the intermittent learning is weirdly more effective than you'd expect. Oh, that's perfect for my attention span. Yeah. But yeah, so I can say any, in my head, I can say any letter. I can very slowly copy. So if I turn it way slow down, I can copy. So maybe I'm trying to copy too fast at this point.
Starting point is 00:09:53 I need to just accept that I'm going to be at five or eight words per minute or maybe 10 if I'm pushing it. But yeah, so now I'm trying to try a bunch of different apps that give more actual, you more actual words and things. The other complication of Morse is a lot of stuff is abbreviated. And this won't be an issue if I'm just talking to my dad because we're not going to use a lot of this stuff. But regular ham operators know all these Q codes and things
Starting point is 00:10:21 and these little two-letter codes. QC, QC. Right, QC, QTH, whatever, DE. q codes and things and these little two-letter codes qc right qc qth whatever de uh there's a bunch of there's a whole bunch of them because you don't want to be obviously hammering out long words if you don't have to so there's a lot of shorthand stuff and i don't know any of those right now really so but it's just something i'm talking to actual people and i thought you really just wanted to talk to your dad oh i mean I mean, you've got to get practice somehow. Fair.
Starting point is 00:10:56 And if I'm transcribing stuff, either from radios for practice, without even talking to someone, just listening for practice, that stuff comes across a lot. But you do understand that if I'm ever trapped in space or in a store with somebody talking to me, that I'm not going to be able to remember Morse, and we are going to have to fall back to ASCII. I don't know ASCII. That's stunned silence, in case you weren't sure. Actually, 13 hex is the dollar sign, I think. That's it. So you could send me dollar signs. Or maybe it's D.
Starting point is 00:11:19 40 is little a. Yeah, yeah. 60 is big a. Okay, so we can... 30 is all the number. 30 is zero. Wait, that's Celsius. 40 is 96 degrees, and 60 is big A. Okay, so we can... 30 is all the number. 30 is zero. Wait, that's Celsius. 40 is 96 degrees and 60 is... Okay, but that's not the only thing you're learning.
Starting point is 00:11:33 It isn't? No, you've been taking this piano class that sounds terrifying to me. Nobody wants to hear that. It's like theory or something. There's no theory in this class. Oh, right. It was the last class. The last class was theory. This class is... This is piano for songwriters. Oh, right. It was the last class was theory. The last class was theory.
Starting point is 00:11:45 This class is... This is piano for songwriters. Okay. And transposition. Well, that's part of the exercises. But yeah, we just do... So the thing is, it's just a class. Okay.
Starting point is 00:11:56 And I have to play live in front of people. That's the difficult part. So every week we have to learn a song and perform it live in front of people with singing. And yet you never sing to me. Somewhere on a hard drive. I'm not going to sing for people. Somewhere on a hard drive in this house is about three hours of me practicing Taylor Swift's Antihero. And I still don't know where it is.
Starting point is 00:12:17 I would share it with you if I did, I promise. Okay, well, so you haven't been entirely not doing anything. Wow. High, low praise. Haven't been entirely not doing it. Wait, I can't even parse that. Haven't, wait, wait, wait. Haven't, that's one no, one negative. Haven't been entirely, entirely is kind of a negative. Haven't not been entirely. Haven't not been entirely. So I've been doing things partially. You've been doing some things.
Starting point is 00:12:48 I've been doing partial things. Okay, to be fair, you said to me very recently, I haven't done anything. Well, that was true. I hadn't done anything that day. That was like today and yesterday and the day before you've said that. No, no, yesterday. But that's not true.
Starting point is 00:13:02 No, no, yesterday I did a bunch of stuff. Okay, okay. But you've said that. No, no, yesterday I did a bunch of stuff. Okay, okay. But you've been, you are currently not fully employed. I'm very, very partially employed. I'm homeopathically employed at this point.
Starting point is 00:13:18 But you did a good job on the newsletter this week. Not that anybody listening can find it now. Although I apologize for not putting a link to the larger images or the blog post. You can find those things on our site quite easily by searching. Anyway, he did a
Starting point is 00:13:33 newsletter post that was all about the Kalman filter and where you can go to find various versions. Tutorials mostly. There weren't too many versions of the filter itself. A few implementations. Yes. So I've been helping someone out with their desire to have sensor fusion
Starting point is 00:13:56 working on a device they're working on. And because you're curious, you're spending some of your podcast time not charging them. Yeah, spending extra time reading about it off the book because it was interesting. So yeah, that's been interesting. Wow, how many times can I say interesting? At least five more.
Starting point is 00:14:17 And then what happens? Who knows? Guillotine falls off me. Yeah, no, it's a cool topic. Coming from a physics background, I tend to look at these things and go oh this should be easy and then you know it's like oh no this is just like all that stuff i had to do um it's not that hard but you have to do have to find the right introduction i think because uh most of the easiest to find introductions i think tend to be kind of textbookish with lots of just here's an equation
Starting point is 00:14:48 and here's a recurrence relation and this does this and it's like this doesn't make any sense. So I found some better tutorials that kind of baby steps walk up the conceptual grounding of it, which still is kind of hard to understand because it's a little bit inside out and backwards the way things are expressed. But I feel like I kind of understand the theory behind it now.
Starting point is 00:15:12 I couldn't implement one without, you know, a reference manual. Not that many people could, but yeah. The hard part with the whole sensor fusion thing with IMUs is the quaternion stuff. And that's just... And that really isn't part of the Kalman. Although it is part of the whole sensor fusion thing with IMUs is the quaternion stuff, and that's just... And that really isn't part of the Kalman, although it is part of the IMU world. You don't need to use quaternions to have sensor fusion. It fixes a lot of stuff if you're doing a lot of rotation and full 360 rotations and things. Well, and that's the problem.
Starting point is 00:15:41 That's why you need to have them, is you have 360 to zero, and it's a discontinuity. And if you want to talk about angular rate, which is the speed at which you're turning around, if you have the 360 to zero, you have a discontinuity, and then you can't integrate over it, and it's all blah, blah, blah. Yeah, but I still don't fully get that stuff. Because you do have to translate it back to Euler angles afterward. After you integrate afterward after you integrate after you integrate after you do anything interesting anything that requires you to have a continuous function okay so so if you want to integrate what if i just want what if i just want the a wheel with a light on to stay at the top just to pull an answer out an example out of my out of my head i want the light to stay on top of the top. Just to pull an answer out, an example out of my head. I want the light to stay on top as the wheel rotates.
Starting point is 00:16:28 It's a bunch of LEDs around the rim of a wheel. Okay, you're on a bike, and you want the light to always be at the top of where the bike is. Yeah, so I do my Kalmont filter, and it spits out the quaternions from the sensor fusion. And now I've got a four-component vector that nobody understands. I mean, quaternions are just, nobody looks at them and says, oh, I know what that is. So naively, I just take that and convert it to Euler angles. Cool. Do I have any problems?
Starting point is 00:16:57 Or is there some, you said there was an integration step. Well, it depends on... Sorry, listeners, we're just going to have a conversation now. We actually meant to have this conversation before the show, and then we forgot. So part of the Kalman involves figuring out,
Starting point is 00:17:14 you estimate what your next position is going to be. And in order to estimate what your next position is going to be, it often is an integration step. Oh, yes, yes, yes. You get the equations integration step. Oh, yes, yes, yes. You get the equations of motion and then you, yes, sure.
Starting point is 00:17:30 Right. Because maybe you have acceleration or velocity. You don't have absolute. Gotcha. Okay, agreed. And so that step has to be done with the quaternions. Oh, okay, okay. And that's why the quaternions end up in the Kalman filter
Starting point is 00:17:44 because the Kalman filter has to do the estimation which requires an integration step for the equations of motion. So your sensor fusion, there's things you have to set up for the Kalman filter.
Starting point is 00:17:54 You don't just buy a Kalman filter with a store in a box and then glue it to your IMU. It's just math. Right. So it has to be set up. So much math.
Starting point is 00:18:03 It has to be set up. And since it's predicting things, you have to write the equations of motion for the thing that's, or whatever, the equations of prediction, let's say. What relates the measurements and the predictions in time? And usually for equations of motion, that's physics stuff like Newton's method or Runge-Kutta, whatever. Those are ways of solving... Differential equations. Yes, but the equations of motion are just F equals MA and one half VT... No, you don't have F equals MA. You have... Well, okay, maybe you kind of do in one place,
Starting point is 00:18:43 but this is even just as simple as... But it's x equals x naught plus vt. Yeah, that, exactly. vt? One half vt? No, just vt. One half at squared. Yes, because that's integrating vt. Right.
Starting point is 00:18:57 Anyhow, so that stuff you have to build and put into the Kalman filter as the prediction stuff. And there's another part, but yeah. So that's the stuff you kind of have to set up. And that can be kind of complicated. And that's the part that needs to be in the quaternion because you don't want the discontinuity. All right, yeah. Oh, we're all on the same page here.
Starting point is 00:19:18 But that means you don't have to mess with the quaternions except in that setup part. Right. Where you're writing the code that does the comma filter for your particular application. Once you've done that, it'll spit out a quaternion and then you just throw it at some trig that you can buy at the store. And then it will give you the regular axis of rotation. Theoretically, as long as you're using one version of quaternions versus another and you're consistent. What? There's more than one version of quaternion?
Starting point is 00:19:45 Don't go down that route. Are there quinternions versus another, and you're consistent. What? There's more than one version of quaternions? Don't go down that route. Are there quinternions? I assume so. I mean, you can have a four-axis system with discontinuities, so in order to make it not have discontinuities, you put it into five, and then you'd have a quinter. I have real mathematical problems with quaternions. Because it's i, j, so it's this four-part thing. It's i, j, so it's this four-part thing. It's i, j, and k. And i is your
Starting point is 00:20:06 friendly i that everyone knows that is i squared equals minus one. But apparently so is j and k. j squared equals minus one, k squared equals minus one. And i, j times k equals minus one. So, I mean, those are all the same thing. Did I not give you a large book called Rotations and Quaternions and such things? I had to put it under a chair leg. Yeah. That's what I've always used it for. I don't want to learn that.
Starting point is 00:20:33 It's funny because I thought it would be so much easier for you because you've got the physics background. I hate the projection stuff. That was so hard. I did that without quaternions. We did all that stuff in Euler angles and stuff. I don't think we ever touched on quaternions. And that was hard enough. Because you've got, you know, you've got these transformations. Anyway, let's get off this topic before I... Making Embedded Systems is coming out late fall is the prediction. Of? 2023. Yeah.
Starting point is 00:21:06 Thank you. It is currently on the O'Reilly Learning System, so you can get a preview. I think right now we have six, seven, eight chapters. I'm not sure. And one of them is the new chapter about interrupts. And one of them is the greatly expanded chapter about how to set up your system, which used to be all state machines and now talks about main loops and all kinds of stuff. And if I wasn't a slacker today, I would have finished the chapter either about debugging or at least a major section of the chapter about the internet of things man i need a better title yeah no it's it's iot and network sensors is the
Starting point is 00:21:54 title of that chapter but i still hate i think you should take this opportunity to destroy that acronym and come up with one of your own well but then i i can't have the joke that the S in IoT is for security, which I may put in the book. I haven't quite decided. Hang on. Network of stuff. Network of things you don't need. How about distributed sensors? I've heard that was a term in like 1968. So it sounds to me like you've greatly expanded the original book. I have expanded the book more than I expected um how many brand new chapters are there well it's a hard question because interrupts actually had a small part in the statement machines chapter but it got massively expanded that's why i'm just it's fair to call it a new chapter so how many How many brand new chapters? They originally had 11? Originally had 10.
Starting point is 00:22:45 10. Brand new chapters are interrupts. That came out of a couple other chapters. Updating code is becoming network of things. Network of stuff.
Starting point is 00:23:03 The... I put in a little section in the memory maps uh chapter that i wasn't going to change much the resource constraints chapter i was just like okay talk about hard faults because at this point they've seen the memory map and they're ready to talk about hard faults but that became an entirely new chapter about debugging in which hilariously to me i don't know what the readers are going to think but i I talk about how to cause hard faults. And it means that instead of trying to walk somebody through something when they're having a problem, I can talk about them as fun things you can do. And that has really made a lot of difference for the ease of writing. And then I plan on adding a new chapter about motors at the
Starting point is 00:23:47 very end. So after power consumption, it's not going to be very long, but I had a section about PID that didn't fit and I don't want to cut that. And I do want to talk more about FETs and actuators and power and how not to blow your board up. It's mostly going to and how not to blow your board up. It's mostly going to be how not to blow your board up. So this is like at least 30% larger? Yeah, we're headed that way, yeah, 30%. I mean, it's a solid second edition. It's not a fixerata and add a new chapter about some hot topic.
Starting point is 00:24:24 Better Linux. Yeah. No, it is. I mean, some of it came out of just stuff I've talked about over the years. Some of it came out of Classpert and things people had questions about. Every chapter still has an interview question, so you get three new interview questions. Although I think, yeah, one of them is not interview questions, it's what not to ask, which I start out with a joke. The interrupting cow joke.
Starting point is 00:24:52 Don't give it away. Okay. I mean, they've heard the interrupting cow joke. If you haven't, go back to Svek's episode. Make them work for it. So, yeah, it's more work than i expected i had a plan i'm not sticking to it i had an editor editor that didn't work with my style and now i have an editor who works very well with my style and we're having a good time and my pre-reader, my technical reviewers are fantastic and it's just mostly I'm having a good time except for days like this where I look at it and go, I don't know words. Words? Words go here? Words, words? But some days are like that. I did actually
Starting point is 00:25:41 make a diagram today, which as you know, is worth at least a thousand words. Although in its current sketchy pencil version, it's probably worth more about four words. Cool. And you said it'll be done in fall-ish. Does that mean there'll be paper published copies in fall? Yeah, that's when the paper copies come out. Wow, okay. You know it's August 15th.
Starting point is 00:26:05 I'm a little worried about that, but I actually don't mind if they push it out to January, February. I mean, it's August 17th. Let's see. I also, Classpert is getting ready to have another cohort, but this one's going to be fully asynchronous. That means you're going through the class with other people, watching the videos, talking about homeworks, and there'll be discussions on a Discord and mentors to help you, and I'll be around on Discord, but there won't be live classes. You do get to watch some of the old live classes and only the best bits
Starting point is 00:26:39 so you don't have to sit through some of my worst jokes, and it will be cheaper. I think it's $5.99 now. It was on presale, but I think it's $5.99, which is still pretty expensive. And if you have a hardship case, I'm such a sucker. So email me and we'll figure that out. But if you can get your employer to pay for it, super duper. And I should know when that starts.
Starting point is 00:27:06 Oh, August, September 18th. It starts September 18th. It can't start August 18th because we're not ready. It's Friday. Yeah, no, it's September. Or tomorrow. Depends on when we're recording this. I don't know when we're recording this.
Starting point is 00:27:23 Okay, one more thing for me to blather about is I have a new origami class that I'm taking. And it's a YouTube class and it's online. And it's by a guy named Boyce who teaches you how to read crease patterns, which is the area that I am now looking into. Crease patterns. Is this for like, no, this isn't the crunchy, crumbly.
Starting point is 00:27:51 No, this isn't crumple. I know you like the crumples. No, this is when you have, usually it's for more box folding, which is the style of folding that I don't really do, but when you have complicated patterns that just come in black and white, and usually there's one set of dashed lines and one set of thick lines, and you're supposed to fold all of the dashed lines one way and all the thick lines the other way, and then you're just magically supposed to collapse it and it works. But I didn't understand that there's actually methods to how you collapse it. It's not just hope and pray. It's like you start at this corner and you identify the important corner by these criteria. And here are some standard things
Starting point is 00:28:37 you do and how you identify them. And it's just been really interesting from a mathematical point of view it's not super like here's math but it's more of a here are some functions you apply to paper and how to read them i don't know it's it was i went out looking for a a new origami paper class and ended up just watching youtube watching finding a youtube thing yeah uh it says here that super con is november 3rd 5th in pasadena california and i believe that most a lot of tickets are going quickly or something from people i see we will not be there we will not be there but it looks like fun and i think we will have a designee to give out embedded stickers so anybody who is going and wants a sticker all you have to do is find the person who's giving them out i suggest walking around saying do you have the embedded stickers to everyone you meet and then forming some sort of mob and then when you find the person, mobbing them. Okay. All right.
Starting point is 00:29:45 It's not a good plan. Yeah. Okay, I have a question that has been on my list for a long time, and I asked it in our Patreon Slack, and I got some really interesting answers. So I'm going to start slow. Pseudocode.
Starting point is 00:30:02 How do you define pseudocode? What is pseudocode to you? I know we had this conversation, so I'm going to probably lean back on things I've already talked about. Are you asking me to answer it? I'm asking you to answer it now as though you and I had only just met today. is code for illustrative purposes in, say, a tutorial or a book that simplifies syntax so it's easily readable and also is not for any real language or device. So it's somewhere between text and code. It isn't syntactically interesting, but it attempts to tell the semantic definition of what you plan on doing.
Starting point is 00:30:51 Yes. How often do you write pseudocode? Nah, I can't even remember any time I have. You know, I might have done it in school for some things, for some papers. You mean like 30 years ago? Okay, that's it. Sorry. Not quite 30 years ago yet.
Starting point is 00:31:15 Yet. Some parts of school. Yeah, something like that. I don't think I've done it professionally except maybe in a document or two or in a comment. Sometimes in a comment, you end up with something that's sort of pseudocode-like because either you've written something that is a complex algorithm or there's some optimization in there that makes it hard to read. So I think maybe I've done that a couple times, but it's not common that I've done that.
Starting point is 00:31:44 So the Kalman filter that you're looking at, you're going to go from, I mean, ideally you're just going to grab a library, but let's say you're not going to grab a library for some reason. Let's just pretend. Right. Yeah. You wouldn't take the Kalman steps that you need to do and write them out in pseudocode and then fill them in? No, because the math is close enough. It's all recurrence relations and things. I mean, that's already code. I mean, there's pieces of stuff you'll need,
Starting point is 00:32:14 like matrix multiplication and matrix inversion and things that will have to be built to accomplish that. But all those operations are in the math. And if you don't understand the math well enough to implement straight from the math, I'm not sure that rewriting it in a different way would help that much for that particular application. But you don't write setting up the state estimation
Starting point is 00:32:37 to use quaternions due to discontinuity. I mean, I might put that in a comment. Right, but you don't write it before you write the code. Not in pseudocode. Like, if I was taking notes about the procedure, it would be math and prose, which I don't consider pseudocode. What's the difference?
Starting point is 00:32:57 Pseudocode looks like code. If you look at it, you go, what language is this? Because I don't know this language. It doesn't just look like prose that's weirdly formatted? I don't think so. And there's often for loops. I've seen pseudocode. Yeah, I would put for loops.
Starting point is 00:33:12 With for loop. Yeah, see, so you're starting to put code-ish things in there. And instead of if, you know, if you were doing it in prose, you would do, you know, check if, check, check if. You would have, you know, you would have, what's the word I'm looking for? Conditionals? Not conditionals, like commands, things to tell somebody to do. Right. You don't tell a computer, check if this equals this.
Starting point is 00:33:38 You just say if. You don't write sentences. Okay. I think pseudocode is, you know, it's compact like code, but I'm not, you know, I'm not sure it's, pseudocode seems mostly useful in cases where you're trying to convey a computer programming topic, but you're not sure what language somebody might be using. So the reason this came up and the reason I'm talking about it is because I use pseudocode all the time,ode all the time. Like, all the time.
Starting point is 00:34:09 I mean, I use it in my book, which is, you know, here, no, there. That's what you're saying about it, is you use it when you don't really care what the person's actually writing in. But I'm working on a simulator for a robotic system I'm working on. And the simulator basically is the pseudocode. And then I take that and I made all of those printfs and then I made them call functions because the simulator doesn't do anything. It just
Starting point is 00:34:35 tells you what it would do if only it could do something. And as we go on, the simulator will gain functionality, but those printfs will stay there. But those printfs all started out with a list of what I wanted to have happen. Sure. I think we're just quibbling over what the definition of pseudocode is. For me, that was totally pseudocode. It was a list of things I wanted to have happen. A lot of times there weren't spaces between words. Sometimes there were open,
Starting point is 00:35:03 closed, pencil parameters. I'm not the pseudocode police, if you want to call that pseudocode. It's just not what I consider pseudocode. Okay. I mean, it sounds like what you said, though. Yeah, it probably is. I'd have to look at it to say if I, I mean, but who cares? Okay. I mean, yeah, I get what you're saying. It's instead of writing out a long paragraph about how something works, you've kind of broken into a series of steps and things. I guess that's pseudocode, sure. I feel like the only thing is I feel like pseudocode looks like a computer language more than a list of just steps. I mean, my steps had, like I said, they were camel case and not English. So this kind of came about because I had a really good experience
Starting point is 00:35:52 when someone brought me a problem. And instead of actually figuring out what the problem was, I kind of knew, but instead of figuring out what the problem was, I knew they had enough time to debug it. So I said, why don't you write down comments for what it is you want this piece of code to do? And basically, I wanted them to write pseudocode for what they wanted this piece of code to do. And I knew, and as happened, when they wrote that out, they could see the bug themselves. And so I use pseudocode both for design and for debugging. Yeah, I mean, maybe I use it more. I'd have to look through my notebooks. Yeah, I think
Starting point is 00:36:33 certainly I've written out little procedures and things. I mean, I write out stuff before coding it a lot, unless I really know it well. Yeah. I'm just not sure if I ever considered it pseudocode before. Do you have another name for it other than just notes? I mean, notes is fine. Algorithm. Write the algorithm out, you know, something like that. Yeah. I mean, yeah, I don't know that the language matters that much, but...
Starting point is 00:36:59 Okay, so you're saying we agree, we just have different terms for our group. Yeah, well, I don't know. I mean, I'd have to look at what I do. I haven't broken something down like that in a while. But yeah. Is there somebody who's saying that pseudocode is something else? I was just really surprised when I asked folks about using pseudocode, and everybody said, no, I never do. Oh, okay.
Starting point is 00:37:23 And I was like, but I use it all the time. One of us is wrong. And I'm pretty sure, wait, no. I just didn't understand how people weren't using what I consider this amazing. Certainly, I think jumping straight into code and trying to do things is often a mistake. Designed by typing.
Starting point is 00:37:42 Yeah. Yeah. So whether you want to call it pseudocode or planning or, you know, there's probably a continuum between stuff that looks like pseudocode and stuff that looks like an essay. But that's all the same stuff. And doing that ahead of time is, like you said, very instructive. It's like, well, it's kind of like rubber duck debugging.
Starting point is 00:38:02 Debugging? Debugging? Rubber duck phase cancellation. like rubber duck debugging. Debugging? Debugging? Rubber duck phase cancellation. Rubber duck debugging where you explain something to someone else, even if the someone else isn't real, because the process of getting into the explain mode of your brain often forces you to notice things you wouldn't otherwise notice. And I think that's the same thing, writing out how does the code work,
Starting point is 00:38:26 not in C, not in Python, not in whatever people use. It's the same kind of mechanism. And it's useful for both planning and debugging because there's so many times, like the bug is really, the code does exactly what you told it to. It just wasn't what you wanted it to.
Starting point is 00:38:42 I told the code to smash the stack. Smash. Okay, so now we have some more listener questions. Oh, wait, no, no, no. I have other questions for you. We're never going to get to these listener questions. I am so sorry. It's fine. You had... What did I do? Last week... Oh, no. You needed to write what was going to be a very standard boring email. And you weren't quite sure how to phrase some of the things.
Starting point is 00:39:16 And I said, why don't you just use ChatGPT to write. Why are you doing this? And that's, that's the response. Tell me about that response. Do you really want to talk about ChatGPT? Because I have feelings. I know you have feelings, but it's funny because they're not the same feelings we had three or four or five episodes of just us talking. Are you sure?
Starting point is 00:39:33 Because I remember an entire episode where I spent most of the episode making fun of it and thinking it was stupid. But you also did spend part of the episode being ChatG GPT's interface to talking to me. Yes. That was my way of mocking it. Right. But that was fun. Now you're beyond fun and into.
Starting point is 00:39:52 I. Yes. Into Grover. I think it is overhyped. At the same time, I think it is potentially being misused. I think it does not work as well as people have thought it has because of some psychological things where it convinces people it's talking like a human and it's very hard to get your brain to not be sympathetic to the imaginary computer.
Starting point is 00:40:25 And it apologizes all the time. How can you keep kicking it? I think despite the fact that I used it to write some code, I have further thought about it and realized it probably did not save me any time. Because the extra time that I did not include where I had to edit what it did and tell it it had done it wrong and think about how it had done it wrong. And so even though it was maybe a slightly more pleasant procedure interacting with an imaginary rubber duck, I probably could have done it myself with looking stuff up and figuring it out. So that's one aspect. People are going to disagree a lot with me, but that's fine. I also don't like the people who are behind it. I don't like how it was generated. There's a lot with me, but that's fine. I also don't like the people who are behind it. I don't like
Starting point is 00:41:05 how it was generated. There's a lot of questions I have about how things are being trained, including where it's coming from, what kind of bias it has in it. And, you know, the more I've used it and learned about it, the more I realize it's extremely... It feels limited. The more I've used it, the less novel things come out of it, because it can't make novel things. It can only synthesize what it's been trained on and repeat what it thinks is going to come next. And what bothers me the most is the people behind it are a little bit icky.
Starting point is 00:41:47 And the people using it and jamming into things aren't doing any thinking ahead about what it means and what it's actually doing. Like Google has started putting the top result. The top result is usually a summary generated by their large language model of a common result. Like the age of the universe? Yes, there's been several now where you can ask at the age of the universe and it will give you a totally bogus answer from a crackpot physicist because that was the top short result and it just summarized it. And it gives it authoritatively. It says the age of the universe is whatever it was, 60 billion years, which is not correct. Another funny example was, what was it? Something about
Starting point is 00:42:32 a goose? Gooses kill people? How dangerous is a goose? And the top result was goose can kill hundreds of people at a time, incinerating them or something and it was summer it was summarizing a popular forum post on a news article that was somebody's joke but it truncated it and left out the part where the guy made it clear it was a joke and it just took as the authoritative answer that that you know geese are actually weapons of mass destruction uh there was another one the other day too but anyway, this is the kind of thing that everything's just getting kind of slowly
Starting point is 00:43:09 kind of ruined, but in a fun way. And that bugs the hell out of me. I don't know how I feel about it. I admit that there are times that I will look around the internet and not find what I want, but know that it is there. Usually it involves VS Code in some JSON format.
Starting point is 00:43:30 And it does okay on those, but I've never been super amused by it. You were amused by it for a little while. Yeah, and I think that people are amused by it. I think there was another article, too, that came out recently where somebody, I don't know if it was a formal study or something, but it was an investigation of how accurate its code work was. And it was basically wrong 60%, 50% of the time in some significant way. Which, like we said in the past, if you know what you're doing, that's correctable.
Starting point is 00:44:08 But how long does that persist? How long until that poisons education in such a way that people don't know that things are wrong? Or maybe it makes a subtle mistake you didn't catch, and you're just taking it. That's my fear. And, you know, with the things you're talking about, I think there's great uses for large language models that are trained on, you know, focused data sets. So the stuff you're talking about, how do I format this JSON for this particular configuration? That's great.
Starting point is 00:44:36 You know, find a training set that's freely available where you can train on a whole corpus of configuration files for difficult things or something like that. But don't include, you know, copyrighted novels and things you scraped from Twitter and Reddit posts and scary forums about stuff that's going to... I mean, just the idea of just throwing the entire body of text that's on the internet into a model and seeing what happens and then having some stuff appear to be useful and some stuff appear to be maybe not useful and we're not sure what this does that's just weird and there's a whole other aspect of oh this is an intelligence
Starting point is 00:45:17 those people are driving me nuts so it's it's a statistical machine and it's going to spit out what you put into it. And so far we put the internet into it. And I don't know a lot of people who think the entirety of the internet is all that great. I hope that we do get some more limited data sets that can direct the knowledge in a way that is trustworthy. The lack of it being trustworthy is... I don't think that's fixable. I mean, there's several large language model researchers who said this is just how they work.
Starting point is 00:45:56 No, no, but like my VS Code thing. Oh, yeah, yeah. If you trained one on a lot of embedded systems, like all of embedded.com and my book, if it was copyright free and all of the forums for the Nordic and ST, you probably could get to something that was reasonably correct for most microcontrollers. That's the thing, is reasonably correct for most microcontrollers. That's the thing, is reasonably correct. And my understanding, and I am not an expert in these things, I have read people who, researchers on this, who have said the hallucination
Starting point is 00:46:34 problem is baked into the architecture. Yeah, we talked to a professor a while back about how the hallucination problem, because it doesn't have any way to tell if it's... It doesn't know right or wrong. Yeah, it doesn't have any way to tell if it's it doesn't know right or wrong yeah it doesn't know truth or fiction yeah it knows this is common yeah and that's and even then when you have edges and there's a stochastic aspect of these right you don't run the same
Starting point is 00:47:00 if you run the same inputs it's not going to give you the same output every time by design because there's that random element in DNNs. So some period of time it's going to give good answers, but some period it won't just because it's got to explore that whole space. Anyhow, those are my feelings. I have not been using it at all recently. Although I did hear that OpenAI is losing a ton of money every time somebody uses it, so I have considered using it a lot now. Just to punish them.
Starting point is 00:47:36 It's like 30 cents a query. Yes, I saw something like that. Okay, and I have one more question for you that probably will take all of our available time god is this just christopher rant's day oh yeah what have i done uh now i know that this this the solution to this problem involves a small demon who sits inside of a box oh i, I am not explaining heat pumps. It says right here, how do heat pumps work? You agreed to this.
Starting point is 00:48:10 No, I didn't prepare for this. I cannot explain it. You explained it to me. I cannot explain it. It's too hard. The thermodynamics escape me. I still don't really understand it. Heat pumps take heat from one place and move it to another
Starting point is 00:48:26 place. And by doing so, they can be much more efficient than generating heat in the destination location. So my stupid explanation for how heat pump works and how it can move many kilowatt hours of heat from one place to another by using a fraction of a kilowatt hour is imagine you had a glowing molten nickel ball the size of a bowling ball in a box and you picked up that box and you moved it somewhere else and opened to the top in the box in the new room it didn't take you a number of kilowatt hours of the glowing hot ball to heat up that room. It's cool with the energy for you to pick it up and move it, presumably incinerating your arms in the process. But yeah, so that's my concept of how they work.
Starting point is 00:49:13 How they actually work involves the box being refrigerant that is compressed and expanded and lots of complicated thermodynamics things. Maxwell's demon. No, Maxwell's demon had like tweezers. Right. He was tweezing. This doesn't tweeze. Pretty sure it does.
Starting point is 00:49:30 Anyway, this came up because we've installed some heat pump-based things in our house. But it's still fascinating because they're extremely efficient. And the heat is being generated by the environment or the sun. So it's not like, it's not cheating. Something's generating the energy. It's just, it's already there for the taking. And you're just moving it.
Starting point is 00:49:52 You're not generating it. And that's why they're more efficient. Yeah. Well, that didn't take nearly as long as I expected. That's probably because I did a very bad job. Well, you did not go into the detail. If you want me to talk about, you know, the Carnot cycle and adiabatic expansion and heating and words that I used to know what they meant.
Starting point is 00:50:12 I cannot speak to those things. Cool. But most people have at least one heat pump in their house. That's how refrigerators work. Okay. Do you want to talk about portable code or compilers and linkers? I feel like portable code might set me off into a pointless rant. Because, yeah.
Starting point is 00:50:34 What was the other one? Compilers and linkers? I don't think we should talk about compilers and linkers right now. Yeah, that'll take another hour. Okay, so what is portable code? William asks. Portable code is code that can be drunk. That's potable code. Potable code. You can drink it. It's okay. Portable code. Portable code is code that, well, there's not a strict definition. Some people think portable code is code that can be recompiled for a different architecture than it was originally written on or for,
Starting point is 00:51:14 and it will run there on the new architecture. Some people might say portable code is an executable that can be taken from one platform to a different platform and it will still run. Some people might say it's interpretable code that can be taken from. So which, you know, those are all fine definitions. The first one where you have to recompile it. Yeah.
Starting point is 00:51:37 Okay. Because a lot of portable code exists that doesn't have to be recompiled. That's the entirety of Java and a lot of things like Electron and Python. Electron. A lot of apps you use is built on Electron. The Slack app is built on Electron. VS Code is built on Electron.
Starting point is 00:51:56 Electron is, as I understand it, a JavaScript engine combined with something else. Okay. Sorry. Particle.io had different particles, and I
Starting point is 00:52:10 thought maybe there might be an Electron board, and I was very confused. Yes, VS Code runs on Particle.io. No, it does not. Yeah, Electron is a free and open source framework from the Open JavaScript Foundation. It came out of the Chromium, so it uses Node.js,
Starting point is 00:52:27 which is a way to run JavaScript as an application on your computer. Okay, I want to go back to you recompile. So we're picking recompile. Right. So, okay, that's portable code. What's the next question? Does it really exist?
Starting point is 00:52:42 Yes. Sure. Yes. I've written it. Yes. Is all code portable with enough effort? No. I think yes with enough effort, because with enough effort, you just rewrite the entire thing.
Starting point is 00:52:55 And have an if statement. And you leave some of the comments in, because those are probably fine. I'm not sure. I mean, yes, in the degenerate case, all code is portable with enough effort. So if you want to think about portable code, go to a big code base like Zephyr or MicroPython, or even like STM32's CMSIS build. Okay, yeah. Finish this thought, but I will come back. All of those things can be compiled for different processors.
Starting point is 00:53:33 And a lot of times it's with pound defs, which we'll have to discuss whether that makes stuff more portable or less. But in the end, one of the things that I would encourage folks to look at is the structure of the code. Because you have these layers. You have a very top layer, you have a middle layer, you get down to a hardware abstraction layer that goes down into a processor abstraction layer, and it just layers and layers and layers. And so portability is
Starting point is 00:54:10 about layers. Because you want to be able to replace the lower layers. The platform-specific stuff. The processor-specific, the platform-specific, the vendor-specific. Whatever SDK may change, you want that to be off to the side in its own little playground so you can swap it out.
Starting point is 00:54:31 The thing about portable code in some situations, not all situations, but in some situations, is like with all things in programming, there are trade-offs. Oh, yeah. The more portable you make something... The longer it'll take to develop. Well, the longer it takes to develop, yeah. The more portable you make something... The longer it'll take to develop. Well, the longer it'll take to develop. Sometimes.
Starting point is 00:54:46 The more complex. But sometimes you lose some of the platform-specific benefits. And it depends on the kind of thing you're working on.
Starting point is 00:54:54 Like flexibility and speed. Flexibility and speed or maybe a feature that just your portable thing can't do. Right.
Starting point is 00:55:02 Like some microprocessors have RSA keys, and they can store fairly large ones that a small 8-bit processor couldn't really handle. Yeah, or on the
Starting point is 00:55:16 application side, you might have an application framework that's cross-platform. Let's say Qt. I have lots of experience writing cross-platform applications in Qt. And the great thing about it is it actually works. I've done this. I have lots of experience writing cross-platform applications in Qt. And the great thing about it is it actually works. I've done this. I have taken, for prototyping purposes, a shipping medical device that was written on Windows, and it took me one day to port it to Linux.
Starting point is 00:55:39 And it worked. And it looked the same and worked the same. There were quirks, things that needed to be worked around, but it mostly worked. And I also took that application, and I took the core of it and ported it to iOS. So the viewing part of the medical device could be run on an iPad. That took a couple of days. So it can be done, and that's great. The downside is for applications like things, there are certain affordances, there's certain look and feel things, there's certain interface things that the native frameworks on Mac OS, iOS, Android, whatever, people are familiar with how that works and what it or sits on top of that. Sometimes they do a good job of copying those things or importing them in, but sometimes stuff gets messed up. So now you've got a cross-platform of, yeah, but it doesn't look like a Windows app. It doesn't really look
Starting point is 00:56:36 like a Mac app. It looks like a cross-platform framework app, which is why VS Code looks a little weird. It looks the same on every platform, but is why VS Code looks a little weird. It looks the same on every platform, but it doesn't look like a Mac app. It doesn't look like a Windows app. So this is one of the things. But like what you're saying, on the low level that happens too,
Starting point is 00:56:59 where maybe you've got to have a software implementation of something that's hardware accelerated because to take advantage of the 15 hardware accelerated different things would be a big effort and would break your port layering and modularity story.
Starting point is 00:57:14 And so you take a performance hit. Talking about Qt is a good way to think about this because... And I will say they did a good job with making things look native. When you think about portability, sometimes we think about my application,
Starting point is 00:57:33 which runs bare metal on this platform, now needs to go to a different processor, possibly because of the chip shortage. And so now I have to rip out all of the STM32 guts and try to replace them with SAMD from microchip. And there's a lot of swearing, and the peripherals work differently, and the documentation is not consistent
Starting point is 00:58:01 from one processor to another, so you're looking at all different kinds of places. Could you have made that portable? Absolutely. You could have put it on MicroPython and never written the line of C. But you had to make that decision in the beginning. And it had to be something that didn't have another trade-off,
Starting point is 00:58:22 like performance, right? Like performance. And so MicroPropython aside, it's the idea that if you decide in the beginning you need a lot of portability, then you can start structuring things for them. But if you decide later, then trying to fit those laters in, I mean, it's really hard to slip the lasagna noodles in between the spaghetti noodles. Okay, it may be snack time. I'm sorry. I'm not following that analogy. If you were planning on doing a portable system, you'd make lots of layers like lasagna.
Starting point is 00:58:59 But if you weren't and you made a pile of spaghetti, but you tried to fit in the lasagna noodles between the spaghetti. Okay. I was wondering if there was an actual cooking thing where lasagna and spaghetti were together. No, but we did see that one about spaghetti and pizza. That was not good. It wasn't spaghetti and pizza. It was spaghetti pizza. Right.
Starting point is 00:59:21 Not good. Late night YouTubing. So this is one of these things like modularity and encapsulation and uh and doing testing and planning and design so many air quotes thinking all things that okay a lot of those were, but a lot of these things are things you have to decide you want as a feature of what you're doing upfront because they have costs. They have development costs, they have sometimes performance costs, sometimes feature costs, and you need to know if it's important. For a lot of people, portability is not important. Like, I know I am staying with this STM32F whatever for this product line. I have already acquired all of them. This is not
Starting point is 01:00:13 changing. But you look at Zephyr and they're like, this is portable. It has no point unless it's portable. Right, right, right. So I assume, William, you fall between those two? I didn't look at that. There isn't much more. I mean, how many different ways can developers argue about what is the right way to make a call portable or a code portable? Well, I mean, a lot, because like we said already, the definition is not, I wouldn't say it's not well-defined, but it encompasses
Starting point is 01:00:45 a lot of things. And it affects a lot of things. If you have classes and you're doing C++, your portability layers are somewhat different. Yeah. Yeah. So I think, I think if you write well-designed, well-structured code, it tends to be more portable as a consequence of good design. And so you can get 80% of the way there by just doing good design practices without saying, oh, I'm making this portable. I found that to be true.
Starting point is 01:01:18 It's like, oh, this is well-designed code. It's easy to, you know, if it's modular, not in the, people make fun of modularity these days, I don't know why. But if you take some steps toward modularity and keeping things separated, keeping areas of responsibility localized in code, those are easier things to move to different places. The whole thing about, you know, having your business logic separated from your user interface logic, things like that. And even for an embedded device, that matters, right? If those things aren't tightly, tightly coupled, you can disconnect one from another. And so maybe you're not, quote, porting the code, but if you can take the UI code
Starting point is 01:02:00 for example, and not have to change it a whole ton when you do move to a different microcontroller. And let's say you did have to write all the low levels. It's not really portable code, but it was code that you were set up for success to port. And I guess going back to the original question, is all code portable with enough effort? No, because all code is not portable, but all code can be ported. I would say that portable code is code that is already ready to be moved with minimal effort. I'm sort of changing the subject, but not entirely. Did I ever talk to you about semantic webs? I think that rings a bell, but go ahead. So, and maybe I don't even
Starting point is 01:02:47 have the right word for it. Maybe it isn't webs. Maybe it's semantic something, semantic meaning, semantic words. Semantic satiation, where I say the word toast until it sounds funny. No, semantic mapping. Okay. Okay. So there's this idea that in languages, the translation programs we have all of these words that have relationships. If you talk about a ruler and a woman, then you may have a queen or an empress, right? And those words will occur in other languages, in those same relations, and they will be next to each other. Okay. languages, in those same relations, and they will be next to each other. And so there's all this idea of, there's a whole map of words and how they sit close to each other and far from each other. You don't get the word queen and cyanobacteria together very often.
Starting point is 01:04:00 You don't. It was hard to find those two. No, that happens in bee colonies. No, that happens. Okay. And so linguists or people who research this sort of thing identify these keywords and create these maps of how languages map to each other. And so when you're translating, you're translating from the maps to each other. On the edge of my seat to see where the hell this is going.
Starting point is 01:04:33 Porting. Here we are. Is like making a semantic map. The first time you learn a language, you're a baby and you only really get one or two shots at learning a good language and getting a semantic map of how the world works. When you learn a second language, it's really hard because you have to figure out how to map all of their stuff onto your languages
Starting point is 01:04:55 and those maps may not match. I mean, there are words in some languages that don't match in others. When you start learning more and more languages, you start working more with the map and less with the language. And you know all of the languages have a word for mother. All of the languages have a word for... Cyanobacteria. Ruler, woman, highly powered.
Starting point is 01:05:20 And so porting is like that, where you start out and you have to port from one, let's say one microprocessor to another with a different underlying CMSIS HAL layer, but you're still on a Cortex-M. And now you have to port from the Cortex-M family over to an ESP. Each time you're going to find more things that don't agree and more things that belong in a layer together. All of the timers go here. And even though the timers don't work the same, they don't have the same interrupts, they don't behave all alike, they all need to have these five things that go with them. And so I don't really know where I was going, but this whole semantic mapping and translation thing has been totally fascinating. I find that true of operating systems.
Starting point is 01:06:12 Oftentimes people will ask, oh, which operating system should I use? Or how do you learn a new RTOS, the topic of RTOSes? And I have never cared because they all have the same stuff. They have a scheduler. They have a same stuff. They have a scheduler. They have a messaging system. They have synchronization primitives. And mostly they're all kind of similar. And they have better features and worse features.
Starting point is 01:06:33 And some have more features and less features. But they all have the same kind of primitives. And there's a few that are off the wall and do different stuff. And some are cheaper than others and some are better supported than others. But I don't feel like I'm learning a new operating system when somebody says, oh, we're using Cheetos. And, you know, okay, Cheetos looks like Fritos or whatever, right? The new snack-based RTOS systems. No, I think you're right.
Starting point is 01:07:01 I think the semantic map is a good thing. I think that happens in a lot of areas where you stop learning, you stop caring about the specifics of the thing you're using or the new thing you're using, and you start analogizing it to a class of things. And you just need to find how it does the particular class of thing in its specific way. And to wrap up the portable code thing, I think it is important to distinguish between code that can be ported and portable code. I think almost all code can be ported.
Starting point is 01:07:37 But portable code says to me, this is ready to be ported in a not too difficult way. Right. This already has a layer. This is designed to be ported in a not too difficult way. Right. This already has a layer. This is designed to be ported. To be ported. Okay. Well, I think we're about out of time. I feel out of time. Okay.
Starting point is 01:07:55 Well, and this might be my favorite chapter I'm going to need to post, so we have to give it plenty of time. Oh, right. Thank you. Thank you for listening to this show, which I believe is called Embedded. And thank you to our Patreon supporters for supporting us. And for their questions. We may have a new support thing up on the website.
Starting point is 01:08:20 I already announced we were doing the coffee thing. Today? No, like months ago. Well, we're actually doing it, as soon as I remember, for people who don't like Patreon. And I understand why you might not. Not that we need your support, but we appreciate it. We do appreciate it. And that will still get you into Slack.
Starting point is 01:08:38 We'll figure out how to do that. Okay, so thank you to our listeners for listening. Thank you to Alicia for hosting. Thank you to me for something. Co-hosting and producing and editing and all the things. What else goes in this? Oh, if you want to contact us, you can hit us up at show at embedded.fm, or there's a contact form on the website, which is embedded.fm.
Starting point is 01:09:05 We have a newsletter every week. I personally write the newsletter. It's not very long. We usually try to have something about the show and then some extra little things that ourselves and maybe our helpers find throughout the web that might interest you. Thanks, Renee. Yes, thanks, Renee. And on the off weeks when we don't have a show, I try to find some interesting little topic,
Starting point is 01:09:35 sometimes a blog post from the website or something else, and expand upon that. And this week it was embedded. Or this week it was Kalman Filters. Kalman Filters. Catman Filters. Which you titled? They signed up for the newsletter. I don't know if you get past newsletters if you sign up.
Starting point is 01:09:50 I think you can find them if you work at it. Anyway, you can sign up for that on the website, which that website, again, is embedded.fm. Okay. Chapter six. Oh, this is Winnie the Pooh by A.A. Milne. And if this is the first time you are joining us, I am surprised you made it this far, but welcome. Chapter 6, in which Eeyore has a birthday and gets two presents.
Starting point is 01:10:17 Eeyore, the old grey donkey, stood by the side of the stream and looked at himself in the water. Pathetic, he said. That's what it is. Pathetic. He turned and walked slowly down the stream for 20 yards, splashed across it, walked slowly back on the other side. Then he looked at himself in the water again. As I thought, he said. No better from this side. But nobody minds. Nobody cares. Pathetic. That's what it is. There was a crackling noise in the bracken behind him, and out came Pooh. Good morning, Eeyore, said Pooh. Good morning, Pooh Bear, said Eeyore gloomily. If it is a good morning, he said, which I doubt, said he. Why, what's the matter? Nothing, Pooh Bear, nothing.
Starting point is 01:11:19 We can't all, and some of us don't, and that's all there is to it. Can't all what, said Pooh, rubbing his nose. Gaiety, song and dance, here we go, round the mulberry bush. Oh, said Pooh. He thought for a long time and then asked, What mulberry bush is that? Bon Hami, went on Eeyore gloomily. French word meaning bonhomie.
Starting point is 01:11:53 He explained, I'm not complaining, but there it is.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.