Sessions at FP Days 2013 about Functional Programming

Your current filters are…

Thursday 24th October 2013

  • Programming, Only Better

    by Bodil Stokke

    The programming paradigms that served us so well through the 80s and 90s are failing us. Building systems the way we're used to building them always seems to end in the inevitable death march towards exponential complexity. But once you stop to ask the right question- "what's really causing all this complexity?" - you realise the answers have really been staring you in the face all along. Debugging is only hard when you can't reason about your code. Concurrency is only hard when you can't predict the state of your code. Reusability is only hard when your components aren't naturally composable.

    Fortunately, languages addressing these issues specifically are popping up all over the place. In many cases, it turns out we've had the solutions to our problems for a long time, we've just forgotten about them, or never really bothered to look. Let's take a moment to explore some of these languages, not as exercises in syntactic details, but looking at the inherent properties in their design that enable us to defy decades of OO tradition and write honest-to-Dijkstra bug free, fault tolerant software without even trying. After half a century in the wilderness, functional programming seems to finally be gaining some ground on the barbarians. Let's examine why.

    At 9:15am to 10:30am, Thursday 24th October

    Coverage photo

  • Erlang/OTP at EE: Journey and lessons learned

    by Chandru Mullaparthi

    This session is about the journey Erlang/OTP has taken since it was first introduced into the business in 2000. Hear how we started with one engineer who discovered Erlang/OTP, and how it has grown to underpin the entire data and voice revenue stream in EE (Umbrella company which owns and operates the EE, T-Mobile and Orange brand mobile networks in the UK).

    At 11:00am to 11:45am, Thursday 24th October

  • Getting Started with (Real World) OCaml

    by Amir Chaudhry

    This session will be a brief introduction to the OCaml programming language and will go through some of the topics covered in the new O'Reilly book, Real World OCaml (https://realworldocaml.org - the book is freely available online under a Creative Commons Licence so all attendees will be able to read it).

    We will also introduce the initial version of a new OCaml Platform which combines the core OCaml compiler with a coherent set of tools, documentation, libraries and testing resources. The Platform will represent the best way for developers, both new and old, to write software in OCaml.

    There will be a break for lunch part-way through the session.

    At 11:00am to 3:00pm, Thursday 24th October

  • My First Clojure Webapp: An introduction to Clojure web development

    by Ryan Greenhall and Jon Neale

    You are a Clojure newbie who has a firm grasp of the sequence abstraction and have been mapping and reducing like a pro, enthusiastically solving project euler and 4clojure problems. Life is good and producing a fibonacci sequence has never been so much fun. However, the time has come to produce a web app but you are not sure where to begin! Does functional programming work on the web?

    This tutorial will provide an introduction to web development in Clojure for beginners, using a monitoring dashboard as the vehicle.

    There will be a break for lunch part-way through the session.

    At 11:00am to 3:00pm, Thursday 24th October

    Coverage photo

  • Running a Long-term (Haskell) Project - with code examples

    by Irek Jozwiak

    Haskell is without a doubt a cool programming language, but how well does it perform in a real-world, enterprise project? What kind of everyday experience awaits the working programmer?

    How does one adopt a non-mainstream tool that is alien to most developers? How does this new tool affect the project in terms of architecture, modeling business logic, testing, etc.?

    In this talk, Irek share stories about using Haskell to write a system responsible for data collection, analysis and billing. Attendees will find out about how interesting problems got solved, and get to see relevant code that illustrates the point.

    No prior Haskell or functional programming knowledge is required.

    At 11:45am to 12:30pm, Thursday 24th October

  • Practical refactoring in Haskell

    by Tom Ellis

    Refactoring is the practice of improving the design of existing code.

    A significant component of refactoring is the separation of concerns, that is making code more modular. Haskell provides an excellent environment to explore this concept since its type system makes it clear what side effects can occur during execution. This tutorial will explore techniques for improving the modularity of Haskell programs using the type system for evidence about which program transformations are worthwhile. Most of the lessons learned will carry over to other functional languages, and many of them to non-functional languages as well.

    Goals: By the end of this tutorial you will be able to use a variety of techniques to improve the design of existing Haskell code, make it more modular, and understand the dependencies between its constituent parts.

    Most of these lessons will transfer directly to other languages, especially functional languages.

    Intended audience: This workshop will be suitable for users of all programming languages, though a passing familiarity with, and enthusiasm for, Haskell will be beneficial.

    Infrastructure required: No special requirements. To follow the live coding execises participants should have a laptop with the Haskell Platform installed. An internet connection is not required but there will be a tarball containing course materials available to download before or during the talk for those who are interested.

    At 1:30pm to 2:15pm, Thursday 24th October

  • A practical theory of language-integrated query

    by Philip Wadler

    Language-integrated query is receiving renewed attention, in part because of its support through Microsoft's LINQ framework. We present a theory of language-integrated query based on quotation and normalisation of quoted terms. Our technique supports abstraction over values and predicates, composition of queries, dynamic generation of queries, and queries with nested intermediate data. Higher-order features prove useful even for constructing first-order queries. We prove that normalisation always succeeds in translating any query of flat relation type to SQL. We present experimental results confirming our technique works, even in situations where Microsoft's LINQ framework either fails to produce an SQL query or, in one case, produces an avalanche of SQL queries.

    At 3:30pm to 4:45pm, Thursday 24th October

Friday 25th October 2013

  • How requirements from the Old World make Erlang fit into the New World

    by Robert Virding

    Erlang was designed around a set of requirements for telecom systems from the Old World. They were distributed, massively concurrent systems which had to scale with demand, be capable of handling massive peak loads and never fail. These are same problems we are facing today. This talk will describe how Erlang was developed as a language and system to solve them, as the challenges we had in telecoms back then evolved to the challenges we are facing in the Cloud today.

    At 9:00am to 10:15am, Friday 25th October

    Coverage photo

  • Exploring a Legacy Clojure Codebase

    by Jon Neale, Ragnar Dahlén and Thomas G. Kristensen

    Clojure is a relatively new language, so what will legacy Clojure applications look like, and how will they be to work with? How will you bring a new developer up to speed with your complex ecosystem of Clojure applications? What happens to your code base when you have a number of experienced developers new to Clojure working on it?

    At uSwitch, we deployed our first Clojure application in early 2010. Since then, we've been happily leveraging the power of Clojure to solve problems and improve our business. Many different systems and applications have been built, by different developers, at different stages in their Clojure learning journey.

    We will quantify how our use of the language has changed throughout that time, and point out the various techniques which have allowed us to avoid a confusing clash of paradigms. Using and presenting the torch analytical library built on top of codeq and datomic we examine a number of “legacy” Clojure systems, and discuss how our patterns of writing code have evolved.

    We will explore the experiences of the developers who inherited the large scale, business critical Clojure applications along with the experiences of the developers who originally wrote the system, whilst exposing some of the WTF moments/mistakes we made along the way. Which parts are easy or difficult to understand or reason about, and what are some of the attributes that make it so?

    At 10:45am to 11:30am, Friday 25th October

    Coverage photo

  • Functional Agile Architecture

    by Pierluigi Riti

    In this session I will talk about using functional programming for the construction of Software Architectures.

    I'll cover how to use functional programming to create a UML diagram of the architecture, and how to use functional programming to make the architecture more flexible and easy to change.

    I'll present a real case study applied to a web architecture, and show how to use TDD and other agile methodologies for the implementation and proper functioning of the architecture

    At 10:45am to 11:30am, Friday 25th October

  • Functional Embedded Programming on the Raspberry Pi (with Erlang)

    by Omer Kilic

    This hands-on session will introduce how to do embedded programming using the Erlang/ALE framework created by Erlang Solutions.

    Erlang/ALE is an Actor Library for Embedded for the Erlang programming language targeted initially for the Raspberry Pi. It provides access to the various embedded interfaces (such as GPIO, I2C, SPI, etc) exposed on the Raspberry Pi from Erlang in a way that sits well with the Erlang and functional programming idioms.

    Erlang's support for concurrency and functional programming is very well suited for modern embedded systems that consist of many internal and external peripherals (such as sensors and actuators). After this session you will want to learnyousomeerlang.com so that you can do interesting embedded projects with Erlang/ALE.

    Most of the session is focused on using Erlang/ALE to do hands-on exercises with a custom extension board for the Raspberry Pi but a brief overview of the embedded ecosystem and what it entails to do embedded programming on devices such as the Raspberry Pi will also be presented.

    This is a hands-on session. Please note: To participate in this session you will have to bring a laptop that has an ethernet port. We will provide you with a Raspberry Pi and the extension board for the duration of the session. The extension board is available as open source hardware, so you can build one yourself at home.

    There will be a break for lunch part-way through the session.

    At 10:45am to 2:45pm, Friday 25th October

    Coverage photo photo

  • Hands-on Haskell Introduction

    by Erik Hesselink and Sebastiaan Visser

    Haskell is an interesting programming language that is quite different from most other languages. It is purely functional, lazy, has algebraic data types and pattern matching, and a powerful type system. Learning Haskell can make you a better programmer, but it can also be daunting.

    We will teach you the basics of Haskell with a combination of presentation and exercises. No prior experience with Haskell is required. We will cover important language features like data types, pattern matching and IO, as well as tools, such as the GHC compiler, the interactive GHCi environment, and cabal.

    This is a hands-on session. Before coming, please make sure you have a laptop with the current Haskell platform (http://www.haskell.org/platform/) installed. This is version 2013.2.0.0, which includes GHC 7.6.3.

    There is a break part-way through the session for lunch.

    At 10:45am to 2:45pm, Friday 25th October

  • The Clojure inside SoundCloud

    by Joseph Wilk

    Over the last year Joseph Wilk has been introducing Clojure into SoundCloud. Over this time we have been refining the blue-print for services functioning under high load with a strong focus on fault tolerance. We will explore how we use Clojure at SoundCloud, the power of focusing around the JVM and real examples where Clojure fit and where it failed.

    At 11:30am to 12:15pm, Friday 25th October

  • Early Warning Indicators in F#

    by Stephen Channell

    This is a case study of a live F# application for real-time early warning indicators of Liquidity Risk.

    EWI used an F# Excel expression parser and computational expressions to generate a Cell network in memory that triggered indicator calculations from market events, that percolated up to RAG status changes.

    The EWI model demonstrates features of F# that enabled rapid development:

    • FSYacc/FSLex parser/interpreter/generator for Excel expression handling
    • Computational Expression usage for type-inferred calculations
    • F# integration with proprietary analytics & Excel function library

    At 1:15pm to 2:00pm, Friday 25th October

  • Excel coding errors are destroying world economies and F# (with Tsunami) is here to stop them!

    by Matthew Moloney

    Ever wish you could code Excel with a Functional Programming Language (F#) instead of VBA?

    Excel has over 400M users all over the world from many backgrounds including business, finance, and governments. On average large spreadsheets have over 12 substantial coding errors. A perfect example of this is the Reinhart-Rogoff paper (Growth in the time of Debt) where a trivial coding error helped them make the case for austerity around the world.
    In this presentation I will demonstrate how to prevent such errors while taking advantage of the rest of the .Net ecosystem by bridging the worlds of Excel and .Net with F#.

    I will give rapid fire demonstrations of
    * Big Data;
    * Data Science;
    * Cloud Computing;
    * GPGPU; and
    * Compiling F# Excel UDFs.
    All from within Excel.

    At 1:15pm to 2:00pm, Friday 25th October

  • Hands-on logic programming with core.logic

    by Thomas G. Kristensen

    Moving from OOP to FP often removes complexity, making code easier to write, read and reason about. The paradigm shift has enabled programmers to be more productive, and hopefully it has made people more open to reconsidering the fundamentals of the tools they use to solve problems. The question is: what is the next big paradigm in programming? and how does it relate to FP?

    Logic programming (LP) offers a declarative way of programming. The shift from FP to LP is very similar to the shift from OOP to FP, in that is makes programs more declarative and easier to reason about.

    core.logic is a Clojure library which enables programmers to write logic programs in Clojure by combining principles from both OOP and FP with logic programming. In this hands-on session we are going to help you through understanding the fundamentals of core.logic, and to write your first logic program on your own machine. We assume you have some (but possibly very little) experience with programming Clojure or another Lisp, but no prior knowledge of any logic programming is assumed.

    The goals of the session are to enable you to:
    * Use fundamental tools in logic programming
    * Combine FP, OOP and logic programming in a single codebase
    * Identify which problems are well suited for logic programming, and which are not
    * Solve a set of problems handed out by the end of the session (at your leisure)

    At 1:15pm to 2:45pm, Friday 25th October

  • Functional programming in the computational sciences with lambda.r

    by Brian Rowe

    The computational sciences are still learning the benefits of functional programming. Most users of R are familiar with object-oriented programming but have not been exposed to functional programming.

    In this session I discuss why functional programming is important for the computational sciences in terms of modeling, program organisation, and reasoning about the correctness of a program. We will review the mechanics of lambda.r, a package I wrote that enables a functional programming style in the R language.

    Using examples based on my work modeling consumer financial transactions, I will discuss when and why I use the various features of lambda.r, including multipart function definitions, guard expressions, type constraints and variables, and attributes in my models.

    The session also explores practical uses of the lambda calculus to reason about numerical programs and show the equivalence between various forms. As R supports vectors natively, there are some surprising results that stem from this.

    At 2:00pm to 2:45pm, Friday 25th October

  • Live Coding as Communication

    by Sam Aaron

    The term "programming language" is often used to describe the medium we use to communicate with computers. However, to what extent can we also use programming languages like we use regular language? For example, could we use them to directly share ideas and thoughts with other people? Could programming be as live as a regular conversation? To what extent would such a live programming environment be ripe for mining novel ideas that would not only benefit the computer industry as a whole and yet even support artistic practices?

    This talk will explore these questions in detail emphasising the role and importance of functional languages in this context. What might a programming environment which has sufficient liveness, rapid feedback and tolerance of failure look like? Could we make such an environment live enough to support music performances? What benefits would such a style of programming offer business? Could live programming be beneficial for rapid prototyping, exploring big data sets, and even communicating formal business ideas?

    At 3:15pm to 4:30pm, Friday 25th October

    Coverage photo