v8: a Tale of Two Compilers

Ever wanted to take a peek under the hood of v8, Google’s Javascript virtual machine, without having to check out the code and poke around?

Here is a nice post that gives a look at what’s going on behind the scenes:

V8 compiles all JavaScript to native code. V8 has two compilers: one that runs fast and produces generic code, and one that doesn’t run as fast but does try to produce optimized code.

The quick-and-simple compiler is known internally as the “full-codegen” compiler. It takes as its input the abstract syntax tree (AST) of a function, walks over the nodes in the AST, and emits calls to a macroassembler directly.

Objective-J and Cappuccino, with Francisco Tolmasky


280 North (bought by Motorolla) is the company behind the impressive 280 slides web-based presentation application (a la Keynote) and the framework it was built on: Cappuccino. Cappuccino is an oddball compared to other Javascript frameworks. First of all, it abstracts completely from HTML and CSS, and second of all: it’s not built using regular Javascript but with Objective-J, a strict superset of Javascript that adds support for classes and message sending to Javascript — much like Objective-C adds those features to C. Objective-J was one of the first languages that uses Javascript as a target language.

The Cappuccino framework is more or less a port of Apple’s Cocoa framework, and Cappuccino applications seem to share the same elegant design style that Mac applications have. Continue Reading

Microsoft to sponsor Windows version of node.js

From the node.js blog:

I’m pleased to announce that Microsoft is partnering with Joyent in formally contributing resources towards porting Node to Windows. As you may have heard in a talk we gave earlier this year, we have started the undertaking of a native port to Windows – targeting the high-performance IOCP API.

This requires a rather large modification of the core structure, and we’re very happy to have official guidance and engineering resources from Microsoft. Rackspace is also contributing Bert Belder’s time to this undertaking.

The result will be an official binary node.exe releases on nodejs.org, which will work on Windows Azure and other Windows versions as far back as Server 2003.

node.js has become the de-facto server Javascript implementation. It was already available on most Unix-based operating systems and with the introduction of a Windows port, it becomes a true cross-platform tool.

It could be time to consider node.js for localhost server applications: applications that need a client-side server component, but do not rely on a desktop native UI. Examples could be peer-to-peer style applications, or synchronization software like Dropbox. A localhost web front-end could be used to communicate with the local node.js and you’d get the same code sharing benefits of Javascript.

Streamlined Asynchronous JavaScript, with Bruno Jouhier


Javascript is a language that has come a long way since Brendan Eich implemented it in 10 days in the mid-nineties. Until a few years ago it was mainly used to build drop-down menus on website, but since the advent of — what we now refer to as — AJAX, Javascript has started to be taken more seriously as a language. Since then, Javascript codebases have increased rapidly. With the advent of node.js, Javascript is also used on the server-side, because it turns out the be an excellent language to write efficient asynchronous code — or is it?

As it turns out, not everybody is satisfied with the verboseness and structure of Javascript code.

We talk to Bruno Jouhier, author of streamline.js, a Javascript preprocessor that attempts to streamline asynchronous code written using Javascript (and CoffeeScript as well), removing the need to write all those callbacks by hand. Continue Reading