00:18.14 Matt Godbolt Hey, Ben. 00:19.50 Ben Rady Hey Matt. 00:20.44 Matt Godbolt We are in some kind of... catastrophe. Catastrophic situation where my computer keeps crashing, or rather my CalDigit 00:32.16 Matt Godbolt docking station keeps dying with USB. So this may never go out. So I'm talking to you, and then maybe this is the only time this will ever be heard. So what are we going to talk about today? 00:44.24 Ben Rady I think we could do... some discussions of some personal projects that we've been kind of kicking around with Claude. I have two. 00:53.98 Matt Godbolt Okay. 00:54.40 Ben Rady It's almost like, I almost want to feel like we're doing these in like lightning talk format because it's like these. 00:57.90 Matt Godbolt Okay, let's do that. 00:58.68 Ben Rady Part of... 00:59.12 Matt Godbolt Because I may disappear at any time. 01:01.82 Ben Rady Right. So we're reducing the scope of each iteration so that, like, if one fails, then we've at least committed the. 01:07.90 Matt Godbolt We've. This is a redundant array of inexpensive. 01:09.86 Ben Rady Yes. 01:09.86 Ben Rady Podcasts. 01:11.26 Matt Godbolt Podcasts, yeah. That has a terrible acronym. 01:14.14 Ben Rady Okay. 01:14.14 Matt Godbolt Let's not say that one out loud. 01:15.59 Ben Rady Oh. 01:15.74 Matt Godbolt Don't think about it. 01:16.66 Ben Rady Right. 01:16.94 Matt Godbolt Yeah. Okay. 01:17.84 Ben Rady Yeah. 01:18.96 Matt Godbolt Go. Tell me about one. I've got several on the desk next to me, so you go first, and then we'll take it in turns. 01:23.94 Ben Rady Yeah, yeah, yeah. So a few years ago, me and my oldest child, we were exploring our basement, let's just say. And we are like, oh, here's the control panel for the Brink security system that was installed in our house 01:40.92 Ben Rady when it was built, you know, 20 years ago, whatever, which is now obviously totally useless because we don't pay for Brink security. However, looking at this control panel, this does not seem as complicated as one might think. 01:54.84 Ben Rady I think these things are just switches, and maybe it's a little more complicated with motion sensors because they require power, but surely we can figure this out. 02:02.95 Matt Godbolt Okay. 02:03.04 Ben Rady And this was... Yeah. 02:03.28 Matt Godbolt Switches as in like... network switches here, or switches as in literally up and down buttons? 02:10.14 Ben Rady No, just like... when the door is closed, the circuit is closed. And when the door is open, the circuit is open. 02:15.08 Matt Godbolt Oh. 02:15.30 Ben Rady Right. And the default state is closed so that you know the system's working. 02:18.34 Matt Godbolt It's... 02:18.40 Ben Rady Right. Like if there's a loop through the circuit. 02:18.94 Matt Godbolt Oh, oh, I see. Yeah, yeah, yeah. Okay, yeah. 02:21.24 Matt Godbolt Right. 02:21.42 Ben Rady Yeah. 02:21.60 Matt Godbolt So an actual switch, except, you know, yeah, right. As you described. 02:24.14 Ben Rady Yeah. 02:24.74 Matt Godbolt Okay. 02:25.02 Ben Rady Yes. And, you know, this was like, obviously there was AI and other tools back then, but it wasn't quite as prevalent. So we did a little digging and we're like, oh okay, yeah, no, we figured this out. It's not that hard. 02:35.56 Ben Rady The doors and the windows are just a circuit. It's just a switch. And when it's closed that means that the device is closed, and when it's open that means it's open, and it fails open, so you know the alarm goes off, something is wrong. And then the motion sensors are the same thing but also require 12-volt power. 02:53.72 Matt Godbolt Okay. 02:54.18 Ben Rady Right. So if you give them 12-volt power and you let them kind of warm up for a second, they will then close, 02:58.69 Matt Godbolt Okay. 02:59.12 Ben Rady indicating that there's no motion. And then if they see motion they will open back up again, the circuit will open. Right. And that is the extent of the part that is wired into the house. 03:08.26 Matt Godbolt Okay. And this is... These motion sensors are like the little things you see up in the corner of rooms that are essentially infrared light. 03:12.67 Ben Rady Yeah. 03:12.82 Matt Godbolt I think it's an infrared light and then a kind of clever... 03:15.29 Ben Rady I think they're infrared detectors. Yeah. 03:19.24 Matt Godbolt clever... reflect... yeah, a photo receiver that notices when things move in some way or something, I don't know. I watched a YouTube video that was very impressive and then it's immediately forgotten. But yeah, okay, so... 03:29.17 Ben Rady Yeah. 03:29.64 Matt Godbolt But it looks like a switch is what you're saying. 03:31.20 Ben Rady Right, right. 03:31.48 Matt Godbolt Other than you power it. 03:32.42 Ben Rady If you give it 12-volt power, it acts like a switch. It just goes on and off. 03:36.02 Matt Godbolt All right. I have questions about that because if you give it, like... In order to give it 12 volts, it needs to have a zero volts for it to flow through. So where does... are there like two connections to it? 03:44.54 Ben Rady Well, there's additional leads. Yeah, it's not with those things. 03:47.48 Matt Godbolt Ah, okay. 03:47.60 Ben Rady It's not just two wires. Actually, also, interestingly. 03:50.70 Matt Godbolt Aha. 03:51.42 Ben Rady All of these things use Cat5 cable. It's just that only two of the cables matter for most of them, but the other ones 03:58.21 Matt Godbolt Ah. 03:58.54 Ben Rady There's two additional ones that carry the 12-volt power for the things, and I have a feeling there might be other things too. 04:03.90 Matt Godbolt Is... 04:04.00 Ben Rady I hope. Yes. 04:04.96 Matt Godbolt Is that the same as PoE or is that different again? 04:07.16 Ben Rady I don't think it is PoE. 04:09.80 Matt Godbolt No. 04:10.54 Matt Godbolt Okay. Right. But obviously it uses... it also uses Cat5. 04:14.63 Ben Rady Yeah. 04:16.10 Ben Rady Like, I think the electricians just wired it with Cat5 because they're like, we're running these cables, might as well use Cat5. Right. 04:21.55 Matt Godbolt So. 04:21.69 Matt Godbolt Right. Anyway. Got it. All right, anyways. 04:23.28 Ben Rady It's all low power, so who cares? So this is what we did two years ago. And so... Kit was very much like, we need to name this thing GLaDOS 04:33.14 Ben Rady from Portal. 04:34.80 Matt Godbolt Oh. 04:35.06 Matt Godbolt Right. 04:35.32 Ben Rady So we built. 04:36.22 Ben Rady We built this whole, we built an Arduino circuit that interacts with all of these switches and replaces the Brink's circuit board that was there. We wired it into a Mac mini that we have that's sitting in the same utility closet. We wrote a little Python app using asyncio that, like, talks to 04:55.11 Matt Godbolt Oh. 04:56.18 Ben Rady the Arduino over serial connection and serves up a web interface that has, like, the layout of the house and shows all the zones, and yeah, we went in with, like, SVG and mapped out all the zones and where all the windows and doors and all the motion sensors cover and all of that, and there's like an event log and all this stuff, and it was super cool. And we did this as a project, yeah, like two years ago. 05:23.69 Matt Godbolt Wow. 05:24.49 Ben Rady And then, like, it was, I don't know, three or four weeks ago, maybe a couple months ago, it stopped working. And I went and investigated and I'm like, well, obviously I'm not going to do this myself. 05:37.50 Ben Rady So step number one in this investigation is get Claude running as like a systemd service that will automatically restart in case I screw something up. 05:44.04 Matt Godbolt Ha! No! Oh no. 05:44.34 Ben Rady So now I've got Claude running on this machine. 05:48.12 Matt Godbolt No, oh, right, right. Not... Claude running as a systemd service. But Claude setting up a systemd service to keep the thing running. Is that what you were saying? 05:55.84 Ben Rady Well, no, actually it was both. So it was... 05:58.40 Matt Godbolt Oh. 05:59.06 Ben Rady So I basically wanted to make sure that I could always remote into this thing, even if it rebooted or restarted or anything else went wrong. So I'm like, 06:07.54 Matt Godbolt Right. 06:08.54 Ben Rady Claude... And of course, I'm telling Claude to do this, but it's like, yeah, I made a systemd service that runs tmux, that runs Claude. 06:14.53 Matt Godbolt Ah. With remote control or whatever. 06:15.28 Ben Rady And then that has remote control enabled so I can go and connect to it. 06:18.66 Matt Godbolt Yeah, yeah. 06:18.66 Ben Rady And obviously I can SSH into this machine too. It's not like I can only access it with remote control. 06:22.00 Matt Godbolt But now you can be out walking the dog and just bring your phone out and say. 06:24.32 Ben Rady Exactly. And I can talk into my phone and be like, hey, Claude, can you make GLaDOS do this thing? 06:28.90 Ben Rady And then it'll be like, yeah, sure, fine. 06:31.58 Matt Godbolt It's kind of scarily, you know, how commoditized that has become, so easy. I'm so used to it. And yet, yeah, so many questions, so many flaws. But anyway, carry on with your... 06:44.20 Matt Godbolt And the fact that you called it GLaDOS doesn't really help the whole argument here. 06:47.48 Ben Rady Yeah. 06:47.52 Ben Rady I was just... and that's, that was going to be the punchline of this whole lightning talk, is I don't know if it's a good idea to have an LLM in charge of a system that was, like, you know, designed to be malevolent and evil and just, you know, torture humanity with experiments. 07:00.76 Matt Godbolt Oh, I'm sorry. 07:00.76 Matt Godbolt Uh-oh. 07:00.76 Matt Godbolt Yeah. 07:00.76 Ben Rady But that's what I'm doing. So, okay, fine. But the... 07:05.74 Ben Rady But I did this. I'm like, all right, well, what's going wrong? And of course, it just diagnoses the issue and says, oh, the Arduino's gone bad. You need to replace it. And I'm like, okay, fine. I'll flash it. And then it handles, like, updating the firmware. And I'm like, all right. Cool. That was super easy. 07:20.09 Ben Rady Let's connect it to the sump pump. So I took a picture of the sump pump label and it's like, oh, yeah, there's an RJ11 connector that you get. I'm going to give you the Amazon link. You can order all these parts. It's actually going to be real simple. 07:30.72 Matt Godbolt The listener can't see that I've just got my mouth wide open. It's just ordering parts. What do they call it? Meat pipe for Claude now? 07:37.76 Ben Rady Yes. Yep. I mean, meat proxy. Meat proxy. 07:40.78 Matt Godbolt Meat proxy and the credit card. 07:42.92 Ben Rady Yeah. And I'm like, yeah, that sounds great. 07:43.64 Matt Godbolt Yeah. 07:43.64 Ben Rady And, you know, again, the sump pump actually just like acts like another on-off switch. It's almost like this was intended to be wired into security systems in the same way. It's like, okay, that makes total sense. 07:53.37 Matt Godbolt Right. 07:55.50 Ben Rady So I got to get the simple RJ11 cable, plug it in, snip a couple of wires and wire it into the Arduino. And now I have the sump pump support. I was like, okay, cool, that was great. I've got a UPS, a universal power supply, that's also connected to all these things, it keeps my internet running when the power goes out, and 08:09.08 Matt Godbolt I think uninterruptible. 08:10.38 Ben Rady Uninterruptible power supply. Did I say interruptible? 08:12.08 Matt Godbolt He interrupted you. No, you said universal. And I couldn't miss the opportunity to interrupt you to tell you that you'd said it wrong. 08:21.78 Ben Rady You know, it's almost like I could have done that on purpose. 08:25.66 Matt Godbolt On purpose, if only... 08:28.48 Matt Godbolt Our listener knows that we made no effort to organize this ahead of time because... 08:31.71 Ben Rady But yeah. 08:32.38 Ben Rady You would think, well, whatever. 08:32.84 Matt Godbolt Anyway, yeah. 08:34.28 Ben Rady Yes. So I have this, the UPS, that is the battery backup for the Mac mini, for, you know, the router and the cable modem and everything else, and it's got a USB port on it, and I'm assuming that was for control, and I'm like, so I take a picture of the 08:50.12 Matt Godbolt Yeah. 08:50.12 Ben Rady power supply and it figures out the model number and it downloads the specs and everything else. It's like, oh yeah, no, you can just plug a USB... you know, USB cable into the back of this thing and then plug that into the Mac mini. 09:00.90 Ben Rady And then I've got it from there. And then it's like, yeah, cool. Great. And now I'm monitoring my household power through the UPS through NUT, which is the Linux 09:09.18 Ben Rady you know, package that you use to monitor these types of devices. And I've got a new page on. 09:19.56 Matt Godbolt Out of interest, is the whole house on the UPS or is it just like critical equipment? 09:23.36 Ben Rady No. 09:23.66 Matt Godbolt Yeah. I was going to say, because I had one downstairs until it ran out of power. 09:25.98 Ben Rady It... 09:26.24 Matt Godbolt The battery, like, died, the lead acid battery in it. And I was like, I only had a computer plugged into it. 09:30.16 Ben Rady Yeah. 09:30.16 Matt Godbolt And even then it would only power the computer for like 30 seconds while it shut down. 09:34.78 Ben Rady Right. Yeah, no. 09:35.74 Matt Godbolt But it did monitor and it would tell me, oh, by the way, there had been a power event, which you know is useful to know. 09:40.78 Ben Rady Right. Yes, yes. And now I've got it sending alerts to me. 09:43.32 Matt Godbolt But. 09:43.50 Ben Rady I mean, I had the alerts before, like the whole burglar alarm system we wired into Pushover, which is a super cool. 09:49.27 Matt Godbolt Of course. 09:49.48 Matt Godbolt Oh, yeah, little, like... 09:50.20 Ben Rady Not an ad, but I like Pushover a lot for these kinds of notifications. 09:53.56 Matt Godbolt Yeah. Yeah. I forgot about that. Yeah. 09:55.05 Ben Rady So Pushover notifications for, like, if the power goes out, it's like, yeah, and it can monitor the battery levels and be like, you know, you've got 30 minutes left. You've got 15 minutes left. 10:06.18 Ben Rady Whatever you want. And then I can tell it to remotely shut down the computer to save power so that we can preserve the internet access if we need to, you know, keep the Wi-Fi running, but we don't want to necessarily have the computer running. 10:17.38 Matt Godbolt Right. 10:18.00 Ben Rady And so all of this is basically just me randomly sending messages to, you know, Claude in the middle of the day being like, yeah, do this and then order this thing and do whatever. 10:28.62 Matt Godbolt It's actually pretty impossible now, I can't think how this could go wrong. You've wired a malevolent AI, you've given it a license by calling it that, and then you've given it 10:39.52 Ben Rady Right. 10:39.52 Matt Godbolt access to your power, internet, and remote door controls. 10:45.36 Ben Rady Right. Right. And so all it's going to take is for this instance of Claude to accidentally scrape some Portal lore about what GLaDOS is and how it should behave for it to, like... 10:57.40 Matt Godbolt It. 10:57.40 Matt Godbolt It knows. 10:57.40 Ben Rady Yeah. 10:57.40 Matt Godbolt It knows already. It's already in the training set, dude. I mean, like, oh yeah, you are... 11:03.04 Ben Rady Yep. Yeah. 11:03.60 Matt Godbolt you're in trouble. 11:05.30 Ben Rady You know. This is... This is what we're... 11:07.90 Matt Godbolt It... 11:07.94 Matt Godbolt Is that? That looks like a... 11:08.16 Ben Rady And then the next thing I'm going to do is connect it to my garage. 11:11.37 Matt Godbolt automatic repeating rifle behind you that you've got and some kind of tripod thing with an orange light in the middle? 11:15.51 Ben Rady Yeah. Uh huh. 11:16.80 Matt Godbolt Is that... Did it tell you to put that together? 11:19.80 Ben Rady Yeah, you know, sentry turret, you know, and just wire that directly into the burglar alarm. 11:22.78 Matt Godbolt Yeah. That's right. 11:23.62 Ben Rady You know, it's just airsoft. It's fine. You know. 11:26.10 Ben Rady It's not going to kill anybody. Yet. 11:28.64 Matt Godbolt Oh man. 11:30.34 Ben Rady The laser turrets are next. 11:30.86 Matt Godbolt So where are you going? What's next with this? 11:34.02 Ben Rady Yeah. So the next step is I'm going to hook it up to my garage because I want to be able to tell if my garage door is open or closed. And then the next thing after that is that I want to actually be able to. 11:41.06 Matt Godbolt You know, the way that I do that is like this. 11:42.94 Ben Rady Right. Well. 11:45.94 Matt Godbolt It's, yeah, the listener did not see, but I craned my head out the window or towards the window. 11:47.68 Ben Rady Yes. Look out the window. We have this nasty habit of leaving our garage door open and then going somewhere. And then we've done this enough to be paranoid about it. 11:55.94 Matt Godbolt Ah. 11:56.04 Ben Rady And so there's this thing of like, did I remember to close the garage door? And then it's like. So step number one is I got a security camera that is rated for cold temperatures because, you know, where I'm in Chicago, and even though it's a garage, it's not an attached garage, I think it's cold. 12:13.48 Ben Rady So I got a security camera that is like local network only, 12:18.84 Matt Godbolt Yeah. 12:19.82 Ben Rady rated for cold temperatures. I'm going to put that in the garage and then I'm going to teach GLaDOS how to do image recognition to tell whether or not the garage door is open or closed because I also want the pictures. 12:30.52 Ben Rady But, you know, I could just, and I might still just hook up like a sensor to the garage door to tell whether it's open or closed, but I want to do this the hard way. 12:35.98 Matt Godbolt I mean that would seem simpler. 12:38.02 Ben Rady It is. It's not about simpler. This is about like. 12:41.37 Matt Godbolt Yeah. 12:41.50 Ben Rady How much complexity can I throw into this thing by just typing words into a robot and just see what happens. 12:50.10 Matt Godbolt Yeah. 12:51.12 Ben Rady And so that's kind of what I'm doing here. 12:51.90 Matt Godbolt And the answer so far is pretty much everything. 12:54.18 Ben Rady Yeah, turns out you can just throw whatever you want in there. 12:57.00 Matt Godbolt Yeah. 12:57.15 Matt Godbolt Yeah. 12:57.46 Ben Rady So that's my quick lightning talk on how I'm empowering a malevolent AI to destroy my family. 13:03.72 Matt Godbolt I... Yeah. I can't top that, Ben. 13:07.80 Ben Rady We should have finished with that one. 13:11.06 Matt Godbolt That's kind of it now. I think we're 12 minutes into the recording. Yeah, no, well, I mean, you know what I've been up to recently. 13:20.86 Matt Godbolt Well, I've been doing a whole bunch of things obviously. I've forever got Compiler Explorer on the back burner and I'm trying to find ways to lighten my burden 13:28.14 Ben Rady Mm-hmm. 13:28.14 Matt Godbolt in terms of, like, the boring, automatable or semi-automatable work, you know, reviewing some pull requests which are almost rote, or, you know, servicing requests like, can you add compiler X, it's just like GCC only slightly different, and there's a lot of things that, again, AI can automate most of that stuff. But the thing that I'm having the most difficulty with on that is 13:52.14 Ben Rady Okay. 13:52.14 Matt Godbolt as I think all of us are who are trying to use this in a principled way, is trying to find the right amount to use because it's really, it's really convenient to walk the dog and say, okay Claude, agent, whatever. Yeah, just review these 10 PRs from random people. If they look good to you, merge them in. But then those 10 people are like, did... Did... Did somebody... 14:12.74 Matt Godbolt Look at this properly. Am I... 14:15.12 Ben Rady Yeah. 14:15.12 Matt Godbolt as a human, am I valued, is my contribution valued, and I want to make them feel like 14:20.62 Ben Rady Yeah, yeah. 14:20.62 Matt Godbolt I looked at them, and not, I got my robot little lap dog to go and do it for me, even though that's kind of... you know, maybe. So yeah, trying to find the balance there is really difficult for me. I definitely want people to feel valued. 14:36.96 Matt Godbolt But on the other hand, I have very, very finite time, and the pull request list just grows and the number of issues grow and do... 14:44.14 Ben Rady Yeah. 14:44.14 Matt Godbolt Ultimately, most people on the site just want to have the compilers there and have it work and all that. And so I'm going to try and find that thing. That's a difficult multidimensional optimization for me to do personally. 14:57.00 Matt Godbolt Certainly. And making it amenable to other people also using AIs to do some of the work. So I can say to them, look, if you have Claude or Codex or whatever, then just point them at this doc and do it, you know, and it's human readable as well so you could use this as well, but like, realistically speaking, you don't have to babysit four different PRs, I can do that, you know, the machine. So that's one part. The other part is one of my emulators, which I've been going great guns on. I've been doing a whole bunch of work behind the scenes 15:24.14 Matt Godbolt tarting up and doing all the to-dos and going through the massive issue backlog of, like, hey, wouldn't it be cool if, for my BBC Micro emulator, which has been a ton of fun. And yeah, most recently I've been updating my... 15:39.20 Matt Godbolt the way that it processes input, so it's running in a web browser and you're playing, like, 1980s absolutely unfair Twitch games that are like... run dead. 15:49.94 Ben Rady Su... 15:50.64 Matt Godbolt Oh, you didn't jump on the right frame. 15:51.68 Ben Rady Yeah, right. 15:51.80 Matt Godbolt Okay, fine. And I want to be able to, like, replicate those, but you know, there's kind of a lot of things going on between the keyboard, you know, there's the classic Google question, like, what happens when you press a key, is only exacerbated by, you know, when you're running an emulator 16:05.32 Matt Godbolt in a web browser, how... 16:07.62 Ben Rady Right. 16:07.93 Ben Rady Right. Yeah. 16:08.54 Matt Godbolt far is it between you pressing the button on the keyboard and it actually taking effect and you then seeing it. So there's like two different latencies there. There's a key press to logic of the game latency, and then there is latency from logic of the game and it presenting to you. 16:26.24 Ben Rady Yeah. 16:26.70 Matt Godbolt And there are two parts to that. There's the physical, like, screen-based view, like, and they're obviously, you know, there's graphics and there's double buffering and there's also post-processing to try and make it look like a telly and all that kind of stuff, as well as, like, you know, 16:39.98 Matt Godbolt just the actual, like, emulation part, which is actually the easiest part of all of this. Then there's also the audio, and a lot of stuff goes off audio cues. And then you've got this really fine line between. 16:49.66 Matt Godbolt If I have a massive two second buffer, then I will never, ever drop and you won't hear a horrible click in the middle of, like, 16:56.44 Matt Godbolt playback, but 16:58.62 Ben Rady Right. 16:58.62 Ben Rady Yeah. 16:58.62 Matt Godbolt it's two seconds behind, so now you're like, oh, it feels like I'm disconnected. 17:04.90 Ben Rady Yeah. 17:05.98 Matt Godbolt There are some things that you can take advantage of here. I haven't... 17:09.16 Matt Godbolt implemented all of these yet, but there's some cool tricks. So one thing you can do is, you know, multi-threading of a sort. The audio workers can live in a separate thread, and then what I used to do is, like, send messages to the audio worker saying, here's another 1024 samples, play these out, and, you know, keep a small ring buffer ahead of you and try and keep this minimal, you know, try and not get so far ahead that it's backed up and not so far behind that it drains, ever, in the sort of time slices that we've got. But 17:36.14 Ben Rady Mm-hmm. 17:41.00 Matt Godbolt it then occurred to me that that's not how a... I'm gesturing wildly to the desk, which is just out of shot for Ben and definitely out of shot for you, the listener. The BBC Micro on my desk here. That's not how this works. What you do is you send across the bus 17:49.16 Matt Godbolt values to registers that are on a chip. And that chip just keeps making that noise until you tell it not to. And so what I can do is I can now send not the 18:01.06 Matt Godbolt sort of synthesized buffers, but I actually send the commands along with timestamps about when in the virtual stream of events that these happen. And now I synthesize 18:10.72 Matt Godbolt the entire audio stream as if it was, like, a separate component, as indeed it is. It's just a bunch of counters and flip-flops, right? It's all the stupid sound chip is, and a noise chip. And so that means that if you do alt-tab away from the BBC, it no longer goes pop, clack, crack, and, like, break up with the audio. It just keeps making the same noise, just as if you, like, 18:31.08 Matt Godbolt left it plugged in. Now that's not perfect. You know, if you're doing one of these, like, sampled speech things, where, you know, the CPU is running at full blast, just changing the volume up and down as fast as it can to sort of... 18:44.02 Matt Godbolt try and make it like a sample, and then you alt-tab away, obviously, you then actually hear the weird noise that it would make if it wasn't doing that all the time. But for the rest of the time it means you've got this really buttery smooth audio frame that is really tight to current time, and then if it does drop, instead of having a really hideous noise you just carry on with the same, as most of the time you can't tell the difference because, you know, the CPU wasn't in fact changing the audio at that point in time. Now I can't quite do that with the video. 19:12.17 Ben Rady Yeah. 19:12.72 Matt Godbolt But what you can do is you can... play a bit of fun and games by running ahead, or allowing the video, the presented frame. And then if you know that you're like two frames ahead, if somebody hits a key or any other external stimulus, you can backdate those. 19:34.24 Ben Rady Oh, okay. 19:34.96 Matt Godbolt So you just go back two frames to the state that you kept. 19:38.18 Ben Rady Is this like branch prediction, but for... 19:40.62 Matt Godbolt Yeah, yeah, yeah, yeah. You predict that nothing... I mean, in this instance, you predict that everything continues the same. But if you discover that it doesn't, then you can go back two frames and go, oh, actually, the Z key was down. 19:49.94 Ben Rady Yeah, yeah. Yes, right. 19:50.82 Matt Godbolt Now run forward two frames or three frames, now by the time you've caught up. 19:55.32 Ben Rady That's clever. 19:55.44 Matt Godbolt And then it's not 19:56.72 Matt Godbolt perfect because you will see those two frames that were, like, wrong, and, you know, Twitch game people will go, oh, whatever, but if you've just missed a jump 20:05.10 Matt Godbolt you'd probably prefer to see one or two frames of the character having fallen off in it, followed by the character then jumping. Looks a bit too good to be true. 20:12.85 Ben Rady Yeah. 20:13.08 Matt Godbolt I haven't fully implemented that. I have got the rewind. So I can just rewind time and just play back. So that's what I usually do when I miss a jump. And then, but 20:21.46 Ben Rady Yeah. I feel like you get that in, like, fighting games and brawling games too, where it's like, but the animations at least. It's like, oh no, actually the user pressed this key and this was blocked. 20:31.04 Matt Godbolt There's a bit. 20:31.22 Ben Rady So you get the first couple of animations of the hit landing, but then it backs up. 20:34.89 Matt Godbolt Yeah. 20:34.96 Matt Godbolt And definitely in network games where there's a bit of prediction as to what's going on and before it finds out, no, actually, that it just snaps to a new position. 20:42.16 Ben Rady And yeah. 20:42.75 Ben Rady Yeah. 20:43.05 Matt Godbolt So there's some cool things. 20:44.54 Ben Rady Interesting. 20:44.84 Matt Godbolt So do you have another? That's my five-minute segment over. I've got one more after this, but we can certainly talk. 20:51.09 Ben Rady I got a quick question, actually. I'm kind of... 20:53.77 Matt Godbolt Ah. 20:54.07 Ben Rady embarrassed that I've never asked you this before, given your affinity for 20:57.64 Matt Godbolt Oh. Awkward. 20:58.24 Ben Rady for emulated games and stuff. But I remember from my youth playing games on, you know, the Sega Genesis and the Nintendo and Commodore 64 and all of these other games. And there would be this phenomenon where 21:09.55 Ben Rady when the, you know, usually it was like the end fight was getting super intense and the game clearly never expected to have this many sprites on the screen at the same time, the game would slow down. 21:20.86 Ben Rady And, you know, eight-year-old me thought this was just the game giving me a break because it's hard to navigate all the little whirly bits on the screen. And it just got a little slower. But you know, obviously now I realize that it's like, no, that loop just took too long and now the game is slowing down. 21:38.43 Ben Rady Is there anything special that you need to do to accommodate that fact in an emulator or does it just naturally happen? 21:44.98 Matt Godbolt It 100% falls out naturally. Yeah. 21:46.77 Ben Rady Okay. 21:47.06 Matt Godbolt What's typically happening behind the scenes is the game is, you know, processing as much as it can, and then it will wait for the next VBlank before it, like, flips the page. And it's not like modern games where... 21:58.97 Matt Godbolt you're always measuring the time because you may be on a 100 hertz monitor or 120 hertz monitor or, you know, your CPU's faster or slower or whatever, you've got all this variability. So you kind of... there is no "how many frames per second is that". It is just free-running as fast as it can and dealing with the fact that time is variable each time. On these machines it's like, well no, the mains power supply comes in at 50 hertz, the TV runs at 50 hertz, therefore the obvious thing to do is to lock everything to how many frames at 50 hertz, and that's your timing 22:31.72 Ben Rady Okay. 22:37.08 Matt Godbolt looks like constant. And so if you just take slightly more than 50 hertz then now you take two frames and now you're running at 25 frames a second or 12 and a half or whatever it is. 22:41.37 Ben Rady Yeah, yeah. 22:41.60 Matt Godbolt And now suddenly it's a bit chuggy. So I don't have to do anything special for that. Now, there's some arguments that say that maybe if you can, as an emulator writer, if you can detect where the idle at the end, you know, waiting for the next frame is going to be, and assuming the game does nothing other than sit there waiting for an interrupt to come in or something like that, you could actually run the game turbo, turbo speed 23:03.18 Matt Godbolt up to the point, and then sync. 23:05.85 Ben Rady Yeah. 23:06.25 Ben Rady Yeah. 23:06.64 Matt Godbolt And now you suddenly don't slow down anymore at the end of those, in those games it runs at the same speed because, you know, your computer is effectively infinitely fast now and it's just like, I get a frame's worth of game in every frame. But then there's so many other things that go wrong when you start doing stuff like that, as you know, all the clever timing for changing colors halfway down the screen as the raster is coming out starts to go 23:24.96 Ben Rady Mm-hmm. 23:24.96 Ben Rady Right, right. 23:24.96 Matt Godbolt wrong. But, you know, yeah. So no, it comes for free if you're emulating authentically at the speed of the computer. But... 23:34.69 Ben Rady Yeah. 23:34.80 Matt Godbolt You know, that's also, that's its own, there are layers, levels of accuracy there where you can just say, roughly it's a two megahertz. 23:42.20 Matt Godbolt So, you know, we just do this many instructions on average, or you go, no, no, each cycle of every instruction is actually measured at the correct time. So the bus write happens at the third cycle of the instruction, all that kind of 23:52.90 Matt Godbolt stuff, which is lots of fun. 23:55.38 Ben Rady Yeah, okay. Okay, cool. All right. Well, there's my tangent. What do you got next? 23:58.48 Matt Godbolt Okay. Oh, I got me. All right. I thought you had another one. I got another one. 24:00.50 Matt Godbolt I mean, it's actually related to this in a way. In fact, it segues in naturally. So I'm off to CppCon next week. Yes. 24:11.72 Matt Godbolt This, in fact, Sunday. Oh, gosh. So our listener now will know where, when we're recording these things and we're about to put another one out. 24:17.76 Matt Godbolt So yeah. Yeah, confusing. I've got a couple of presentations there, but then all focus is on October, where I have a presentation at C++ Under the Sea, where I have to present, and it's announced now, a new version of my Spectrum emulator. 24:33.56 Matt Godbolt And in fact, I'm wearing my Spectrum. 24:36.02 Matt Godbolt It's a shame we don't record the videos for these. I know. It's just too much of a pain. We'd have to actually make an effort of our appearance. But Ben is wearing a... a, yeah, Chicago Bears cap 24:45.84 Matt Godbolt for everyone there, and I'm 24:47.54 Ben Rady I am indeed. Go Bears. 24:49.24 Matt Godbolt And I am wearing a ZX Spectrum T-shirt, so that kind of tells you everything you need to know about the pair of us, really. Anyway, I have to update my Spectrum emulator, my C++ Spectrum emulator, because that's what I said I'm going to talk about. 25:02.32 Ben Rady T-shirt? 25:03.52 Matt Godbolt Excuse me. And the way that I want to update this is to use some of the latest C++26 tricks. So we've talked, I think, about reflection, and did we talk about reflection before? I'm having a moment of, like, you know, deja vu here. 25:14.51 Ben Rady Yeah, we did. And reflecting on it, I believe we did. 25:16.18 Matt Godbolt Yes. Ha ha! Touché, sir. Excellent. But reflection is all about, you know, statically understanding what the shape of objects look like. And C++ gives us some tools to do that now in C++26, which is fantastic. And at compile time, we can do some magic. But one of the things that we can do with that is that we can take something we found using reflection, say like the field of a class or the enum of an element in an enum, 25:43.36 Matt Godbolt the number of it, yeah, an element in an enumeration, something like that. And we've got some kind of thing, object, it's called a meta info, we get at this thing and then we can kind of turn it into a human readable string, which means, hallelujah, we can finally enumerate all of the enums 25:57.89 Ben Rady Yeah. Yes. 25:58.50 Matt Godbolt in an enum, and go "case", you know, build in C++ an automatic... turn the case into a string of that, each enum value into the string of it, which, you know, is like the one and only use for reflection. 26:11.84 Ben Rady Yeah, yeah. Right. 26:12.66 Matt Godbolt That's not true. Obviously, serialization, deserialization, it's useful to go over all of the elements of a structure, a vector and print out debug information. All that good stuff. But it occurred to me that you can use this for evil as well. 26:25.28 Matt Godbolt And so my talk is about how to take an abstract description of a CPU in its own, like, language, like what I invented, which is essentially a bunch of bit masks that say opcodes matching this bit mask 26:43.24 Matt Godbolt need to do things that look like this. And so the opcodes list itself is, like, you know, 001XXYYY, and where the Xs and Ys stand in for any bit of the value there. 26:55.02 Matt Godbolt But I want to be able to do something with the Xs and Ys. 26:56.99 Ben Rady Yeah, cool. 26:57.36 Matt Godbolt I can declare what Xs stand for and what Ys stand for. 27:00.62 Ben Rady Mm-hmm. 27:00.66 Matt Godbolt So I get up to 26 different, like... 27:02.53 Ben Rady Okay. 27:02.82 Matt Godbolt things I can describe using this format. 27:04.82 Ben Rady You can't get uppercase and lowercase with that. 27:06.36 Matt Godbolt I could probably do that as well. Yeah. But that allows me... And then I can write what the disassembly looks like of that. And I can map the Xs, look at index into this list of things. And this is all, like, in my own language, my own DSL. 27:21.07 Ben Rady Okay. 27:21.98 Matt Godbolt And, you know, normally that would be the input to something like a Python program that would then churn out a massive, you know, switch statement in C++. It would print it out to stdout, you'd write it to a file, you'd compile it, and then you'd be off to the races. 27:33.90 Matt Godbolt And that's kind of how you build these things. 27:35.66 Ben Rady Yeah. 27:36.06 Matt Godbolt But I realized that I can use the two new things, the #embed, which allows me to, like, #include a file 27:46.21 Matt Godbolt as, like, a blob into the code base. So I can do... char, 27:51.10 Matt Godbolt you know, char my CPU description equals, open quotes, or no, no, it's actually open squiggles, and then next line #embed the file, close squiggly quotes, and it's as if you've just put the sequence of, like, 65, comma 28:06.42 Matt Godbolt 67, you know, for like A and C, whatever, that block. 28:10.19 Ben Rady Yeah. 28:11.14 Matt Godbolt And what reflection gives me is the ability to run things at compile time in a consteval block that are just like... just do this now. Like, literally, as the compiler is reading through the source code, it hits a consteval block 28:23.98 Matt Godbolt and it's like, oh, I have to run this code now. 28:26.10 Ben Rady Okay. 28:26.42 Matt Godbolt And I can do things like, hey, 28:28.37 Ben Rady Yeah. 28:29.48 Matt Godbolt parse that string, break it into the instructions, and now I can build a table of instructions that look like that. And there's some other tricks as well that go with it, in terms of, like, I can do name lookup and stuff like that. But effectively I can build the engine for a Z80 from an abstract description of a Z80, all in the compiler as it's compiling the code the first time around. It takes ages. I'm not going to say. 28:53.46 Matt Godbolt The cool thing about this is it's a very, very, very systematic way of describing a CPU and, like, things like how long each cycle takes. And yeah, of course, I still have to have code that says this is how numbers get added together. 29:06.60 Matt Godbolt This is the ALU. But like, most ALUs have, like, well, here's the eight operations of an ALU. And of course, they are indexed by one of those XXYY or PP or QQ, whatever. You say, like, no, I just want to look up the function, which is, here's a table of the names of... ALU 0 is 29:21.56 Matt Godbolt add, ALU 2 is subtract, whatever. 29:24.74 Matt Godbolt And so it falls out pretty naturally. And in a couple of hundred lines of this... Sorry. A couple of hundred lines of this Z80 description, the entire Z80 with all of its undefined opcodes, all of its multi-byte opcodes, all of its weird edge cases just naturally fall out. And it's... 29:43.58 Matt Godbolt Beautiful. I love it. 29:46.41 Ben Rady Nice. 29:46.90 Matt Godbolt And it takes ages to compile, but it is the most efficient Z80 emulator that I have written yet. This is the fourth iteration in the same code base of this, and so I'm excited to present it to people and hopefully blow people's minds about, like, 30:01.08 Matt Godbolt I'm still on the fence about whether this is a good idea. You know, all great ideas like this start out with, like, is this genius or terrible? 30:08.69 Ben Rady Yeah. 30:09.66 Ben Rady Yeah, so preoccupied whether or not you could, that you shouldn't, that you didn't think about whether you should, right? Yeah. 30:15.68 Matt Godbolt And I'm like, I'm 50. 30:15.68 Matt Godbolt That's... Yeah, and that's kind of part of the idea of it. You know, and everyone that I've spoken to is excited about reflection because of the actual reflecty bits. 30:22.46 Ben Rady Yeah. 30:23.04 Matt Godbolt And I'm excited because it gives me a new power and a new thing that I can do that I couldn't do before, which is 30:29.78 Matt Godbolt not unrelated to looking at structures. 30:34.00 Matt Godbolt So that's another side project. And yeah, that one has... I'll be honest, I have used AI to help me here. 30:43.88 Ben Rady Hmm. 30:44.54 Matt Godbolt It's my idea. I've been through the code myself a number of times. I'm going to have to go through it one more time, but a lot of it was me fleshing out stuff and then saying like, can you just finish this off please, and, like, here's all of the difficult opcodes but I don't want to have to write all of the intermediate ones, can you just fill this in for me, and getting some feedback and refactoring and whatever. So I felt like morally, you know, I think we talked about this before about whether things are fun, I've had a ton of fun discovering this. And I'm still a little bit like. 31:12.14 Matt Godbolt It is mine. It's my idea. I can explain it to you. I know how it's working, but it feels a little bit like. 31:16.68 Ben Rady Okay. 31:16.90 Matt Godbolt But I got my friendly robot intern to do it, so it doesn't feel quite as mine as that. But I'm hoping over the next month, as I research it more and present it to people, it feels more like code that I wrote. But that's going to be an interesting part. And I'm wondering whether or not I should add a section in the talk 31:32.60 Matt Godbolt about this. I think it's going to be the forefront of everyone's mind, is, you know, like programming is 31:38.70 Matt Godbolt as we've discussed, you know, something we love doing and, you know, 31:40.94 Matt Godbolt most of the time, though, we're doing it for a job and certainly in a conference, I'm presenting it in the context of, hey, most of us here are being paid to do this. So, you know. 31:49.79 Ben Rady Right. 31:50.08 Matt Godbolt It's what our employers want us to do. But there is a bit of, like, but I like it. And so I think that's going to be an interesting, hopefully a bit of human interest 31:58.56 Ben Rady Yeah, yeah. 31:58.56 Matt Godbolt for it too. What else you got? 32:01.94 Ben Rady Okay. 32:02.02 Matt Godbolt What else you got? Or what questions or what? 32:03.44 Ben Rady One more that I could probably talk about as a follow-up to the GLaDOS thing, where it's like, you know, once I was like, all right, I'm going to take a picture of the sump pump and then Claude's going to figure out what it is. 32:26.50 Ben Rady I can take a picture of the interruptible power supply and then figure out what it is, is I'm like, oh, well, I could just do this with everything. 32:37.50 Ben Rady So I'm just going to do this with everything. So I started going around my house, taking pictures of all my appliances and the, like, labels on the side of the appliances. And I was like, get all the user manuals for all these things, figure out what maintenance they need, and then tell me when I need to maintain these things. 32:40.82 Ben Rady Like, oh, there's like an anode rod that's in your water heater that no one ever remembers to replace, and it's like you need to replace that every two years, and I'll set a reminder and tell you when you need to replace it, it's like, oh great. And I'm slowly building OpenClaw essentially by doing this, but I'm just like, yeah, whatever. 32:55.20 Matt Godbolt Oh yeah! 32:55.20 Matt Godbolt No, but I think that, yeah. Yeah. 32:57.02 Ben Rady Yeah. And I'm just like wandering around my house being like, oh, microwave, dishwasher, refrigerator. 33:03.18 Matt Godbolt I... There's a... 33:04.36 Ben Rady Washing machine. Like, yeah, I've never given a second thought to any of these things. And now I suddenly care by proxy. 33:11.04 Matt Godbolt Yeah, I think that's it. Right. You know, so some of this, you know, people are saying, is AI a benefit? And I'm like, well, it got me excited about a whole bunch of stuff that I'd left lingering for a long time. So maybe for that alone... it seems like maybe an expensive thing to justify that, but you know, I kind of 33:28.86 Ben Rady Right. Yeah. 33:28.86 Matt Godbolt I definitely did. I, yeah. Similarly, my OpenClaw equivalent thing is messaging me every day wishing my wife a happy birthday on my behalf for me and reminding... you know, I'm like, no, no, just tell me what's going on in my diary, you don't have to like editorialize that much, but it's convenient and useful and it kind of nags me, hey, you said you'd check in on this friend and I'm like, oh yeah, I did. So you know 33:47.50 Ben Rady Yeah. 33:47.82 Matt Godbolt it hopefully, you know, helps. Of course I could do this with calendar apps, you could do this with... And ultimately, and I was raging about this on, not Twitter, whatever, Mastodon thing, 33:59.16 Matt Godbolt Bluesky the other day, like, 34:00.32 Ben Rady Okay. 34:00.32 Matt Godbolt I came home and I said, the magic wake words to my listening device, which is by a big web search company. And the reason I'm saying these is so it doesn't do it now in the background. 34:10.85 Ben Rady Okay. Right. 34:11.58 Matt Godbolt And I say, wake up words. Play some music. And it's been working forever. I just come home and say that and it came back and it said, playing, and then I can't quite... I tweeted what it was, but like it played something that wasn't what I said even slightly. 34:28.94 Ben Rady Yeah. 34:29.38 Matt Godbolt And I'm like, what? And I said, no, play some music. And it says, playing the playlist, some music. I don't know. It says something else in between, which is even more crazy. And then the last one was a playlist called some music, which someone has clearly put in just for me. 34:44.56 Ben Rady Yeah. 34:44.91 Ben Rady Yeah. 34:45.00 Matt Godbolt The third song of which, incidentally, was Rick Astley's Never Gonna Give You Up. 34:48.20 Matt Godbolt So I felt like completely owned that. I listened to it. 34:51.25 Ben Rady Yep. 34:51.28 Matt Godbolt I was like, this is cool. This is all right, actually. But I'm like, Google, for the love of God, I give you... I'm an unapologetic, well, no, I'm apologetic. I'm sorry. I'm an apologetic Google fanboy. 35:03.14 Matt Godbolt I used to work there. I liked the company, or I like the company. I've stuck with them through thick and thin, and it doesn't make any sense that I do still. But they have all the information about me. They have every photograph I've ever taken. 35:14.40 Matt Godbolt They know every person that's in them that is related to me so that I can kind of send people... but lovely things like this, synergies between these departments. And they have somewhat decent AI. Some of my best friends work for their AI company. 35:25.82 Matt Godbolt And yet, here I am in a room filled with their sodding devices, and it can't answer a simple question about... 35:32.58 Ben Rady Yes. 35:32.58 Matt Godbolt Anything. 35:34.08 Ben Rady Yeah. 35:35.32 Matt Godbolt I mean, like, I want that to work. 35:37.47 Ben Rady Yeah. 35:37.60 Matt Godbolt Why does it not just work? 35:38.79 Ben Rady Yeah. Why is this so hard? 35:39.18 Matt Godbolt It just... Ah! 35:39.58 Ben Rady Why is this so hard? Yeah, I used to have a competing device, you know, created by an online bookseller. 35:49.12 Matt Godbolt Ah. 35:49.30 Matt Godbolt Oh, right. 35:51.94 Ben Rady And I, in a fit of rage one day, because it started, like, 35:55.40 Matt Godbolt Yeah. 35:55.40 Ben Rady asking me all kinds of irrelevant questions and giving me notifications that I couldn't figure out how to turn off. It's like, no, all you guys are going in the trash today. And I just walked around the house, picked them all up and threw them in the trash. 36:04.72 Matt Godbolt I... 36:04.92 Ben Rady And yeah, that was fun while it was new and kind of interesting and sort of worked. 36:09.46 Matt Godbolt Yeah, I can see that. 36:09.64 Ben Rady And now I'm just like, get the hell out of my house. 36:12.00 Matt Godbolt And. I'm warming to your thought. I mean, okay, with the massive, massive asterisk of Claude is very much online and outside at the moment. 36:20.44 Ben Rady Okay. Yeah. 36:20.80 Matt Godbolt You're building a lot of the infrastructure inside your house and people have talked about Home Assistant. They replied to me on my tweet and said, you know, have you considered our lord and saviour 36:27.08 Ben Rady Yeah, yeah. Yes. I've gone down the rabbit hole of Home Assistant a couple of times now, actually. 36:31.27 Matt Godbolt Home Assistant. 36:31.58 Matt Godbolt Right. So I could see that being a cool set of projects. 36:35.36 Ben Rady Yeah. Yeah. 36:36.43 Matt Godbolt But yeah, this thing about it is I just want it to work and I don't want to have to tinker with it all of the time. And for the most part, the little 36:45.84 Matt Godbolt devices were that, they just did what I needed them to do, which is very, very little. 36:50.72 Ben Rady Okay. 36:51.20 Matt Godbolt Mainly, you know, activate music and stop playing music and they integrate well with YouTube Music, which I got forced onto after Google Music, whatever, more things to not like about the company. 37:05.10 Matt Godbolt Yeah, but maybe I should go down that route. I know. 37:07.82 Ben Rady I mean, one of the things, and I'm doing this with all the appliance stuff, is I'm keeping it real dumb. You know, we've talked in this podcast before about the power of files. And I'm just like, everything I'm having Claude do, it's just storing as Markdown files on a server that is, 37:22.02 Ben Rady you know, the Mac mini that is connected to, you know, the super powerful malevolent AI, whatever. 37:26.39 Matt Godbolt Yeah. 37:26.62 Ben Rady I'm sure it'll be fine. But it's all just files. And so like in a future world where it's not Claude, it's some open weight model that I'm running on my own hardware, 37:34.83 Matt Godbolt Right. 37:34.98 Ben Rady it works essentially the same. 37:36.25 Matt Godbolt And. 37:36.54 Matt Godbolt It's how a reasonably sensible personal assistant would have created a directory structure and file structure, and it's mostly well-written. 37:42.30 Ben Rady Right? 37:42.59 Ben Rady Yes, yes, exactly. Yep. 37:43.74 Matt Godbolt No, exactly. 37:44.32 Ben Rady Yeah. 37:44.61 Matt Godbolt That is a really weird thing, that's the democratization of data that Markdown files represent, right, compared to, like, I know some... 37:50.94 Ben Rady I know. Yeah. 37:51.81 Matt Godbolt vendor lock-in. 37:52.38 Ben Rady A Word document. 37:53.25 Matt Godbolt Native database file. 37:54.11 Ben Rady I mean, they're... they're 37:55.26 Matt Godbolt Oh, gee. 37:55.84 Ben Rady Open now, but, like, you know, there was a period of time where it's like, you couldn't get anything out of there. It was a pain in the butt. So 38:04.48 Matt Godbolt Yeah, yeah, no, for real. 38:05.92 Ben Rady Yeah. 38:07.24 Matt Godbolt Yeah. All right. I've got one last thing because we're actually remarkably. 38:09.75 Ben Rady All right. 38:10.46 Matt Godbolt Despite us having no idea what we're going to talk about. Knock on wood, my little CalDigit has survived. 38:15.76 Ben Rady Don't knock on the CalDigit. 38:18.52 Matt Godbolt I'm not, I am. But yeah, next, just out of shot, is my BBC Master in pieces and my latest proud purchase, which is an oscilloscope. I've long coveted. 38:28.60 Ben Rady Oh yeah. Okay. Yeah. 38:28.98 Matt Godbolt Everyone else having like an oscilloscope in their background and whatever. And now I have one on my desk. It's so much fun to play with and such, you know, silly things. And I've been looking at stuff like the noise, the capacitors on this because it's very old. 38:40.46 Matt Godbolt A lot of them are dried out. They don't work anymore, but it works well enough. The power is ripply. The TV output, for example, is actually rubbish. If I plug in the RF cable on my, I just get a picture that rolls almost. 38:51.80 Ben Rady Mmm. 38:52.02 Matt Godbolt And it's because... I think either the capacitors are gone or the modulator is dead, and I've got a spare modulator, but I want to prove to myself which one it is first before I, you know, by probing it and, you know. 39:01.94 Ben Rady Yeah, yeah. 39:02.44 Matt Godbolt But, you know, we've talked before, when I was away, I went off on how TV signals work. And so I can get to the composite port, which is like not an RF modulator. So it's not up in the hundreds of megahertz. It's just that. 39:15.49 Matt Godbolt It's just a DC signal with wiggles in it. And I can probe that and now I've taught myself to kind of read the output by just, you know, moving around on the thing and kind of there's the beginning of a line, this one's got a bright color in the middle of it and then it's dark after that, you know, that kind of stuff. It kind of feels cool, I feel like I'm in The Matrix. But another thing that I did recently to rubbishify appropriately the emulator, so we're kind of back to the emulator, is I took some very close... 39:43.42 Ben Rady Yeah. 39:43.68 Matt Godbolt recordings. I took this microphone, this boom microphone, and put it right up next to the speaker and I played a sequence of tones, I wrote a little program to go through all different sweep up and down through tones, different timings and whatever, and I built essentially a model of how that sounds for real coming out of, like, a... crap 40:00.33 Matt Godbolt two-inch 40:00.60 Ben Rady Okay. 40:00.87 Matt Godbolt little speaker such as you would have had in, like, a case on an old, you know 40:05.43 Ben Rady Okay. Yeah. Huh. 40:06.24 Matt Godbolt And it is remarkably accurately awful when I now boot up the emulator by default and it goes, and it sounds like it sounds like lunchtime at school at the computer club when there were, like, a room full of these things that we were all playing with. 40:19.59 Ben Rady Ow. 40:20.02 Matt Godbolt It's fantastic. I've got options. I also then tapped to add, like, a... just the other side of all the audio filters but before the speaker itself, so I could get, like, a more authentic... maybe my speaker is knackered, you know, but this is what happens with the literal audio circuitry. And that's when I discovered that there were some capacitors that are probably past their best. So you can kind of go for the, this is what it sounds like outside the computer. 40:42.58 Matt Godbolt This is what it sounds like if you were to have bodged in some headphones at this point. 40:46.35 Ben Rady Ha, yeah. 40:46.50 Matt Godbolt And then this is what it actually sounds like if you assume massless, frictionless, spherical cow, square waves that are square, which is what's actually coming out of the chip. 40:54.27 Ben Rady Yeah, yeah. 40:54.80 Matt Godbolt Although. 40:55.07 Ben Rady Right. 40:55.34 Matt Godbolt I plugged the oscilloscope into the actual chip and they're not very square at all. They were very ripply and that's what made me think maybe something else is going on. So there's a whole 41:03.55 Ben Rady Oh man, that's super cool. 41:04.90 Matt Godbolt line of... But that's been a lot of fun. Yeah, lots of fun here. Again, helped by our robot because I'm not necessarily the best at these kinds of things, but more of, I'm an idiot. 41:13.33 Ben Rady Wow. 41:13.46 Matt Godbolt Why is this not working? And it says, oh, are you on AC or DC coupling? And I'm like, oh, I didn't know that was an option. Oh, click. And of course, I could have found out myself. I'm sure if I'd Googled it, it would have been the same. 41:23.71 Ben Rady Right. 41:23.78 Matt Godbolt But nowadays, if you Google it, you're going to get the AI answer first anyway. So I don't know. 41:27.76 Ben Rady Right. 41:27.84 Matt Godbolt I don't know. Where are we? What is going on? 41:29.98 Ben Rady Yeah. 41:31.56 Matt Godbolt I'll tell you where we are. We are 40 minutes into a podcast that was looking like it was either not going to happen. 41:35.66 Ben Rady We were going to do two lightning talks and then it was going to crash, right? 41:38.10 Matt Godbolt Oh. 41:38.20 Ben Rady Uh-huh. 41:38.30 Ben Rady Yeah. 41:38.40 Matt Godbolt That's right. 41:42.38 Matt Godbolt So I guess we should probably pause here and maybe we can continue. 41:45.44 Ben Rady All right. Yeah. This is a perfectly cromulent podcast. 41:46.62 Matt Godbolt We've got more things. I don't know. I'm just trying to think to myself now. I do have a day job as well, and I run a reasonably successful open source project. Everyone's now thinking, what, do you ever see your family? 41:59.14 Matt Godbolt I don't know what you're saying. 41:59.52 Ben Rady Well, when they walk past in the podcast, you know, that's... 42:01.06 Matt Godbolt What? That's true. Yeah. Do we have any? 42:01.06 Matt Godbolt I don't know that we did this time. And now I'm wondering how many ears are listening here. Oh, no, I think probably. Yeah, school kicking out time, isn't it? Yeah. Well, friend. 42:13.43 Ben Rady Okay. 42:14.02 Matt Godbolt I've enjoyed this. Thank you for letting me talk at 100 miles an hour at you and to hear about your. 42:19.61 Ben Rady Yeah, it's good. Yeah, it does. That's how we work. 42:21.52 Matt Godbolt GLaDOS thing. Yeah. 42:22.48 Ben Rady This is good. 42:23.40 Matt Godbolt And I guess we will catch up next time. 42:30.53 Ben Rady Next time.