2013-01

What temperature has the same degrees in Celsius and Fahrenheit?

[2013-01-11] life, scitech

ECMAScript.next: array comprehensions and generator comprehensions

[2013-01-09] esnext, dev, javascript
Update 2014-08-04: Comprehensions won’t be in ECMAScript 6. There’s a chance that an updated version of them will be in ECMAScript 7 or later.

ECMAScript.next will have two kinds of comprehensions: array comprehensions and generator comprehensions. They allow one to quickly assemble an array or a sequence of elements. Comprehensions exist in many programming languages, for example: CoffeeScript, Python, Haskell, Clojure.

Brace styles and JavaScript

[2013-01-07] dev, javascript, jslang, jsstyle
In languages whose syntax is derived from C (e.g.: C ← C++ ← Java ← JavaScript), two brace styles are most common: Allman style and 1TBS.

JavaScript terminology: the two prototypes

[2013-01-03] dev, javascript, jslang
In JavaScript, there is an unfortunate overloading of the term “prototype”.

2012-12

Looking back on 2012

[2012-12-30] 2ality
2012 has been a very productive JavaScript year for me:

The problem with blogs

[2012-12-28] publishing, computers
I’m a big fan of blogs. After all, I’m writing one, myself. They are the contemporary version of a specialized newspaper. Regularly having new content is exciting and reading blogs is well supported by various apps, thanks to standardized publication formats such as RSS and Atom.

Two ways of clearing an array in JavaScript

[2012-12-25] dev, javascript, jslang
Update 2012-12-27: Better example for aliasing in Sect. 1.

In a blog post, David Walsh mentions two approaches for emptying (clearing) an array. This blog post explains the pros and cons of both approaches. In order to understand them, we first need to know about aliasing.

The future of JavaScript: a CoffeeScript-like workflow

[2012-12-18] esnext, dev, javascript
ECMAScript 6 [1] will bring many new features to the language. However, it will be years before we can rely on it being supported in most browsers that are in use. This post examines tools that will allow us to program with ECMAScript 6 much sooner.

JavaScript puzzle: equal, but not the same

[2012-12-13] dev, javascript, puzzle, jslang
The following puzzle has been posted on Reddit by davvblack: What are the values of x and y, given the following interaction?
    > x === y
    true
    > 1/x > 1/y
    true

Using ES6 template strings for regular expressions

[2012-12-11] esnext, dev, template literals, javascript
ECMAScript 6 template strings [1] give us multi-line raw (backslash has no special meaning) string literals and interpolation. But they can also be tagged, in which case a library can determine the meaning of their content. Steven Levithan has recently given an example of how they could be used for his regular expression library XRegExp.