Live data from Hacker News

Boot a linux kernel right inside your browser.

bellard.org

141–150 of 255 posts

Re: Boot a linux kernel right inside your browser.

#141

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?

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.

#142
post #24

I'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 !

I don't see vim in there, but there's a minimalistic vi.

Re: Boot a linux kernel right inside your browser.

#144
post #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]…

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…

Sadly my dreams were also crushed when I discovered that lynx wasn't in there.

However, wget is there, so all the building blocks are in place.

Re: Boot a linux kernel right inside your browser.

#145

Earlier 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

I saw that, but I don't understand how it's booted.

Re: Boot a linux kernel right inside your browser.

#147
post #53

Earlier 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!)

HN would appreciate if you left reddit at reddit.

Re: Boot a linux kernel right inside your browser.

#149
post #57

Earlier 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…

Close but I think you have your orders understated. A normal programmer faces O(n^2), while a great programmer achieves O(n log n). Really bad programmers do O(k ^n) amount of work to achieve the same, with k>2.
Post reply on HN