Linux In JavaScript, With Persistent Storage
An anonymous reader writes "Remember Fabrice bellard's [Linux-booting PC emulator in JavaScript] ? This modified version [Note: click on "emulator.html" in that directory to see it in action] allows the same emulator to boot the most recent linux kernel, 3.0.4, as well as providing the user with persistent storage. It is achieved by building a virtual block device, which stores data in HTML5 local storage. The block device can be partitioned and formatted as ext2, so it can be easily used."
So when the web browser becomes the OS we will still be able to issue cryptic command-line incantations to do things that everyone else has to point-and-click to do!
Because you can? Because nobody else has done it? Because it's cool? Because it's a challenge?
It depresses me that everyone always responds to these articles with "Why?" and "What's the point?" and "What a waste of time". The whole of human achievement is pretty much the story of people doing things just to see if they can, or because it's interesting to them, or because it's never been done before.
I happen to be interested by the implementation of Javascript engines these days - but I don't know yet if I will write my own any time soon ! Anyway, this emulator was a way to learn how to write optimized code for recent Javascript engines, in particular Jaeger Monkey (for Firefox 4) and V8 (for Chrome).
This could be a great thing to embed into online how-tos and the like for teaching basic or even advanced linux. ... heh, embedded linux on the rise again :P
Three awesome reasons:
1) Because you can,
2) Because no-one else ever has,
3) Because there are useful lessons that can be learned by performing an exercise like this.
and I'll go ahead and speculate on the fourth and possibly best reason:
4) Because the developer enjoyed solving the problems involved in doing it
The time he spent doing this is probably equivalent to the time you spent watching all 5 seasons of the Battlestar Galactica. I'll leave it to you to decide which was the more monumental waste of time.
You can never know everything, and part of what you do know will always be wrong. Perhaps even the most important part.
Do you want us to use Flash instead? O! Enlighten us, wise one, about the numerous other languages that are available for web browsers!
Clicked pie.
Pentium MMX. Is that what everyone gets as well?
"Windows 8 is going to use less memory"
"Oh yeah? Well Linux can run in javascript, ha!"
XML is like violence. If it doesn't solve the problem, use more.
Rather than using javascript to load infected files that use *.pdf and other infectible formats, they can now run a botnet just using an infected ad straight inside your web browser.
News flash: it won't and it will only get better.
The special thing about it, is that it's available on almost any modern computing device, down to phones. It's become the Windows of programming languages in a way - not the best option, but it's just so damn common that you should at least learn to use it. I don't know why we don't have any alternative scripting languages for browsers yet. CoffeeScript looks nice, but it just compiles down to JavaScript anyway.. so not the most efficient way to do things if you need to ship your framework as libraries on your website rather than it being built into the browser.
I did suspect that Ruby was a bit of a fad, but it is a nice language all the same.
which is totally what she said
Hell, it's basically a mistake of history and circumstance that it's so widely available.
Herein lies the reason why javascript is not 'just a fad'. No matter your opinion of the DOM and javascript syntax, it is *capable* of being used to get the job done and it is everywhere. Other than making tasks absolutely impossible, it's hard to offset in difficulty the benefit of being everywhere. No other language will be everywhere so long as javascript is 'good enough'. Any browser attempting to bring their own favored child in will not meet with adoption because Javascript will work too and on other browsers. Short of getting Microsoft, Google, Apple, and Firefox to adopt the language with *zero* footprint to start with, nothing will change.
XML is like violence. If it doesn't solve the problem, use more.
While jsLinux is cool, and this is a cool addition, it just makes me wish JavaScript wasn't the only languageVM embedded in the browser. The thought of what could be done if one could take advantage of what the various scripting languages do best instead of trying to fit JavaScript to everything makes me sad.
Having to work for a living is the root of all evil.
don't click, it's goatse.
On second thought, let's not go to Camelot. It is a silly place.
What is bad about it, if it's within the bounds of the browser's sandbox?
which is totally what she said
I dont think Java will play a big role anytime soon in most of the web. Especially this demo shows, that js itself has become so powerful, that powerful conversion a compilation apis will evolve, completely removing java from interest in the web. and I fear the people who might consider your path of using integration to a VM in the background will use adobe products more for these tasks, where interaction is already given - even if the flash vm sucks.
Your point is however interesting, because it shows what you think of, something which crosses barriers of mobile (no adobe!) and desktop browsers - there the only problem is, the number of applications for this model being used both in browsers and mobile devices are too few; the development cost of apps building either on complete web based logic or application based logic for mophos are smaller; and at last: while java is a common thing between android and the desktop, there is already the separation between oracle and dalvik and the separation between ios, symbian, winmob, and others, not all supporting java or flash as common backbone, again throwing up the question if targeted dedicated apps using common apis are not cheaper.
So my answer is: does not matter what oracle does there. It's a market which already falls from its zenith.
Java plays a role in conversion languages however at google. I still prefer pyjamas.
You know the reason as to why they respond to these questions with "Why"? Because they can.
There is no reason to get depressed if people have not the same insight or opinion as you have. It will make your life a whole lot easier (and less depressing).
I am sure that some things these people do you will find a waste of time. Should they get depressed of that because you ask them "Why?" or "What's the point?".
The question of why is just as relevant as why not. The only thing it shows by your response is that you have different priorities. And that is a good thing. Remember: We are all individuals. ( ... I'm not.)
Don't fight for your country, if your country does not fight for you.
I logged in with root and no password.
I guess you could install a webserver on it, then maybe even host those same files (including "emulator.html")...
Then on another session open a web browser, point to your webserver and open the emulator...
That way you'd have an emulated web server serving an emulator that is being run on an emulated web browser emulating linux.
Honestly, this should make you chuckle and smile and say "Wow!"
"Why" might be in there somewhere but if it's your first port of call, you're a lost cause - hand in your geek card.
OMG!!! Ponies!!!
All hail the year of linux in the browser!
rewriting history since 2109
standard linux fresh-install login.
username root
no password.
That is worthy of attention. More so than climbing Mt Everest but less than inventing the transistor.
Do you even lift?
These aren't the 'roids you're looking for.
Have gnu, will travel.
It's been present on pretty much all browsers of any note since the late 1990s. Love it or hate it, Javascript stopped being a fad a decade ago, and has so much momentum now that unless you want to give up web development, you'd better just man up about it.
The world's burning. Moped Jesus spotted on I50. Details at 11.
Only the bootloader needsto be signed for secure boot, so as long as grub is signed, you can boot whatever yoou want.
The license of GRUB requires that it be distributed with "Installation Information", which includes private keys for signing. Operating systems would need to be shipped with a non-GPL bootloader, and makers of home PCs would have no incentive to include keys for this bootloader because boot-time malware could work by installing it and setting it as default.
you can boot linux from the NTloader just fine if you have a system tah only has MS signing keys and no way to disable secure boot.
The NT loader of Windows 8 will check the signature on any kernel it loads, and (I'm guessing) so will the NT loader of Windows 7 and Windows Vista after a service pack to allow their use on machines that require UEFI secure boot.
Most SW development isn't either to impress girls, make money, or even "scientific" curiosity (not eve CS). It's to enjoy doing something the doer has never themself done before, and/or have the results from your own labor. A pretty good amount of SW development motivated by that has pushed the world forward.
That is a lot different from hobbies like watching TV or playing video games. The difference is between producing something, and consuming something. Very little consumption has ever pushed the world forward - probably none by a single person (and any is vastly outweighed by pushing us backwards).
This particular hobbyist effort might not push the world forward. So what? Its equivalent is "let's make a tiny S-100 bus 6502 CPU into a personal computer mimicking a $100K IBM machine". A few dozen hobbyists doing that pushed the world far forward. The same happened with radio and plenty of other electronic hobbies, and (among the rich) with astronomy, botany and other hobbies become sciences.
And even here the "Linux in JS" effort is by a hobbyist specializing in embedded script engine development. This particular stunt might not push anything forward but their own expertise - or passion. Which is where world pushes come from.
Scrubbing a floor with a toothbrush is hazing partly because it's been done before, which makes it even more pointless - and so more tedious. "Linux in JS" is new, and so less pointless. Even if it is a terrible tool for running Linux. It's a pretty good tool for exercising the imagination, and the skills and commitment to back them up.
--
make install -not war
Ok, that was, by far, the easiest way to get Linux running on my iPad.
This cool Web app is not "Linux in Javascript". It is in fact a "Javascript PC Emulator", just as the app says in the app's page title. It's a bootloader and a virtual PC implemented in Javascript running in the browser JS engine. Which loads a stripped-down Linux binary into itself and runs it, as if it were running on the PC. The Linux was written in C, compiled into PC (x86) machine instructions like any PC Linux, and then runs on the Javascript PC emulator.
I suppose it might be possible to run a Windows binary on it, if that bloatware would fit in the browser. Maybe DOS, or even Novell Netware (though this Linux demo has its networking stripped, and in any case the browser enforces the originating-server-only network access).
Very admirable project. Truly journalistic bad headline and summary.
--
make install -not war