Speaking at Lambda Jam, 2017

Apr. 23 2017haskelltalk

Pleased to announce I'll be speaking at Lambda Jam in Sydney, May 8-9.

The topic will be continuation-passing style, or moreso CPS embeddings of various interfaces. This will be my first conference talk, and first public speaking venture in a couple of years, so please help me out and turn up! It took ages to find a photo of me taken in the last five years in which I didn't look to be recovering from the dacking of a lifetime.

This talk was based on an internal presentation on right Kan extensions. I gave this talk for our Abstract Nonsense reading group, which aims to find and demystify the most perplexing jargon thrown about by functional programmers.

Stare too long at Codensity or Coyoneda and they quickly starts to look like a difference list. All three are examples of right Kan extensions, insofar as I understand that concept. However, that's not why they're useful for functional programming.

Ignoring the category theory fan fiction, they're APIs to construct simple lambda terms where the spine is comprised entirely of bind, fmap, or append. They're CPS embeddings of an interface. They help us to restructure expressions in a meaning-preserving way to change their runtime characteristics, and we can prove their correctness with equational reasoning. This is useful.

This got me thinking about other CPS embeddings. They really are everywhere in Haskell libraries when you start to look. Function structure guided and enforced by types is really fundamental to the art of functional programming.

I'll put up some more detailed posts as the day arrives, as I'm still working hard on the examples and illustrations.

(I'm publishing this mostly to force IFTTT to republish the Hedgehog post, but nevertheless, this is an exciting / terrifying event for me!)


Continuations all the way down

This talk will demonstrate the use of continuation-passing style to solve common and eternal practical problems in Haskell. It aims to illustrate that a range of seemingly magical techniques are comprised of little more than judicious use of CPS, changing the structure of constructed expressions without affecting their meaning.

Whether you’re tackling classic inner-loop optimisations like difference lists (DList) or builders, reshaping the spine of an expression to manage lazy side effects, or using the Codensity transform to improve the asymptotics of your free monad, it’s continuations all the way down.

The aim of this talk is to provide some visual and practical intuition for difference lists, then deconstruct scary pieces of jargon until they look like difference lists. We gain some concrete intuition for CPS, and controlled lazy evaluation. We demonstrate that many advanced concepts are little more than an accretion of simple, powerful techniques, of which lambda is the ultimate.