Is JavaScript the Undisputed King?

September 28, 2012

One year ago I listened to Allen Wirfs-Brock of the Mozilla Foundation deliver the [closing keynote for StrangeLoop 2011](http://www.infoq.com/presentations/Post-PC-Computing-Is-Not-a-Vision). Wirfs-Brock's central claim was jarring. Keep in mind, this is a conference whose attendee list is dominated by language designers, database architects, PhDs, and people whose credentials make the term "senior" seem like a gaping understatement. Yet in front of this crowd, Wirfs-Brock unabashedly coronated JavaScript the new king of programming languages. I did not buy it. But a year later, I'm changing my mind. I like JavaScript. It was, in all honesty, the first language I felt really comfortable in. I learned with the web. I started programming in 1995, at age 16. My summer internship led me into C, Java, Perl, and JavaScript all at once. JavaScript was my favorite, doubtless because its bindings to the browser made results more gratifying. "Look, ma! I put a message in the status bar!" But as I matured as a programmer, I looked back on those heady experiments as pretend-programming with a toy language. JavaScript had a firm place in my constellation of programming languages: It was for tricking out web pages. A decade and a half later, I found myself at StrangeLoop hearing an otherwise credible source claim that JavaScript is the new C. Really? You can imagine my skepticism. Since hearing Wirfs-Brock a year ago, several things changed for me. First, within weeks of StrangeLoop 2011, I begin writing Node.js code. Second, I read some of the technical papers from Google on the V8 engine ([start here](https://developers.google.com/v8/design)), and then read some of the ECMA proposals for the [next version of JavaScript](http://wiki.ecmascript.org/doku.php). Finally, I wrote an application framework for Node.js -- always a great opportunity to stretch one's grasp of a language and an environment. I know it's the same language that I used to pop up alert dialogs in my pimply high-school years, but it feels different now. Did it grow up, or did I? ## The Acceptance Speech On September 25, StrangeLoop 2012 concluded. And who should deliver the [closing keynote](https://thestrangeloop.com/sessions/the-state-of-javascript)? None other than Brendan Eich, the father of JavaScript. Eich is disarming, funny, and intensely intelligent. Quick to point out the work of others, he portrays the JavaScript community as a vibrant group of intelligent individuals who, differences aside, have the best interests of the language users in mind. His presentation began with a humorous history of the mistakes of JavaScript, then moved to upcoming features and standards work, and concluded with a look at some of the more exciting JavaScript projects. It didn't come across as a sales pitch; it came across as an acceptance speech, an oath of office. "I hereby solemnly swear that JavaScript will do right by you." And by far, the most interesting aspect of this presentation was Eich's promotion of JavaScript as the new replacement for the VM. Here is the text of one of Eich's slides:

JavaScript > bytecode

  • Dynamic typing = no verification
  • Type inference = delayed optimization
  • Would byte code compress as well?
  • Bytecode standardization would suck
  • Bytecode versioning would suck more
  • Low-level byte code is future-hostile
  • Many humans like writing JavaScript

Oh yes he did! CoffeeScript, ClojureScript, Dart… Eich enthusiastically champions building languages that compile (or transcode) to JavaScript. (Did you know there's a project to rebuild the JVM in JavaScript? The Doppio project also spoke at StrangeLoop 2012.)

On the server; on the desktop; on mobile devices -- JavaScript already is pervasive. And if you've convinced a theater full of language lawyers, scientists, CTOs, and architects that JavaScript is the new C, you've won. Wirfs-Brock and Eich won.

Hail to the king, baby.

With 1,000 Titles, Packt has Contributed Over £300,000 to Open Source Projects

September 22, 2012

Packt now has 1,000 titles! Packt's royalties sharing model contributes a percentage of book royalties back to open source projects, and they've now exceeded £300,000 in contributions. (Packt is a UK-based company.) To celebrate their 1,000th title they are offering one free ebook to anyone who already...

Pronto.js: Creating and chaining commands

September 7, 2012

Pronto.js is a JavaScript framework for Node.js designed for writing fast, efficient, asynchronous, component-based applications. It can be used for web applications, REST API servers, command-line programs, and so on.

Pronto.js is based on the idea that code consists of three major conceptual pieces...

How Fortissimo Does Dependency Injection

September 7, 2012

Dependency Injection (DI) is a software design strategy for making software more flexible by passing an object the components it needs to get its job done. This is more flexible than having each object manage its own components. If you are not familiar with DI, check out a great introduction.

Fortissimo

VOTE: A potentially major change to QueryPath.

September 1, 2012

TL;DR: There's an experimental version of QueryPath 3 for you to try and let me know what you think: https://github.com/technosophos/querypath/zipball/3.0.0-experimental-find-v2.1

Either respond at support-querypath@googlegroups.com or to @querypath on Twitter.

Read on for the onger explanation...

Getting Started with Pronto.js

August 27, 2012

Pronto.js is a JavaScript library for application building. Designed for Node.js, it makes writing high performance asynchronous applications much easier. And it introduces modularity so that you can build applications with highly reusable components. ConsumerSearch.com (part of About.com, a New York...

JavaScript Callbacks: The Function is Last… or Lost?

August 22, 2012

In JavaScript -- especially of the Node.js sort -- it is a common pattern to put a functional callback as the last argument in a parameter list. For example, we might define a function that looks like this:

/**
 * @param {String} data
 *   Data to save.
 * @param {Object} properties
 *   Properties...

Rewriting URLs for X-Forwarded-Proto and Reverse Proxies

August 13, 2012

Reverse proxies and web servers sometimes forward HTTPS traffic to their backends using HTTP. (In other words, they handle the SSL with the client, and the backend only has to handle HTTP). This can provide a speed boost, and is generally a good thing. But smart backend code may need to ensure that...

Three Months at a Standing Desk, 5 Lessons Learned

August 9, 2012

For the last three months I have been using a standing desk. Time to share the results.

I am in reasonably good shape, and I don't have any clinical back, shoulder or leg problems. But even with my high-ergonomics desk chair, foot rest, and fastidiously arranged workstation setup, a day in a traditional...

Biography of the PHP HPCloud Library

August 7, 2012

The first two articles in a series about the HP Cloud PHP bindings is available on the Cloud Matters, the official HP Cloud blog. Matt Farina is writing this series.