Wed, 28 Apr 2010

FP-Syd #23.

On Thursday April 15th, we held the 23rd meeting of the Sydney Functional Programming group. The meeting was held at Google's Sydney offices and we had 28 people show up to hear our two presenters.

First up we had Ben Lippmeier demonstrating Gloss, a library for 2D vector graphics, animations and simulations. Gloss grew out of a library that Ben and others were using the teach Haskell to first year computer science students at ANU. It is now also being used at UNSW. The library was designed to allow students to get animations running without having to really tangle with monads. Programs using the library can achieve very impressive results with very few lines of code.

Our second presenter for the evening was Barry Jay demonstrating his Bondi programming language. Bondi is an Ocaml-like language in that it is strictly statically typed, is mainly functional but allows imperative constructs as well, is impure with respect to I/O and has an object system.

Bondi came about as a proof of concept language aiming to show that the the ideas behind Pattern Calculus actually have practical application. Bondi shows very clearly the value of being able to pattern match on arbitrary compounds objects without writing code to deal with the specifics of the compound. A simple example Barry came up with was defining a completely new data type Complex and having Bondi's pattern matching immediately able to figure out how to print it using the toString function as follows (the "~~" below is the Bondi REPL command prompt):

  ~~ datatype Complex = Cmplx of Float and Float ;;
  Cmplx: Float -> Float -> Complex

  ~~ toString (Cmplx 1.1 2.2) ;;
  it: String
  it = "Cmplx 1.1 2.2"

Towards the end, the questions and resulting discussion turned back to the Pattern Calculus its relationship to Lambda Calculus. This discussion continued at the pub where I think we decided that the Pattern Calculus is a super-set of the Lambda Calculus. For more on this topic I would recommend the slides to Barry's presentation at SAPLING '09 and the full paper version titled "A Combinatory Account of Internal Structure".

A big thanks to Ben and Barry for presenting and Google for providing the meeting venue and the snacks.

Posted at: 21:25 | Category: FP-Syd | Permalink