Live data from Hacker News

Boot a linux kernel right inside your browser.

bellard.org

221–230 of 255 posts

Re: Boot a linux kernel right inside your browser.

#221
post #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…

Thanks for the info. I got it running locally with those bins you mentioned. There is currently no further backend action.

Re: Boot a linux kernel right inside your browser.

#222
post #187

Earlier quoted context omitted.

Have you never used Java Applets? (i.e. JVM in the browser) the load time alone makes that a terrible idea. Not too mention the 'breaking the web/page model' and poor UX that ensued. Strange that people actually think Java would be the saviour. Feel free to keep continue to use Java applets if you think they're superior tech, they should still be well supported.

I have used and written applets, and they are horrible, but it's not what I'm suggesting. Applets run in their own area on the page and can't interact with the rest of the page like javascript does. I'm suggesting to replace the javascript runtime with a JVM runtime, while supporting everything javascript does through an API. Here's the use case I'm imagining: 1. When a user starts loading a page (read 'web app') the…

You seem highly optimistic about the JVM's appropriateness here. In reality what the browser needs is something more like the Dalvik VM, which is designed for compactness, efficiency, and multi-process models.

Re: Boot a linux kernel right inside your browser.

#225

Earlier quoted context omitted.

>This is why so many people want to see the browser execution environment offer more complete, low-level APIs instead of high-level APIs locked to HTML/CSS and legacy browser technology. It's called the desktop and offers all the native and low-level stuff you can possibly imagine. And the only people that want to see it, are the ones who have forgotten about it. Maybe there is a middle ground between desktop softwar…

Qt Quick with its QML environment (UI markup + Javascript + native extensions if you need them) is a great middle ground. It seems that the plan for Qt 5 is to move the enitre Qt toolkit over to the "QML first" model - that is, QML becomes the default way to create interfaces, for both mobile and desktop apps, and native widgets are only used when you require them. They also want to better integrate webkit and web co…

We've used QML in a recent QT/C++ desktop app and it's performance is comparatively poor compared with WebKit rendering and its CSS subset support is woefully inadequate.

The HTML/CSS/JS dev model is fine as it is, there's no need to hope for nirvana grass-is-greener frameworks that don't exist. Learn HTML5 like the rest of us.

Re: Boot a linux kernel right inside your browser.

#226
post #187

Earlier quoted context omitted.

Have you never used Java Applets? (i.e. JVM in the browser) the load time alone makes that a terrible idea. Not too mention the 'breaking the web/page model' and poor UX that ensued. Strange that people actually think Java would be the saviour. Feel free to keep continue to use Java applets if you think they're superior tech, they should still be well supported.

I have used and written applets, and they are horrible, but it's not what I'm suggesting. Applets run in their own area on the page and can't interact with the rest of the page like javascript does. I'm suggesting to replace the javascript runtime with a JVM runtime, while supporting everything javascript does through an API. Here's the use case I'm imagining: 1. When a user starts loading a page (read 'web app') the…

"Applets run in their own area on the page and can't interact with the rest of the page like javascript does."

You can actually call methods in a Java applet from Javascript and vice-versa. It just doesn't seem to be used very much:

http://download.oracle.com/javase/tutorial/deployment/applet...

Re: Boot a linux kernel right inside your browser.

#228
post #50
post #46

ERROR: your browser is too old to run JS/Linux. You should use a recent browser such as Firefox 4.x or Google Chrome. No, it isn't. Stop using user-agent matching and start using JavaScript feature detection instead.

It does. It tests for ArrayBuffer support, outputting that message if the necessary constructors aren't found. What browser are you using that you expect to be supported? (Safari doesn't have support for ArrayBuffer, but a recent WebKit nightly does, and this runs in that).

http://nightly.webkit.org/

I downloaded a webkit nightly from here, and it works now. Also, of note, the nightly picks up all my Safari settings, so it's not too much of a pain.

Post reply on HN