Lurker News

Comments (190) 70 threads

staunch4 replies#
This may as well be magic as far as I'm concerned. When I first saw http://bellard.org/jslinux/ I just about shat myself. This is definitely another level of awesome. Well done.
ghayes7 replies#
This really is extremely well done [and I'd like to see the unminified source]. The next feature I'd want to see is networking support. I love the idea to be able to run my entire dev setup in an emulated browser session [e.g. ruby, rails, redis]. That would be a game changer on how I'd develop.
javanix3 replies#
At 2000 kIPS you may have a few generations of javascript engines to go before we get there.

That's not meant to take away from this project - it truly is amazing what can be interpreted in the browser now.

gngeal#
Dynamic translation of x86 sequences could give you some boost, as could use of asm.js.
Dylan16807#
Some things would do badly at that speed. But serving basic web queries would be fine, and give you a better feel for what is slow when milliseconds spent processing turn into actual seconds.
tekacs6 replies#
Just for reference's sake this does vary a fair bit by computer and browser - mine never drops below ~8kIPS and runs mostly at ~15kIPS (and up to ~23kIPS).

Whilst this is nothing like the several orders of magnitude required for more capable interactive behaviour, it does make my load times noticeably faster than those claimed on the page. :)
(I'm Chrome on Linux, i7 4th Gen, incidentally)

Continue this thread — 6 replies

chris_mahan#
Absolutely. This would be awesome.
RaphiePS#
I think it would be really cool to link this up with some of the Chrome App API's (TCP/UDP networking, serial). Then you could distribute lightweight programs without bothering with Emscripten or Native Client.
rrrene1 reply#
> That would be a game changer on how I'd develop.

Why? I'm honestly curious since I can't imagine any big advantages over more "classic" setups ...

vidarh2 replies#
Go to any machine with a browser, log in, and have your dev environment pop up in the same state it was when you left it somewhere else, yet all running locally rather over some VNC connection or potentially laggy ssh connection. Log out, and have the state persisted.

Continue this thread — 2 replies

stonewhite#
Must plug http://www.koding.com here.

It is a "social" development platform supporting rails, mysql etc.

benjamincburns1 reply#
I'm presently working on networking (OpenCores ethmac) support for the jor1k[1] OpenRisc emulator. The plan is to push ethernet frames out over a web socket, and pipe them into a tun interface on the server via a node/python/C/whatever backend. From there, do whatever you want using your OS' standard networking tools (if you have specific needs for the server-side of this which go beyond using your os' standard tools, please let me know).

If you're interested in this, please do make plenty of noise at me to finish. I've got a flight back to the East coast from Portland on Sunday, so I'm hoping I can get most of the browser code finished by then. After that I'm going to be somewhat distracted through the end of January, as I'm moving from Charleston, SC to Christchurch, New Zealand. I could use a bit of motivation to get this done.
1: http://s-macke.github.io/jor1k/

s-macke1 reply#
I am really looking forward. If you have any wishes for an image with some tools, please let me know. Lynx, elinks, dillo, ssh, netcat, telnet ... whatever you want. Then I have to think about a demo. Maybe we can allow very limited access to some websites.

Continue this thread — 1 reply

benatkin#
Or PHP.

Ruby's interestingness to performance ratio is not high.

_ak1 reply#
With emscripten, anything is possible nowadays. And it blows your mind.
facorreia2 replies#
Anything has been possible since 1999. Anything at all.

http://www.zombo.com

NIL8#
I can't stop laughing. That was so weird and funny that I almost forgot what I was doing here on HN.
chubot1 reply#
Wait how does this differ from JSLinux? Aren't they doing the same thing?

Also, this isn't just an x86 emulator, right? If it can boot linux, it's emulating the entire PC platform, not just x86. Very impressive of course. But I am interested in a comparison vs jslinux (also not open source).

g34 replies#
Yes, it's very similar to the jslinux project. However, I added more hardware (it can boot a real bios: seabios). Also, I'll make this open source.
why-el#
Keep us updated when you do. :)
tectonic#
Very much looking forward to the open source release!
chii3 replies#
great to hear you are opensourcing this!

I had a quick look at the minified source. its pretty hard to decipher (method names have been renamed too), unlike traditional minification which you can recover by just reformatting.

Continue this thread — 3 replies

simida#
wait for you to open the source.
acqq#
I just ran Bellard's JSLinux (#) on my retina iPad with iOS 7. It works! Booting took 15 sec. Claims 20 bogoMips. And I can type the commands in it and execute them:

First I tap to the edit box on the right, the keyboard rolls in, then I tap in the "console." The commands work. I just don't know how I'd type ctrl-Keys without the physical keyboard.
Copy.sh ends with unimplemented GP handler however for anything I've tried.
#) JSLinux: the PC emulator is written in Javascript with the emulated hardware: 32 bit x86 compatible CPU, 8259 Programmble Interrupt Controller, 8254 Programmble Interrupt Timer, 16450 UART, Real Time Clock, IDE interface and hard disk. http://bellard.org/jslinux/tech.html

bumbledraven#
https://news.ycombinator.com/item?id=6221724

   g3 62 days ago | link | parent | on: Show HN: Virtual Machines in the Browser
   Just give me one more month, I'm almost there ...
The last month always takes at least 60 days. Strong work!
JoshTriplett6 replies#
Very impressive.

Interesting bug: I can't seem to type '-', '=', '+', or '_' into the Linux image. Missing '-' in particular makes it hard to run commands with options.
Elaborate workaround:

    /root% eval eq$(dmesg | grep 'e820 update' | sed 's/.*) \(.\).*/\1\1/')
    /root% echo $eq
    =
    /root% eval dash$eq$(uname bad 2>&1 | grep Usage: | sed 's/.*\[\(.\).*/\1/')
    /root% echo $dash
    -
    /root% uname ${dash}a
    Linux (none) 2.6.34.14 #44 Tue Oct 15 20:50:15 CEST 2013 i586 GNU/Linux
The first command grabs an '=' from dmesg and sets "eq" to it (without typing '='), and then the second command grabs a '-' from the usage message of uname and sets "dash" to that (without typing '-'). The last shows how to use ${dash} in a command.
Sheepshow2 replies#
This is the most soul-crushing category of bug, the kind which keeps me up all night, drinking.

Build a skyscraper, and lock the keys inside for the ribbon cutting. Sorry pal you lost your funding
Land on Mars, see an alien, but your camera is out of batteries and everybody back on Earth thinks you're a quack.
Successfully perform open-heart surgery on a desert island, but muck up the stitches and cause a scar. Your patient will hold it against you the rest of his life (which you saved).

to3m1 reply#
The soul-crushing bugs are the ones where you run a program, and nothing actually goes actively wrong, but the program overall just doesn't behave quite like it does on the real hardware.

Simple defects where a key is being ignored on certain systems are usually quite easy to fix ;)

j1vms1 reply#
Whoosh

Continue this thread — 1 reply

shurcooL1 reply#
Luckily, he was able to come up with a workaround.

Here's a soul-crushing situation that doesn't have a workaround, as far as I can tell.
You can play the original Deus Ex on OnLive. By default, it sets the fov to a very low number. It's only possible to change it in the console (there is no UI for it). But the console is disabled. However, you can get around that by pressing T, which creates a mini console with "say " prepoulated. Press delete to erase say, and type "fov 90". So close...
But they disabled the Enter key from working.
So you can get full access to the console, type the command that would fix the FOV, but you're unable to execute it because Enter key does not get sent to the game. You're completely helpless.

a13692099933 replies#
OnLive runs on OSX. gdb (i think) also runs on OSX. It should be possible to isolate the callback used to handle keyboard input and call it with c=10. This would take anywhere from hours to weeks of debugging though.

Continue this thread — 3 replies

g31 reply#
I've found the bug. For now, try Chromium. I'll fix this tomorrow.
JoshTriplett1 reply#
Thanks! What was the bug? I'd be interested.

Also, any plans to implement GPF handling? I tried booting a test environment I have on it (which runs Python as part of the GRUB2 bootloader), but it failed primarily due to lack of support for trapping GPFs. (There are a few other issues I'd have to work around to make it work, but that's a major one that I can't easily work around.)

g3#
Chromium and Firefox send different key codes for `-` and `=` (see http://unixpapa.com/js/testkey.html).

Regarding GPFs: This is one of the few things that are not completely implemented yet, I'm working on figuring this out.

femto1 reply#
I found that bug too. First thing I did was think, "a system restore is a page refresh away and I've always wanted to test the effects of this", then I attempted to type "rm -r /*".
valleyer#
Not `dd if=/dev/random of=/dev/kmem` ?
laumars1 reply#
You could just use octal escape sequences in printf:

    printf '\055'
returns

    -
Just change 055 for 075 (=), 053 (+) or 137 (_).

eg your $eq code can be written like this:

    eval eq$(printf '\075\075')
JoshTriplett#
Good thinking; that is much simpler.

Continue this thread — 2 more replies

hardwaresofton#
Pretty awesome, I for one don't think the constant stream of "x, rewritten completely in javascript" is tiring (this is not meant to be sarcastic).

[EDIT] - This post doesn't seem to say enough when I look back at it. Wanted to add this:
Seeing posts like this really excites me (and inspires me) about the future of web programming, and programming in general. Anyone that's excited about programming has to get excited about abstraction, and it doesn't get much more abstract that cross-coded/implemented virtualized systems like this. Even if you hate javascript.
Every step people take in blurring lines between systems like this should be exciting, given the large amount of abstraction that had to go into creating something like this.

Load more comments