Linux Kernel Running In JavaScript Emulator With Graphics and Network Support
New submitter warmflatsprite writes "It seems that there have been a rash of JavaScript virtual machines running Linux lately (or maybe I just travel in really weird circles). However until now none of them had network support, so they weren't too terribly useful. Sebastian Macke's jor1k project uses asm.js to produce a very fast emulation of the OpenCores OpenRISC processor (or1k) along with a HTML5 canvas framebuffer for graphics support. Recently Ben Burns contributed an emulated OpenCores ethmac ethernet adapter to the project. This sends ethernet frames to a gateway server via websocket where they are switched and/or piped into TAP virtual ethernet adapter. With this you can build whatever kind of network appliance you'd like for the myriad of fast, sandboxed VMs running in your users' browsers. For the live demo all VMs connect to a single private LAN (subnet 10.5.0.0/16). The websocket gateway also NATs traffic from that LAN out to the open Internet."
What does one use this for?
javascript can run linux while java choke in everyday tasks?
Be or ben't
Can we go back to trying to target for time+space efficiency rather than buzzwords?
A lack of network support was what was holding back a JavaScript VM running Linux from being useful. No other reason whatsoever.
Imagine a Beowulf cluster of these! It would be the slowest, worst cluster ever!
My TurboCOBOL VM can run Linux faster than any other.
The YASEP is one of these other CPU cores that has a JS simulator, see :-) :-)
http://yasep.org
No linux image though, the goal being to co-develop/co-simulate the core along the VHDL code (running on in FPGA and with GHDL).
But while we're at it, the JS code serves as a development tool, not just for the VHDL and architecture, but also for the code that runs on it !
It can already compute and display Mandelbrot sets in multi-CPU configurations in a windowed environment
So yeah, nested indirections have benefits
[233.6925329] panic in year 0 -- XHIBIT dump, turtle stack overflow
..er, forget it.
Join the Slashcott! Feb 10 thru Feb 17!
The most incredible thing is the speed at which it runs: 11.5 MIPS.
My desktop dual-core Xeon W3503@2.40Ghz barely manages 40 MIPS in Chrome.
The iPhone 5s is crazy fast by most standards
Artificial intelligence is no match for natural stupidity
Can this Linux kernel run a Javascript VM? If so, can that VM run the Linux kernel? And if so, can that kernel run a Javascript VM? And if so...
Seriously! What is the fucking point of this? Why are they more interested in this mental masturbation than in improving the Linux Kernel, or developing a new application all together?
There is zero value in running the Linux kernel inside a Javascript VM, inside a browser. Burning 10 dollar bills is more fun!
Are you sane?
What this is really saying is that complicated network capable operations can be run in javascript. This is the ultimate in drive-by downloads because almost every website insists on using javascript. You have no idea what the javascript is doing. So any website you go to will be free to run spamming, network detection, etc. just by you going to a webpage. We are screwed.
It's amazing to me that "tech for the sake of tech" posts like this elicit much the same responses I would expect from a non-nerdy audience. At what point did slashdotters become mostly a group of curmudgeonly old-men who care only about what use can be made of new things and who find NO INTEREST what-so-ever in new and different ideas?
THIS is why it takes that ex-jock-turned-business man to make money on technology. Somebody who isn't an old-fart slashdotter who "ho-hum"s everything new. This community is SUCH a disappointment.
From my OpenRISC ORK Javascript Emulator Running With Network Support
i.imgur.com/zJPsjCT.png
Wonderful now that I can finally run a full operating system in a browser, I can finally deliver a rich client server experience in my web-based applications :-)
Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
There are many times when I need to do remote admin on a machine from a location where I don't have SSH available. Currently that usually involves some type of hacky browser-based terminal emulator. Actually running a Linux based OS in the browser would be perfect for such occasions, assuming I'm someplace where making outbound port 22 connections isn't a problem.
Run a JVM on this thing, run a Swing applications - and you got yourself an applet without installing any plugins!!
Considering that most smartphones will happily run a terminal program...and you can get bootable linux on a usb stick or a whole linux computer on an HDMI plug.
It's amazing to me that "tech for the sake of tech" posts like this elicit much the same responses I would expect from a non-nerdy audience. At what point did slashdotters become mostly a group of curmudgeonly old-men who care only about what use can be made of new things and who find NO INTEREST what-so-ever in new and different ideas?
Because Javascript sucks. If it were Perl, Python, or Ruby, I'd be more interested. Unlike Javascript, Perl provides power for its complicated syntax.
Ok, supposing that instead of presenting a command line to the browser user the websocket/javascript instead installed a reverse command line back to the server, essentially giving a remote user access to the internal commands within the browser via the javascript kernel. All the remote user needs is a bug. plugin, or other feature that allows the browser to perform operations on the websurfer's host, like a fly-by install of malware or scraping the user environment of all information available. What prevents this scenario? How would the user even know other than the browser got reaaaalllly slooooowwwww.....
oh yes, Windows is much more complex, needing about twice the resources and memory to get the same job done as a Linux or BSD, in between siezeups needing a reboot. truly a powerhouse.
Does that mean you should? I'm sure you could emulate any known processor and run any OS in Visual Basic... Why would you? Gah!
In the UK, "weren't too useful" and "weren't terribly useful" have much the same meaning: not very. But "not too terribly useful" broadly parses as "fairly", because not too terribly binds as not "too-terribly".
I've seen this form from non-UK writers many times, though, and apparently it still reads as not very.
Eh.
i can't even get that with native linux...but i'm going to get it in javascript linux??
I'm puzzled how one makes it "fast". When my highly active programs run in a browser they tend to glitch and halt after a while if they have been doing lots and lots of quick object instantiation and destruction.
You've almost figured it out!
Recycle your objects. Enjoy instant performance improvements. (While this is not just true for JavaScript, it's obviously the advice you need.)
Oh, and try learning the language. It's not like Java and C#. If you try to treat it that way, you'll end up writing crap. You can break yourself out of that easily enough by working through The Little Schemer in JS instead of Scheme.
How one does that is not obvious to me. let's take an example. Suppose I create a function like this:
var recylceObj = function( oldObj, newAttitributes) {
for (var i in newAtritutes) {
oldObj[i] = newAttributes[i];
};
}
var foo = recycleObj( oldObj, { x:1, y:2, z:3} );
so superficially I just reused an old memory allocated object oldObj by overwriting it's attributes with new ones. But wait, to do that I had to instantiate the temporary hash { x:1, y:2, z:3} to transfer in those attributes. Which is memory allocation and object creation. It would in fact be simpler to write:
var foo = { x:1, y:2, z:3};
foo.prototype = oldObj.prototype;
I would in fact think this latter way would be more efficient in both speed and memory. So How do I save anything by recylcing?
is there a better way to recycle? what am I missing
Some drink at the fountain of knowledge. Others just gargle.
Dupe, or maybe just an update to this:
http://tech.slashdot.org/story/13/10/12/1819231/javascript-based-openrisc-emulator-can-run-linux-gcc-wayland
I deny that I have not avoided attaining the opposite of that which I do not want.
I can see this as an alternative to using ajaxterm. We use ajaxterm behind a 2 factor authentication system at work to gain remote access when the connection is too poor to establish a vpn session. Ajaxterm is lacking history, and isnt the prettiest. This would be a very nice alternative to that.
I am having trouble setting up WINE with this. Can someone help me setup WINE so I can play Crisis on my Nexus?
The Official Site of 1337 Pwnage
I don't know what you mean by real OS. But if you mean Windows. Windows 95-Windows2000 should be possible to emulate. The newer Windwows version might work as well in future. It depends on the amount of memory the web browsers provides you and of the bandwidth of your network connection. Download 500MB before you see the Desktop? But you can't put them online as this will violate copyright law.
Be advised that this isn't a port of the kernel to JavaScript. The JS in that page is emulating a computer which executes a kernel built against the or1k architecture (as opposed to x86, or any of the arm variants).
Stuck at "Loading kernel and hard drive image" for me under windows, online an offline, Chrome and IE.
I must be cursed.
A blog I run for the wealth
I think a setup like this would be good to develop a OS prototyping engine. Instead of working low to high level like most operating systems you could work at all levels to perfect the upper level look & feel and adjust the lower level to correct for problems affecting higher level & security. Sort of like what going from type writers to word processors did for writing.
*It's not what you can do for the Dark Side but what the Dark Side can do for you!*
And with it they cure cancer, solve world hunger and make perfect soufflé?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."