Live data from Hacker News

jor1k: OR1000 Javascript Emulator Running Linux

s-macke.github.io

31–40 of 71 posts

Re: jor1k: OR1000 Javascript Emulator Running Linux

#31

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…

You don't need the whole of Linux just to run gpg though...

Re: jor1k: OR1000 Javascript Emulator Running Linux

#32

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

Corrected, should be available soon.

https://github.com/s-macke/jor1k/commit/1285da3247a1a92f6638...

Re: jor1k: OR1000 Javascript Emulator Running Linux

#33
post #22
post #8

is the "Restart with asm.js core" button working?

Yes, with firefox 23 I pass from 6 MIPS to 90 (which I suppose means that there is some bug without asm.js, since it shouldn't improve that much). This work is giving a new mean to "impressive"

Not a bug, asm.js is basically machine code, so it should run nearly at native speed.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#34

# 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.

'Bloat' is 'any feature I'm not using right now'.

We expect more out of our software, so we write more code to do it, and we complain about bloat because no individual person uses, or expects to use, every feature in every piece of software. However, when anyone comes along to remove features, people complain even worse because, of course, nobody can agree about which features to axe! Everyone is using different subsets!

Re: jor1k: OR1000 Javascript Emulator Running Linux

#35
post #32

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

Corrected, should be available soon. https://github.com/s-macke/jor1k/commit/1285da3247a1a92f6638...

Oh wow, you wrote it all by hand? That's really impressive! :)

If the standalone asm.js validator isn't yelling about that and Firefox 25 is, you should let the people who maintain the validator know. They're supposed to be in sync.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#36

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…

tptacek tells me that secure JS is never going to happen so I don't see a use case there. Yes, proof of concept is cool, until someone steals your private key. No thanks.

I suppose though you could non-secure stuff, like add a Python interpreter or C compiler and teach people to code inside the VM. GitHub could provide in-browser syntax checking using a real interpreter/compiler.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#37
post #32

Earlier quoted context omitted.

Corrected, should be available soon. https://github.com/s-macke/jor1k/commit/1285da3247a1a92f6638...

Oh wow, you wrote it all by hand? That's really impressive! :) If the standalone asm.js validator isn't yelling about that and Firefox 25 is, you should let the people who maintain the validator know. They're supposed to be in sync.

Yes, programmed the asm.js core by hand. It was not too hard. One day. The asm.js is also a little bit outdated. It could be around 20% faster. I have never used the standalone asm.js validator. Not even knew, that it exists. The optimizing work in Javascript is really hard. Every few weeks there is a new browser and new mystic speed issues. Firefox 22 without asm.js was the fastest six weeks ago (30-60 MIPS). Then everything changed. And I don't know why. Even the IE is faster than Firefox (without asm.js) right now.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#38
post #34

Earlier quoted context omitted.

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.

'Bloat' is 'any feature I'm not using right now'. We expect more out of our software, so we write more code to do it, and we complain about bloat because no individual person uses, or expects to use, every feature in every piece of software. However, when anyone comes along to remove features, people complain even worse because, of course, nobody can agree about which features to axe! Everyone is using different subs…

Nah, bloat is any feature I'm not using ever; like java, or gnome-tracker.

e: these are just two things that were installed on my system despite not having software that needed them.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#39
post #37

Earlier quoted context omitted.

Oh wow, you wrote it all by hand? That's really impressive! :) If the standalone asm.js validator isn't yelling about that and Firefox 25 is, you should let the people who maintain the validator know. They're supposed to be in sync.

Yes, programmed the asm.js core by hand. It was not too hard. One day. The asm.js is also a little bit outdated. It could be around 20% faster. I have never used the standalone asm.js validator. Not even knew, that it exists. The optimizing work in Javascript is really hard. Every few weeks there is a new browser and new mystic speed issues. Firefox 22 without asm.js was the fastest six weeks ago (30-60 MIPS). Then e…

Yeah, I've had the same experience. I applaud your persistence! Hopefully asm.js will eventually let you avoid babysitting your code with every browser release.

Re: jor1k: OR1000 Javascript Emulator Running Linux

#40
post #34

Earlier quoted context omitted.

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.

'Bloat' is 'any feature I'm not using right now'. We expect more out of our software, so we write more code to do it, and we complain about bloat because no individual person uses, or expects to use, every feature in every piece of software. However, when anyone comes along to remove features, people complain even worse because, of course, nobody can agree about which features to axe! Everyone is using different subs…

And that "bloat" also comes from features in libraries that the developers use. It's much of what allows development to happen at a much more rapid rate than it did in the past.
Post reply on HN