Before you comment about the 1MHz mistake! *I corrected it in the description* when the video was uploaded after it was initially pointed out. Spare me your nitpicking please!
@@honey-6jrbseb You just lack a fundamental understanding of how emulation works. This is not going to get 3 orders of magnitude faster, no matter how much you hope.
5:31 scratch actually doesn't have a native "text tool" that can display text cleanly like this. the text is actually rendered using entirely the pen tool using a font engine that i wrote a while back which compressed most of the glyphs into a list. the font used is GNU Unifont if anyone was wondering
Do you have a writeup about this project? I've been searching but didn't find it. I'm trying to understand what is the content of the ROM. Where is the entrypoint, the initcpio, the kernel binary etc. Or how does /dev/ttyS0 connect to the terminal "hardware".
@@Denshi Yes, Scratch is made with Javascript and Turbowarp even compiles Scratch projects into Javascript, but that has nothing to do with this project.
If you think about it, this is both Linux _ON_ Scratch, but also Linux _FROM_ Scratch, because it uses completely custom distro built from the ground up.
@@NinjaWeedle we gonna get Windows 3.1 with the classic Tada.wav startup sound after that and you can still find Tada.wav in modern versions of Windows aka in C:\Windows\Media
@@iflyplanesthrutunnels The amount of performance overhead this would cost to a PC would be insane. Gonna make an i9 13900K feel like a potato CPU with how slow it would make things
People have been wanting ways to convert scratch between programming languages forever, that's really cool! If it's kept personal, then it's still cool that someone figured it out. I think Scratch to C would be harder, but maybe not.
Saw this a couple of days ago, this is completely crazy! Would love to see it pushed to its limits. The dev mentioned that it may be theoretically possible to make like a network stack or some sort of connection to the outside word, so you could SSH into the Linux on Scratch from your terminal. That'd be hilarious. Also, this is probably the most secure PC on earth, like I'd imagine there's no way to break out of the Scratch emulator lol
@@PabTSM-OfficialChannel scratch does have cloud variables tho.. so you could have another computer with the project open that reads and writes to the cloud variables and translates them to allow the program to communicate with the outside world would be insanely slow though
1:16 Don't know if somebody else has said this, but you are reading the log wrong. The clock speed of the CPU emulated in this project is variable as some instructions take longer than others and it really depends on the speed of your computer, not some fixed value. It usually hovers around 1-2kHz. It is also a 32-bit system not a 64-bit system. The value you are seeing in the logs is about the accuracy and tick rate of the timer provided by the CPU. It's saying that the CPU has a 64-bit clock value which ticks up at 1000kHz, not that the CPU itself is 64-bit and has a clock speed of 1000kHz. Also, another correction, 5:31, vanilla Scratch does not have a text tool. You might be thinking of the experimental extension they have made which allows printing text but in normal scratch you have to render it yourself which is what this project does. I worked on this and if you have any other questions I'm happy to answer them :)
It would be awesome if we could get a scratch compiler to C++, that then compiles into being an executable for your system, that might actually guess up to a single gigahertz instead of being you know, one megahertz
I started CS50 and one of the first things they have you do is make something more or less sophisticated in Scratch. I tried to make something akin to Lightroom but that would only change the basic global settings by sliders. I kept complaining how it was not possible and how Scratch is dumb. Seeing this and some other stuff people have made in it impresses me. PS: I still didn't get sliders to work.
i normally hate people correcting spelling mistakes, but just to let you know it's risc-v, not risk-v (it might change context in some scenarios so im telling you yk)
@@october1234 You have to be trolling me right now?! Even been open source, implementing a *FUCKING KERNEL PLUS SOME APPS* on *FUCKING SCRATCH* requires so much dedication and time...
@@godnyx117 Dont get me wrong, I agree that implementing a cpu is extremely hard, let alone scratch. I just want to point out that a possible reason for them to chose risc-v over arm or x86 could be because it is open source.
@@october1234 Oh, I thought you talked about the Linux kernel and meant that it is easy to do it because it's open source, hence why I was so "socked". In that case, yeah, RISC-V may be chosen for that reason! This project is so cool and interesting!
If you think about it a package manager and the internet is possible by making the project communicate with an internet providing computer through cloud variables
If Scratch runs under Linux then you can now run this kind of Linux under Linux and you can even run Scratch on this implementation of Linux that means that Scratch runs on Scratch.
Scratch does not have a text tool, your options are to roll your own renderer with the pen tool or just put the text in variables/lists and make them visible.
To summarize : there are a JavaScript program On a linux distribution Runing on Risk 5 Processor Emulated onn Scratch Itself coded in javascript ! WHAT THE HELL ! ARE YOU OK ?
While attending the University of Helsinki in the fall of 1990, Torvalds enrolled in a Unix course.[52] The course utilized a MicroVAX minicomputer running Ultrix, and one of the required texts was Operating Systems: Design and Implementation by Andrew S. Tanenbaum. This textbook included a copy of Tanenbaum's MINIX operating system. It was with this course that Torvalds first became exposed to Unix. In 1991, he became curious about operating systems.[53] Frustrated by the licensing of MINIX, which at the time limited it to educational use only,[49] he began to work on his own operating system kernel, which eventually became the Linux kernel. This scratched Linux is a good think
i think redstone would be impossible, as you probably couldnt fit the required redstone for all the ram and stuff in the loaded chunks, but perhaps you could do it with command blocks?
There is actually some network in scratch (turbowarp which is what you're running there, primarily for speedup i guess, not the extra features it provides) however the network functionality is like, basic http requests, not opening a connection, though i'm not sure what's possible if you write your own extension or try to accomplish it via running javascript from within scratch (like, escaping scratch blocks by setting a certain special variable to js source code)
what if you set up a bunch of cloud variables and got another machine to run a modded version of scratch so that when the linux vm makes a web request, it transfers to the mod, witch makes a fetch request, then writes it to an output cloud variable, effectively acting as a translator or antenna. This would allow for all sorts of crazy things!
Funnily enough, this is what an FPGA implementation/simulation of a RISC-V Linux looks like! You have your different modules implementing your CPU, and a rom that contains your machine code! Sweet video, thanks for Sharing!
as soon as linux gets UI scratch projects you can just run games "natively" on scratch and make javascript programs in java in linux in scratch on a linux computer
@@markwilson3326 no scratch uses https which is encrypted, you would have to do a server hack to do it i think and that would be…both morally and legally bad
I was trying to replicate Windows XP when I was in 5th grade in elementary school, but it turns out that I just made a start menu and the school term is over. 😂
it'd probably require a lot more tweaks tho. i don't know how scratch works and how its text rendering works, but drawing pixels probably is a lot harder than drawing text. if you can emulate xorg, you can emulate any window manager, just that, you need to emulate xorg, which you need raw pixels for
@@fxiqval Because the text is using a unix font and has all the special characterslike enabled, I think that it is already drawn like an image, not like a scratch text, so configuring an X server to basically draw window pixels instead of text pixels won't be a big deal.
@@misternether8602 that's actually a fair point, it also supports coloring cuz ls has colors, not sure if it supports background coloring tho. if it does, you can print a space w/ a colored background
2:08 "i guess there's no tab completion in scratch" really shows how he just isn't comprehending what's going on here or why this is so impressive, it's not that there's no tab completion hahaha, it's just that the turbowarp website caught the tab key press way before it even got to the scratch window, not even sure a scratch program even has an option/way to receive the tab key in the first place, but it has nothing to do with "oh i guess there's no tab completion in this" hahahaha
ik this type of project would never be released due to copyright infringement but if people can code emulators in scratch, whats stopping someone from making an nes emulator for scratch?
Before you comment about the 1MHz mistake! *I corrected it in the description* when the video was uploaded after it was initially pointed out. Spare me your nitpicking please!
Did you not read 1 GHz and think "Wow that's strange"? Or do you actually think a 4 GHz processor can run a 1 GHz processor in scratch?
@@PokeComm might happen someday 👀
@@PokeComm IT can. You're clueless
@@honey-6jrbseb You just lack a fundamental understanding of how emulation works. This is not going to get 3 orders of magnitude faster, no matter how much you hope.
@@PokeComm It's theoritically possible, no idea why you're saying otherwise.
5:31
scratch actually doesn't have a native "text tool" that can display text cleanly like this. the text is actually rendered using entirely the pen tool using a font engine that i wrote a while back which compressed most of the glyphs into a list. the font used is GNU Unifont if anyone was wondering
cool, thanks for creating for it.
Do you have a writeup about this project? I've been searching but didn't find it. I'm trying to understand what is the content of the ROM. Where is the entrypoint, the initcpio, the kernel binary etc. Or how does /dev/ttyS0 connect to the terminal "hardware".
@@kebien6020following
@@leeroyjenkins0 scratch mesa 😂
You did this. Man you're a whiz
Linux from Scratch: 😫❌
Linux on Scratch: 😎👌
so strange how the dev included a js engine into this but not a C compiler
It is strange! I was thinking it has something to do with Scratch being in JS, but I'm still not sure.
It is in fact@@Denshi
@@Denshi Yes, Scratch is made with Javascript and Turbowarp even compiles Scratch projects into Javascript, but that has nothing to do with this project.
I think js is easier to implement?
@@Denshi don't think so Turing machine en.wikipedia.org/wiki/Turing_machine
If you think about it, this is both Linux _ON_ Scratch, but also Linux _FROM_ Scratch, because it uses completely custom distro built from the ground up.
It uses buildroot. Im not sure how scratch that should be considered
and perhaps also Scratch on Linux
linux on from scratch on linux
The only truely bloat free installation.
Second only to not running linux at all.
@@EdgyPuermfs explaining why their barely supported obscure bsd distribution is actually way better then Linux because it saves 25 mbs of ram
@@Natalietrans Not running an OS or even a computer saves far more mbs of ram.
@@EdgyPuer You fool, I run Linux on pencil and paper by following RISC-V instructions by hand /s
computing like it's the 1930s@@glitchy_weasel
now we only need to get neofetch working and we finally get the linux distro of all time.
yes
I use linux on scratch btw
@@anubmusing9749 truly a Linux user of all time.
wget better 🗿
@@eeeeeeeeeex3 is wget in los?
average linux enthusiast when they have 1 min of free time:
why do I feel like we’re gonna eventually get a full Windows installation in Scratch
The author of this is working on getting windows 3.0 running in scratch via 8086 emulation
@@NinjaWeedle we gonna get Windows 3.1 with the classic Tada.wav startup sound after that and you can still find Tada.wav in modern versions of Windows aka in C:\Windows\Media
@@iflyplanesthrutunnels The amount of performance overhead this would cost to a PC would be insane. Gonna make an i9 13900K feel like a potato CPU with how slow it would make things
@@yancgc5098 I can just isolate the lag via virtual machine lol
@@yancgc5098The usage of Turbowarp, penguin mod and similar scratch mods make things run way faster.
1:21 1000KHz is 1 MHz not 1 GHz
Noted!
I can’t even begin to imagine how someone would pull this off in such a limited language. It’s like building a sky scraper with silverware
tbf he didnt. He made a tool that translates from C to Scratch.
Scary is pretty close to some programming languages (fairly close to python suprisingly) so it’s not unheard of
@@honkhonk8009Oh yes, that's basically nothing. I could do that in an afternoon. Not an achievement at all.
People have been wanting ways to convert scratch between programming languages forever, that's really cool! If it's kept personal, then it's still cool that someone figured it out. I think Scratch to C would be harder, but maybe not.
@@olivereisenberger7215its really not super remarkable
I’m waiting for someone to run scratch inside of that linux
lol
If you can get a browser working (and network connection) it might work.
Saw this a couple of days ago, this is completely crazy! Would love to see it pushed to its limits. The dev mentioned that it may be theoretically possible to make like a network stack or some sort of connection to the outside word, so you could SSH into the Linux on Scratch from your terminal. That'd be hilarious.
Also, this is probably the most secure PC on earth, like I'd imagine there's no way to break out of the Scratch emulator lol
there is a turbowarp extension for that, but its like socket, http, etc
impossible, that would require http requests to atleast get a server file which scratch does not have
@@PabTSM-OfficialChannel turbowarp
@@PabTSM-OfficialChannel Scratch doesn't, but a clone of it, TurboWarp, has extensions to communicate over a real networl.
@@PabTSM-OfficialChannel scratch does have cloud variables tho.. so you could have another computer with the project open that reads and writes to the cloud variables and translates them to allow the program to communicate with the outside world
would be insanely slow though
1:16 Don't know if somebody else has said this, but you are reading the log wrong. The clock speed of the CPU emulated in this project is variable as some instructions take longer than others and it really depends on the speed of your computer, not some fixed value. It usually hovers around 1-2kHz. It is also a 32-bit system not a 64-bit system. The value you are seeing in the logs is about the accuracy and tick rate of the timer provided by the CPU. It's saying that the CPU has a 64-bit clock value which ticks up at 1000kHz, not that the CPU itself is 64-bit and has a clock speed of 1000kHz.
Also, another correction, 5:31, vanilla Scratch does not have a text tool. You might be thinking of the experimental extension they have made which allows printing text but in normal scratch you have to render it yourself which is what this project does.
I worked on this and if you have any other questions I'm happy to answer them :)
Yep, instantly had those thoughts and happy to see a person in the comments correct it :)
No, he didn't read it wrong. You are wrong
@@derwastlread the last paragraph you table
@@derwastl 1000kHz is 1MHz - google.com/search?q=1000kHz+to+MHz
@@derwastl I helped make the project lmao
It would be awesome if we could get a scratch compiler to C++, that then compiles into being an executable for your system, that might actually guess up to a single gigahertz instead of being you know, one megahertz
Compiling to readable and downloadable Javascript is possible (using LeopardJS) so maybe putting it into something like Node would work
This is actually one of my projects hopefully it goes well
Turbowarp Packager is the way to go!
@@DarkninjaRocksnot the same, esp performance wise
I started CS50 and one of the first things they have you do is make something more or less sophisticated in Scratch. I tried to make something akin to Lightroom but that would only change the basic global settings by sliders. I kept complaining how it was not possible and how Scratch is dumb.
Seeing this and some other stuff people have made in it impresses me.
PS: I still didn't get sliders to work.
Just because something is technically possible does not make it a good idea lol
that fizzbuzz was running in a js runtime on a scratch riskv emulator on a js scratch emulator on another js runtime on an actual metal
i normally hate people correcting spelling mistakes, but just to let you know it's risc-v, not risk-v (it might change context in some scenarios so im telling you yk)
1:17 NO! 1000kHz are not 1GHz, but 1MHz. 1GHz processor in Scratch would be impressive
if there were packages made available for this, would this then count as a distro?
GNU on scratch here we come
I'd like to think it includes BusyBox just to make Stallmanites angry that they can't say its actually GNU+Linux in Scratch
me looking at the video: it's just scratch on linux
me reading the title again: wait a minute...
“I run Arch”
“I run Gentoo”
“I run Linux from scratch”
“Really? I run Linux ON scratch”
I use Scratch btw
HOLY.... These madmen, what have they done!!!!!!! And they are BASED AF for choosing RISC-V!
Probably because its open source and easier to implement?
@@october1234 You have to be trolling me right now?! Even been open source, implementing a *FUCKING KERNEL PLUS SOME APPS* on *FUCKING SCRATCH* requires so much dedication and time...
@@godnyx117 Dont get me wrong, I agree that implementing a cpu is extremely hard, let alone scratch. I just want to point out that a possible reason for them to chose risc-v over arm or x86 could be because it is open source.
@@october1234 Oh, I thought you talked about the Linux kernel and meant that it is easy to do it because it's open source, hence why I was so "socked".
In that case, yeah, RISC-V may be chosen for that reason! This project is so cool and interesting!
they took “Linux from scratch” to a whole new level
Running Linux on Scratch on Linux on Scratch would be the real test.
If you think about it a package manager and the internet is possible by making the project communicate with an internet providing computer through cloud variables
Technically the only limit is what’s on the rom atm.
If you had an install with vim loaded onto the rom I dont see a reason why it wouldn’t work
imagine one day we just see “running scratch linux minecraft!” or something along the lines of that
As a developer of a scratch OS thing, this is impressive as hell
That's actually amazing! I underestimated this language
1:17 one megahertz 1 gigahertz would be 1000 megahertz
If Scratch runs under Linux then you can now run this kind of Linux under Linux and you can even run Scratch on this implementation of Linux that means that Scratch runs on Scratch.
Scratch does not have a text tool, your options are to roll your own renderer with the pen tool or just put the text in variables/lists and make them visible.
or use the say/think blocks
@@qwertyuiop.lkjhgfdsawhich look like hot garbage
@@qwertyuiop.lkjhgfdsa ew
To summarize :
there are a JavaScript program
On a linux distribution
Runing on Risk 5 Processor
Emulated onn Scratch
Itself coded in javascript !
WHAT THE HELL !
ARE YOU OK ?
"That would require some kind of internet IO"
TurboWarp's 'Cloudlink' addon: "Allow me to introduce myself."
Running doom, on wine, on Linux, on scratch
While attending the University of Helsinki in the fall of 1990, Torvalds enrolled in a Unix course.[52] The course utilized a MicroVAX minicomputer running Ultrix, and one of the required texts was Operating Systems: Design and Implementation by Andrew S. Tanenbaum. This textbook included a copy of Tanenbaum's MINIX operating system. It was with this course that Torvalds first became exposed to Unix. In 1991, he became curious about operating systems.[53] Frustrated by the licensing of MINIX, which at the time limited it to educational use only,[49] he began to work on his own operating system kernel, which eventually became the Linux kernel. This scratched Linux is a good think
Everybody gangasta until Scratch running on Sratch
I hope someone emulates a Linux kernel in minecraft. they have made CPUs and GPUs on it before. The hardware requirements would be crazy tho
@@bumblebeegamerreal he probably meant to run linux on redstone, no mods needed
@@_lun4r_ Oh i see
i think redstone would be impossible, as you probably couldnt fit the required redstone for all the ram and stuff in the loaded chunks, but perhaps you could do it with command blocks?
that would be legit so cool but might be a little difficult
@@bumblebeegamerreal btw that mod only mirrors real virtual box's video output to minecraft
This is wild, and it becomes much more simpler to tweak memory and hack internal components of the OS!
There is actually some network in scratch (turbowarp which is what you're running there, primarily for speedup i guess, not the extra features it provides) however the network functionality is like, basic http requests, not opening a connection, though i'm not sure what's possible if you write your own extension or try to accomplish it via running javascript from within scratch (like, escaping scratch blocks by setting a certain special variable to js source code)
this is awesome and i love it makes ke wanna love the community even more i loved the part of the ROM
Now thats a real virtual machine to mess with viruses
I think there's an internet extension in turbowarp, so a package manager would THEORETICALLY be possible.
imagine using scratch as some sort of homelab
but can it run doom?
Turing completeness is fun!
I am still not able to wrap my head around it, this is truly amazing.
i just played "The mast" running in that same turbo engine . and im inpressed what someone can do with scratch
5:32 Scratch doesnt have a text tool outside of Scratch Labs. If vanilla scratch had a text tool coding in scratch would be heaven 😩
nice video, but whereis the "A Confy install: LFS"? we need it
Well considering doom runs on Linux, it's only a matter of time before someone makes doom on Linux on scratch
Doom already exists on Scratch. Pretty sure it’s in one of Griffpatch’s projects.
@@A-A-A-A-A-A Sure, but that's running natively in scratch, not in Linux on scratch
@@UCXEO5L8xnaMJhtUsuNXhlmQ Ah, misread the comment, sorry.
Since the Linux distro here is running at 1MHz and Doom 1 runs at 66MHz, there's a long way to go
i wonder when windows will be able to run in scratch?
what if you set up a bunch of cloud variables and got another machine to run a modded version of scratch so that when the linux vm makes a web request, it transfers to the mod, witch makes a fetch request, then writes it to an output cloud variable, effectively acting as a translator or antenna.
This would allow for all sorts of crazy things!
it would be REALLY slow
@@official-obama If you are looking for performance, Scratch is not a good place
@@official-obama80s internet at home
ed does indeed sound like c9
I recognize that penguin my dad used to work for computer stuff the mascot was a penguin with a blue outline on its chest
6:52
I think someone tried to ping in this thing?
?? YOU COULD THEORETICALLY RUN ANYTHING IN SCRATCH THAT YOU COULD RUN IN LINUX
I am surprised this was not released on April 1st
This is insane. I thought I was a god when I made the cat move with the arrow keys as a kid
Funnily enough, this is what an FPGA implementation/simulation of a RISC-V Linux looks like! You have your different modules implementing your CPU, and a rom that contains your machine code!
Sweet video, thanks for Sharing!
when you accidentally use Linux in Scratch instead of Linux from Scratch
Next someone should try to emulate a 386sx and run windows 95 in scratch.
Wow, a computer in scratch,just mind blowing
Brings a different meaning to "Linux from Scratch"
Finally, i can run linux on a school computer
Wow, this is amazing
When you just woke up and somebody tries to talk to you:
Yeah? Can we get a GUI loading though?
Could use cloud variables for internet -related protocols Though the package server would have to be running in the project.
From what I can tell, all 4263001 values in that ROM were input manually. What the hell.
probably imported
who needs linux from scratch when we have linux on scratch
"Linux From Scratch" has nothing on this guy.
1:20 1000k hertz is 1 mega hertz, not giga
as soon as linux gets UI scratch projects you can just run games "natively" on scratch and make javascript programs in java in linux in scratch on a linux computer
I want to play Doom on this thing.
1:31 It's not "Linux from scratch", it's "Linux On Scratch".
does it have a processor? does it have a keyboard? does it have a display? Can it run doom?
Finally, the FINEST in Scratch development!
can it run doom ? (not scratch, the emulated linux)
What we need to do now is use cloud variables and an AWS api to give this internet access somehow. Maybe that would work?
nope we would need http requests to even get a file from a server and scratch does not support it
@@markwilson3326 no scratch uses https which is encrypted, you would have to do a server hack to do it i think and that would be…both morally and legally bad
Now I want to build assembly soft debuggers in Scratch so I can visually browse everything
Would be nice to see scratch support in linux kernel, so we could write a driver or rewrite usb subsystem in scratch
haha i read the title the wrong way round, this is much more interesting
RiscV is foss so ez IG? But pain to implement
Now for Linux on Scratch!
if all you have is ed, you can always type ‘visual’ to enter vi(sual) mode :-)
could this be considered a linux distribution?
yes, it's a patched version of buildroot
anyone else having trouble opening it up on turbowarp?
So if you can emulate RiscV, then it should run RiscOS?
it runs on arm
Now we need Linux from Scratch on Scratch
I was trying to replicate Windows XP when I was in 5th grade in elementary school, but it turns out that I just made a start menu and the school term is over. 😂
is it possible to compile a basic windows manager in to this kernel and install the scratch on it. so basically to run scratch inside the scratch
it would be super hard, but possible. not planned for the future though.
it'd probably require a lot more tweaks tho. i don't know how scratch works and how its text rendering works, but drawing pixels probably is a lot harder than drawing text. if you can emulate xorg, you can emulate any window manager, just that, you need to emulate xorg, which you need raw pixels for
@@fxiqval Because the text is using a unix font and has all the special characterslike
enabled, I think that it is already drawn like an image, not like a scratch text, so configuring an X server to basically draw window pixels instead of text pixels won't be a big deal.
@@misternether8602 that's actually a fair point, it also supports coloring cuz ls has colors, not sure if it supports background coloring tho. if it does, you can print a space w/ a colored background
@@fxiqval there is no "scratch text", all the pixels for the text are rendered manually with the pen tool.
Next, your kitchen toaster. Oh wait..
2:08 "i guess there's no tab completion in scratch" really shows how he just isn't comprehending what's going on here or why this is so impressive, it's not that there's no tab completion hahaha, it's just that the turbowarp website caught the tab key press way before it even got to the scratch window, not even sure a scratch program even has an option/way to receive the tab key in the first place, but it has nothing to do with "oh i guess there's no tab completion in this" hahahaha
you can't get Tab key on scratch
@@koliwbr yea
ik this type of project would never be released due to copyright infringement but if people can code emulators in scratch, whats stopping someone from making an nes emulator for scratch?
One already exists and is shared, it's called Cool NES emulator.
It’s not available anymore TwT
i've actually tried doing that with windows 3 many years ago but it was an awful experience so i just give up
I wonder when windos will be on scratch
No cuz 12 y/o me on scratch 2 was reading random dev forums and making turbo mode 3d games-where did my intelligence go?
ed is the standard unix text editor.