2011-11

Bridging the module gap between Node.js and browsers

[2011-11-19] dev, nodejs, javascript, jsmodules
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.

The Node.js v0.8 roadmap

[2011-11-19] dev, nodejs, javascript
Ryan Dahl has posted the roadmap for version 0.8 of Node.js. The following sections describe the highlights.

Execute code each time the Node.js REPL starts

[2011-11-17] dev, nodejs, repl, javascript
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

[2011-11-16] audio, html5, webdev
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.

What JavaScript would be like with significant newlines

[2011-11-14] dev, javascript, jslang
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:

Economic inequality is bad, even for the rich

[2011-11-11] society, life, business
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.

Web technology stacks – from LAMP to Janos

[2011-11-11] dev, nodejs, javascript, webdev
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).

Load Node.js modules in browsers via lobrow

[2011-11-09] dev, javascript, jsmodules, jslang
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

[2011-11-08] dev, javascript, jslang
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)

[2011-11-07] latex, hack, computers
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.