Show HN: A Unix environment in a single HTML file (420 KB)

(shiro.computer)

27 points | by sagebird a day ago ago

6 comments

  • richmans a day ago ago

    I would not call this a unix environment. It does not run elf binaries. It does not have a kernel. All of the commands are vibecode-reimplementations in typescript.

    • cf100clunk a day ago ago

      Yep, the title of the OP is misleading that way.

  • TekMol a day ago ago

        P.S. `curl -fsSL https://claude.ai/install.sh | bash` works.
        You can run real Claude Code and it can use Shiro's tools
        like a normal Linux system.
    
    Are you sure? I am getting this:

        user@shiro:~$ curl -fsSL https://claude.ai/install.sh | bash
        Installing Claude Code...
        Installing packages globally...
    
        Resolved 1 package(s):
          + @anthropic-ai/claude-code@2.1.45
          22 files extracted
        Created 1 bin symlink(s) in /usr/local/bin
    
        Packages installed globally.
    
        Claude Code installed successfully!
        Run: claude
        user@shiro:~$ claude
    
    Now I get what looks like errors:

        anonymous/q2<@https://shiro.computer/ line 991 > AsyncFunction:57:43
        y/<@https://shiro.computer/ line 991 > AsyncFunction:9:688
        ...and some more like this...
    
    And then I am back on the normal command line.
  • nerdralph a day ago ago

    The gcc stub surprised me:

      user@shiro:/tmp/hn$ cat main.c
      #include <stdio.h>
      int main()
      {
        printf("Hello\n");
      }
    
      user@shiro:/tmp/hn$ cc main.c -o main; ./main
      Hello, World!
    
      user@shiro:/tmp/hn$ cat main
      #!/bin/sh
      echo 'Hello, World!'
  • dTal a day ago ago

    gcc seems to be a funny stub that generates an "executable" that prints "Hello, World!" if the input file fuzzy-matches a hello world, and otherwise prints nothing.

    Seems to be a few simple regexes: to "compile" you need a "main(" with either int or void before, and to trigger the hello world behavior you need printf( and a "hello" inside quotes. But that seems to be it:

      void main(
      //printf(" hello"
  • reconnecting a day ago ago

    > I built a browser-native Unix environment

    On GitHub, it says Claude built it.