Condensed Applied FP Course

Intermediate functional programmers often find it daunting to move from examples provided in books and blogs to developing their first fully functioning application. The Queensland Functional Programming Lab at Data61/CSIRO have produced a course for exactly this purpose. Building on the fundamentals, we work through the process of constructing a REST application covering the following topics:

Outline/Structure of the Workshop

Normally the course is run over three days covering the following lessons:

Level 01 : Simple hello world web app.

Level 02 : Define our application spec with types!

Level 03 : Testing & tools

Level 04 : Database layer

Level 05 : Better error handling through ExceptT

Level 06 : Add some flexible configuration

Level 07 : ReaderT & refactoring

Given the time constraints, we will select a subset of these exercises and provide the rest for students to complete at their leisure. The exact subset will depend on the student preferences and ability, but we intend to cover:

Level 02 : Define our application spec with types!

Level 05 : Better error handling through ExceptT

Level 06 : Add some flexible configuration

Level 07 : ReaderT & refactoring

There are plenty of interesting exercises and scope for deeper dives into interesting ideas.

Learning Outcome

By the end of the workshop:

You should be able to accurately describe the benefits of Functional Programming in practice.

You should gain the confidence to continue exploring your own self-directed learning of Functional Programming.

You should feel confident to seek out the necessary skills that are required to apply Functional Programming in your professional programming role.

You will be shown the location of online (volunteer) peer support networks, for individuals who choose to continue self-study and require assistance from others to do so.

Target Audience

This is targeted toward programmers who have become proficient with navigating functional programming concepts and would like to progress to building a complete application.

Prerequisites for Attendees

You should be able to implement the canonical function of type:

Applicative f => [f a] -> f [a]

Participants will be required to bring a suitable development machine (e.g. portable laptop) for working through the exercises. You will also need to install the Glasgow Haskell Compiler (http://www.haskell.org/ghc/) version 7.10 or higher on that machine.

Stack 'yaml' configuration is provided and checked by our CI system for successful builds. However the authors do not use stack, so we cannot promise to be able to resolve stack related issues that may arise. Though we will do our best. :)

Public Feedback

I, for one, really like the content of this course, but I agree that there is an oversaturation of tutorial courses in between Snoyman's and the Data61/QFPL content. I'm not sure what to do here, because on one hand, this is a very practical, and slightly more advanced course than much of the beginner content we're seeing, but on the other, there's not enough time!

People who liked this proposal, also liked:

Michael Snoyman - Functional Programming for the Long Haul

schedule 11 months ago

Sold Out!

45 Mins

Keynote

Beginner

How do you decide whether a programming language is worth using or not? By necessity, such decisions are usually based on assessments that can be made relatively quickly: the ease of using the language, how productive you feel in the first week, and so on. Unfortunately, this tells us very little about the costs involved in continuing to maintain a project past that initial phase. And in reality, the vast majority of time spent on most projects is spent in those later phases.

I'm going to claim, based on my own experience and analysis of language features, that functional programming in general, and Haskell in particular, are well suited for improving this long tail of projects. We need languages and programming techniques that allow broad codebase refactorings, significant requirements changes, improving performance in hotspots of the code, and reduced debug time. I believe Haskell checks these boxes.

schedule 10 months ago

Sold Out!

45 Mins

Demonstration

Beginner

In Indian classical music, we have Jugalbandi, where two lead musicians or vocalist engage in a playful competition. There is jugalbandi between Flutist and a Percussionist (say using Tabla as the instrument). Compositions rendered by flutist will be heard by the percussionist and will replay the same notes, but now on Tabla and vice-versa is also possible.

In a similar way, we will perform Code Jugalbandi (http://codejugalbandi.org) to see how the solution looks using different programming languages. This time the focus of Code Jugalbandi will be on exploring concurrency models in different languages. Functional Programming has made programming concurrency easier as compared to imperative programming. For deeper perspective on Code Jugalbandi, check out http://codejugalbandi.org/#essence-of-code-jugalbandi

Ajay Viswanathan - Algebraic Data Types: Just my kinda Type

schedule 11 months ago

Sold Out!

20 Mins

Talk

Beginner

Functional programming is built around a foundation of well-defined Types, and when you throw in Typeclasses into the mix, you get the love-child that is Algebraic Data Types. In this talk I aim to explore the mathematical foundations of Type theory and how it can be used practically in Scala for wide variety of applications like Machine Learning (Apache Spark MLlib), API design (using Vertx), DSLs and the like.

I will also be introducing the scalacheck library for Property-based testing and how you can quickly validate your ADT domains.

The talk will further deep-dive into how you can utilize the amazing Cats library and Shapeless to build generic libraries around your ADTs, having Circe as a case-study.

Harendra Kumar - High Performance Haskell

schedule 11 months ago

Sold Out!

45 Mins

Talk

Intermediate

Haskell can and does perform as well as C, sometimes even better. However,writing high performance software in Haskell is often challenging especiallybecause performance is sensitive to strictness, inlining and specialization.This talk focuses on how to write high performance code using Haskell. It isderived from practical experience writing high performance Haskell libraries. Wewill go over some of the experiences from optimizing the "unicode-transforms"library whose performance rivals the best C library for unicode normalization.From more recent past, we will go over some learnings from optimizing andbenchmarking "streamly", a high performance concurrent streaming library. Wewill discuss systematic approach towards performances improvement, pitfalls andthe tools of the trade.

Tony Morris - Parametricity, Functional Programming, Types

schedule 10 months ago

Sold Out!

45 Mins

Talk

Intermediate

In this talk, we define the principle of functional programming, then go intodetail about what becomes possible by following this principle. In particular,parametricity (Wadler, 1989) and exploiting types in API design are an essentialproperty of productive software teams, especially teams composed of volunteersas in open-source. This will be demonstrated.

Some of our most important programming tools are neglected, often argued awayunder a false compromise. Why then, are functional programming and associatedconsequences such as parametricity so casually disregarded? Are they truly sounimportant? In this talk, these questions are answered thoroughly and withoutcompromise.

We will define the principle of functional programming, then go intodetail about common problems to all of software development. We will build thecase from ground up and finish with detailed practical demonstration of asolution to these problems. The audience should expect to walk away with aprincipled understanding and vocabulary of why functional programming andassociated techniques have become necessary to software development.

Michael Ho - Making the Switch: How We Transitioned from Java to Haskell

schedule 10 months ago

Sold Out!

45 Mins

Case Study

Intermediate

In this case study presentation, SumAll's CTO, Todd Sundsted, and Senior Software Engineer, Michael Ho, will discuss the move from Java to Haskell along two parallel paths. First, the business/political story — how SumAll convinced the decision makers, fought the nay-sayers, and generally managed the people impacted by the transition. Second, the technical story — how they actually replaced their Java code with Haskell code. Along the way, they will address their hopes and expectations from transitioning from Java to Haskell, and will conclude with the results they've gained and seen to date.

Anupam Jain - Purely Functional User Interfaces that Scale

schedule 10 months ago

Sold Out!

45 Mins

Talk

Beginner

A virtual cottage industry has sprung up around Purely functional UI development, with many available libraries that are essentially just variants on two distinct approaches: Functional Reactive Programming (FRP), and some form of functional views like "The Elm Architecture". After having worked extensively with each of them, I have found that none of the approaches scale with program complexity. Either they are too difficult for beginners trying to build a hello world app, or they have unpredictable complexity curves with some simple refactorings becoming unmanageably complex, or they "tackle" the scaling problem by restricting developers to a safe subset of FP which becomes painful for experienced developers who start hitting the complexity ceiling.

In this talk I give an overview of the current Purely Functional UI Development Landscape, and then present "Concur", a rather unusual UI framework, that I built to address the shortcomings of the existing approaches. In particular, it completely separates monoidal composition in "space" (i.e. on the UI screen), from composition in "time" (i.e. state transitions), which leads to several benefits. It's also a general purpose approach, with Haskell and Purescript implementations available currently, and can be used to build user interfaces for the web or for native platforms.

The biggest advantage of Concur that has emerged is its consistent UI development experience that scales linearly with program complexity. Simple things are easy, complex things are just as complex as the problem itself, no more. Reusing existing widgets, and refactoring existing code is easy and predictable. This means that Concur is suitable for all levels of experience.

For Learners - Concur provides a consistent set of tools which can be combined in predictable ways to accomplish any level of functionality. Due to its extremely gentle learning curve, Concur is well suited for learners of functional programming (replacing console applications for learners).

For experienced folks - Assuming you are already familiar with functional programming, Concur will provide a satisfying development experience. Concur does not artificially constrain you in any form. You are encouraged to use your FP bag of tricks in predictable ways, and you are never going against the grain. It's a library in spirit, rather than a framework.

schedule 8 months ago

Sold Out!

45 Mins

Talk

Intermediate

When we talk about domain models, we talk about entities that interact with each other to accomplish specific domain functionalities. We can model these behaviors using pure functions. Pure functions compose to build larger behaviors out of smaller ones. But unfortunately the real world is not so pure. We need to manage exceptions that may occur as part of the interactions, we may need to write stuff to the underlying repository (that may again fail), we may need to log audit trails and there can be many other instances where the domain behavior does not guarantee any purity whatsoever. The substitution model of functional programming fails under these conditions, which we call side-effects.

In this session we talk about how to manage such impure scenarios using the power of algebraic effects. We will see how we can achieve function composition even in the presence of effects and keep our model pure and referentially transparent. We will use Scala as the implementation language.

In discussing effects we will look at some patterns that will ensure a clean separation between the algebra of our interface and the implementation. This has the advantage that we can compose algebras incrementally to build richer functionalities without committing to specific implementations. This is the tagless final approach that offers modularity and extensibility in designing pure and effectful domain models.

George Wilson - Laws!

schedule 10 months ago

Sold Out!

45 Mins

Talk

Beginner

Laws, laws, laws. It seems as though whenever we learn about a new abstraction in functional programming, we hear about its associated laws. Laws come up when we learn about type classes like Functors, Monoids, Monads, and more! Usually laws are mentioned and swiftly brushed past as we move on to examples and applications of whatever structure we're learning about. But not today.

In this talk, we'll learn about Functors and Monoids, paying close attention to their laws. Why should our abstractions have laws? We'll answer this question both by seeing powers we gain by having laws, and by seeing tragedies that can befall us without laws.

Michael Snoyman - Applied Haskell Workshop

schedule 11 months ago

480 Mins

Workshop

Intermediate

This full day workshop will focus on applying Haskell to normal, everyday programming. We'll be focusing on getting comfortable with common tasks, libraries, and paradigms, including:

Understanding strictness, laziness, and evaluation

Data structures

Structuring applications

Concurrency and mutability

Library recommendations

By the end of the workshop, you should feel confident in working on production Haskell codebases. While we obviously cannot cover all topics in Haskell in one day, the goal is to empower attendees with sufficient knowledge to continue developing their Haskell skillset through writing real applications.

schedule 9 months ago

45 Mins

Talk

Intermediate

A significant amount of this software complexity comes from either an inability to recall previous states or the inability to understand how a state was arrived at.

From the foundations of AI, LISP and functional programming [1], to causality in distributed systems [2], to the more grungy practices of immutable infrastructure, or the unreasonable effectiveness of fact-based approaches to large scale data systems; the ability to adequately cope with time, and the change and conflict it inevitably creates, is a common thread to being able to build and reason about these systems.

This talk looks at the impact of time on system design. We will walk through examples of large-scale systems and their battles with complexity. At the end of the talk, the audience should start to see the common spectre of time and have an appreciation of how understanding time is fundamental to maintaining clarity, correctness and reliability in systems.

Brian McKenna - Starting Data61 Functional Programming Course

schedule 11 months ago

Sold Out!

90 Mins

Workshop

Beginner

Following Tony and Alois' Introduction to Haskell syntax and tools, we will work through the first few modules of Data61's Functional Programming Course. These modules cover writing functions for the optional and list data types.

We will complete enough exercises to cover basic data types, functions and polymorphism. We'll practice the techniques of equational reasoning, parametricity and type/hole driven development. After completing these modules, you should be able to use the techniques to attempt most other exercises in the repository.

This workshop has the same requirements as Tony's introduction, along with a download of a recent version of the fp-course repository (https://github.com/data61/fp-course).

Luka Jacobowitz - Testing in the world of Functional Programming

schedule 1 year ago

Sold Out!

45 Mins

Demonstration

Intermediate

Testing is one of the most fundamental aspects of being a software developer. There are several movements and communities based on different methodologies with regards to testing such as TDD, BDD or design by contract. However, in the FP community testing is often not a large topic and is often glossed over. While it’s true that testing in functional programming tends to be less important, there should still be more resources on how to create tests that add actual value.

This talks aims to provide exactly that, with good examples on how to leverage property based testing, refinement types and the most difficult part: figuring out how to test code that interacts with the outside world.

Mark Hibberd - Property Based Testing

schedule 11 months ago

Sold Out!

90 Mins

Workshop

Beginner

Building on the earlier two introductions to functional programming with types, property based testing is the extra verification technique you need to ensure working software. We will work through the patterns of property based testing, starting with simple functions, working up to verification of a larger program.

By the end of this workshop participants will have a better understanding of the advantages of property based tests over example based tests, as well as acquiring the skills and confidence to start applying property based testing techniques to their current work.

This workshop has the same requirements as Tony's introduction, and will require a recent clone of the workshop repository available at https://github.com/markhibberd/property-based-testing-workshop.

Tony Morris - Let's Lens

schedule 10 months ago

Sold Out!

480 Mins

Workshop

Intermediate

Let's Lens presents a series of exercises, in a similar format to the Data61 functional programming course material. The subject of the exercises is around the concept of lenses, initially proposed by Foster et al., to solve the view-update problem of relational databases.

The theories around lenses have been advanced significantly in recent years, resulting in a library, implemented in Haskell, called lens.

This workshop will take you through the basic definition of the lens data structure and its related structures such as traversals and prisms. Following this we implement some of the low-level lens library, then go on to discuss and solve a practical problem that uses all of these structures.

schedule 8 months ago

Sold Out!

90 Mins

Workshop

Beginner

APL is the original functional programming language, the grand-daddy, the Godfather, and the old workhorse. But don't let Grandpa's age fool you. APL programmers have been leveraging the use of functional programming with arrays long before it was cool to be chasing pointers in an ADT using statically typed pattern matching, and they've refined their own style and approach to getting the most from a "functional paradigm."

In this workshop, you will have the chance to spend some time thinking like a functional array programmer. What makes it different? How does the code look at the end? What thought process do you go through to get there? Get a chance to play around with some classic problems and try solving them "the APL way."