text
stringlengths
0
2.35k
**Mat Ryer:** So with binary bloat then - like you said, 16k used to be a big program. And I remember -- you know, a floppy disk was 1.44 megabytes that you could fit on that. If you take a photo now and share it, that's about eight floppy disks, or something, at least. You wouldn't tolerate that. If you're like "Oh, y...
**Roger Peppe:** Those were big floppy disks as well, right? It started off at like 200k, if you were lucky...
**Mat Ryer:** Yeah, when they used to be actually floppy.
**Roger Peppe:** Yeah. Not to mention tapes...
**Mat Ryer:** Yeah. Honestly, I love that early tech. I really miss it when tech was rubbish. It was so cool. I had a Spectrum, with the tape cassette thing, when I was a kid... So literally - and people won't believe this, but in order to load a program... I don't even know if they know what a cassette tape is either....
**Egon Elbre:** I think you now need to explain the modem as well.
**Mat Ryer:** \[19:56\] Yeah... This is it. No, it's all changed so much... And by the way, I started young. I'm not old. I just want to make that clear. But why do we care about binaries now? Because we can get away with great, big binaries, can't we? What's the big deal? They upload in no time, they move around the w...
**Egon Elbre:** I think mostly we don't. If we did, we already would have done something significant about it. But there are definitely cases where we do care.
**Roger Peppe:** I do get shocked by the size of binaries sometimes. I look at it, I'm expecting like five megabytes or something, and it's 120 megabytes. I'm like "Wow...! That's ridiculous."
**Mat Ryer:** And is that usually because you've imported something in your own program? Or are you just talking about anyone's programs?
**Roger Peppe:** I guess I'm just talking about building a binary and having a look; it's not me importing something particularly. But yeah, binaries are very big. I mean, I care more about binaries on small devices, if I'm running something on a Raspberry Pi, or... Actually, even a Raspberry Pi, you usually have quite...
**Mat Ryer:** How many floppy drives can you attach to a Raspberry Pi?
**Roger Peppe:** How many floppy drives have you got? \[laughter\]
**Mat Ryer:** Not enough.
**Roger Peppe:** Clearly.
**Mat Ryer:** None at the moment... Actually, I do have one, because I've recently -- I decided I'm going to buy all my old computers that I used to have. I've got a Spectrum already, it's arrived. I've ordered an Amiga 500, and I'm bidding on one on eBay, the Amiga 1200. These were my early computers that I grew up wi...
**Roger Peppe:** That's a good idea.
**Mat Ryer:** Yeah. I'm just going to put them on the wall. Plug them in, but just have them on the wall.
**Roger Peppe:** I should get an Acorn Archimedes again. That was my first ever computer that I owned.
**Mat Ryer:** Did you? That's cool.
**Roger Peppe:** At university that was, yeah.
**Mat Ryer:** Yeah... We had those at school.
**Egon Elbre:** I started on a 286, so... A bit later than you.
**Mat Ryer:** Yeah... What are you trying to say?
**Egon Elbre:** I started later...?
**Mat Ryer:** Well, then you did a fine job. \[laughs\]
**Break:** \[22:11\]
**Mat Ryer:** Okay, so small devices - and this is where TinyGo comes in, because this is the problem that TinyGo is trying to address, is so that you can still use what is essentially the standard library, but it's much smaller; it's deliberately designed to be cut down and simpler.
**Roger Peppe:** Yeah. I love TinyGo. I use TinyGo a bit gratuitously, a friend once said. I wanted to build a doorbell with hanging -- not tubes; what do you call them? Maybe you call them tubes... I would think knockers...
**Mat Ryer:** Stick with tubes.
**Roger Peppe:** So I built in the software -- he built the hardware; he put the actual thing together with the relays in there, but he never actually got the tubes working. So I built the software, and it's great because you've got this tiny little microprocessor... You know, maybe it was 16-bit, maybe 8-bit; I can't ...
**Mat Ryer:** Yeah. You can have butler. Hire somebody to -- when the lights come on, they hit the tubes.
**Roger Peppe:** At the same time, that would work.
**Mat Ryer:** If he could... Yeah, eventually work their way up to that. That sounds cool. I love that. And Egon, at GopherCon EU in Berlin, recently, you were hacking with TinyGo, weren't you?
**Egon Elbre:** Oh, yeah. I did some MIDI controller thingy.
**Mat Ryer:** Yeah. So he was playing music on a little -- he had these buttons attached to this little breadboard, and then wrote the code to translate that into MIDI instructions for some music software.
**Egon Elbre:** Yeah, it worked pretty well, and it was really nice.
**Mat Ryer:** \[26:13\] Yeah, I liked it.
**Egon Elbre:** I did get some embedded device noise on it, so some of the buttons didn't work as they were supposed to, but it still did things, I guess...
**Mat Ryer:** Yeah, it was going *DONG DOING DING* which I think is good. It's not as good as Roger on the fiddle...
**Roger Peppe:** Not so nice on that I'm afraid... It was actually great using Go with TinyGo, because you could have this debouncing code, which totally didn't care about any of the other code. It would just sleep for a bit, wait for debounce... And that was independent of all the other logic waiting for buttons, and ...
**Mat Ryer:** What was that doing them, the debounce? Literally stopping if you got noise coming through from buttons, or something?
**Roger Peppe:** Yeah, so if you press a button, then it's not a clean thing that you have pressed this button. It makes contact, and then bounces, and comes down again, and bounces, and comes down again... It eventually ends up either down or up, right? But you don't know when that initial contact is made, which way i...
**Mat Ryer:** Yeah. You would stress the butler out.
**Roger Peppe:** Yeah, you don't want to do that.
**Egon Elbre:** I did have debounce code, but something was wrong. \[laughter\]
**Mat Ryer:** Well, that's funny, because debounce - I've used that in the frontend of web development, which is literally the same thing. If you click too many times, or sometimes on hover -- because you can, if you're just teetering on the edge, on the precipice of the pixel, you can end up with this horrible flicker...
**Roger Peppe:** It is, absolutely, literally, a bounce, yeah. It was quite interesting to write... And it's so nice writing in Go, honestly. I can't get over how nice it was. You can have interfaces... They're quite clever about interfaces and TinyGo, actually, because they basically expand all the code out. They're r...
**Mat Ryer:** Yeah. Do you think people should, as an experiment, use TinyGo and try and actually experiment with that, and also run something on a tiny device, just to sort of understand what's going on? Or is this, again -- are we just at the point, most people, where we can just deal with a big binary?
**Roger Peppe:** I think it's well worth experimenting with it, and having a go, see what it takes to run in 1k of RAM, or whatever... Because binaries are still quite big, but you can still have 128k, 256k of binary. But you're not going to be importing gRPC. \[laughter\]