 Hi, I'm Denchy. So if you've seen my previous videos on Scratch, you'll know that people make a lot of various impressive programs in it. Everything from 3D games to physics simulators, stuff like that. And today what I'm looking at is probably the most impressive thing I've seen so far, which is a full implementation of the Linux kernel. 6.1.14 year it is right there in Scratch. So the way this is accomplished from what I know, of course I haven't sat down and looked through the entire source code for this yet because it's massive, but basically what it does is it emulates the RISC-5 architecture. This is running not on x86 or ARM as most devices are running Linux nowadays. This is a RISC-5 Linux kernel, which is one of the Linux kernels available. And what this does is it emulates a RISC-5 processor in Scratch and runs the Linux kernel. We'll have a closer look at what's going on in the background later, but first let's actually run it and see what it can do. I'm really curious. I have tried it before, but I've not really looked into it too deeply, so let's go. Alright, here we go. So it does have a full terminal interface. We can see the kernel starting up right there. So we're at 64 bits at 1000 kilohertz. So it's a 1 gigahertz processor in Scratch, at least according to the log here. If I'm reading the log right, it's starting the init system. And here we are. So we're logged in on a Linux term Scratch setup apparently. And we're just thrown into a terminal. So I'm going to try running a few commands and see what happens. So first of all, I want to see if it can clear the screen. So I'll try running clear. And okay, yeah, I guess that's not included. I tried to control L there, but that didn't work. I'll try doing Ls to see what the sort of contents of the drive are, because I know there is something. Yeah, here we are. There is something on here. There's a JavaScript program and readme.txt. So I'll try to cat out one of these files. So readme.txt. Sorry, I'm doing it wrong. I tried to press tab, but I'm running this. There's no tab completion in Scratch. Readme.txt. Let's see what happens. All right, here we are. Welcome to Linux on Scratch. This is overall a pretty bare bones Linux installation for risk five. But there's a few cool things installed. So you can use the add text editor. So I was thinking maybe there's like VIM included, but no, there's there's no VIM or VI or anything like that. It just comes with the add editor, which is one of those really rudimentary ones. If I'm not sure, I don't think this is the one from plan nine, but it's it's one of those really rudimentary editors where you're editing the text like line by line in a really weird way. I don't know how to use it. So I'm not gonna try using it. You can use duck tape to run JavaScript files. So I want us to run fizzbuzz.js with that. Okay. So I'll guess we'll do that duck tape and then fizzbuzz.js. See what it does. It's not really here. Oh, here we are. Okay. So I ran fizzbuzz up to 100. Huh. Well, there you go. It works. I guess I'll cat the readme. I tried doing control all of that. I'll cat the readme again because there was more information in there than it read. There's a benchmarking utility installed called Cormark, which can be used to test the speed of the risk five emulation. Okay, let's try that. So Cormark. So I realized that when you press enter, it kind of takes a little while for it to process it. So I just kind of have to wait because it takes a second. So I'm currently, yeah, there you go. A benchmark scratch that says the Cormark size is, wow, that's a, that's quite a coincident number. Does it come with like PWD? And okay, we're in root. It comes with LS. If I try to list like our binary programs, what is there? Okay. So there's a few things. So this is running busybox. Okay. So busybox is the base utilities you'd find in distributions like alpine and kiss linux. Okay. So touch is included RM. So all the basic utilities are there. I guess that's a testament to how flexible linux is that it'll run on literally anything, including an emulated risk five processor on scratch. And I don't know if you can hear that, but that's my computer, my computer fans spinning up as it tries to run this recompiled scratch program. Okay. So obviously all this will be linked in the description. But what I'm curious about now is what this actually looks like in the back, how this was accomplished scratch. We're going to click the C inside button and hopefully it won't crash our browser. Okay. There's there's a few things going on. So this is presumably just like a blank sprite. What's what's this then? This is probably good. What I just clicked on probably has a bunch of code. Okay. A bitwise and a B set A to that's a lot of embedded stuff. And it's like a tiny miniature little scroll figure. And you could scroll between. So this is like, okay, this is like all the I guess these are the this is the implementation of the entire risk five instruction set, I'm assuming. I mean, it's crazy that this is done in scratch, right? But at the same time, it is technically just running the instructions which were made into like a physical processor, like a physical instruction set, at least I'm assuming I'm not a hardware architect. I can't give you the details here, but it's basically emulating a real CPU in scratch, which is just crazy. And so what it does is it from from what I understood, they copy like a copy of Linux into this, they upload a copy of Linux into the wrong, and then it can just run Linux. And I'm assuming the terminal works by just having a bunch of sprites. And there's a pen tool as well. So which is weird because I know that scratch has like a text tool. So I'm surprised that's not being used. But I guess not. I guess it's like emulating a display or something. So what's this? This is the Oh, these are all the different key events. So key events and those go into the processor. Okay, adding yours like the run button, which actually starts the program, the risk five wrong. Okay, if we if we do show the list, we can actually look through the ROM. So if I do show show list, risk five wrong. I believe this entire thing is the whole Linux kernel, like address by address, this is the ROM for this full install late, not just the Linux kernel, but the full installation of Linux from scratch, that is currently running at scratch is the getting over this mental image of scratch right next to an emulated Linux system is just that's messing with me right now. But what you're seeing in this tiny little risk five wrong menu, that's that's all the data. I'm assuming because I mean, what else would be in the wrong? So I'm waiting for the moment people start getting XOR growing on scratch. And the moment we start getting like, maybe not XOR, but more advanced distributions, maybe start getting like a package manager work. I'm assuming probably not a package manager because that would require some kind of internet IO, but maybe something like Vim running in scratch stuff like that. That would be interesting to see. I want to thank the creator of this project, Billman 66 for creating this amazingly impressive program in scratch. Of course, all of this will be in the description. I'm running this using Turbo Warp, which is a recompiler for scratch recompile scratch to JavaScript and it runs it basically runs your scratch projects a lot faster than the native scratch engine. And it's basically impossible to run this without having Turbo Warp. So yeah, I hope everybody enjoyed this video. And I've been Denchie. Goodbye.