WEBVTT
1
00:00:18.140 --> 00:00:19.500
Hey, Ben.
2
00:00:19.500 --> 00:00:20.440
Hey Matt.
3
00:00:20.440 --> 00:00:32.160
We are in some kind of... catastrophe. Catastrophic situation where my computer keeps crashing, or rather my CalDigit
4
00:00:32.160 --> 00:00:44.240
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?
5
00:00:44.240 --> 00:00:53.980
I think we could do... some discussions of some personal projects that we've been kind of kicking around with Claude. I have two.
6
00:00:53.980 --> 00:00:54.400
Okay.
7
00:00:54.400 --> 00:00:57.900
It's almost like, I almost want to feel like we're doing these in like lightning talk format because it's like these.
8
00:00:57.900 --> 00:00:58.680
Okay, let's do that.
9
00:00:58.680 --> 00:00:59.120
Part of...
10
00:00:59.120 --> 00:01:01.820
Because I may disappear at any time.
11
00:01:01.820 --> 00:01:07.900
Right. So we're reducing the scope of each iteration so that, like, if one fails, then we've at least committed the.
12
00:01:07.900 --> 00:01:09.860
We've. This is a redundant array of inexpensive.
13
00:01:09.860 --> 00:01:09.860
Yes.
14
00:01:09.860 --> 00:01:11.260
Podcasts.
15
00:01:11.260 --> 00:01:14.140
Podcasts, yeah. That has a terrible acronym.
16
00:01:14.140 --> 00:01:14.140
Okay.
17
00:01:14.140 --> 00:01:15.590
Let's not say that one out loud.
18
00:01:15.590 --> 00:01:15.740
Oh.
19
00:01:15.740 --> 00:01:16.660
Don't think about it.
20
00:01:16.660 --> 00:01:16.940
Right.
21
00:01:16.940 --> 00:01:17.840
Yeah. Okay.
22
00:01:17.840 --> 00:01:18.960
Yeah.
23
00:01:18.960 --> 00:01:23.940
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.
24
00:01:23.940 --> 00:01:40.920
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
25
00:01:40.920 --> 00:01:54.840
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.
26
00:01:54.840 --> 00:02:02.950
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.
27
00:02:02.950 --> 00:02:03.040
Okay.
28
00:02:03.040 --> 00:02:03.280
And this was... Yeah.
29
00:02:03.280 --> 00:02:10.140
Switches as in like... network switches here, or switches as in literally up and down buttons?
30
00:02:10.140 --> 00:02:15.080
No, just like... when the door is closed, the circuit is closed. And when the door is open, the circuit is open.
31
00:02:15.080 --> 00:02:15.300
Oh.
32
00:02:15.300 --> 00:02:18.340
Right. And the default state is closed so that you know the system's working.
33
00:02:18.340 --> 00:02:18.400
It's...
34
00:02:18.400 --> 00:02:18.940
Right. Like if there's a loop through the circuit.
35
00:02:18.940 --> 00:02:21.240
Oh, oh, I see. Yeah, yeah, yeah. Okay, yeah.
36
00:02:21.240 --> 00:02:21.420
Right.
37
00:02:21.420 --> 00:02:21.600
Yeah.
38
00:02:21.600 --> 00:02:24.140
So an actual switch, except, you know, yeah, right. As you described.
39
00:02:24.140 --> 00:02:24.740
Yeah.
40
00:02:24.740 --> 00:02:25.020
Okay.
41
00:02:25.020 --> 00:02:35.560
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.
42
00:02:35.560 --> 00:02:53.720
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.
43
00:02:53.720 --> 00:02:54.180
Okay.
44
00:02:54.180 --> 00:02:58.690
Right. So if you give them 12-volt power and you let them kind of warm up for a second, they will then close,
45
00:02:58.690 --> 00:02:59.120
Okay.
46
00:02:59.120 --> 00:03:08.260
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.
47
00:03:08.260 --> 00:03:12.670
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.
48
00:03:12.670 --> 00:03:12.820
Yeah.
49
00:03:12.820 --> 00:03:15.290
I think it's an infrared light and then a kind of clever...
50
00:03:15.290 --> 00:03:19.240
I think they're infrared detectors. Yeah.
51
00:03:19.240 --> 00:03:29.170
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...
52
00:03:29.170 --> 00:03:29.640
Yeah.
53
00:03:29.640 --> 00:03:31.200
But it looks like a switch is what you're saying.
54
00:03:31.200 --> 00:03:31.480
Right, right.
55
00:03:31.480 --> 00:03:32.420
Other than you power it.
56
00:03:32.420 --> 00:03:36.020
If you give it 12-volt power, it acts like a switch. It just goes on and off.
57
00:03:36.020 --> 00:03:44.540
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?
58
00:03:44.540 --> 00:03:47.480
Well, there's additional leads. Yeah, it's not with those things.
59
00:03:47.480 --> 00:03:47.600
Ah, okay.
60
00:03:47.600 --> 00:03:50.700
It's not just two wires. Actually, also, interestingly.
61
00:03:50.700 --> 00:03:51.420
Aha.
62
00:03:51.420 --> 00:03:58.210
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
63
00:03:58.210 --> 00:03:58.540
Ah.
64
00:03:58.540 --> 00:04:03.900
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.
65
00:04:03.900 --> 00:04:04.000
Is...
66
00:04:04.000 --> 00:04:04.960
I hope. Yes.
67
00:04:04.960 --> 00:04:07.160
Is that the same as PoE or is that different again?
68
00:04:07.160 --> 00:04:09.800
I don't think it is PoE.
69
00:04:09.800 --> 00:04:10.540
No.
70
00:04:10.540 --> 00:04:14.630
Okay. Right. But obviously it uses... it also uses Cat5.
71
00:04:14.630 --> 00:04:16.100
Yeah.
72
00:04:16.100 --> 00:04:21.550
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.
73
00:04:21.550 --> 00:04:21.690
So.
74
00:04:21.690 --> 00:04:23.280
Right. Anyway. Got it. All right, anyways.
75
00:04:23.280 --> 00:04:33.140
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
76
00:04:33.140 --> 00:04:34.800
from Portal.
77
00:04:34.800 --> 00:04:35.060
Oh.
78
00:04:35.060 --> 00:04:35.320
Right.
79
00:04:35.320 --> 00:04:36.220
So we built.
80
00:04:36.220 --> 00:04:55.110
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
81
00:04:55.110 --> 00:04:56.180
Oh.
82
00:04:56.180 --> 00:05:23.690
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.
83
00:05:23.690 --> 00:05:24.490
Wow.
84
00:05:24.490 --> 00:05:37.500
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.
85
00:05:37.500 --> 00:05:44.040
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.
86
00:05:44.040 --> 00:05:44.340
Ha! No! Oh no.
87
00:05:44.340 --> 00:05:48.120
So now I've got Claude running on this machine.
88
00:05:48.120 --> 00:05:55.840
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?
89
00:05:55.840 --> 00:05:58.400
Well, no, actually it was both. So it was...
90
00:05:58.400 --> 00:05:59.060
Oh.
91
00:05:59.060 --> 00:06:07.540
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,
92
00:06:07.540 --> 00:06:08.540
Right.
93
00:06:08.540 --> 00:06:14.530
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.
94
00:06:14.530 --> 00:06:15.280
Ah. With remote control or whatever.
95
00:06:15.280 --> 00:06:18.660
And then that has remote control enabled so I can go and connect to it.
96
00:06:18.660 --> 00:06:18.660
Yeah, yeah.
97
00:06:18.660 --> 00:06:22.000
And obviously I can SSH into this machine too. It's not like I can only access it with remote control.
98
00:06:22.000 --> 00:06:24.320
But now you can be out walking the dog and just bring your phone out and say.
99
00:06:24.320 --> 00:06:28.900
Exactly. And I can talk into my phone and be like, hey, Claude, can you make GLaDOS do this thing?
100
00:06:28.900 --> 00:06:31.580
And then it'll be like, yeah, sure, fine.
101
00:06:31.580 --> 00:06:44.200
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...
102
00:06:44.200 --> 00:06:47.480
And the fact that you called it GLaDOS doesn't really help the whole argument here.
103
00:06:47.480 --> 00:06:47.520
Yeah.
104
00:06:47.520 --> 00:07:00.760
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.
105
00:07:00.760 --> 00:07:00.760
Oh, I'm sorry.
106
00:07:00.760 --> 00:07:00.760
Uh-oh.
107
00:07:00.760 --> 00:07:00.760
Yeah.
108
00:07:00.760 --> 00:07:05.740
But that's what I'm doing. So, okay, fine. But the...
109
00:07:05.740 --> 00:07:20.090
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.
110
00:07:20.090 --> 00:07:30.720
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.
111
00:07:30.720 --> 00:07:37.760
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?
112
00:07:37.760 --> 00:07:40.780
Yes. Yep. I mean, meat proxy. Meat proxy.
113
00:07:40.780 --> 00:07:42.920
Meat proxy and the credit card.
114
00:07:42.920 --> 00:07:43.640
Yeah. And I'm like, yeah, that sounds great.
115
00:07:43.640 --> 00:07:43.640
Yeah.
116
00:07:43.640 --> 00:07:53.370
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.
117
00:07:53.370 --> 00:07:55.500
Right.
118
00:07:55.500 --> 00:08:09.080
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
119
00:08:09.080 --> 00:08:10.380
I think uninterruptible.
120
00:08:10.380 --> 00:08:12.080
Uninterruptible power supply. Did I say interruptible?
121
00:08:12.080 --> 00:08:21.780
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.
122
00:08:21.780 --> 00:08:25.660
You know, it's almost like I could have done that on purpose.
123
00:08:25.660 --> 00:08:28.480
On purpose, if only...
124
00:08:28.480 --> 00:08:31.710
Our listener knows that we made no effort to organize this ahead of time because...
125
00:08:31.710 --> 00:08:32.380
But yeah.
126
00:08:32.380 --> 00:08:32.840
You would think, well, whatever.
127
00:08:32.840 --> 00:08:34.280
Anyway, yeah.
128
00:08:34.280 --> 00:08:50.120
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
129
00:08:50.120 --> 00:08:50.120
Yeah.
130
00:08:50.120 --> 00:09:00.900
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.
131
00:09:00.900 --> 00:09:09.180
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
132
00:09:09.180 --> 00:09:19.560
you know, package that you use to monitor these types of devices. And I've got a new page on.
133
00:09:19.560 --> 00:09:23.360
Out of interest, is the whole house on the UPS or is it just like critical equipment?
134
00:09:23.360 --> 00:09:23.660
No.
135
00:09:23.660 --> 00:09:25.980
Yeah. I was going to say, because I had one downstairs until it ran out of power.
136
00:09:25.980 --> 00:09:26.240
It...
137
00:09:26.240 --> 00:09:30.160
The battery, like, died, the lead acid battery in it. And I was like, I only had a computer plugged into it.
138
00:09:30.160 --> 00:09:30.160
Yeah.
139
00:09:30.160 --> 00:09:34.780
And even then it would only power the computer for like 30 seconds while it shut down.
140
00:09:34.780 --> 00:09:35.740
Right. Yeah, no.
141
00:09:35.740 --> 00:09:40.780
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.
142
00:09:40.780 --> 00:09:43.320
Right. Yes, yes. And now I've got it sending alerts to me.
143
00:09:43.320 --> 00:09:43.500
But.
144
00:09:43.500 --> 00:09:49.270
I mean, I had the alerts before, like the whole burglar alarm system we wired into Pushover, which is a super cool.
145
00:09:49.270 --> 00:09:49.480
Of course.
146
00:09:49.480 --> 00:09:50.200
Oh, yeah, little, like...
147
00:09:50.200 --> 00:09:53.560
Not an ad, but I like Pushover a lot for these kinds of notifications.
148
00:09:53.560 --> 00:09:55.050
Yeah. Yeah. I forgot about that. Yeah.
149
00:09:55.050 --> 00:10:06.180
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.
150
00:10:06.180 --> 00:10:17.380
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.
151
00:10:17.380 --> 00:10:18.000
Right.
152
00:10:18.000 --> 00:10:28.620
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.
153
00:10:28.620 --> 00:10:39.520
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
154
00:10:39.520 --> 00:10:39.520
Right.
155
00:10:39.520 --> 00:10:45.360
access to your power, internet, and remote door controls.
156
00:10:45.360 --> 00:10:57.400
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...
157
00:10:57.400 --> 00:10:57.400
It.
158
00:10:57.400 --> 00:10:57.400
It knows.
159
00:10:57.400 --> 00:10:57.400
Yeah.
160
00:10:57.400 --> 00:11:03.040
It knows already. It's already in the training set, dude. I mean, like, oh yeah, you are...
161
00:11:03.040 --> 00:11:03.600
Yep. Yeah.
162
00:11:03.600 --> 00:11:05.300
you're in trouble.
163
00:11:05.300 --> 00:11:07.900
You know. This is... This is what we're...
164
00:11:07.900 --> 00:11:07.940
It...
165
00:11:07.940 --> 00:11:08.160
Is that? That looks like a...
166
00:11:08.160 --> 00:11:11.370
And then the next thing I'm going to do is connect it to my garage.
167
00:11:11.370 --> 00:11:15.510
automatic repeating rifle behind you that you've got and some kind of tripod thing with an orange light in the middle?
168
00:11:15.510 --> 00:11:16.800
Yeah. Uh huh.
169
00:11:16.800 --> 00:11:19.800
Is that... Did it tell you to put that together?
170
00:11:19.800 --> 00:11:22.780
Yeah, you know, sentry turret, you know, and just wire that directly into the burglar alarm.
171
00:11:22.780 --> 00:11:23.620
Yeah. That's right.
172
00:11:23.620 --> 00:11:26.100
You know, it's just airsoft. It's fine. You know.
173
00:11:26.100 --> 00:11:28.640
It's not going to kill anybody. Yet.
174
00:11:28.640 --> 00:11:30.340
Oh man.
175
00:11:30.340 --> 00:11:30.860
The laser turrets are next.
176
00:11:30.860 --> 00:11:34.020
So where are you going? What's next with this?
177
00:11:34.020 --> 00:11:41.060
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.
178
00:11:41.060 --> 00:11:42.940
You know, the way that I do that is like this.
179
00:11:42.940 --> 00:11:45.940
Right. Well.
180
00:11:45.940 --> 00:11:47.680
It's, yeah, the listener did not see, but I craned my head out the window or towards the window.
181
00:11:47.680 --> 00:11:55.940
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.
182
00:11:55.940 --> 00:11:56.040
Ah.
183
00:11:56.040 --> 00:12:13.480
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.
184
00:12:13.480 --> 00:12:18.840
So I got a security camera that is like local network only,
185
00:12:18.840 --> 00:12:19.820
Yeah.
186
00:12:19.820 --> 00:12:30.520
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.
187
00:12:30.520 --> 00:12:35.980
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.
188
00:12:35.980 --> 00:12:38.020
I mean that would seem simpler.
189
00:12:38.020 --> 00:12:41.370
It is. It's not about simpler. This is about like.
190
00:12:41.370 --> 00:12:41.500
Yeah.
191
00:12:41.500 --> 00:12:50.100
How much complexity can I throw into this thing by just typing words into a robot and just see what happens.
192
00:12:50.100 --> 00:12:51.120
Yeah.
193
00:12:51.120 --> 00:12:51.900
And so that's kind of what I'm doing here.
194
00:12:51.900 --> 00:12:54.180
And the answer so far is pretty much everything.
195
00:12:54.180 --> 00:12:57.000
Yeah, turns out you can just throw whatever you want in there.
196
00:12:57.000 --> 00:12:57.150
Yeah.
197
00:12:57.150 --> 00:12:57.460
Yeah.
198
00:12:57.460 --> 00:13:03.720
So that's my quick lightning talk on how I'm empowering a malevolent AI to destroy my family.
199
00:13:03.720 --> 00:13:07.800
I... Yeah. I can't top that, Ben.
200
00:13:07.800 --> 00:13:11.060
We should have finished with that one.
201
00:13:11.060 --> 00:13:20.860
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.
202
00:13:20.860 --> 00:13:28.140
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
203
00:13:28.140 --> 00:13:28.140
Mm-hmm.
204
00:13:28.140 --> 00:13:52.140
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
205
00:13:52.140 --> 00:13:52.140
Okay.
206
00:13:52.140 --> 00:14:12.740
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...
207
00:14:12.740 --> 00:14:15.120
Look at this properly. Am I...
208
00:14:15.120 --> 00:14:15.120
Yeah.
209
00:14:15.120 --> 00:14:20.620
as a human, am I valued, is my contribution valued, and I want to make them feel like
210
00:14:20.620 --> 00:14:20.620
Yeah, yeah.
211
00:14:20.620 --> 00:14:36.960
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.
212
00:14:36.960 --> 00:14:44.140
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...
213
00:14:44.140 --> 00:14:44.140
Yeah.
214
00:14:44.140 --> 00:14:57.000
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.
215
00:14:57.000 --> 00:15:24.140
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
216
00:15:24.140 --> 00:15:39.200
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...
217
00:15:39.200 --> 00:15:49.940
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.
218
00:15:49.940 --> 00:15:50.640
Su...
219
00:15:50.640 --> 00:15:51.680
Oh, you didn't jump on the right frame.
220
00:15:51.680 --> 00:15:51.800
Yeah, right.
221
00:15:51.800 --> 00:16:05.320
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
222
00:16:05.320 --> 00:16:07.620
in a web browser, how...
223
00:16:07.620 --> 00:16:07.930
Right.
224
00:16:07.930 --> 00:16:08.540
Right. Yeah.
225
00:16:08.540 --> 00:16:26.240
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.
226
00:16:26.240 --> 00:16:26.700
Yeah.
227
00:16:26.700 --> 00:16:39.980
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,
228
00:16:39.980 --> 00:16:49.660
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.
229
00:16:49.660 --> 00:16:56.440
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,
230
00:16:56.440 --> 00:16:58.620
playback, but
231
00:16:58.620 --> 00:16:58.620
Right.
232
00:16:58.620 --> 00:16:58.620
Yeah.
233
00:16:58.620 --> 00:17:04.900
it's two seconds behind, so now you're like, oh, it feels like I'm disconnected.
234
00:17:04.900 --> 00:17:05.980
Yeah.
235
00:17:05.980 --> 00:17:09.160
There are some things that you can take advantage of here. I haven't...
236
00:17:09.160 --> 00:17:36.140
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
237
00:17:36.140 --> 00:17:41.000
Mm-hmm.
238
00:17:41.000 --> 00:17:49.160
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
239
00:17:49.160 --> 00:18:01.060
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
240
00:18:01.060 --> 00:18:10.720
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
241
00:18:10.720 --> 00:18:31.080
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,
242
00:18:31.080 --> 00:18:44.020
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...
243
00:18:44.020 --> 00:19:12.170
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.
244
00:19:12.170 --> 00:19:12.720
Yeah.
245
00:19:12.720 --> 00:19:34.240
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.
246
00:19:34.240 --> 00:19:34.960
Oh, okay.
247
00:19:34.960 --> 00:19:38.180
So you just go back two frames to the state that you kept.
248
00:19:38.180 --> 00:19:40.620
Is this like branch prediction, but for...
249
00:19:40.620 --> 00:19:49.940
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.
250
00:19:49.940 --> 00:19:50.820
Yeah, yeah. Yes, right.
251
00:19:50.820 --> 00:19:55.320
Now run forward two frames or three frames, now by the time you've caught up.
252
00:19:55.320 --> 00:19:55.440
That's clever.
253
00:19:55.440 --> 00:19:56.720
And then it's not
254
00:19:56.720 --> 00:20:05.100
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
255
00:20:05.100 --> 00:20:12.850
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.
256
00:20:12.850 --> 00:20:13.080
Yeah.
257
00:20:13.080 --> 00:20:21.460
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
258
00:20:21.460 --> 00:20:31.040
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.
259
00:20:31.040 --> 00:20:31.220
There's a bit.
260
00:20:31.220 --> 00:20:34.890
So you get the first couple of animations of the hit landing, but then it backs up.
261
00:20:34.890 --> 00:20:34.960
Yeah.
262
00:20:34.960 --> 00:20:42.160
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.
263
00:20:42.160 --> 00:20:42.750
And yeah.
264
00:20:42.750 --> 00:20:43.050
Yeah.
265
00:20:43.050 --> 00:20:44.540
So there's some cool things.
266
00:20:44.540 --> 00:20:44.840
Interesting.
267
00:20:44.840 --> 00:20:51.090
So do you have another? That's my five-minute segment over. I've got one more after this, but we can certainly talk.
268
00:20:51.090 --> 00:20:53.770
I got a quick question, actually. I'm kind of...
269
00:20:53.770 --> 00:20:54.070
Ah.
270
00:20:54.070 --> 00:20:57.640
embarrassed that I've never asked you this before, given your affinity for
271
00:20:57.640 --> 00:20:58.240
Oh. Awkward.
272
00:20:58.240 --> 00:21:09.550
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
273
00:21:09.550 --> 00:21:20.860
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.
274
00:21:20.860 --> 00:21:38.430
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.
275
00:21:38.430 --> 00:21:44.980
Is there anything special that you need to do to accommodate that fact in an emulator or does it just naturally happen?
276
00:21:44.980 --> 00:21:46.770
It 100% falls out naturally. Yeah.
277
00:21:46.770 --> 00:21:47.060
Okay.
278
00:21:47.060 --> 00:21:58.970
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...
279
00:21:58.970 --> 00:22:31.720
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
280
00:22:31.720 --> 00:22:37.080
Okay.
281
00:22:37.080 --> 00:22:41.370
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.
282
00:22:41.370 --> 00:22:41.600
Yeah, yeah.
283
00:22:41.600 --> 00:23:03.180
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
284
00:23:03.180 --> 00:23:05.850
up to the point, and then sync.
285
00:23:05.850 --> 00:23:06.250
Yeah.
286
00:23:06.250 --> 00:23:06.640
Yeah.
287
00:23:06.640 --> 00:23:24.960
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
288
00:23:24.960 --> 00:23:24.960
Mm-hmm.
289
00:23:24.960 --> 00:23:24.960
Right, right.
290
00:23:24.960 --> 00:23:34.690
wrong. But, you know, yeah. So no, it comes for free if you're emulating authentically at the speed of the computer. But...
291
00:23:34.690 --> 00:23:34.800
Yeah.
292
00:23:34.800 --> 00:23:42.200
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.
293
00:23:42.200 --> 00:23:52.900
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
294
00:23:52.900 --> 00:23:55.380
stuff, which is lots of fun.
295
00:23:55.380 --> 00:23:58.480
Yeah, okay. Okay, cool. All right. Well, there's my tangent. What do you got next?
296
00:23:58.480 --> 00:24:00.500
Okay. Oh, I got me. All right. I thought you had another one. I got another one.
297
00:24:00.500 --> 00:24:11.720
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.
298
00:24:11.720 --> 00:24:17.760
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.
299
00:24:17.760 --> 00:24:33.560
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.
300
00:24:33.560 --> 00:24:36.020
And in fact, I'm wearing my Spectrum.
301
00:24:36.020 --> 00:24:45.840
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
302
00:24:45.840 --> 00:24:47.540
for everyone there, and I'm
303
00:24:47.540 --> 00:24:49.240
I am indeed. Go Bears.
304
00:24:49.240 --> 00:25:02.320
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.
305
00:25:02.320 --> 00:25:03.520
T-shirt?
306
00:25:03.520 --> 00:25:14.510
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.
307
00:25:14.510 --> 00:25:16.180
Yeah, we did. And reflecting on it, I believe we did.
308
00:25:16.180 --> 00:25:43.360
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,
309
00:25:43.360 --> 00:25:57.890
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
310
00:25:57.890 --> 00:25:58.500
Yeah. Yes.
311
00:25:58.500 --> 00:26:11.840
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.
312
00:26:11.840 --> 00:26:12.660
Yeah, yeah. Right.
313
00:26:12.660 --> 00:26:25.280
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.
314
00:26:25.280 --> 00:26:43.240
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
315
00:26:43.240 --> 00:26:55.020
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.
316
00:26:55.020 --> 00:26:56.990
But I want to be able to do something with the Xs and Ys.
317
00:26:56.990 --> 00:26:57.360
Yeah, cool.
318
00:26:57.360 --> 00:27:00.620
I can declare what Xs stand for and what Ys stand for.
319
00:27:00.620 --> 00:27:00.660
Mm-hmm.
320
00:27:00.660 --> 00:27:02.530
So I get up to 26 different, like...
321
00:27:02.530 --> 00:27:02.820
Okay.
322
00:27:02.820 --> 00:27:04.820
things I can describe using this format.
323
00:27:04.820 --> 00:27:06.360
You can't get uppercase and lowercase with that.
324
00:27:06.360 --> 00:27:21.070
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.
325
00:27:21.070 --> 00:27:21.980
Okay.
326
00:27:21.980 --> 00:27:33.900
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.
327
00:27:33.900 --> 00:27:35.660
And that's kind of how you build these things.
328
00:27:35.660 --> 00:27:36.060
Yeah.
329
00:27:36.060 --> 00:27:46.210
But I realized that I can use the two new things, the #embed, which allows me to, like, #include a file
330
00:27:46.210 --> 00:27:51.100
as, like, a blob into the code base. So I can do... char,
331
00:27:51.100 --> 00:28:06.420
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
332
00:28:06.420 --> 00:28:10.190
67, you know, for like A and C, whatever, that block.
333
00:28:10.190 --> 00:28:11.140
Yeah.
334
00:28:11.140 --> 00:28:23.980
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
335
00:28:23.980 --> 00:28:26.100
and it's like, oh, I have to run this code now.
336
00:28:26.100 --> 00:28:26.420
Okay.
337
00:28:26.420 --> 00:28:28.370
And I can do things like, hey,
338
00:28:28.370 --> 00:28:29.480
Yeah.
339
00:28:29.480 --> 00:28:53.460
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.
340
00:28:53.460 --> 00:29:06.600
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.
341
00:29:06.600 --> 00:29:21.560
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
342
00:29:21.560 --> 00:29:24.740
add, ALU 2 is subtract, whatever.
343
00:29:24.740 --> 00:29:43.580
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...
344
00:29:43.580 --> 00:29:46.410
Beautiful. I love it.
345
00:29:46.410 --> 00:29:46.900
Nice.
346
00:29:46.900 --> 00:30:01.080
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,
347
00:30:01.080 --> 00:30:08.690
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?
348
00:30:08.690 --> 00:30:09.660
Yeah.
349
00:30:09.660 --> 00:30:15.680
Yeah, so preoccupied whether or not you could, that you shouldn't, that you didn't think about whether you should, right? Yeah.
350
00:30:15.680 --> 00:30:15.680
And I'm like, I'm 50.
351
00:30:15.680 --> 00:30:22.460
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.
352
00:30:22.460 --> 00:30:23.040
Yeah.
353
00:30:23.040 --> 00:30:29.780
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
354
00:30:29.780 --> 00:30:34.000
not unrelated to looking at structures.
355
00:30:34.000 --> 00:30:43.880
So that's another side project. And yeah, that one has... I'll be honest, I have used AI to help me here.
356
00:30:43.880 --> 00:30:44.540
Hmm.
357
00:30:44.540 --> 00:31:12.140
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.
358
00:31:12.140 --> 00:31:16.680
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.
359
00:31:16.680 --> 00:31:16.900
Okay.
360
00:31:16.900 --> 00:31:32.600
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
361
00:31:32.600 --> 00:31:38.700
about this. I think it's going to be the forefront of everyone's mind, is, you know, like programming is
362
00:31:38.700 --> 00:31:40.940
as we've discussed, you know, something we love doing and, you know,
363
00:31:40.940 --> 00:31:49.790
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.
364
00:31:49.790 --> 00:31:50.080
Right.
365
00:31:50.080 --> 00:31:58.560
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
366
00:31:58.560 --> 00:31:58.560
Yeah, yeah.
367
00:31:58.560 --> 00:32:01.940
for it too. What else you got?
368
00:32:01.940 --> 00:32:02.020
Okay.
369
00:32:02.020 --> 00:32:03.440
What else you got? Or what questions or what?
370
00:32:03.440 --> 00:32:26.500
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.
371
00:32:26.500 --> 00:32:37.500
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.
372
00:32:37.500 --> 00:32:40.820
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.
373
00:32:40.820 --> 00:32:55.200
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.
374
00:32:55.200 --> 00:32:55.200
Oh yeah!
375
00:32:55.200 --> 00:32:57.020
No, but I think that, yeah. Yeah.
376
00:32:57.020 --> 00:33:03.180
Yeah. And I'm just like wandering around my house being like, oh, microwave, dishwasher, refrigerator.
377
00:33:03.180 --> 00:33:04.360
I... There's a...
378
00:33:04.360 --> 00:33:11.040
Washing machine. Like, yeah, I've never given a second thought to any of these things. And now I suddenly care by proxy.
379
00:33:11.040 --> 00:33:28.860
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
380
00:33:28.860 --> 00:33:28.860
Right. Yeah.
381
00:33:28.860 --> 00:33:47.500
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
382
00:33:47.500 --> 00:33:47.820
Yeah.
383
00:33:47.820 --> 00:33:59.160
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,
384
00:33:59.160 --> 00:34:00.320
Bluesky the other day, like,
385
00:34:00.320 --> 00:34:00.320
Okay.
386
00:34:00.320 --> 00:34:10.850
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.
387
00:34:10.850 --> 00:34:11.580
Okay. Right.
388
00:34:11.580 --> 00:34:28.940
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.
389
00:34:28.940 --> 00:34:29.380
Yeah.
390
00:34:29.380 --> 00:34:44.560
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.
391
00:34:44.560 --> 00:34:44.910
Yeah.
392
00:34:44.910 --> 00:34:45.000
Yeah.
393
00:34:45.000 --> 00:34:48.200
The third song of which, incidentally, was Rick Astley's Never Gonna Give You Up.
394
00:34:48.200 --> 00:34:51.250
So I felt like completely owned that. I listened to it.
395
00:34:51.250 --> 00:34:51.280
Yep.
396
00:34:51.280 --> 00:35:03.140
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.
397
00:35:03.140 --> 00:35:14.400
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.
398
00:35:14.400 --> 00:35:25.820
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.
399
00:35:25.820 --> 00:35:32.580
And yet, here I am in a room filled with their sodding devices, and it can't answer a simple question about...
400
00:35:32.580 --> 00:35:32.580
Yes.
401
00:35:32.580 --> 00:35:34.080
Anything.
402
00:35:34.080 --> 00:35:35.320
Yeah.
403
00:35:35.320 --> 00:35:37.470
I mean, like, I want that to work.
404
00:35:37.470 --> 00:35:37.600
Yeah.
405
00:35:37.600 --> 00:35:38.790
Why does it not just work?
406
00:35:38.790 --> 00:35:39.180
Yeah. Why is this so hard?
407
00:35:39.180 --> 00:35:39.580
It just... Ah!
408
00:35:39.580 --> 00:35:49.120
Why is this so hard? Yeah, I used to have a competing device, you know, created by an online bookseller.
409
00:35:49.120 --> 00:35:49.300
Ah.
410
00:35:49.300 --> 00:35:51.940
Oh, right.
411
00:35:51.940 --> 00:35:55.400
And I, in a fit of rage one day, because it started, like,
412
00:35:55.400 --> 00:35:55.400
Yeah.
413
00:35:55.400 --> 00:36:04.720
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.
414
00:36:04.720 --> 00:36:04.920
I...
415
00:36:04.920 --> 00:36:09.460
And yeah, that was fun while it was new and kind of interesting and sort of worked.
416
00:36:09.460 --> 00:36:09.640
Yeah, I can see that.
417
00:36:09.640 --> 00:36:12.000
And now I'm just like, get the hell out of my house.
418
00:36:12.000 --> 00:36:20.440
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.
419
00:36:20.440 --> 00:36:20.800
Okay. Yeah.
420
00:36:20.800 --> 00:36:27.080
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
421
00:36:27.080 --> 00:36:31.270
Yeah, yeah. Yes. I've gone down the rabbit hole of Home Assistant a couple of times now, actually.
422
00:36:31.270 --> 00:36:31.580
Home Assistant.
423
00:36:31.580 --> 00:36:35.360
Right. So I could see that being a cool set of projects.
424
00:36:35.360 --> 00:36:36.430
Yeah. Yeah.
425
00:36:36.430 --> 00:36:45.840
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
426
00:36:45.840 --> 00:36:50.720
devices were that, they just did what I needed them to do, which is very, very little.
427
00:36:50.720 --> 00:36:51.200
Okay.
428
00:36:51.200 --> 00:37:05.100
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.
429
00:37:05.100 --> 00:37:07.820
Yeah, but maybe I should go down that route. I know.
430
00:37:07.820 --> 00:37:22.020
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,
431
00:37:22.020 --> 00:37:26.390
you know, the Mac mini that is connected to, you know, the super powerful malevolent AI, whatever.
432
00:37:26.390 --> 00:37:26.620
Yeah.
433
00:37:26.620 --> 00:37:34.830
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,
434
00:37:34.830 --> 00:37:34.980
Right.
435
00:37:34.980 --> 00:37:36.250
it works essentially the same.
436
00:37:36.250 --> 00:37:36.540
And.
437
00:37:36.540 --> 00:37:42.300
It's how a reasonably sensible personal assistant would have created a directory structure and file structure, and it's mostly well-written.
438
00:37:42.300 --> 00:37:42.590
Right?
439
00:37:42.590 --> 00:37:43.740
Yes, yes, exactly. Yep.
440
00:37:43.740 --> 00:37:44.320
No, exactly.
441
00:37:44.320 --> 00:37:44.610
Yeah.
442
00:37:44.610 --> 00:37:50.940
That is a really weird thing, that's the democratization of data that Markdown files represent, right, compared to, like, I know some...
443
00:37:50.940 --> 00:37:51.810
I know. Yeah.
444
00:37:51.810 --> 00:37:52.380
vendor lock-in.
445
00:37:52.380 --> 00:37:53.250
A Word document.
446
00:37:53.250 --> 00:37:54.110
Native database file.
447
00:37:54.110 --> 00:37:55.260
I mean, they're... they're
448
00:37:55.260 --> 00:37:55.840
Oh, gee.
449
00:37:55.840 --> 00:38:04.480
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
450
00:38:04.480 --> 00:38:05.920
Yeah, yeah, no, for real.
451
00:38:05.920 --> 00:38:07.240
Yeah.
452
00:38:07.240 --> 00:38:09.750
Yeah. All right. I've got one last thing because we're actually remarkably.
453
00:38:09.750 --> 00:38:10.460
All right.
454
00:38:10.460 --> 00:38:15.760
Despite us having no idea what we're going to talk about. Knock on wood, my little CalDigit has survived.
455
00:38:15.760 --> 00:38:18.520
Don't knock on the CalDigit.
456
00:38:18.520 --> 00:38:28.600
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.
457
00:38:28.600 --> 00:38:28.980
Oh yeah. Okay. Yeah.
458
00:38:28.980 --> 00:38:40.460
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.
459
00:38:40.460 --> 00:38:51.800
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.
460
00:38:51.800 --> 00:38:52.020
Mmm.
461
00:38:52.020 --> 00:39:01.940
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.
462
00:39:01.940 --> 00:39:02.440
Yeah, yeah.
463
00:39:02.440 --> 00:39:15.490
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.
464
00:39:15.490 --> 00:39:43.420
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...
465
00:39:43.420 --> 00:39:43.680
Yeah.
466
00:39:43.680 --> 00:40:00.330
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
467
00:40:00.330 --> 00:40:00.600
two-inch
468
00:40:00.600 --> 00:40:00.870
Okay.
469
00:40:00.870 --> 00:40:05.430
little speaker such as you would have had in, like, a case on an old, you know
470
00:40:05.430 --> 00:40:06.240
Okay. Yeah. Huh.
471
00:40:06.240 --> 00:40:19.590
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.
472
00:40:19.590 --> 00:40:20.020
Ow.
473
00:40:20.020 --> 00:40:42.580
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.
474
00:40:42.580 --> 00:40:46.350
This is what it sounds like if you were to have bodged in some headphones at this point.
475
00:40:46.350 --> 00:40:46.500
Ha, yeah.
476
00:40:46.500 --> 00:40:54.270
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.
477
00:40:54.270 --> 00:40:54.800
Yeah, yeah.
478
00:40:54.800 --> 00:40:55.070
Although.
479
00:40:55.070 --> 00:40:55.340
Right.
480
00:40:55.340 --> 00:41:03.550
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
481
00:41:03.550 --> 00:41:04.900
Oh man, that's super cool.
482
00:41:04.900 --> 00:41:13.330
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.
483
00:41:13.330 --> 00:41:13.460
Wow.
484
00:41:13.460 --> 00:41:23.710
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.
485
00:41:23.710 --> 00:41:23.780
Right.
486
00:41:23.780 --> 00:41:27.760
But nowadays, if you Google it, you're going to get the AI answer first anyway. So I don't know.
487
00:41:27.760 --> 00:41:27.840
Right.
488
00:41:27.840 --> 00:41:29.980
I don't know. Where are we? What is going on?
489
00:41:29.980 --> 00:41:31.560
Yeah.
490
00:41:31.560 --> 00:41:35.660
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.
491
00:41:35.660 --> 00:41:38.100
We were going to do two lightning talks and then it was going to crash, right?
492
00:41:38.100 --> 00:41:38.200
Oh.
493
00:41:38.200 --> 00:41:38.300
Uh-huh.
494
00:41:38.300 --> 00:41:38.400
Yeah.
495
00:41:38.400 --> 00:41:42.380
That's right.
496
00:41:42.380 --> 00:41:45.440
So I guess we should probably pause here and maybe we can continue.
497
00:41:45.440 --> 00:41:46.620
All right. Yeah. This is a perfectly cromulent podcast.
498
00:41:46.620 --> 00:41:59.140
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?
499
00:41:59.140 --> 00:41:59.520
I don't know what you're saying.
500
00:41:59.520 --> 00:42:01.060
Well, when they walk past in the podcast, you know, that's...
501
00:42:01.060 --> 00:42:01.060
What? That's true. Yeah. Do we have any?
502
00:42:01.060 --> 00:42:13.430
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.
503
00:42:13.430 --> 00:42:14.020
Okay.
504
00:42:14.020 --> 00:42:19.610
I've enjoyed this. Thank you for letting me talk at 100 miles an hour at you and to hear about your.
505
00:42:19.610 --> 00:42:21.520
Yeah, it's good. Yeah, it does. That's how we work.
506
00:42:21.520 --> 00:42:22.480
GLaDOS thing. Yeah.
507
00:42:22.480 --> 00:42:23.400
This is good.
508
00:42:23.400 --> 00:42:30.530
And I guess we will catch up next time.
509
00:42:30.530 --> 00:42:32.530
Next time.
1
00:00:18.140 --> 00:00:19.500
Hey, Ben.
2
00:00:19.500 --> 00:00:20.440
Hey Matt.
3
00:00:20.440 --> 00:00:32.160
We are in some kind of... catastrophe. Catastrophic situation where my computer keeps crashing, or rather my CalDigit
4
00:00:32.160 --> 00:00:44.240
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?
5
00:00:44.240 --> 00:00:53.980
I think we could do... some discussions of some personal projects that we've been kind of kicking around with Claude. I have two.
6
00:00:53.980 --> 00:00:54.400
Okay.
7
00:00:54.400 --> 00:00:57.900
It's almost like, I almost want to feel like we're doing these in like lightning talk format because it's like these.
8
00:00:57.900 --> 00:00:58.680
Okay, let's do that.
9
00:00:58.680 --> 00:00:59.120
Part of...
10
00:00:59.120 --> 00:01:01.820
Because I may disappear at any time.
11
00:01:01.820 --> 00:01:07.900
Right. So we're reducing the scope of each iteration so that, like, if one fails, then we've at least committed the.
12
00:01:07.900 --> 00:01:09.860
We've. This is a redundant array of inexpensive.
13
00:01:09.860 --> 00:01:09.860
Yes.
14
00:01:09.860 --> 00:01:11.260
Podcasts.
15
00:01:11.260 --> 00:01:14.140
Podcasts, yeah. That has a terrible acronym.
16
00:01:14.140 --> 00:01:14.140
Okay.
17
00:01:14.140 --> 00:01:15.590
Let's not say that one out loud.
18
00:01:15.590 --> 00:01:15.740
Oh.
19
00:01:15.740 --> 00:01:16.660
Don't think about it.
20
00:01:16.660 --> 00:01:16.940
Right.
21
00:01:16.940 --> 00:01:17.840
Yeah. Okay.
22
00:01:17.840 --> 00:01:18.960
Yeah.
23
00:01:18.960 --> 00:01:23.940
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.
24
00:01:23.940 --> 00:01:40.920
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
25
00:01:40.920 --> 00:01:54.840
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.
26
00:01:54.840 --> 00:02:02.950
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.
27
00:02:02.950 --> 00:02:03.040
Okay.
28
00:02:03.040 --> 00:02:03.280
And this was... Yeah.
29
00:02:03.280 --> 00:02:10.140
Switches as in like... network switches here, or switches as in literally up and down buttons?
30
00:02:10.140 --> 00:02:15.080
No, just like... when the door is closed, the circuit is closed. And when the door is open, the circuit is open.
31
00:02:15.080 --> 00:02:15.300
Oh.
32
00:02:15.300 --> 00:02:18.340
Right. And the default state is closed so that you know the system's working.
33
00:02:18.340 --> 00:02:18.400
It's...
34
00:02:18.400 --> 00:02:18.940
Right. Like if there's a loop through the circuit.
35
00:02:18.940 --> 00:02:21.240
Oh, oh, I see. Yeah, yeah, yeah. Okay, yeah.
36
00:02:21.240 --> 00:02:21.420
Right.
37
00:02:21.420 --> 00:02:21.600
Yeah.
38
00:02:21.600 --> 00:02:24.140
So an actual switch, except, you know, yeah, right. As you described.
39
00:02:24.140 --> 00:02:24.740
Yeah.
40
00:02:24.740 --> 00:02:25.020
Okay.
41
00:02:25.020 --> 00:02:35.560
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.
42
00:02:35.560 --> 00:02:53.720
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.
43
00:02:53.720 --> 00:02:54.180
Okay.
44
00:02:54.180 --> 00:02:58.690
Right. So if you give them 12-volt power and you let them kind of warm up for a second, they will then close,
45
00:02:58.690 --> 00:02:59.120
Okay.
46
00:02:59.120 --> 00:03:08.260
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.
47
00:03:08.260 --> 00:03:12.670
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.
48
00:03:12.670 --> 00:03:12.820
Yeah.
49
00:03:12.820 --> 00:03:15.290
I think it's an infrared light and then a kind of clever...
50
00:03:15.290 --> 00:03:19.240
I think they're infrared detectors. Yeah.
51
00:03:19.240 --> 00:03:29.170
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...
52
00:03:29.170 --> 00:03:29.640
Yeah.
53
00:03:29.640 --> 00:03:31.200
But it looks like a switch is what you're saying.
54
00:03:31.200 --> 00:03:31.480
Right, right.
55
00:03:31.480 --> 00:03:32.420
Other than you power it.
56
00:03:32.420 --> 00:03:36.020
If you give it 12-volt power, it acts like a switch. It just goes on and off.
57
00:03:36.020 --> 00:03:44.540
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?
58
00:03:44.540 --> 00:03:47.480
Well, there's additional leads. Yeah, it's not with those things.
59
00:03:47.480 --> 00:03:47.600
Ah, okay.
60
00:03:47.600 --> 00:03:50.700
It's not just two wires. Actually, also, interestingly.
61
00:03:50.700 --> 00:03:51.420
Aha.
62
00:03:51.420 --> 00:03:58.210
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
63
00:03:58.210 --> 00:03:58.540
Ah.
64
00:03:58.540 --> 00:04:03.900
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.
65
00:04:03.900 --> 00:04:04.000
Is...
66
00:04:04.000 --> 00:04:04.960
I hope. Yes.
67
00:04:04.960 --> 00:04:07.160
Is that the same as PoE or is that different again?
68
00:04:07.160 --> 00:04:09.800
I don't think it is PoE.
69
00:04:09.800 --> 00:04:10.540
No.
70
00:04:10.540 --> 00:04:14.630
Okay. Right. But obviously it uses... it also uses Cat5.
71
00:04:14.630 --> 00:04:16.100
Yeah.
72
00:04:16.100 --> 00:04:21.550
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.
73
00:04:21.550 --> 00:04:21.690
So.
74
00:04:21.690 --> 00:04:23.280
Right. Anyway. Got it. All right, anyways.
75
00:04:23.280 --> 00:04:33.140
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
76
00:04:33.140 --> 00:04:34.800
from Portal.
77
00:04:34.800 --> 00:04:35.060
Oh.
78
00:04:35.060 --> 00:04:35.320
Right.
79
00:04:35.320 --> 00:04:36.220
So we built.
80
00:04:36.220 --> 00:04:55.110
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
81
00:04:55.110 --> 00:04:56.180
Oh.
82
00:04:56.180 --> 00:05:23.690
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.
83
00:05:23.690 --> 00:05:24.490
Wow.
84
00:05:24.490 --> 00:05:37.500
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.
85
00:05:37.500 --> 00:05:44.040
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.
86
00:05:44.040 --> 00:05:44.340
Ha! No! Oh no.
87
00:05:44.340 --> 00:05:48.120
So now I've got Claude running on this machine.
88
00:05:48.120 --> 00:05:55.840
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?
89
00:05:55.840 --> 00:05:58.400
Well, no, actually it was both. So it was...
90
00:05:58.400 --> 00:05:59.060
Oh.
91
00:05:59.060 --> 00:06:07.540
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,
92
00:06:07.540 --> 00:06:08.540
Right.
93
00:06:08.540 --> 00:06:14.530
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.
94
00:06:14.530 --> 00:06:15.280
Ah. With remote control or whatever.
95
00:06:15.280 --> 00:06:18.660
And then that has remote control enabled so I can go and connect to it.
96
00:06:18.660 --> 00:06:18.660
Yeah, yeah.
97
00:06:18.660 --> 00:06:22.000
And obviously I can SSH into this machine too. It's not like I can only access it with remote control.
98
00:06:22.000 --> 00:06:24.320
But now you can be out walking the dog and just bring your phone out and say.
99
00:06:24.320 --> 00:06:28.900
Exactly. And I can talk into my phone and be like, hey, Claude, can you make GLaDOS do this thing?
100
00:06:28.900 --> 00:06:31.580
And then it'll be like, yeah, sure, fine.
101
00:06:31.580 --> 00:06:44.200
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...
102
00:06:44.200 --> 00:06:47.480
And the fact that you called it GLaDOS doesn't really help the whole argument here.
103
00:06:47.480 --> 00:06:47.520
Yeah.
104
00:06:47.520 --> 00:07:00.760
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.
105
00:07:00.760 --> 00:07:00.760
Oh, I'm sorry.
106
00:07:00.760 --> 00:07:00.760
Uh-oh.
107
00:07:00.760 --> 00:07:00.760
Yeah.
108
00:07:00.760 --> 00:07:05.740
But that's what I'm doing. So, okay, fine. But the...
109
00:07:05.740 --> 00:07:20.090
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.
110
00:07:20.090 --> 00:07:30.720
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.
111
00:07:30.720 --> 00:07:37.760
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?
112
00:07:37.760 --> 00:07:40.780
Yes. Yep. I mean, meat proxy. Meat proxy.
113
00:07:40.780 --> 00:07:42.920
Meat proxy and the credit card.
114
00:07:42.920 --> 00:07:43.640
Yeah. And I'm like, yeah, that sounds great.
115
00:07:43.640 --> 00:07:43.640
Yeah.
116
00:07:43.640 --> 00:07:53.370
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.
117
00:07:53.370 --> 00:07:55.500
Right.
118
00:07:55.500 --> 00:08:09.080
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
119
00:08:09.080 --> 00:08:10.380
I think uninterruptible.
120
00:08:10.380 --> 00:08:12.080
Uninterruptible power supply. Did I say interruptible?
121
00:08:12.080 --> 00:08:21.780
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.
122
00:08:21.780 --> 00:08:25.660
You know, it's almost like I could have done that on purpose.
123
00:08:25.660 --> 00:08:28.480
On purpose, if only...
124
00:08:28.480 --> 00:08:31.710
Our listener knows that we made no effort to organize this ahead of time because...
125
00:08:31.710 --> 00:08:32.380
But yeah.
126
00:08:32.380 --> 00:08:32.840
You would think, well, whatever.
127
00:08:32.840 --> 00:08:34.280
Anyway, yeah.
128
00:08:34.280 --> 00:08:50.120
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
129
00:08:50.120 --> 00:08:50.120
Yeah.
130
00:08:50.120 --> 00:09:00.900
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.
131
00:09:00.900 --> 00:09:09.180
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
132
00:09:09.180 --> 00:09:19.560
you know, package that you use to monitor these types of devices. And I've got a new page on.
133
00:09:19.560 --> 00:09:23.360
Out of interest, is the whole house on the UPS or is it just like critical equipment?
134
00:09:23.360 --> 00:09:23.660
No.
135
00:09:23.660 --> 00:09:25.980
Yeah. I was going to say, because I had one downstairs until it ran out of power.
136
00:09:25.980 --> 00:09:26.240
It...
137
00:09:26.240 --> 00:09:30.160
The battery, like, died, the lead acid battery in it. And I was like, I only had a computer plugged into it.
138
00:09:30.160 --> 00:09:30.160
Yeah.
139
00:09:30.160 --> 00:09:34.780
And even then it would only power the computer for like 30 seconds while it shut down.
140
00:09:34.780 --> 00:09:35.740
Right. Yeah, no.
141
00:09:35.740 --> 00:09:40.780
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.
142
00:09:40.780 --> 00:09:43.320
Right. Yes, yes. And now I've got it sending alerts to me.
143
00:09:43.320 --> 00:09:43.500
But.
144
00:09:43.500 --> 00:09:49.270
I mean, I had the alerts before, like the whole burglar alarm system we wired into Pushover, which is a super cool.
145
00:09:49.270 --> 00:09:49.480
Of course.
146
00:09:49.480 --> 00:09:50.200
Oh, yeah, little, like...
147
00:09:50.200 --> 00:09:53.560
Not an ad, but I like Pushover a lot for these kinds of notifications.
148
00:09:53.560 --> 00:09:55.050
Yeah. Yeah. I forgot about that. Yeah.
149
00:09:55.050 --> 00:10:06.180
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.
150
00:10:06.180 --> 00:10:17.380
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.
151
00:10:17.380 --> 00:10:18.000
Right.
152
00:10:18.000 --> 00:10:28.620
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.
153
00:10:28.620 --> 00:10:39.520
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
154
00:10:39.520 --> 00:10:39.520
Right.
155
00:10:39.520 --> 00:10:45.360
access to your power, internet, and remote door controls.
156
00:10:45.360 --> 00:10:57.400
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...
157
00:10:57.400 --> 00:10:57.400
It.
158
00:10:57.400 --> 00:10:57.400
It knows.
159
00:10:57.400 --> 00:10:57.400
Yeah.
160
00:10:57.400 --> 00:11:03.040
It knows already. It's already in the training set, dude. I mean, like, oh yeah, you are...
161
00:11:03.040 --> 00:11:03.600
Yep. Yeah.
162
00:11:03.600 --> 00:11:05.300
you're in trouble.
163
00:11:05.300 --> 00:11:07.900
You know. This is... This is what we're...
164
00:11:07.900 --> 00:11:07.940
It...
165
00:11:07.940 --> 00:11:08.160
Is that? That looks like a...
166
00:11:08.160 --> 00:11:11.370
And then the next thing I'm going to do is connect it to my garage.
167
00:11:11.370 --> 00:11:15.510
automatic repeating rifle behind you that you've got and some kind of tripod thing with an orange light in the middle?
168
00:11:15.510 --> 00:11:16.800
Yeah. Uh huh.
169
00:11:16.800 --> 00:11:19.800
Is that... Did it tell you to put that together?
170
00:11:19.800 --> 00:11:22.780
Yeah, you know, sentry turret, you know, and just wire that directly into the burglar alarm.
171
00:11:22.780 --> 00:11:23.620
Yeah. That's right.
172
00:11:23.620 --> 00:11:26.100
You know, it's just airsoft. It's fine. You know.
173
00:11:26.100 --> 00:11:28.640
It's not going to kill anybody. Yet.
174
00:11:28.640 --> 00:11:30.340
Oh man.
175
00:11:30.340 --> 00:11:30.860
The laser turrets are next.
176
00:11:30.860 --> 00:11:34.020
So where are you going? What's next with this?
177
00:11:34.020 --> 00:11:41.060
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.
178
00:11:41.060 --> 00:11:42.940
You know, the way that I do that is like this.
179
00:11:42.940 --> 00:11:45.940
Right. Well.
180
00:11:45.940 --> 00:11:47.680
It's, yeah, the listener did not see, but I craned my head out the window or towards the window.
181
00:11:47.680 --> 00:11:55.940
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.
182
00:11:55.940 --> 00:11:56.040
Ah.
183
00:11:56.040 --> 00:12:13.480
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.
184
00:12:13.480 --> 00:12:18.840
So I got a security camera that is like local network only,
185
00:12:18.840 --> 00:12:19.820
Yeah.
186
00:12:19.820 --> 00:12:30.520
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.
187
00:12:30.520 --> 00:12:35.980
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.
188
00:12:35.980 --> 00:12:38.020
I mean that would seem simpler.
189
00:12:38.020 --> 00:12:41.370
It is. It's not about simpler. This is about like.
190
00:12:41.370 --> 00:12:41.500
Yeah.
191
00:12:41.500 --> 00:12:50.100
How much complexity can I throw into this thing by just typing words into a robot and just see what happens.
192
00:12:50.100 --> 00:12:51.120
Yeah.
193
00:12:51.120 --> 00:12:51.900
And so that's kind of what I'm doing here.
194
00:12:51.900 --> 00:12:54.180
And the answer so far is pretty much everything.
195
00:12:54.180 --> 00:12:57.000
Yeah, turns out you can just throw whatever you want in there.
196
00:12:57.000 --> 00:12:57.150
Yeah.
197
00:12:57.150 --> 00:12:57.460
Yeah.
198
00:12:57.460 --> 00:13:03.720
So that's my quick lightning talk on how I'm empowering a malevolent AI to destroy my family.
199
00:13:03.720 --> 00:13:07.800
I... Yeah. I can't top that, Ben.
200
00:13:07.800 --> 00:13:11.060
We should have finished with that one.
201
00:13:11.060 --> 00:13:20.860
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.
202
00:13:20.860 --> 00:13:28.140
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
203
00:13:28.140 --> 00:13:28.140
Mm-hmm.
204
00:13:28.140 --> 00:13:52.140
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
205
00:13:52.140 --> 00:13:52.140
Okay.
206
00:13:52.140 --> 00:14:12.740
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...
207
00:14:12.740 --> 00:14:15.120
Look at this properly. Am I...
208
00:14:15.120 --> 00:14:15.120
Yeah.
209
00:14:15.120 --> 00:14:20.620
as a human, am I valued, is my contribution valued, and I want to make them feel like
210
00:14:20.620 --> 00:14:20.620
Yeah, yeah.
211
00:14:20.620 --> 00:14:36.960
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.
212
00:14:36.960 --> 00:14:44.140
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...
213
00:14:44.140 --> 00:14:44.140
Yeah.
214
00:14:44.140 --> 00:14:57.000
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.
215
00:14:57.000 --> 00:15:24.140
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
216
00:15:24.140 --> 00:15:39.200
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...
217
00:15:39.200 --> 00:15:49.940
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.
218
00:15:49.940 --> 00:15:50.640
Su...
219
00:15:50.640 --> 00:15:51.680
Oh, you didn't jump on the right frame.
220
00:15:51.680 --> 00:15:51.800
Yeah, right.
221
00:15:51.800 --> 00:16:05.320
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
222
00:16:05.320 --> 00:16:07.620
in a web browser, how...
223
00:16:07.620 --> 00:16:07.930
Right.
224
00:16:07.930 --> 00:16:08.540
Right. Yeah.
225
00:16:08.540 --> 00:16:26.240
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.
226
00:16:26.240 --> 00:16:26.700
Yeah.
227
00:16:26.700 --> 00:16:39.980
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,
228
00:16:39.980 --> 00:16:49.660
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.
229
00:16:49.660 --> 00:16:56.440
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,
230
00:16:56.440 --> 00:16:58.620
playback, but
231
00:16:58.620 --> 00:16:58.620
Right.
232
00:16:58.620 --> 00:16:58.620
Yeah.
233
00:16:58.620 --> 00:17:04.900
it's two seconds behind, so now you're like, oh, it feels like I'm disconnected.
234
00:17:04.900 --> 00:17:05.980
Yeah.
235
00:17:05.980 --> 00:17:09.160
There are some things that you can take advantage of here. I haven't...
236
00:17:09.160 --> 00:17:36.140
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
237
00:17:36.140 --> 00:17:41.000
Mm-hmm.
238
00:17:41.000 --> 00:17:49.160
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
239
00:17:49.160 --> 00:18:01.060
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
240
00:18:01.060 --> 00:18:10.720
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
241
00:18:10.720 --> 00:18:31.080
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,
242
00:18:31.080 --> 00:18:44.020
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...
243
00:18:44.020 --> 00:19:12.170
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.
244
00:19:12.170 --> 00:19:12.720
Yeah.
245
00:19:12.720 --> 00:19:34.240
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.
246
00:19:34.240 --> 00:19:34.960
Oh, okay.
247
00:19:34.960 --> 00:19:38.180
So you just go back two frames to the state that you kept.
248
00:19:38.180 --> 00:19:40.620
Is this like branch prediction, but for...
249
00:19:40.620 --> 00:19:49.940
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.
250
00:19:49.940 --> 00:19:50.820
Yeah, yeah. Yes, right.
251
00:19:50.820 --> 00:19:55.320
Now run forward two frames or three frames, now by the time you've caught up.
252
00:19:55.320 --> 00:19:55.440
That's clever.
253
00:19:55.440 --> 00:19:56.720
And then it's not
254
00:19:56.720 --> 00:20:05.100
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
255
00:20:05.100 --> 00:20:12.850
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.
256
00:20:12.850 --> 00:20:13.080
Yeah.
257
00:20:13.080 --> 00:20:21.460
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
258
00:20:21.460 --> 00:20:31.040
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.
259
00:20:31.040 --> 00:20:31.220
There's a bit.
260
00:20:31.220 --> 00:20:34.890
So you get the first couple of animations of the hit landing, but then it backs up.
261
00:20:34.890 --> 00:20:34.960
Yeah.
262
00:20:34.960 --> 00:20:42.160
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.
263
00:20:42.160 --> 00:20:42.750
And yeah.
264
00:20:42.750 --> 00:20:43.050
Yeah.
265
00:20:43.050 --> 00:20:44.540
So there's some cool things.
266
00:20:44.540 --> 00:20:44.840
Interesting.
267
00:20:44.840 --> 00:20:51.090
So do you have another? That's my five-minute segment over. I've got one more after this, but we can certainly talk.
268
00:20:51.090 --> 00:20:53.770
I got a quick question, actually. I'm kind of...
269
00:20:53.770 --> 00:20:54.070
Ah.
270
00:20:54.070 --> 00:20:57.640
embarrassed that I've never asked you this before, given your affinity for
271
00:20:57.640 --> 00:20:58.240
Oh. Awkward.
272
00:20:58.240 --> 00:21:09.550
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
273
00:21:09.550 --> 00:21:20.860
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.
274
00:21:20.860 --> 00:21:38.430
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.
275
00:21:38.430 --> 00:21:44.980
Is there anything special that you need to do to accommodate that fact in an emulator or does it just naturally happen?
276
00:21:44.980 --> 00:21:46.770
It 100% falls out naturally. Yeah.
277
00:21:46.770 --> 00:21:47.060
Okay.
278
00:21:47.060 --> 00:21:58.970
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...
279
00:21:58.970 --> 00:22:31.720
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
280
00:22:31.720 --> 00:22:37.080
Okay.
281
00:22:37.080 --> 00:22:41.370
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.
282
00:22:41.370 --> 00:22:41.600
Yeah, yeah.
283
00:22:41.600 --> 00:23:03.180
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
284
00:23:03.180 --> 00:23:05.850
up to the point, and then sync.
285
00:23:05.850 --> 00:23:06.250
Yeah.
286
00:23:06.250 --> 00:23:06.640
Yeah.
287
00:23:06.640 --> 00:23:24.960
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
288
00:23:24.960 --> 00:23:24.960
Mm-hmm.
289
00:23:24.960 --> 00:23:24.960
Right, right.
290
00:23:24.960 --> 00:23:34.690
wrong. But, you know, yeah. So no, it comes for free if you're emulating authentically at the speed of the computer. But...
291
00:23:34.690 --> 00:23:34.800
Yeah.
292
00:23:34.800 --> 00:23:42.200
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.
293
00:23:42.200 --> 00:23:52.900
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
294
00:23:52.900 --> 00:23:55.380
stuff, which is lots of fun.
295
00:23:55.380 --> 00:23:58.480
Yeah, okay. Okay, cool. All right. Well, there's my tangent. What do you got next?
296
00:23:58.480 --> 00:24:00.500
Okay. Oh, I got me. All right. I thought you had another one. I got another one.
297
00:24:00.500 --> 00:24:11.720
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.
298
00:24:11.720 --> 00:24:17.760
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.
299
00:24:17.760 --> 00:24:33.560
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.
300
00:24:33.560 --> 00:24:36.020
And in fact, I'm wearing my Spectrum.
301
00:24:36.020 --> 00:24:45.840
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
302
00:24:45.840 --> 00:24:47.540
for everyone there, and I'm
303
00:24:47.540 --> 00:24:49.240
I am indeed. Go Bears.
304
00:24:49.240 --> 00:25:02.320
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.
305
00:25:02.320 --> 00:25:03.520
T-shirt?
306
00:25:03.520 --> 00:25:14.510
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.
307
00:25:14.510 --> 00:25:16.180
Yeah, we did. And reflecting on it, I believe we did.
308
00:25:16.180 --> 00:25:43.360
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,
309
00:25:43.360 --> 00:25:57.890
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
310
00:25:57.890 --> 00:25:58.500
Yeah. Yes.
311
00:25:58.500 --> 00:26:11.840
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.
312
00:26:11.840 --> 00:26:12.660
Yeah, yeah. Right.
313
00:26:12.660 --> 00:26:25.280
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.
314
00:26:25.280 --> 00:26:43.240
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
315
00:26:43.240 --> 00:26:55.020
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.
316
00:26:55.020 --> 00:26:56.990
But I want to be able to do something with the Xs and Ys.
317
00:26:56.990 --> 00:26:57.360
Yeah, cool.
318
00:26:57.360 --> 00:27:00.620
I can declare what Xs stand for and what Ys stand for.
319
00:27:00.620 --> 00:27:00.660
Mm-hmm.
320
00:27:00.660 --> 00:27:02.530
So I get up to 26 different, like...
321
00:27:02.530 --> 00:27:02.820
Okay.
322
00:27:02.820 --> 00:27:04.820
things I can describe using this format.
323
00:27:04.820 --> 00:27:06.360
You can't get uppercase and lowercase with that.
324
00:27:06.360 --> 00:27:21.070
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.
325
00:27:21.070 --> 00:27:21.980
Okay.
326
00:27:21.980 --> 00:27:33.900
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.
327
00:27:33.900 --> 00:27:35.660
And that's kind of how you build these things.
328
00:27:35.660 --> 00:27:36.060
Yeah.
329
00:27:36.060 --> 00:27:46.210
But I realized that I can use the two new things, the #embed, which allows me to, like, #include a file
330
00:27:46.210 --> 00:27:51.100
as, like, a blob into the code base. So I can do... char,
331
00:27:51.100 --> 00:28:06.420
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
332
00:28:06.420 --> 00:28:10.190
67, you know, for like A and C, whatever, that block.
333
00:28:10.190 --> 00:28:11.140
Yeah.
334
00:28:11.140 --> 00:28:23.980
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
335
00:28:23.980 --> 00:28:26.100
and it's like, oh, I have to run this code now.
336
00:28:26.100 --> 00:28:26.420
Okay.
337
00:28:26.420 --> 00:28:28.370
And I can do things like, hey,
338
00:28:28.370 --> 00:28:29.480
Yeah.
339
00:28:29.480 --> 00:28:53.460
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.
340
00:28:53.460 --> 00:29:06.600
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.
341
00:29:06.600 --> 00:29:21.560
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
342
00:29:21.560 --> 00:29:24.740
add, ALU 2 is subtract, whatever.
343
00:29:24.740 --> 00:29:43.580
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...
344
00:29:43.580 --> 00:29:46.410
Beautiful. I love it.
345
00:29:46.410 --> 00:29:46.900
Nice.
346
00:29:46.900 --> 00:30:01.080
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,
347
00:30:01.080 --> 00:30:08.690
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?
348
00:30:08.690 --> 00:30:09.660
Yeah.
349
00:30:09.660 --> 00:30:15.680
Yeah, so preoccupied whether or not you could, that you shouldn't, that you didn't think about whether you should, right? Yeah.
350
00:30:15.680 --> 00:30:15.680
And I'm like, I'm 50.
351
00:30:15.680 --> 00:30:22.460
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.
352
00:30:22.460 --> 00:30:23.040
Yeah.
353
00:30:23.040 --> 00:30:29.780
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
354
00:30:29.780 --> 00:30:34.000
not unrelated to looking at structures.
355
00:30:34.000 --> 00:30:43.880
So that's another side project. And yeah, that one has... I'll be honest, I have used AI to help me here.
356
00:30:43.880 --> 00:30:44.540
Hmm.
357
00:30:44.540 --> 00:31:12.140
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.
358
00:31:12.140 --> 00:31:16.680
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.
359
00:31:16.680 --> 00:31:16.900
Okay.
360
00:31:16.900 --> 00:31:32.600
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
361
00:31:32.600 --> 00:31:38.700
about this. I think it's going to be the forefront of everyone's mind, is, you know, like programming is
362
00:31:38.700 --> 00:31:40.940
as we've discussed, you know, something we love doing and, you know,
363
00:31:40.940 --> 00:31:49.790
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.
364
00:31:49.790 --> 00:31:50.080
Right.
365
00:31:50.080 --> 00:31:58.560
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
366
00:31:58.560 --> 00:31:58.560
Yeah, yeah.
367
00:31:58.560 --> 00:32:01.940
for it too. What else you got?
368
00:32:01.940 --> 00:32:02.020
Okay.
369
00:32:02.020 --> 00:32:03.440
What else you got? Or what questions or what?
370
00:32:03.440 --> 00:32:26.500
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.
371
00:32:26.500 --> 00:32:37.500
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.
372
00:32:37.500 --> 00:32:40.820
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.
373
00:32:40.820 --> 00:32:55.200
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.
374
00:32:55.200 --> 00:32:55.200
Oh yeah!
375
00:32:55.200 --> 00:32:57.020
No, but I think that, yeah. Yeah.
376
00:32:57.020 --> 00:33:03.180
Yeah. And I'm just like wandering around my house being like, oh, microwave, dishwasher, refrigerator.
377
00:33:03.180 --> 00:33:04.360
I... There's a...
378
00:33:04.360 --> 00:33:11.040
Washing machine. Like, yeah, I've never given a second thought to any of these things. And now I suddenly care by proxy.
379
00:33:11.040 --> 00:33:28.860
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
380
00:33:28.860 --> 00:33:28.860
Right. Yeah.
381
00:33:28.860 --> 00:33:47.500
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
382
00:33:47.500 --> 00:33:47.820
Yeah.
383
00:33:47.820 --> 00:33:59.160
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,
384
00:33:59.160 --> 00:34:00.320
Bluesky the other day, like,
385
00:34:00.320 --> 00:34:00.320
Okay.
386
00:34:00.320 --> 00:34:10.850
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.
387
00:34:10.850 --> 00:34:11.580
Okay. Right.
388
00:34:11.580 --> 00:34:28.940
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.
389
00:34:28.940 --> 00:34:29.380
Yeah.
390
00:34:29.380 --> 00:34:44.560
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.
391
00:34:44.560 --> 00:34:44.910
Yeah.
392
00:34:44.910 --> 00:34:45.000
Yeah.
393
00:34:45.000 --> 00:34:48.200
The third song of which, incidentally, was Rick Astley's Never Gonna Give You Up.
394
00:34:48.200 --> 00:34:51.250
So I felt like completely owned that. I listened to it.
395
00:34:51.250 --> 00:34:51.280
Yep.
396
00:34:51.280 --> 00:35:03.140
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.
397
00:35:03.140 --> 00:35:14.400
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.
398
00:35:14.400 --> 00:35:25.820
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.
399
00:35:25.820 --> 00:35:32.580
And yet, here I am in a room filled with their sodding devices, and it can't answer a simple question about...
400
00:35:32.580 --> 00:35:32.580
Yes.
401
00:35:32.580 --> 00:35:34.080
Anything.
402
00:35:34.080 --> 00:35:35.320
Yeah.
403
00:35:35.320 --> 00:35:37.470
I mean, like, I want that to work.
404
00:35:37.470 --> 00:35:37.600
Yeah.
405
00:35:37.600 --> 00:35:38.790
Why does it not just work?
406
00:35:38.790 --> 00:35:39.180
Yeah. Why is this so hard?
407
00:35:39.180 --> 00:35:39.580
It just... Ah!
408
00:35:39.580 --> 00:35:49.120
Why is this so hard? Yeah, I used to have a competing device, you know, created by an online bookseller.
409
00:35:49.120 --> 00:35:49.300
Ah.
410
00:35:49.300 --> 00:35:51.940
Oh, right.
411
00:35:51.940 --> 00:35:55.400
And I, in a fit of rage one day, because it started, like,
412
00:35:55.400 --> 00:35:55.400
Yeah.
413
00:35:55.400 --> 00:36:04.720
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.
414
00:36:04.720 --> 00:36:04.920
I...
415
00:36:04.920 --> 00:36:09.460
And yeah, that was fun while it was new and kind of interesting and sort of worked.
416
00:36:09.460 --> 00:36:09.640
Yeah, I can see that.
417
00:36:09.640 --> 00:36:12.000
And now I'm just like, get the hell out of my house.
418
00:36:12.000 --> 00:36:20.440
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.
419
00:36:20.440 --> 00:36:20.800
Okay. Yeah.
420
00:36:20.800 --> 00:36:27.080
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
421
00:36:27.080 --> 00:36:31.270
Yeah, yeah. Yes. I've gone down the rabbit hole of Home Assistant a couple of times now, actually.
422
00:36:31.270 --> 00:36:31.580
Home Assistant.
423
00:36:31.580 --> 00:36:35.360
Right. So I could see that being a cool set of projects.
424
00:36:35.360 --> 00:36:36.430
Yeah. Yeah.
425
00:36:36.430 --> 00:36:45.840
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
426
00:36:45.840 --> 00:36:50.720
devices were that, they just did what I needed them to do, which is very, very little.
427
00:36:50.720 --> 00:36:51.200
Okay.
428
00:36:51.200 --> 00:37:05.100
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.
429
00:37:05.100 --> 00:37:07.820
Yeah, but maybe I should go down that route. I know.
430
00:37:07.820 --> 00:37:22.020
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,
431
00:37:22.020 --> 00:37:26.390
you know, the Mac mini that is connected to, you know, the super powerful malevolent AI, whatever.
432
00:37:26.390 --> 00:37:26.620
Yeah.
433
00:37:26.620 --> 00:37:34.830
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,
434
00:37:34.830 --> 00:37:34.980
Right.
435
00:37:34.980 --> 00:37:36.250
it works essentially the same.
436
00:37:36.250 --> 00:37:36.540
And.
437
00:37:36.540 --> 00:37:42.300
It's how a reasonably sensible personal assistant would have created a directory structure and file structure, and it's mostly well-written.
438
00:37:42.300 --> 00:37:42.590
Right?
439
00:37:42.590 --> 00:37:43.740
Yes, yes, exactly. Yep.
440
00:37:43.740 --> 00:37:44.320
No, exactly.
441
00:37:44.320 --> 00:37:44.610
Yeah.
442
00:37:44.610 --> 00:37:50.940
That is a really weird thing, that's the democratization of data that Markdown files represent, right, compared to, like, I know some...
443
00:37:50.940 --> 00:37:51.810
I know. Yeah.
444
00:37:51.810 --> 00:37:52.380
vendor lock-in.
445
00:37:52.380 --> 00:37:53.250
A Word document.
446
00:37:53.250 --> 00:37:54.110
Native database file.
447
00:37:54.110 --> 00:37:55.260
I mean, they're... they're
448
00:37:55.260 --> 00:37:55.840
Oh, gee.
449
00:37:55.840 --> 00:38:04.480
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
450
00:38:04.480 --> 00:38:05.920
Yeah, yeah, no, for real.
451
00:38:05.920 --> 00:38:07.240
Yeah.
452
00:38:07.240 --> 00:38:09.750
Yeah. All right. I've got one last thing because we're actually remarkably.
453
00:38:09.750 --> 00:38:10.460
All right.
454
00:38:10.460 --> 00:38:15.760
Despite us having no idea what we're going to talk about. Knock on wood, my little CalDigit has survived.
455
00:38:15.760 --> 00:38:18.520
Don't knock on the CalDigit.
456
00:38:18.520 --> 00:38:28.600
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.
457
00:38:28.600 --> 00:38:28.980
Oh yeah. Okay. Yeah.
458
00:38:28.980 --> 00:38:40.460
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.
459
00:38:40.460 --> 00:38:51.800
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.
460
00:38:51.800 --> 00:38:52.020
Mmm.
461
00:38:52.020 --> 00:39:01.940
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.
462
00:39:01.940 --> 00:39:02.440
Yeah, yeah.
463
00:39:02.440 --> 00:39:15.490
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.
464
00:39:15.490 --> 00:39:43.420
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...
465
00:39:43.420 --> 00:39:43.680
Yeah.
466
00:39:43.680 --> 00:40:00.330
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
467
00:40:00.330 --> 00:40:00.600
two-inch
468
00:40:00.600 --> 00:40:00.870
Okay.
469
00:40:00.870 --> 00:40:05.430
little speaker such as you would have had in, like, a case on an old, you know
470
00:40:05.430 --> 00:40:06.240
Okay. Yeah. Huh.
471
00:40:06.240 --> 00:40:19.590
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.
472
00:40:19.590 --> 00:40:20.020
Ow.
473
00:40:20.020 --> 00:40:42.580
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.
474
00:40:42.580 --> 00:40:46.350
This is what it sounds like if you were to have bodged in some headphones at this point.
475
00:40:46.350 --> 00:40:46.500
Ha, yeah.
476
00:40:46.500 --> 00:40:54.270
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.
477
00:40:54.270 --> 00:40:54.800
Yeah, yeah.
478
00:40:54.800 --> 00:40:55.070
Although.
479
00:40:55.070 --> 00:40:55.340
Right.
480
00:40:55.340 --> 00:41:03.550
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
481
00:41:03.550 --> 00:41:04.900
Oh man, that's super cool.
482
00:41:04.900 --> 00:41:13.330
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.
483
00:41:13.330 --> 00:41:13.460
Wow.
484
00:41:13.460 --> 00:41:23.710
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.
485
00:41:23.710 --> 00:41:23.780
Right.
486
00:41:23.780 --> 00:41:27.760
But nowadays, if you Google it, you're going to get the AI answer first anyway. So I don't know.
487
00:41:27.760 --> 00:41:27.840
Right.
488
00:41:27.840 --> 00:41:29.980
I don't know. Where are we? What is going on?
489
00:41:29.980 --> 00:41:31.560
Yeah.
490
00:41:31.560 --> 00:41:35.660
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.
491
00:41:35.660 --> 00:41:38.100
We were going to do two lightning talks and then it was going to crash, right?
492
00:41:38.100 --> 00:41:38.200
Oh.
493
00:41:38.200 --> 00:41:38.300
Uh-huh.
494
00:41:38.300 --> 00:41:38.400
Yeah.
495
00:41:38.400 --> 00:41:42.380
That's right.
496
00:41:42.380 --> 00:41:45.440
So I guess we should probably pause here and maybe we can continue.
497
00:41:45.440 --> 00:41:46.620
All right. Yeah. This is a perfectly cromulent podcast.
498
00:41:46.620 --> 00:41:59.140
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?
499
00:41:59.140 --> 00:41:59.520
I don't know what you're saying.
500
00:41:59.520 --> 00:42:01.060
Well, when they walk past in the podcast, you know, that's...
501
00:42:01.060 --> 00:42:01.060
What? That's true. Yeah. Do we have any?
502
00:42:01.060 --> 00:42:13.430
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.
503
00:42:13.430 --> 00:42:14.020
Okay.
504
00:42:14.020 --> 00:42:19.610
I've enjoyed this. Thank you for letting me talk at 100 miles an hour at you and to hear about your.
505
00:42:19.610 --> 00:42:21.520
Yeah, it's good. Yeah, it does. That's how we work.
506
00:42:21.520 --> 00:42:22.480
GLaDOS thing. Yeah.
507
00:42:22.480 --> 00:42:23.400
This is good.
508
00:42:23.400 --> 00:42:30.530
And I guess we will catch up next time.
509
00:42:30.530 --> 00:42:32.530
Next time.