Zeggy Posted May 17, 2011 Share Posted May 17, 2011 Somebody wrote linux entirely in javascript, and loads in your browser! http://bellard.org/jslinux/ Pretty damn amazing, it was written in just 3 days! You can use emacs, a c compiler, and more stuff with it, and it all runs from your browser. Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted May 17, 2011 Share Posted May 17, 2011 Thats more than damn clever :D Quote Link to comment Share on other sites More sharing options...
galdikas Posted May 17, 2011 Share Posted May 17, 2011 I was expecting to see some interface :D So what can you do with it? Quote Link to comment Share on other sites More sharing options...
Lithium Posted May 17, 2011 Share Posted May 17, 2011 nobody wrote linux on js actually... that is simply an interface in JS to handle it. Quoting the author itself... "Javascript terminal Although I could have reused the excellent termlib, I decided to write my own because I was curious to see how it could be done. ... Linux distribution I compiled a 2.6.20 Linux kernel" And no it is nothing new as well! ;) Quote Link to comment Share on other sites More sharing options...
Zeggy Posted May 17, 2011 Author Share Posted May 17, 2011 (edited) Yeah, you're right, he didn't write linux in javascript, sorry. But he did write the entire hardware emulation to support loading linux. I'd call that more than 'simply' an interface. And yes it is new, nobody has ever done this before. There are lots of javascript emulators for other systems but none for the pc. But then again, the guy that did this also wrote qemu so this was probably easy for him :P The linux part is just a binary which is loaded from the server, so I think it could support other os binaries. btw, in the first part of your quote, he is just talking about the terminal. But the terminal is only part of what he wrote. The more important part is the hardware emulator. galdikas: quite a lot. Type ls to see the directory listing. It should show hello.c. You can compile it into a hello world program with the included c compiler using this command: tcc -o hello hello.c Then run it with ./hello Type ls /bin to see the programs that can be used. Not everything works though (for example, there's no network support) You can also mess it up like a normal os: f(){ f|f &};f (forkbomb) rm -rf / (delete everything) Edited May 17, 2011 by Zeggy Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted May 18, 2011 Share Posted May 18, 2011 Well it's not completely true... http://benfirshman.com/projects/jsnes/ http://www.codebase.es/jsgb/ http://www.kingsquare.nl/jsc64 http://www.chiptune.com/ Etc... That means a lot of emulators have been already created with JS. Honestly there is not much you can do with them today and wonder what could be the interest in a couple of years, currently it is just... toys. Quote Link to comment Share on other sites More sharing options...
Zeggy Posted May 18, 2011 Author Share Posted May 18, 2011 (edited) Yeah, I said there are a lot of emulators, but none that can emulate the PC. This emulates an actual computer right in your browser where you can do everything you normally do on a computer. This one isn't just a toy, it's actually running linux in your browser... And at a very decent speed too. It's basically virtualization right in your browser. You can literally write a c program and compile it right in your browser, and then run it too. If the guy can get network support working, you could write and compile a c program in linux or a php website or whatever with vi/emacs/whatever linux editor, and upload it somewhere where other people can download it, then you have your entire development tools and development chain right in your browser. Edited May 18, 2011 by Zeggy Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted May 18, 2011 Share Posted May 18, 2011 well, sockets are not accessible via JS, so no that's not doable. Second, I hardly see the benefit of having a virtual machine inside my browser, already virtual machines are slower and don't emulate 100% of the features, if yet they would be A LOT slower I doubt people would use them, without talking that those machines would work as long as you have the browser window open. Also saving and loading state, I hardly see how he could manage it. So I stay with my mind, it is currently a fun thing, but not really useful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.