The If Works This dirt was a building before

Ruby

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: # [...]

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 [...]

Faye gets server-side clients

After its initial release a few weeks ago, the number one feature requested for Faye has been server-side clients. The first version let JavaScript running in the browser send messages, but now you can create a client on the server side to let your backend applications subscribe and publish messages. We’ve got clients for Node.js [...]

Evented programming patterns: Round-up

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 Over the last few articles, I’ve covered a few of the evented programming patterns [...]

Evented programming patterns: Asynchronous methods

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 Building on the pattern for deferred processing that we just saw, asynchronous methods are [...]

Faye: a Comet client and server for Node.js and Rack

I’m doing my traditional birthday software announcement a little early this year, mostly because I really want to get this out and partly because I’m doing a lot of little bits of work on old projects at the moment and this is the only fancy new thing I’ve got to show. Spurred on by the [...]

Adding a dynamic defmacro to Heist

I’ve just picked up the opening chapters of Let Over Lambda, which describes itself as a book on macro programming – particularly Common Lisp macro programming. One of the early macros given in the book is unit-of-time which looks like this: (defmacro unit-of-time (value unit) `(* ,value ,(case unit ((s) 1) ((m) 60) ((h) 3600) [...]

Cross-process metaprogramming on the cheap

I will preface my first post of the new decade by saying: this is not by any means elegant. It’s an egregious hack, but it may come in handy for those of you using Culerity for testing your Rails front-end using JavaScript. This is not so much about JavaScript as about dealing with the multitude [...]

Testing command-line apps with Cucumber

.cuke-pass { color: #4e9a06; } .cuke-fail { color: #d73734; } .cuke-pending { color: #c4a000; } .cuke-skipped { color: #06989a; } I recently wrote a tiny little tool called Claw to help me work on large codebases in gEdit. It provides a terminal that lets you search for files by name and content using very minimal [...]

← Before