The If Works This dirt was a building before

JavaScript

The potentially asynchronous loop

If you write a lot of asynchronous or event-driven code, you’re probably going to end up needing an asynchronous for loop. That is, a loop that runs each iteration sequentially but those iterations may contain non-blocking logic that must halt the loop until the async action resumes. In my case, I need the main loop [...]

What I mean when I use the MIT license

The MIT license, in case you’re not familiar with it, is one of a family of software licenses recognised by the Open Source Initiative. It’s one of the shortest and most liberal, and reads as follows: The MIT License Copyright (c) 2010 James T. Suckerpunch Permission is hereby granted, free of charge, to any person [...]

Evented programming patterns: Testing event-driven apps

This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Thus far all the articles in this series have focused on methods for structuring [...]

Evented programming patterns: Asynchronous pipelines

This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps In a previous article for this series, I covered the topic of asynchronous methods: [...]

Evented programming patterns: Object lifecycle

This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Earlier in this series I covered a very common pattern in event-driven programming: the [...]

Why Bayeux still matters

This article was prompted by a tweet from Micheil Smith: Why are people still using cometd when we’re seeing websockets come into most modern browsers? To recap, CometD is the reference client/server implementation of the Bayeux protocol, which defines a messaging protocol for web clients to publish and subscribe to message channels. This lets browsers [...]

Faye 0.5: WebSockets, protocol extensions API and CometD integration

It’s been a few months since the last major Faye update, and in the interim the new release ended up getting so much feature creep that I’ve decided to skip a version number. That’s how much awesome is in the new release! 0.2 versions worth! It’s now available through npm, as well as Rubygems: # [...]

JS.Class 2.1.5 supports Node, Narwhal and more

While there’s much work going on towards what will probably be JS.Class 3.0, the 2.1.x series is benefiting from some of the goodness being added upstream. I’ve just pushed out a new release that gets the package manager and all the libraries to work under CommonJS, specifically targeting Node.js and Narwhal for now. I’ve had [...]

Compiling the V8 JavaScript runtime under 64-bit Ubuntu

File under “I’m writing this for the benefit of my future self, and may not work on your machine.” I recently upgraded my home machine to a 64-bit edition of Ubuntu 10.04 and had do to more than the usual dance to get Google’s blazing fast V8 JavaScript interpreter to compile. Here’s what I did. [...]

Terminus: control your browser from the command line

I’ve been saying for a while that I want to use Faye for automating JavaScript and integration testing, especially now that it has server-side clients. Well I took the first step in that direction this afternoon by hacking together Terminus, a distributed JavaScript console. You just install and run like so: $ sudo gem install [...]

← Before