[HN Gopher] Linux running on RISC-V emulated in Scratch
       ___________________________________________________________________
        
       Linux running on RISC-V emulated in Scratch
        
       Author : varun_ch
       Score  : 115 points
       Date   : 2023-10-29 09:37 UTC (13 hours ago)
        
 (HTM) web link (blog.adafruit.com)
 (TXT) w3m dump (blog.adafruit.com)
        
       | xnzakg wrote:
       | Kind of wild to think that you can run a newer Linux version in
       | Scratch than on a lot of physical devices.
       | 
       | Also gives "Linux From Scratch" a new meaning.
        
         | yjftsjthsd-h wrote:
         | In fairness, a lot of the friction on real devices is from it
         | being a real device; VMs have fewer and simpler drivers to deal
         | with.
         | 
         | (And nobody cares about stability in a PoC)
        
           | charcircuit wrote:
           | A lot of friction also comes from kernel modules not having a
           | stable API they can target meaning they need to be updated
           | for new versions.
        
             | josephcsible wrote:
             | There doesn't need to be a stable API. They should just
             | upstream their drivers into the kernel tree.
        
               | FreeFull wrote:
               | Someone has to actually maintain the driver in the tree.
               | Drivers that don't have maintainers end up being removed
               | from the kernel.
        
           | freedomben wrote:
           | Indeed, for people who have never had to work with real
           | hardware before, it is _shocking_ how complex it is and the
           | level of hackiness it sometimes takes to make it  "work" (I
           | say "work" because often times drivers are doing insanely
           | hacky things to make it seem like it's working, even though
           | it's duct tape and bubble gum under the hood). Not just when
           | things are going right, but also when they go wrong (which
           | can involve real-world physical things that break
           | expectations, like damn voltage fluctuations or a physically
           | damaged component for example!). When you only have "virtual"
           | hardware to control, things are much, much, much more simple.
        
       | zabzonk wrote:
       | it's kind of scary what you can do with a visual programming like
       | scratch these days. but i'm not crazy about the site linked in
       | the title.
        
         | mandarlimaye wrote:
         | What's wrong with adafruit?
        
           | zabzonk wrote:
           | nothing specific, i guess - i'm just not mad about the
           | design.
        
       | mandarlimaye wrote:
       | This should be illegal! This person could have cured cancer if
       | they weren't building this kind of shit. (Only half joking)
        
         | IshKebab wrote:
         | It's really not very difficult to do this. RISC-V is
         | deliberately quite a simple ISA. The Sail model for it is only
         | a few thousand lines of code, and you don't need remotely that
         | much to run Linux if you compile for a limited target ISA (no
         | floating point, etc.).
        
       | zitterbewegung wrote:
       | Okay, I wasn't taking scratch seriously but now it seems like the
       | new basic.
        
       | ram_rattle wrote:
       | crazy, I remember seeing some project 6 years back running linux
       | on a excel sheet (each cell was considered as memory unit),
       | nothing can beat that.
        
         | homarp wrote:
         | I can only find https://mrthefakeperson.github.io/Excel-
         | Virtual-Machine/ so I'm curious if you can find the "linux in
         | excel"
        
       | jonathrg wrote:
       | Link to the actual thing
       | https://scratch.mit.edu/projects/892602496
        
         | varun_ch wrote:
         | and here it's running in a hyper optimised mod of Scratch
         | called Turbowarp. It's really surprising how much the Scratch
         | community has made. :)
         | 
         | https://experiments.turbowarp.org/next/892602496
        
           | blacklion wrote:
           | "that compiles projects to JavaScript to make them run really
           | fast." - now I'm scared.
        
       | chungy wrote:
       | Huh. I thought the title might have been a grammar mishap ("from
       | scratch" is how I read it first), but apparently Scratch is a
       | kids-oriented visual programming tool: https://scratch.mit.edu/
       | 
       | Neat. Kind of reminds me of LOGO in days of yore.
        
         | homarp wrote:
         | Previous Scratch discussions:
         | 
         | + Scratch is a big deal -
         | https://news.ycombinator.com/item?id=32120445
         | 
         | + Scratch is the world's largest coding community for children
         | - https://news.ycombinator.com/item?id=35373052
        
       | userbinator wrote:
       | If it's Turing-complete, someone will try to run Linux on it.
        
         | makapuf wrote:
         | Will it run doom ?
        
       ___________________________________________________________________
       (page generated 2023-10-29 23:00 UTC)