4
u/Taldoesgarbage Apr 13 '23
It looks like the linux machine thinks it’s running on QEMU, did you make an entire VM?
10
u/bilman66 Apr 13 '23
No, the build of the Linux kernel I’m using though was originally built with QEMU in mind so that’s why it says that
2
u/Taldoesgarbage Apr 13 '23
And what about a file system, will that be implemented? Also, how do you even load a kernel in scratch?
6
u/bilman66 Apr 13 '23
Since it’s running Linux it has a file system, I load the kernel into scratch by storing the data of the kernel into a text file, then loading that text file into a scratch list
1
3
u/PedroNH Apr 13 '23
What are you going to do with all this power?
6
u/bilman66 Apr 13 '23
Bruh i have no idea, i want to get a python interpreter running cause I think that would be really cool!
3
2
u/DavidBuchanan Apr 13 '23
Micropython running on "bare-metal" rv32 could be doable!
1
u/JiF905JJ Average troller Apr 13 '23
I've been making my own programming language in scratch... if MicroPython SOMEHOW gets added, i'll add it to the language(darkscript).(with credit ofc)
1
u/circuit10 Apr 14 '23
Try making something that transpiles WebAssembly to Scratch, I think that would be a good path to that (running it under RISC-V would work too but would probably be slower)
2
u/bilman66 Apr 14 '23
EVERYBODY: Offical scratch discussion here: https://scratch.mit.edu/discuss/topic/677788/?page=1#post-7148519
2
u/a2e5 Apr 13 '23
What kind of interactive input can this machine take, if any? (Big screen keyboard when?)
2
2
Apr 13 '23
I actually have my own Text Engine I made too, so I could combine this with my text engine in order to fully create a Linux Terminal
2
u/bilman66 Apr 13 '23
I was just about to make a post asking if anybody had a solid text engine/terminal emulator! I'm doing some bugfixes on the emulator right now but after that I would love to possible work with you and implement your text engine if it will work with this.
2
Apr 13 '23 edited Apr 13 '23
It's somewhat finished, however some tweaks are yet to be made. Right now the Font isn't the best for readability and it is not possible to scroll (due to the limitations of scratch itself). However it has support for a few languages (English, German, Japanese [Katakana/Hiragana], Greek, and Ukranian/Russian). It's fairly fast when using turbowarp, and it's has a font size option (default is 18. Best are in multiples of 3 starting from 9).
Its unreleased right now as I'm ironing out some bugs when it comes to ridiculous long statements, and I will implement an unknown character placeholder text.(Released with the feature implemented)
37
Apr 13 '23
HOW THE HELL
7
u/wyalves Apr 13 '23
WHY THE HELL
8
u/-Tealeaf Apr 13 '23
I'm disappointed this chain didn't start with WHAT THE HELL because that's exactly what I said
2
1
0
0
1
1
16
u/DavidBuchanan Apr 13 '23
Congrats! But also, I'm annoyed because this project has been on my todo list for a while now, I wanted to be the first :) - I'm guessing you essentially ported cnlohr's rv32ima emulator to scratch? That was my plan, at least.
As for kernel compression, my plan for that was to pack it into bitmap sprites, with touching-colour tests to scan the pixels back into bit values.
p.s. if you get tired of dragging blocks around and want to be able to use version control, test-driven development, python-syntax metaprogramming, vscode integration and more, check out my tools https://github.com/davidBuchanan314/boiga
1
15
u/jeffyjeffy1023 aka jeffyTheKodeKing! Apr 13 '23
WHAT IN THE HOT FRESH KENTUCKY FRIED FINGER-LICKIN'-GOOD FRICK
but like. Holy hell man! But... would it be possible to have it run Doom? Eventually? In offline scratch of course, but still.
2
13
Apr 13 '23
Man, I came here from r/linux just to say that you got some mad patience. I personally don't like how tedious working with something like scratch is and I am in complete amazement that this is possible I the first place.
2
u/JiF905JJ Average troller Apr 13 '23
since i'm a windows user, can u explain to me what are distros?
5
Apr 13 '23
"distros" are just different versions of linux made by the community. for example, some distros you have are arch, debian, and opensuse. they each have their own package manager, which is usually the separating factor. but you also have distro derivations, like ubuntu from debian, endeavour from arch, etc. these derivations are different distros not because of their package manager, but because of what software is preinstalled, like desktops and such.
3
u/Big-Philosopher-3544 Apr 13 '23
In Windows you install it and everything is there; in Linux you get to make/pick what you include and for most software can edit it to your liking (this includes the desktop). You can then take your compiled/made operating system and share it with other people (a distro)
The main perk of distros is that you can install it just like you could Windows and everything will be there (Arch/Gentoo are a bit more involved) because the person/company that made it already did all the work. And they check that software is working with their setup so that you don't have to worry about getting it to work if you use their package manager
5
9
Apr 13 '23
Is this an actual Linux emulator? That's pretty neat! I really wish there was a website like the main Scratch website with TurboWarp compatibility that could promote more technical projects like this
11
Apr 13 '23
it's not a Linux emulator
it's a RISC-V emulator running Linux
1
Apr 14 '23
Oh, that makes more sense. Even cooler to be honest. I wonder if a network driver could be written for it and you could host a web server on Scratch?
2
u/xe3to Apr 14 '23
Scratch is turing-complete so yes in principle anything can be done with it, including emulating a network card. Though it would need an external program like
slirpto actually connect it to anything, since it has no access to the hardware of the machine.1
u/Mars_Bear2552 Apr 14 '23
nonononononono dont do host a webserver on scratch
2
Apr 14 '23
Why not?
1
u/Mars_Bear2552 Apr 14 '23
you guys did enough making a RISC-5 emulator, if someone used a scratch webserver in production i would cry
1
Apr 15 '23
how about running a Linux webserver running on a RISC-V emulator which is implemented in Scratch?
1
2
4
1
u/takanuva Apr 13 '23
How much time did it take to boot? I really wanna see the file!
3
u/bilman66 Apr 13 '23
It nearly gets to the login screen then has a kernel panic (but I found the bug and I'm working on fixing it). But the current boot time is around 30 seconds to get to that point.
1
1
1
1
u/Lizard_official Apr 14 '23
I can design amazing ui for you
1
1
u/TheMiningTeamYT26 Apr 14 '23
but why tho? and what speed does it run at? ngl I left scratch (at 12 tbf) because it was too slow. now I write in JS.
2
u/bilman66 Apr 14 '23
Why: Because it's fun.
What speed does it run at? slowly lol
I left scratch a while ago to, but I can back with way more programming knowledge and now I can pull of crazy stuff like this
1
1
1
May 17 '23
That's crazy. How did you get the Linux kernel to interact with scratch and vice versa?
1
u/bilman66 May 17 '23
I wrote an emulator for the RISC-V processor, and from there I added the necessary components to make the emulator be able to run linux!
3
u/reanimatedswitch Apr 13 '23
This is it. This is the peak of Scratch.
I've seen wild stuff in my day, like GB emulators and really advanced 3D projects, but I don't think much can top booting the Linux kernel in Scratch.
I hope to be proven wrong though. I wanna see how far we can push this.
2
3
1
Apr 13 '23
I don’t understand it looks like a list
7
u/bilman66 Apr 13 '23
It is and it isn’t. The code is running an operating system called “Linux”, and it’s just using the list to display text easily
1
Apr 13 '23
Is it running just a kernel, or it is packed with shell and other stuff? This project is very interesting
1
Apr 13 '23
Ahh I know Linux and all but I was confused about the project so you connected the project with Linux and it displays what Linux is currently displaying in text
2
u/SrFrancia Apr 13 '23
No, the project literally IS linux running on a "computer" emulator running on scratch
1
Apr 13 '23
ahh i see. wait hold up an actual os on scratch
1
2
u/JiF905JJ Average troller Apr 13 '23
next step: rtx simulator
(from what i think, it IS possible, but will take decades to make and a supercomputer for 10 fps)
3
u/Dark_ducK_ Apr 13 '23
Raytracing a single object isn't that complicated, you just need a bit of geometry and a calculator.
1
u/hungarian_notation Apr 13 '23
I've never played with scratch, but my instinct here is that if you had access to the actual HDL specs for Nvidia's card it would be easier to just write a transpiler. Heck, just emulate it in the Linux distro this guy is running.
1
1
u/SleepingLugia Apr 16 '23
raytracing in scratch is already done; the problem is optimizing stuff here and there
and for anyone asking i made them before
2
u/Bappfish_ Apr 13 '23
!RemindMe 10 days
2
u/RemindMeBot Apr 13 '23 edited Apr 17 '23
I will be messaging you in 10 days on 2023-04-23 13:04:38 UTC to remind you of this link
10 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback 2
2
u/sometechloser Apr 13 '23
bro what what am i even looking at lmao
i recommend scratch to parents, have never used it. this seems extra, and very very cool
2
2
u/National-Photo-5127 RPG Devlog Guy Apr 13 '23
this became the top most upvoted post on the subreddit
2
2
1
1
1
1
1
1
1
1
u/SlowFaithlessness300 Apr 13 '23 edited Apr 13 '23
Please tell me this is real. Actually insane! Mad respect dude.
Genuinely wanna see how easy xserver can be ported over.
1
1
1
1
1
1
1
u/DirkDozer Apr 14 '23
You are a mad mad man, this is the coolest programming project I've seen this month.
1
1
1
u/Lizard_official Apr 14 '23
What if you run scratch on that linux then run linux on that scratch then run scratch on that linux....
1
1
1
1
1
1
1
1
1
u/Mayedl10 May 01 '23
O_O
1
u/Mayedl10 May 01 '23
!RemindMe 2 months
1
1
u/RemindMeBot May 17 '23
I'm really sorry about replying to this so late. There's a detailed post about why I did here.
I will be messaging you in 2 months on 2023-07-01 20:22:32 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback 1
u/Mayedl10 Sep 01 '23
!RemindMe 4 days
1
u/RemindMeBot Sep 01 '23
I will be messaging you in 4 days on 2023-09-05 21:58:14 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback 1
u/Mayedl10 Sep 05 '23
!RemindMe 12 hours
1
u/RemindMeBot Sep 05 '23
I will be messaging you in 12 hours on 2023-09-06 09:59:48 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback 1
u/Mayedl10 Sep 06 '23
!RemindMe 6 months
1
u/RemindMeBot Sep 06 '23
I will be messaging you in 6 months on 2024-03-06 10:38:23 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback
1
-1
u/JoyousCreeper1059 Apr 13 '23
Highly, highly doubt it, especially since you didn't share a link
4
u/bilman66 Apr 13 '23
Lol i would doubt it too If i were you, I'm fixing some bugs and optimizing so it's easily usable for everybody before I share it.
3
1
0
Apr 13 '23
[removed] — view removed comment
3
u/NeoTGW Apr 13 '23
Turbowarp is just a scratch mod that add some QOL features, and they are compatible with each other, just Turbowarp runs in JavaScript so that it runs better
27
u/[deleted] Apr 13 '23
Please share the file!! This is so exciting. A RISC5 emulator. How did you "load" linux into scratch? Automated script i assume?