A closer look at super-references in JavaScript and ECMAScript 6

Update 2013-04-09: now simulates the approach of the ECMAScript 6 specification draft (search for "HomeObject" to find the relevant parts).

This post examines how super-references work in JavaScript and how they will be simplified by ECMAScript 6. To understand this post, it helps to be familiar with JavaScript inheritance. If you are not, consult [2].


Former bank regulator William Black explains Occupy issues

On November 3rd, William Black spoke at the Occupy Los Angeles Teach-In. A video of his talk has been posted on YouTube:


Mnemonics for remembering the CSS order of top right bottom left

Whenever one specifies values for all directions in a single CSS property, one has to adhere to the standard order: top comes first, right second, bottom third, and left fourth. This post mentions three mnemonics for remembering that order.


Node.js v0.6.3 now comes with NPM

Node.js version 0.6.3 (stable) came out on 2011-11-25. Highlight (quoting “Node v0.6.3” by piscisaureus for node blog):

V8’s incremental garbage collector: shorter pauses, better interactive performance

Quoting “A game changer for interactive performance” by Vyacheslav Egorov and Erik Corry for The Chromium Blog:


HTML5 context menus in Firefox 8+

Starting with version 8, Firefox supports HTML5 context menus. This post is a summary of “HTML5 context menus in Firefox (Screencast and Code)” by Chris Heilmann for Mozilla Hacks.


Named parameters in JavaScript and ECMAScript 6

This post explains what named parameters are, how they can be simulated in JavaScript, and what improvements ECMAScript 6 will bring. Obviously, what is said about methods here applies to functions, as well.


Video: Prototypal inheritance in JavaScript

I recently held a talk on JavaScript inheritance for a MunichJS meetup at Google Munich. Courtesy of TNG, a video has been recorded which I have uploaded to Vimeo.


The Node.js v0.8 roadmap

Ryan Dahl has posted the roadmap for version 0.8 of Node.js. The following sections describe the highlights.

Bridging the module gap between Node.js and browsers

Update 2012-07-04: amdefine: use AMD modules on Node.js

One of the advantages of Node.js is that you can use the same programming language – JavaScript – on both server and client. When it comes to modularizing code that is portable between the two platforms, one is presented with a major challenge: they approach modularity differently. This post examines four solutions for writing cross-platform modules.


Execute code each time the Node.js REPL starts

If you start the Node.js binary without any arguments, you are in the REPL (Read-Eval-Print-Loop), a JavaScript command line. This post shows you how to execute code each time the REPL starts. That allows you to, say, automatically load modules you want to use.


Web audio APIs and the low-level approach

HTML5 Audio APIs - How Low can we Go?” (by Mark Boas for The Worm Hole) explains that there are currently two competing web APIs for audio. One is supported by Firefox, the other by Chrome and Safari. The former takes a low-level approach, the latter is higher-level.


GWT and Dart

GWT’s Bruce Johnson writes about GWT’s future, in light of the recent introduction of Dart.


Key webOS feature: developer interest

This post argues that webOS had one key feature of a successful operating system: developer interest.

What JavaScript would be like with significant newlines

Update 2012-03-17: More explanations in Sect. 1.

Brendan Eich recently repeated that he regrets not having given JavaScript significant newlines. This post explains what that would be like. Quote:


Web technology stacks – from LAMP to Janos

The classic stack of small- to medium-scale web technologies is LAMP (Linux, Apache, MySQL, PHP). With the rise of JavaScript and NoSQL databases, another stack is poised to replace it: Janos (client-side JavaScript, Node.js, NoSQL database).

Economic inequality is bad, even for the rich

The TED talk “How economic inequality harms societies” by Richard Wilkinson explains an interesting fact: Beyond certain basic wealth, the well-being of a society depends much more on income differences being small than on incomes being high on average.


Load Node.js modules in browsers via lobrow

Update 2011-11-19: Bridging the module gap between Node.js and browsers

Node.js has the advantage of letting you use JavaScript on client and server. Thus, it is a major nuisance that you can’t put portable code into a file that can be loaded on both platforms. This post presents a solution.


Improving the JavaScript typeof operator

The typeof operator in JavaScript is partially broken. This blog post explains how to fix it and how to extend its use to objects.


Customize LaTeX output from a shell (Unix)

This post explains how to influence LaTeX output via a Unix shell, including the insertion of a word that you pass to a script. It is partially based on an answer given by Will Robertson on StackOverflow.


Myth: JavaScript needs classes

  • [2012-03-17] I completely rewrote this post and changed its name (which previously was “JavaScript does not need classes”).
  • [2012-07-29] Classes have been accepted for ECMAScript.next.
  • [2012-10-03] Since this article has been written, it was decided that ECMAScript will have the special property __proto__ instead of the <| operator.
  • [2013-10-21] Instead of the extension operator, ECMAScript.next will have the function Object.assign().
A popular JavaScript myth is that JavaScript’s prototypal inheritance is complicated and that to fix it, we need classes. This post explains that that opinion is not completely wrong, but misses some important points.


Why I want the iPad to have a mouse cursor

This post argues that both Apple and Microsoft are wrong with regard to what user interface approach to use where. It also presents suggestions for how to implement user interfaces that work well on all devices. The idea is that depending on how you use a tablet such as the iPad, it makes sense for it to have a mouse cursor (or rather, a trackpad cursor).

JavaFX open-sourced as JFX

This is big news. Quoting an email from the OpenJDK mailing list [via Developpez.com]:
As announced at JavaOne we (Oracle) would love to contribute JavaFX into OpenJDK as a new project called "JFX".


Uncurrying `this` in JavaScript

Update 2011-12-17: New section “Making uncurryThis() safe to use in the presence of untrusted code”.

This post explains applications of uncurrying and currying this in JavaScript. It has been triggered by a tweet of Brendan Eich’s.