2012-10

JavaScript: parallel programming via River Trail coming to Firefox

[2012-10-15] dev, javascript
2013-12-23: A new blog post on ParallelJS (as River Trail is now called) supersedes this post.

River Trail is a set of mechanisms that enable a new functional style of parallel programming in JavaScript. An initial prototype was developed by Intel. Recently, work has started to bring it to Firefox.

Controlling the Mac user interface from the shell

[2012-10-11] jsshell, dev, shell, mac
The Mac OS X shell has several Mac-only commands for communicating with the graphical user interface (GUI). They are useful in three cases: First, when switching back and forth between shell and GUI. Second, when interacting with the system from a language that is not Objective C or AppleScript: Bash, Node.js [1], Python etc.

How to pronounce __proto__

[2012-10-08] esnext, dev, javascript, __proto__, jslang
[This post is part of a series on the special property __proto__]

Bracketing variable names with double underscores is a tradition in Python that JavaScript has borrowed a few times, most prominently for the property __proto__ [1] (which is currently non-standard, but will become part of ECMAScript 6). For Python, the following pronounciation has been suggested by Ned Batchelder:

JavaScript: __proto__

[2012-10-03] esnext, dev, javascript, __proto__, jslang
[This post is part of a series on the special property __proto__]

This blog post looks at the special property __proto__, which allows you to get and set the prototype of an object. In order to understand this post, you should be familiar with JavaScript’s prototypal inheritance [1].

2012-09

Support for the Web Audio API is growing

[2012-09-30] dev, html5, javascript, clientjs

A quine in JavaScript

[2012-09-24] dev, javascript, jslang
Quoting Wikipedia:
A quine is a computer program which takes no input and produces a copy of its own source code as its only output.
@cowboy (Ben Alman) gives the following example for JavaScript:
    !function $(){console.log('!'+$+'()')}()
Why does the quine work? The above code uses several tricks.

JavaScript: single quotes or double quotes?

[2012-09-17] dev, javascript, jslang, jsstyle
Today, I’ve asked on Twitter:
JavaScript: single quotes versus double quotes. Any preferences?
And I got great answers. Two funny examples:

Expressions versus statements in JavaScript

[2012-09-13] dev, javascript, jslang
Update 2012-09-21: New in Sect. 4: using void for IIFEs, concatenating IIFEs.

This blog post looks at a syntactic distinction that is unfortunately quite important in JavaScript: the difference between expressions and statements.

The empty regular expression

[2012-09-07] dev, javascript, jslang, regexp
This blog post takes a look at the empty regular expression.

JavaScript: the glass is half full

[2012-09-04] dev, javascript, jslang
JavaScript is widely used these days. But there are still many people who dislike it, which is why Dart and – to a lesser degree – CoffeeScript have passionate fans. Recently, Crockford, who has done much to establish JavaScript as a credible general-purpose programming language, called it “tragically important”. In this blog post, I argue that we should see JavaScript’s glass (cup?) as half full and not as half empty.