JavaScript: Now powerful enough to run Linux

 

Summary

The latest project to emerge from prolific programmer Fabrice Bellard is a JavaScript program that runs Linux on an emulated x86 processor within a browser.

Events

Echelon 2012
June 11 and 12, 2012

University Cultural Centre, National University of Singapore

Startup Asia Jakarta 2012
June 7 and 8, 2012

12th Floor, Annex Building, Wisma Nusantara Complex, Jl. M.H. Thamrin No. 59 Jakarta 10350, Indonesia

MMA Forum Singapore
April 23-25, 2012

Grand Hyatt Singapore

Step aside, Google Docs, there's a new JavaScript tour de force in town.

I'm talking about the latest project from programmer Fabrice Bellard, a JavaScript program that emulates an x86 processor fast enough to run Linux in a Web browser.

The JavaScript PC Emulator can do the work of an Intel 486 chip from the 1990s, but doesn't have a built-in floating point unit for numeric processing, Bellard said. Happily, Linux itself can emulate that, and a version of the operating system's core--2.6.20--runs on the foundation.

Bellard published a technical description of the JavaScript PC Emulator on Saturday, but today the project caught the notice of prominent techies, including Brendan Eich, a Mozilla programmer and the creator of JavaScript.

"I did it for fun, just because newer JavaScript engines are fast enough to do complicated things," Bellard said of the project. "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 JaegerMonkey (for Firefox 4) and V8 (for Chrome)."

Bellard suggests some possibilities for more serious use, including benchmarks or running old DOS games. But probably the project's biggest practical repercussion is simply the news that JavaScript has matured enough to run an entire computer-within-a-computer.

Curious people can try the emulator with a modern browser that has fast JavaScript performance; it works with Firefox 4 but not newer versions of Google Chrome. And those who really want to dig in can look at the JavaScript PC Emulator's actual JavaScript code.

The project is the latest attention-getter from Bellard. The French programmer also wrote QEMU, software that can emulate one type of processor on another; FFmpeg, open-source software for playing and otherwise handling video and audio streams; QEmacs, a lightweight text editor for Unix systems; digital TV signal generator software that uses a computer's VGA card to broadcast TV over the air; Linmodem, Linux software that emulates a hardware modem chip; and a program that calculated pi to a then-record 2,699,999,990,000 digits using a mere personal computer.

Bellard also is a two-time winner of the Obfuscated C competition to produce clever but superficially incomprehensible programs in the C language.

Talkback

Add your opinion

In order to post a comment, you need to be registered. (Sign In or register below)

Post your comment

ZDNet Asia Live

Intranets need social to survive http://t.co/pdOHvgBP #intranet #socialintranet #intranet20

Fanboys on AV for Mac: "ludicrous" "a waste of time" "The Mac will protect me" "the most secure ever" "impenetrable" http://t.co/a1o2Sz7E

RT @ameliatmy: the hottest angel investment & venture capital event in #MALAYSIA! will u be there? http://t.co/ChSjkmzu #ABAF

Singapore Game Box in the ZDnet news!
http://t.co/UuTs0SqX http://t.co/YdPKmm39

#radio Radio Bolivia by EnjoyIT 1.0 http://t.co/fdlBPOeI

RT @zdnetasia: SingTel acquires HungryGoWhere for US$9.4 million. http://t.co/Qho1REVZ

Gartner: Mobile CRM gives better ROI than social - http://t.co/s5OfTAXK #CRM

RT @zdnetasia: S'pore sets up portal to grow games sector. http://t.co/In8gtj7L

#Malaysia: 20% yoy rise in overall #wages for both direct and non-direct labor. http://t.co/5T2e0LUU

RT @mikebuetow: #Malaysia: 20% yoy rise in overall #wages for both direct and non-direct labor. http://t.co/5T2e0LUU

@88tc88 RT @KevinZDNetAsia: User experience more important to app monetization than actual content http://t.co/ogbD5wyI… #li #dm12

Dubbed the first social #Olympics, this year's summer games have some of the strictest social rules for all involved http://t.co/4HlcqhW3

Value of big data analytics largely untapped - Zd Net http://t.co/ZuhPrCN4: Pushing cloud limits for d... http://t.co/VyOU0vHz #TheBIBlog

Value of big data analytics largely untapped http://t.co/026PCpSc @zdnetasia

RT @data_nerd: Value of big data analytics largely untapped http://t.co/026PCpSc @zdnetasia

So much as we know , MTK6575 extremely integrated frequency1GHz ARM Cortex-A9 processor, the superiority of 3G / HSPA Modem, and help the...

15 hours ago by y15822137359 on 5 SaaS adoption speed bumps to avoid

I reckon your view: "CRM is strategy, not software", if a company replicating the approach uses in ERP implementation into CRM, what they...

1 day ago by wykoong on Gartner: Mobile CRM gives better ROI than social

This video will teach you about the Excel fill handle but also provide you with a workook to download... http://www.youtube.com/watch?v=...

2 days ago by TradeBrother on A quick fill handle trick for Microsoft Excel

waiting...

4 days ago by eapete on What should count in a company's market value?

Boy, you've opened a can of worms now.

Wait for the rants & raves.

4 days ago by eapete on What should count in a company's market value?

I was puzzling before this whether to replicate the success formula we executed for a financial institute, and come out with a standard s...

4 days ago by wykoong on Drop the egos, copy ideas, then innovate