Live data from Hacker News

Boot a linux kernel right inside your browser.

bellard.org

231–240 of 255 posts

Re: Boot a linux kernel right inside your browser.

#231

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…

I've always wished that, instead of a "browser language", browsers exposed a LOW LEVEL bytecode environment (which browsers are then free to interpret, JIT compile or on-the-fly AOT compile at page load time). It should be reasonably low level, in that it should provide an abstraction from the hardware, but still allow for very efficient execution of lower level code. Then high level languages and frameworks could be…

Factor, Racket, and Lua all have ffi's that are very easy to use. I've never quite liked Lua's metaprogramming, though (macros are very useful when you're writing bindings.) and my least favourite Lua quirk would be the lack of integer types - both other languages have fairly sane (and performant!) numeric towers.

That said, I'd give a higher priority for the language in my browser to be safe: some kind of correctness guarantee would be nice. Or even, while we're at it, some kind of way to analyze the script and say "this script GETS from urls x,y, and posts data d to z"

Re: Boot a linux kernel right inside your browser.

#235

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…

I've always wished that, instead of a "browser language", browsers exposed a LOW LEVEL bytecode environment (which browsers are then free to interpret, JIT compile or on-the-fly AOT compile at page load time). It should be reasonably low level, in that it should provide an abstraction from the hardware, but still allow for very efficient execution of lower level code. Then high level languages and frameworks could be…

> Its a pity that javascript is so in-grained in client-side web now, as its really a terrible bytecode...

Gilad Bracha complains about this at http://gbracha.blogspot.com/2011/03/truthiness-is-out-there....

Re: Boot a linux kernel right inside your browser.

#236

Earlier quoted context omitted.

Seriously? the JVM? You listed the pros, but what about all the cons? Modern JVMs are fast, but highly specialized for long-running applications, which web pages are decidedly not. That's just the tip of the iceberg.

Yes, seriously. In what sense are JVMs "specialized for long-running applications"? If you mean they start slowly, that's hardly the case even if you start from scratch: > time java HelloWorld Hello, World! java HelloWorld 0.28s user 0.06s system 135% cpu 0.248 total In any case, the JVM is just an example (although I still argue it can serve this purpose well). My main point is that the "correct" model for the web i…

Seriously? .28s is 280 milliseconds, for a result with zero content. That is already at the outside acceptable threshold for being perceived as slow response, and that's before we spend any time at all rendering the page. Certainly a VM of some kind could boot faster, but milliseconds count.

Re: Boot a linux kernel right inside your browser.

#237
post #64
post #39

I'm sad the source has been compressed so there's no easy human-readable View Source, like there was on the VAX emulator that came up a few weeks ago. :( Still awe-inspiring, though. :)

Paste the source at http://jsbeautifier.org/ - It makes the source readable

Thanks both of you, jsbeautify extension now installed. :)

https://chrome.google.com/webstore/detail/kkioiolcacgoihiiek...

Post reply on HN