This is demonstrative of the advantages of the new low-level APIs being added to JavaScript to work efficiently with binary data. Fabrice uses this to implement an x86 interpreter -- it could not be done efficiently without typed arrays. However, it is still slow -- imagine what kind of advances could be made if a common bytecode was established that would be JIT'd by the JavaScript VM, and could be output directly b…
Can you explain the steps necessary to combine a JS x86 interpreter with a binary Linux disk image into a running VM? The part I don't understand is, what environment does the Kernel need to think is there, and how is that done in JS?
Boot a linux kernel right inside your browser.
141–150 of 255 posts
Re: Boot a linux kernel right inside your browser.
#142I'm utterly dumbfounded. Not only does it boot, it's got emacs, and a compiler. Welcome to JS/Linux ~ # emacs test.c ~ # cat test.c void main(void) { printf("Hello World!\n"); } ~ # tcc test.c -o hello ~ # ./hello Hello World! [Edit: just realized that there is already a 'hello.c' in the directory that shows just this with better diction.]
and VIM !
Re: Boot a linux kernel right inside your browser.
#143Re: Boot a linux kernel right inside your browser.
#144This 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]…
Indeed, this is completely awesome. I first thought it was some remotely hosted virtual machine, but it really runs inside the browser. Insane! Especially considered how fast it is. When he adds X, we can run Firefox inside Linux inside Firefox inside Linux :') Edit: seems the terminal emulator supports ANSI escape codes such as the 16 Linux colors, but not the XTerm 256 color mode (\e[38;5;CCm) or Konsole 24 bit (\e…
However, wget is there, so all the building blocks are in place.
Re: Boot a linux kernel right inside your browser.
#145Earlier quoted context omitted.
Can you explain the steps necessary to combine a JS x86 interpreter with a binary Linux disk image into a running VM? The part I don't understand is, what environment does the Kernel need to think is there, and how is that done in JS?
This is explained well in the Technical Notes section of the site. http://bellard.org/jslinux/tech.html
Re: Boot a linux kernel right inside your browser.
#146 alias ll='ls -lh'Re: Boot a linux kernel right inside your browser.
#147Earlier quoted context omitted.
Indeed, this is completely awesome. I first thought it was some remotely hosted virtual machine, but it really runs inside the browser. Insane! Especially considered how fast it is. When he adds X, we can run Firefox inside Linux inside Firefox inside Linux :') Edit: seems the terminal emulator supports ANSI escape codes such as the 16 Linux colors, but not the XTerm 256 color mode (\e[38;5;CCm) or Konsole 24 bit (\e…
> When he adds X, we can run Firefox inside Linux inside Firefox inside Linux :') Reddit has a meme for that. ;) (downvote away, I've earned it!)
Re: Boot a linux kernel right inside your browser.
#148Can i run Node.js on this? /evil grin
Can I run this in Node.js!?
Re: Boot a linux kernel right inside your browser.
#149Earlier quoted context omitted.
So pg was wrong, the greatest hackers don't use Lisp, they write in (and invent) obscure versions of C all day.
Great hackers can use whatever languages/tools they like. The fact that they're being great is not the consequence of the tools they chose, but of the masterpiece work they achieved. I am always fond of such an analogy: in terms of efficiency, the greatest hackers has an algorithmic complexity of O(1); meanwhile, the majority of us may be O(n), if you can manage to get a O(log n) you can make into the club of good ha…