Live data from Hacker News

Boot a linux kernel right inside your browser.

bellard.org

31–40 of 255 posts

Re: Boot a linux kernel right inside your browser.

#31
Unbelievable, this is like magic. I am totally impressed. It is a real linux instance. BTW. I see the hello.c file someone mentioned here. Have we all mounted the same disk image?

I see so many use cases for this, but I don't fully understand what is going on behind the scenes. Maybe someone can shed some light on it:

  1) How is the disk emulated. Is it a local image, or is it running on the backend?

  2) Is there a remote possibility to get the networking up and running?

  3) Can the disk image be externally accessed to be customized?

Re: Boot a linux kernel right inside your browser.

#33
This is completely awesome. When I saw http://cb.vu a few years ago I thought hey, someone has finally done it, but that turned out to be a hack. Kudos to Bellard once again.

Nitpicking: the terminal emulation is messed up. It keeps resizing horizontally, and less gets confused. I'm sure the terminal emulator was fun to play with. A correct vt100 state machine implementation [1] would probably not be quite as fun [2]. There's a vt100.js library used by a couple projects that might improve things. [3]

[1] http://vt100.net/emu/dec_ansi_parser

[2] http://vt100.net/emu/vt500_parser.png

[3] http://fzort.org/bi/o.php

Re: Boot a linux kernel right inside your browser.

#34
post #16

After FFmpeg (used in all your TVs and gadgets, very likely), QEmu (used also by Xen and VBox and other), tcc and his IOCC entries, the DVB-T emission with an ATI card, Fabrice comes, once again with something crazy... He is really impressive...

Take a look at his IOCCC entry in 2001/02:

OTCC is an Obfuscated Tiny C Compiler for i386-linux. It generates FAST! i386 32 bit code (no bytecode) and it is powerful enough to compile itself. OTCC supports a strict subset of C. This subset is compilable by a standard ANSI C compiler. OTCC compiles, assembles, links and runs C code without the need of any other program.

http://www0.us.ioccc.org/2001/bellard.hint

(Note for those not familiar with the IOCCC: This is done in 2048 bytes)

Re: Boot a linux kernel right inside your browser.

#35
post #29

Earlier quoted context omitted.

Don't forget that he discovered the fastest known algorithm for computing an arbitrary digit of pi. If you ever are tempted to get egotistical, just think of this guy. If you are prone to low self esteem, avoid reading about him.

And still, he has normal job in a normal company... Not in a start-up or not in a mega-tech-corp...

which company is that?

Re: Boot a linux kernel right inside your browser.

#37
post #31

Unbelievable, this is like magic. I am totally impressed. It is a real linux instance. BTW. I see the hello.c file someone mentioned here. Have we all mounted the same disk image? I see so many use cases for this, but I don't fully understand what is going on behind the scenes. Maybe someone can shed some light on it: 1) How is the disk emulated. Is it a local image, or is it running on the backend? 2) Is there a rem…

1): The disk doesn't seem to be emulated; it's just a rootfs in RAM.

2): See another thread here.

3): Check out cpux86.js. In the start() function at the very end, the following section might be enlighting (even though it is a bit obfuscated by a javascript compressor):

  function start() {
  [...]
    If=32*1024*1024;
    ya.phys_mem_resize(If);
    ya.load_binary("vmlinux26.bin",0x00100000);
    Jf=ya.load_binary("root.bin",0x00400000);
    start=0x10000;
    ya.load_binary("linuxstart.bin",start);
    ya.eip=start;
The files vmlinux26.bin, root.bin and linuxstart.bin are fetched from the server.

Re: Boot a linux kernel right inside your browser.

#38
post #29

Earlier quoted context omitted.

Don't forget that he discovered the fastest known algorithm for computing an arbitrary digit of pi. If you ever are tempted to get egotistical, just think of this guy. If you are prone to low self esteem, avoid reading about him.

And still, he has normal job in a normal company... Not in a start-up or not in a mega-tech-corp...

Perhaps he's able to produce great stuff like this because he has a normal job in a normal company.
Post reply on HN