2012-07

Explaining to non-programmers what JavaScript is

[2012-07-23] dev, javascript, computers
When I tell non-programmers that what I do professionally involves JavaScript, I most commonly get the reaction: “Isn’t that that thing that you have to install and that makes the browser slow?”. This answer surprises me in two ways:

Implementing a command line with eval in JavaScript

[2012-07-16] eval, dev, javascript, jslang
This blog post explores JavaScript’s eval function by implementing the foundation for an interactive command line. As a bonus, you’ll get to work with ECMAScript.next’s generators (which can already be tried out on current Firefox versions).

Programming: initially a female profession

[2012-07-13] society, life, computers
In the 1940s, the first computer programmers were all women. That only changed later. Quoting “Researcher reveals how ‘Computer Geeks’ replaced ‘Computer Girls’” by Brenda D. Frink for the Clayman Institute for Gender Research:

Combining code editing with a command line

[2012-07-10] dev, hci, javascript
Update 2012-09-05: separated input and output.

Currently, you are forced to work with JavaScript code in either of two modes: You can either use a code editor and edit multiple lines or you can use an interactive command line and work with one line at a time (editing, evaluating). With jsrepl [GitHub project, live demo], I have prototyped a combination of both modes – no need to chose, any more.

Working with large integers in JavaScript

[2012-07-05] numbers, dev, javascript, jsint, jslang
In JavaScript, one has at most 53 bits for integers. This blog post explains how to work with large integers, by encoding them in strings.

amdefine: use AMD modules on Node.js

[2012-07-04] dev, nodejs, javascript, amdefine, jsmodules, clientjs, jslang
James Burke’s npm module amdefine lets you write AMD modules [1] that also work on Node.js. To do so, you need to perform the following steps:

Text message lengths

[2012-07-02] psychology, computers
Several text messaging technologies impose character limits on messages. This blog post describes those limits and their advantages.

2012-06

Mozilla’s next-generation web browser Servo is making progress

[2012-06-27] browser, computers, servo, mozilla
Servo is Mozilla’s next-generation web browser [1], with a focus on parallelism and security. It’s not much more than a technology demo and will remain so for a while, but it’s making progress nonetheless. Quoting Patrick Walton in a thread on Google Groups:

Asynchronous programming and continuation-passing style in JavaScript

[2012-06-22] async, dev, javascript, advancedjs, jslang
In this blog post, we give a name to JavaScript’s callback-based asynchronous programming style: continuation-passing style (CPS). We explain how CPS works and give tips for using it.

JavaScript: sparse arrays vs. dense arrays

[2012-06-13] underscorejs, dev, javascript, jslang, jsarrays
In general, arrays in JavaScript are sparse – they can have holes in them, because an array is simply a map from indices to values. This blog post explains how to create dense arrays, arrays without holes.