Discuss Scratch

the_computer_maker
Scratcher
100+ posts

Can we run Linux on scratch

Can we make a computer that can run Linux?
dhuls
Scratcher
1000+ posts

Can we run Linux on scratch

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)
9pfs
Scratcher
100+ posts

Can we run Linux on scratch

Sure, transpile v86, your browser's JS engine, and whatever dependencies your browser's JS engine has to an SB3 and try running it…
9pfs
Scratcher
100+ posts

Can we run Linux on scratch

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)
Ugh, got beaten to it
Sorry, you have to wait 60 seconds between posts.
Sorry, you have to wait 10 minutes between telling me that…
the_computer_maker
Scratcher
100+ posts

Can we run Linux on scratch

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
the_computer_maker
Scratcher
100+ posts

Can we run Linux on scratch

Or we can just build our own virtual processor and try running it on that
dhuls
Scratcher
1000+ posts

Can we run Linux on scratch

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.
9pfs
Scratcher
100+ posts

Can we run Linux on scratch

the_computer_maker wrote:

Or we can just build our own virtual processor and try running it on that
Good luck… BTW, you won't exactly be running Windows 11. You'd start at 16-bit and work your way up.
SuperSonicmario
Scratcher
100+ posts

Can we run Linux on scratch

Probably. It will be extremely slow, though - I wouldn't expect to reach a shell in a day with a typical Linux distribution.
the_computer_maker
Scratcher
100+ posts

Can we run Linux on scratch

SuperSonicmario wrote:

Probably. It will be extremely slow, though - I wouldn't expect to reach a shell in a day with a typical Linux distribution.
i
all you need to run Linux is the command line not that graphical user interface
Jonathan50
Scratcher
1000+ posts

Can we run Linux on scratch

SuperSonicmario wrote:

Probably. It will be extremely slow, though - I wouldn't expect to reach a shell in a day with a typical Linux distribution.
It would be far too difficult to load something huge like a GNU/Linux distribution — if you want to run Linux in Scratch, you would start with just the kernel plus a statically linked binary (like hello world with syscalls). Which is definitely possible if one makes an emulator including virtual memory… (x86 will probably not be the easiest architecture.)

Edit: Wait, you can actually build Linux without MMU support. (Virtual memory would be more fun, of course, unless it's for RISC-V since that's complicated. ARM or a CISC architecture like 680x0 or x86 could be alternatives.)

Last edited by Jonathan50 (Feb. 27, 2022 02:57:25)

jellyfishfisher56
Scratcher
500+ posts

Can we run Linux on scratch

There is no point I see in this, and all writing it in Scratch does is make it harder.
9pfs
Scratcher
100+ posts

Can we run Linux on scratch

jellyfishfisher56 wrote:

There is no point I see in this, and all writing it in Scratch does is make it harder.
v86???
kccuber
Scratcher
1000+ posts

Can we run Linux on scratch

9pfs wrote:

jellyfishfisher56 wrote:

There is no point I see in this, and all writing it in Scratch does is make it harder.
v86???

As you can see, that does not include Scratch.
helloworldbyeworld
Scratcher
1000+ posts

Can we run Linux on scratch

kccuber wrote:

9pfs wrote:

jellyfishfisher56 wrote:

There is no point I see in this, and all writing it in Scratch does is make it harder.
v86???

As you can see, that does not include Scratch.
LOL (of course not)

Well, I always tell myself ‘everything’s possible on scratch, because the basic building blocks of programming languages are there (logic blocks)’. I actually think it’s possible, though it’ll do two things probably:

1. Crash the scratch website, and maybe your browser
2. Lag so much it takes forever to interact with it
dhuls
Scratcher
1000+ posts

Can we run Linux on scratch

kccuber wrote:

(#14)

9pfs wrote:

jellyfishfisher56 wrote:

There is no point I see in this, and all writing it in Scratch does is make it harder.
v86???

As you can see, that does not include Scratch.
I doubt linguist can detect Scratch anyways.
Jonathan50
Scratcher
1000+ posts

Can we run Linux on scratch

Kind of got a Frakensteined version of my RISC-V emulator to make a Frankensteined version of the Linux kernel (with no virtual memory) complain and die a little

It is light years away from being proper Linux.

I basically just spent a long time commenting out code and trying to get it to write some messages. I kept testing it in QEMU but in QEMU it gets a bit farther and complains differently. And the main problem is annoying mystery bugs; for example I had to comment out some code or it would try to pad all the numbers with an insane number of zeros.

Maybe RISC-V is a good easy platform to emulate if you don't care about running an operating system (even without virtual memory, let alone with it). I don't know. I could share the source changes a patch, but it is extremely hacky so if anybody were that interested, starting over would make sense. I'm probably not going to take it further than that, but I guess that's the nearest anybody has gotten to running a conventional OS kernel on Scratch.

Last edited by Jonathan50 (March 5, 2022 03:15:56)

sf97ahgf
Scratcher
100+ posts

Can we run Linux on scratch

Here we are: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/690730/
May be on turbowarp but on the scratch language nonetheless.
applejuiceproduc
Scratcher
1000+ posts

Can we run Linux on scratch

helloworldbyeworld wrote:

kccuber wrote:

9pfs wrote:

jellyfishfisher56 wrote:

There is no point I see in this, and all writing it in Scratch does is make it harder.
v86???

As you can see, that does not include Scratch.
LOL (of course not)

Well, I always tell myself ‘everything’s possible on scratch, because the basic building blocks of programming languages are there (logic blocks)’. I actually think it’s possible, though it’ll do two things probably:

1. Crash the scratch website, and maybe your browser
2. Lag so much it takes forever to interact with it
I mean if you had a supercomputer and you were using turbowarp (for like 60+ fps and stuff) it would be possible, but still…

Scratch isn't designed to run linux.

Last edited by applejuiceproduc (June 12, 2023 09:47:48)

ajskateboarder
Scratcher
1000+ posts

Can we run Linux on scratch

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)

Powered by DjangoBB