• Copy of Concurrency and the Laws of Physics

  • Learning to Learn

  • The Pierian Stream

  • A Dominion of DomainsA Dominion of Domains

    This talk explores the domain specific language (DSL) of the deck-building card game Dominion. We will see how actions in the game have their own language, and can be decomposed into many smaller languages. Using Tagless-Final encoding, we will define these each of these DSLs and compose them to create the larger language. We will explore two different mechanisms of composition: extension and embedding. Finally, we will enrich the DSL with a type system that enforces game-specific constraints.

  • Meta teaching with Scalameta

  • Coding with Cats

  • Abstract Data Types in the Region of Abysmal Pain

    Abstract data types are an essential tool in a programmer's toolkit, but finding a data structure to fit them can be challenging. This is especially so for graphs, which can have complex constraints that are difficult to encode using conventional data structures. Join me in the search for a functional, typesafe graph. We will explore different graph representations, and discover how types can help us encode constraints. Using dependent types, we will construct a graph that we can prove satisfies its abstract data type.

  • The Ascent to Idris

    Type level programming greatly increases the robustness of our code, but is difficult to express in Scala. Idris, a language where types are first class, is much better at expressing such concepts. But Scala has come a long way in the past few years. This talk takes a closer look at type level programming in Idris and Scala. We start with a basic problem defined using values, and slowly add types to it in both languages. By using singleton and refined types, as well as typelevel functions, we'll rise to the challenge of Idris

  • Topiary and the Art of Origami

    Recursive data structures are a core tool of any functional programmer's toolkit, but they are also one of the most challenging. Budding functional programmers are plagued with nightmares of infinite recursion, mental stack overflows, and the terrifying fixed point. Recursion schemes, generalised folds and unfolds with exotic names and signatures, are a further hurdle to overcome. But past this hurdle there are many rewards. This talk uses the power of recursion schemes to predict survival on the Titanic. We will show that recursion schemes can be used to grow a decision tree and make predictions from it. Furthermore, they give us far more benefits than the basic folds or unfolds we would otherwise use. You will make use of many folds, unfolds and even refolds. Be prepared to exercise your skills in origami!

  • Peeling the Banana: Recursion schemes from first principles (Haskell)

    Recursion is at the heart of every functional programmer's toolkit, but with it comes a lot of boilerplate. In the early 1990s, the seminal paper Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire (Erik Meijer, M.M. Fokkinga and Ross Paterson) introduced a little known technique known as recursion schemes. This technique makes recursion generic, removing much of the boilerplate associated with it, and cleanly separating business logic from recursive traversal. It paved the way to many different schemes, each for their own kind of recursive traversal. This talk explores the technique of recursion schemes and how to use it. We start with primitive recursion, briefly diving into folds, before deriving the catamorphism, a specific recursion schema for the right fold. We shall see that there is a rich zoo of recursion schemes for different types of folds, unfolds and more.

  • Peeling The Banana: Recursion schemes from first principles

    Recursion is at the heart of every functional programmer's toolkit, but with it comes a lot of boilerplate. In the early 1990s, the seminal paper Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire (Erik Meijer, M.M. Fokkinga and Ross Paterson) introduced a little known technique known as recursion schemes. This technique makes recursion generic, removing much of the boilerplate associated with it, and cleanly separating business logic from recursive traversal. It paved the way to many different schemes, each for their own kind of recursive traversal. This talk explores the technique of recursion schemes and how to use it. We start with primitive recursion, briefly diving into folds, before deriving the catamorphism, a specific recursion schema for the right fold. We shall see that there is a rich zoo of recursion schemes for different types of folds, unfolds and more.