Code from the talk, the live-coded part as well as my original C++ solution to the problem solution explained in depth. All feedback on this talk appreciated on Twitter @Sirupsen.
https://gist.github.com/3914233