Discuss Scratch

CST1229
Scratcher
1000+ posts

Can we run Linux on scratch

ajskateboarder wrote:

(#20)

kccuber wrote:

9pfs wrote:

v86???

As you can see, that does not include Scratch.
Rust and C can compile to WASM (which runs in the browser)
The title of this topic is
Can we run Linux on scratch
not
Can we run Linux in a browser
Chiroyce
Scratcher
1000+ posts

Can we run Linux on scratch

somewhat, im no linux nerd so i cannot verify if this is in fact “Linux” but such a thing does exist

https://github.com/Its-Jakey/Linux-On-Scratch

Download the project from here - https://raw.githubusercontent.com/Its-Jakey/Linux-On-Scratch/main/rv32ima.sb3

ajskateboarder
Scratcher
1000+ posts

Can we run Linux on scratch

CST1229 wrote:

ajskateboarder wrote:

Rust and C can compile to WASM (which runs in the browser)
The title of this topic is
Can we run Linux on scratch
not
Can we run Linux in a browser
Bruh
If v86 can run in the browser, it can run in Scratch through a block extension.
Mystery96
Scratcher
100+ posts

Can we run Linux on scratch

ajskateboarder wrote:

CST1229 wrote:

ajskateboarder wrote:

Rust and C can compile to WASM (which runs in the browser)
The title of this topic is
Can we run Linux on scratch
not
Can we run Linux in a browser
Bruh
If v86 can run in the browser, it can run in Scratch through a block extension.
that would be kinda cheating though, as you wouldn't even have to use the normal scratch blocks, just plop your os of choice into v86 and off you go.
dakotadraco77
New Scratcher
1 post

Can we run Linux on scratch

linux should make it better
BreadcatGames
Scratcher
1000+ posts

Can we run Linux on scratch

dakotadraco77 wrote:

linux should make it better

what
rishi272011
Scratcher
100 posts

Can we run Linux on scratch

Chiroyce wrote:

somewhat, im no linux nerd so i cannot verify if this is in fact “Linux” but such a thing does exist

https://github.com/Its-Jakey/Linux-On-Scratch

Download the project from here - https://raw.githubusercontent.com/Its-Jakey/Linux-On-Scratch/main/rv32ima.sb3

I think you can also run it on turbowarp online here:
https://experiments.turbowarp.org/next/892602496/fullscreen?size=960x720
Leon_to_ziomal
Scratcher
5 posts

Can we run Linux on scratch

dhuls wrote:

the_computer_maker wrote:

(#5)

dhuls wrote:

With how limited Scratch is, probably not (and I mean a real Linux distro, not a fan-made operating system claiming to be a Linux distro even though Linux uses 0 Scratch code)
I think you need to take a look at this
https://bellard.org/jslinux/vm.html?cpu=riscv64&url=fedora33-riscv-xwin.cfg&graphic=1&mem=256
That's JavaScript, not Scratch.

Scratch IS JavaScript. (Well, not exactly…)
Scratch isn't a programming language, but a graphical interface for JavaScript.
You could inject JavaScript code on Turbowarp or PenguinMod, but not stock Scratch. You need to use prebuilt JavaScript blocks.
I would like to see a lot of things from here (https://scratch-mit-edu.ezproxyberklee.flo.org/projects/827943393/) on Scratch 4.0, but also a Custom JavaScript Block.
Maybe we will get that…
BigNate469
Scratcher
1000+ posts

Can we run Linux on scratch

Leon_to_ziomal wrote:

Scratch isn't a programming language, but a graphical interface for JavaScript.
Incorrect- Scratch is a programming language interpreted in JavaScript, but it isn't a graphical interface for JS itself (otherwise we would probably have things like DOM API access and objects, among other things).

Anyways, Scratch is Turing-complete. Just make a C compiler that compiles to Scratch instead of bytecode- and then create a minimal Linux distribution.
ninjaMAR
Scratcher
1000+ posts

Can we run Linux on scratch

BigNate469 wrote:

(#29)
Anyways, Scratch is Turing-complete. Just make a C compiler that compiles to Scratch instead of bytecode- and then create a minimal Linux distribution.
It's not that simple. That would probably be even more complicated than an emulator.
BigNate469
Scratcher
1000+ posts

Can we run Linux on scratch

ninjaMAR wrote:

BigNate469 wrote:

(#29)
Anyways, Scratch is Turing-complete. Just make a C compiler that compiles to Scratch instead of bytecode- and then create a minimal Linux distribution.
It's not that simple. That would probably be even more complicated than an emulator.
Would it though? Technically you could also create a way to emulate a x86 or ARM CPU plugged into a monitor, and compile Linux and just import the code into Scratch, likely into a list.
Jonathan50
Scratcher
1000+ posts

Can we run Linux on scratch

BigNate469 wrote:

Would it though?
You could compile a straightforward portable C program that way (providing the needed standard library routines) – which is what bobbybee was doing with scratch-llvm as a Clang backend. The Linux kernel isn't that; it has machine-dependent parts (and parts written in assembly, not just C), since after all its job is to multiplex the CPU/RAM/hardware to processes, which access hardware in a limited/abstracted way thanks to system calls.
Technically you could also create a way to emulate a x86 or ARM CPU plugged into a monitor, and compile Linux and just import the code into Scratch, likely into a list.
Yes, and that's what @bilman66 did do, except with RISC-V. (Here's a link to the project on bilman66's GitHub account, in case you never saw it, though of course it's already been discussed on this thread)

Last edited by Jonathan50 (Feb. 8, 2025 21:01:03)

scratchcode1_2_3
Scratcher
1000+ posts

Can we run Linux on scratch

people've emulated computers before here (but very simple nes-like ones)
it's possible in a pdf we can't lose hope
CST1229
Scratcher
1000+ posts

Can we run Linux on scratch

scratchcode1_2_3 wrote:

(#33)
people've emulated computers before here (but very simple nes-like ones)
someone has emulated a whole linux computer before https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/710568/ (but the project was apparently unshared. not sure what's on about that)

Powered by DjangoBB