Late-binding with Erlang

Tony Garnock-Jones wrote “Upon browsing the source to the excellent MochiWeb, I came across a call to a function that, when I looked, wasn’t defined anywhere. This, it turns out, was a clue: Erlang has undocumented syntactic support for late-bound method dispatch, i.e. lightweight object-oriented programming! The following example, myclass.erl, is a parameterized module, a feature that arrived…”

Diff for Javascript, revisited

Tony Garnock-Jones wrote “Last weekend I finally revisited the diff-in-javascript code I'd written a couple of years back, adding (very simple) patch-like and diff3-like functionality. On the way, not only did I discover Khanna, Kunal and Pierce's excellent paper "A Formal Investigation of Diff3", but I found, the revision-control wiki, which I'm just starting to get my teeth into. I'm looking forward to learning more about merge algorithms. The code I wrote last weekend is available: just download diff.js. The tools included: * [cci no_cc="true"]Diff.diff_comm[/cci] - works like a simple Unix comm(1) * [cci no_cc="true"]Diff.diff_patch[/cci] - works like a simple Unix diff(1) * [cci no_cc="true"]Diff.patch[/cci] - works like a (very) simple Unix patch(1) (it's not a patch on Wall's patch) * [cci no_cc="true"]Diff.diff3_merge[/cci] - works like a couple of the variations on GNU's diff3(1) Read on for some examples showing the library in action.”

E4X: Not as awful as I thought

Tony Garnock-Jones wrote “Long, long ago, I complained about various warts and infelicities in E4X, the ECMAScript extensions for generating and pattern-matching XML documents. It turns out that two of my complaints were not well-founded: sequence-splicing is supported, and programmatic construction of tags is possible. Firstly (and I’m amazed I didn’t realise this at the time, as I…”

Ubuntu on EeePC is fairly slick

Tony Garnock-Jones wrote “The instructions were pretty easy to follow (admittedly, after 10 years, you learn where the awkward spots are in linux installations) and the result is a tiny, snappy, fully-working Ubuntu machine, complete with webcam and wifi. The only bit I haven’t got working yet is microphone input to Skype; my bet is that it’s a…”

STOMP adapter updated for RabbitMQ 1.3.0

Tony Garnock-Jones wrote “I’ve updated our STOMP adapter for RabbitMQ to fix a bug reported by Carl Bourne. In the process, I updated the code to work with the latest snapshots of RabbitMQ, including the currently-released version, v1.3.0. You can get the code by checking it out from our repository with hg clone hg update rabbitmq_v1_3_0_branch UPDATE:…”

Unit testing in Java vs. Smalltalk

Tony Garnock-Jones wrote “When you write unit tests, the minimal requirement before being able to try them out is that they compile. In Smalltalk, this means things like syntactic well-formedness, and perhaps the presence of global variables (i.e. classes) that you reference in the test method body. It’s very quick and comfortable in Smalltalk to develop supported by…”

Using AMQP to do cron-like scheduling

Tony Garnock-Jones wrote “Barry Pederson‘s excellent py-amqplib Python AMQP client comes with a very cute little demo, demonstrating how easy it is to do sophisticated cron-like things with AMQP and RabbitMQ. As Barry writes in the example, the trick is to “[fire] off simple messages at one-minute intervals to a topic exchange named ‘clock’, with the topic of…”

How to run RabbitMQ’s experimental STOMP adapter

Tony Garnock-Jones wrote “The code for the experimental STOMP adapter for RabbitMQ is distributed separately from the main server, at the moment. This post walks through the steps needed to try the adapter out, running it against a recent snapshot release of RabbitMQ. The perl Net::Stomp STOMP client is used to demonstrate the adapter in action, subscribing to a queue and sending a couple of messages to it.”

Some simple examples of using Erlang’s XPath implementation

Tony Garnock-Jones wrote “We've been investigating the possibility of an XPath-based routing extension to RabbitMQ, where XPath would be used as binding patterns, and the message structure would be exposed as XML infoset. As part of this work, we've been looking at Erlang's XPath implementation that comes as part of the built-in xmerl library. This post walks through a couple of simple examples of using Erlang's XPath implementation to retrieve nodesets matching various criteria.”

New .NET/C# client library for RabbitMQ

Tony Garnock-Jones wrote “We’ve just finished and released our .NET/C# client library for AMQP. We developed it on Mono, and made sure it ran on the Microsoft .NET stacks as well – versions 1.1 and 2.0. There’s also a WCF binding, for exposing WCF-based services over AMQP. (The WCF binding only compiles and runs on the Microsoft CLR…”

NDocProc bug fix for empty namespaces

Tony Garnock-Jones wrote “Thanks to a comment from Claus, I’ve discovered the wonderful fact that null is not permitted as a key in an IDictionary in .NET. As it happens, the main problem was that I’d not covered namespaceless classes in NDocProc at all gracefully, but nonetheless, forbidding nulls as dictionary keys is a strange design decision. I’ve…”

GNU Smalltalk Cairo Clock Demo

Tony Garnock-Jones wrote “I’ve taken Mike Anderson’s Cairo clock applet demo and updated it ever so slightly for GNU Smalltalk version 2.95h. * the original tarball: clockdemo.tgz (and a mirror) * patch for getting it to work with gst-2.95h: fixes-2.95h.patch I’ve also written a small patch, available here, intended to apply atop fixes-2.95h.patch, which gets the code into…”