Live data from Hacker News

jor1k: OR1000 Javascript Emulator Running Linux

s-macke.github.io

21–30 of 71 posts

Re: jor1k: OR1000 Javascript Emulator Running Linux

#23

Earlier quoted context omitted.

Works for me on Firefox 23.0.1 after a fairly long delay. Also worked on Chrome 29.0.1547.66. Edit - one oddity: on Chrome the console does not register the spacebar.

You'll need to specify which version of chrome. Space works fine for me on Version 29.0.1547.66 m

Version 29.0.1547.66 m

Re: jor1k: OR1000 Javascript Emulator Running Linux

#24

# scummvm

How the heck does a 7MB image come with an entire OS, emulator, and a fully functional game?! You have to wonder how much of our stuff is bloated.

Go back to the late 80s/early 90s and small System 7 UNIX clones like Mark Williams Company's Coherent 3.2 could install, complete with their entire userland, dev sys, docs, and formatters in around 10Mb of disk space and run on a 286 with 640Kb of RAM. No TCP/IP stack (it used UUCP for comms) and no X11, but if you fast-forward to 1992 you could have Coherent 4, with TCP/IP and X11, running on a 386 with 4Mb of RAM and installed in 20Mb of disk.

Even the mammoth (by the standards of the day) SCO Open Desktop 3.0, with X11/Motif and a bagload of other stuff, could install in less than 200Mb of disk space and run reasonably smoothly on a 386/33 with 16Mb of RAM. That was a full-blown workstation grade UNIX distribution with all the trimmings. These days word processors are bigger.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#27

So realistically, what can you do with something like this especially since there is no networking? Can it do anything fun with WebGL?

In general a JavaScript-based Linux virtual machine should allow you to run software that would otherwise be difficult or impossible to run in the browser (which right now can be done for a lot of software by compiling it to JavaScript with https://github.com/kripken/emscripten). Data could be transferred to the VM for processing and then back to "normal" JavaScript using serial I/O. This might prove a useful kludge.

For a simple example of where it could be used consider a webmail provider who wants to get GPG encryption into their web UI. The provider could embed a Linux VM in the HTML document to let the user do encryption with the well-examined native version of GPG. (Although native GPG running inside this VM would not be safe from, e.g., malicious JS in banner ads.)

Right now the emulation is too slow to do these kinds of things practically, however, and it's hard to say whether or not it will get sufficiently fast before other tools for running native software the browser fully mature.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#29
asm.js type error: non-expression-statement call must be coerced @ http://s-macke.github.io/jor1k/js/worker/fastcpu.js:927

Firefox 25.0a2 (2013-09-11)

EDIT: Interestingly in Chrome Canary it starts out running at around 50 MIPS and then at some point v8's jit recompiles/deopts some code and it drops down to 12 MIPS and stays there.

JavaScript... sigh

Re: jor1k: OR1000 Javascript Emulator Running Linux

#30
post #3

Two things: 1) I am waiting for a version using networking. I know there are security issues but there are also workarounds. 2) My notebook is hot, so I checked and the Chrome CPU console is at 25% even if I am not doing anything in the console.

I'd have to look at the code, but it might not be too awful to get tun/tap to work over WebSockets...

Regarding the heat, I wonder if the architecture has support for idle states. If so, the VM should "clock down" by executing its loop from a timer instead of full-bore. I wonder if this is already happening, though.

Post reply on HN