GULCII at FARM (Oxford, UK)

churchSucc

I last played live with GULCII in 2011 at LiWoLi and NOHUP Bow Arts Open around the same time. With further tweaks and enhancements, I've been rehearsing a short code recital for the FARM conference's Evening Of Algorithmic Arts at the Old Fire Station in Oxford, UK, this coming Saturday 9th September. Book your free ticket online and come along, it should be a good one with many performances.

GULCII (Graphical Untyped Lambda Calculus Interactive Interpreter) is an untyped lambda calculus interpreter supporting interactive modification of a running program with graphical display of graph reduction. Lambda calculus is a minimal prototypical functional programming language developed by Alonzo Church in the 1930s. Church encoding uses folds to represent data as higher-order functions. Dana Scott's encoding composes algebraic data types as functions. Each has strengths and weaknesses.

The performance is a code recital, with the internal state of the interpreter visualized and sonified. Part 1 introduces Church encoding. Part 2 develops Scott encoding. An interlude takes in two non-terminating loops, each with their own intrinsic computational rhythm. Finally, Part 3 tests an equivalence between Church and Scott numerals.

The performance involves functional programming in two ways. Firstly, the live recital of lambda calculus code into the interpreter for evaluation. Secondly, the interpreter itself is written in the functional programming language Haskell.

Regarding related work, Henning Thielemann's "live-sequencer" has a similar approach to code evaluation with names rebindable to terms during runtime. Sonification of data has a long history, including a mention by Douglas Adams in "Dirk Gently’s Holistic Detective Agency" (1987), while sonification of machines is perhaps more niche. I was inspired by Valentina Vuksic's "Sei Personaggi Part 2", in which "the magnetic fields of the memory modules (RAM) are being picked up acoustically while the experimental computer drama is moving on"; the Puredyne GNU/Linux startup sound, "cat /dev/mem > /dev/dsp"; and also Dave Griffith's "Betablocker" live-coding acid techno machine.

I'll be at the daytime FARM conference too, if you're at ICFP and want to say hi. Long beard, glasses, probably drinking coffee.

EDIT: it went really well, I'm pleased. Had some nice feedback too, particularly a suggestion that I could have finished up by defining:

churchPred = \n . toChurch (scottPred (fromChurch n))

I didn't catch the name of the suggester, but I think I'll use this in future, it's a very nice punchline. Thanks, mystery functional programmer! I'll try to improve the sonfication too, it is rather minimal.

Since getting back home I worked a bit on the code, cleaning it up for a 0.3 release on Hackage (not quite ready yet) - I also fixed an infelicity with the evaluator, now it reduces the right-hand branch of an apply node when the left-hand branch is irreducible (and the apply node itself is not a lambda applied to something, in which case it would beta reduce). This means it can make progress in more cases, for example (with Scott-encoded lists and numerals):

iterate succ zero

The version I performed with would get stuck at cons zero stuff.