[HN Gopher] Show HN: Running TempleOS in user space without virt...
       ___________________________________________________________________
        
       Show HN: Running TempleOS in user space without virtualization
        
       TempleOS is an experimental OS designed to be simple and self-
       hosted with a JIT compiler. I was mesmerized by it but didn't like
       the hassle of using virtual machines to boot it up and move files
       around from the virtual drive.  My project lets you run TempleOS as
       an app of some sort instead of using a virtual machine to run it -
       this brings a lot of benefits like speed, seamless filesystem
       integration (virtual machine development with stock TempleOS is
       really a pain.), command-line mode where you can code in HolyC on
       the command line instead of TempleOS' GUI.  Its user-space nature
       lets it do networking quite easily with the FFI - it even features
       an IRC server, client and a wiki server!  I've also added a bunch
       of third-party games and software written for TempleOS on the
       Community folder, I hope you people take a look and enjoy!
        
       Author : 1fishe2fishe
       Score  : 161 points
       Date   : 2024-04-12 06:57 UTC (16 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | xmlparser wrote:
       | Oh wow, nice! Just a question, how do you manage memory for the
       | OS? I thought operating systems needed whole control of the MMU.
        
         | 1fishe2fishe wrote:
         | That was actually a very easy part of EXODUS. Since TempleOS is
         | basically a unikernel, it doesn't need any code for per-process
         | virtual address space.
         | 
         | So I can just map some pages in the host process and the host
         | process' address space becomes the HolyC kernel's entire
         | address space, which is ironic since Terry was always adamant
         | about how he disliked modern isolated per-process address
         | spaces and that turned out to be a key to porting his OS to
         | Ring 3.
         | 
         | I did need some code for "code pages" though - since all
         | function calls in TempleOS use the 32 bit relative call
         | instruction, all compiled HolyC code go in the lower 32 bit
         | address space. Some Linux distros like to map the ELF binary at
         | that address range too, so I have a routine to read
         | /proc/self/maps and avoid mmapping those areas (I was surprised
         | mmap can overlap without any signs).
        
           | xmlparser wrote:
           | Haha, that's like committing blasphemy to achieve a holy
           | goal. I wonder what Terry or God would say about this.
        
             | mjgoeke wrote:
             | I'm guessing something along the lines of 1 Samuel 13:13
             | ;-)
             | 
             | https://www.bible.com/bible/114/1SA.13.13
        
             | artsi0m wrote:
             | Terry referenced the joke about web browsers, saying that
             | as the most people use internet explorer to download
             | firefox, he used Ubuntu with VMWare to run Temple OS.
             | https://iv.ggtyler.dev/watch?v=IXhmu1aQSOY
        
           | evmar wrote:
           | Wine has a similar problem around needing to reserve the
           | lower 32 bit address space for 32-bit executables.
           | 
           | I bookmarked their Mac workaround around here:
           | https://github.com/wine-
           | mirror/wine/blob/b2a099b3ceec6fef05c... which involves
           | rearranging the zero page and creating a big WINE_RESERVE
           | section.
           | 
           | On Linux it appears they use a -Ttext linker flag to
           | reposition the code location, but I haven't read it too
           | carefully: https://github.com/wine-
           | mirror/wine/blob/b2a099b3ceec6fef05c...
        
       | TheAmazingRace wrote:
       | I love how Terry's work continues to inspire developers to this
       | day, even after he has left this mortal plane of existence.
        
         | gosub100 wrote:
         | You might even say it's "born again".
        
           | VelesDude wrote:
           | Urrrgh... that is so good and bad it hurts!
        
       | nenadg wrote:
       | is this called a distro or denomination?
        
         | 1fishe2fishe wrote:
         | Sort of a "distro" I guess. It's basically TempleOS as an app.
        
           | davidgerard wrote:
           | still a better love story than Urbit
        
         | dinero_rojo wrote:
         | Was thinking it might just be a new rite if there weren't any
         | schisms or majors philosophical differences between fishe and
         | TD (pbuh), but I think Mr. God did tell Terry not to bother
         | with networking, so I think it would qualify as a separate
         | denomination.
        
         | blueflow wrote:
         | Its an Operating System.
        
       | LazarWolf_ wrote:
       | "Exodus", what a great name for this project. Very cool.
        
       ___________________________________________________________________
       (page generated 2024-04-12 23:01 UTC)