- Edsger Dijkstra
"The problem with object-oriented languages is the implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle."
Join the renaissance!
Treat functions as first-class values, allowing them to be passed as arguments and returned from functions. Higher order functions such as these enable powerful new abstractions.
Manage side effects more cleanly meaning less state and fewer bugs.
Be thread safe by default, without having to resort to locks which fail to compose.
Be a proving ground for awesome features. Garbage Collection, Closures, Continuations, Monads, Expression orientation, Lexical Scope, and Software Transactional Memories all made it into functional languages years before they were mainstream. What are you still missing?
Come to a meeting
They provide us and others with a vibrant community space to make interesting stuff. They're a place for geeks, artists, designers, illustrators, hackers, functional programmers, tinkerers, innovators and idle dreamers.
We meet regularly, for talks and practical sessions. Meetings are usually on the third Monday of the month at 7pm, though for practical reasons this is not always possible. So it is best to check here and keep an eye on our Google Group for announcements.
Deep learning has improved on the state of the art in several fields of machine learning, and is beginning to be used in commercial settings. This talk aims to provide a grounding in the core concepts of the topic, explore parallels with functional programming and introduce some promising recent research.
Traditional unit testing requires the programmer to manually generate test cases, which are highly specific but give poor coverage of the range of possible inputs.
Property-based testing is used to specify the behaviour of programs and assert the adherence of the implementation to the specification by randomly exploring the input space.
This talk introduces property-based testing FsCheck, an F# port of Quickcheck. The API will be introduced before being demonstrated in development of a simple regular expression engine, and used to check invariants for data structures.
The interactive REPL driven demonstration will try and provide a whistlestop tour of Clojure and its workflow, showcasing unique aspects of the language and its workflows. Depending on what people want to see, we can touch on topics ranging from macros and meta programming to interacting with Lisp at the REPL, using profilers to diagnose performance issues, tools such as Leiningen, nREPL, Paredit, or CIDER, or the concurrency options available to you such as futures, promises, agents, atoms and the Software Transactional Memory.
Or perhaps any other core language features such as protocols, multimethods, persistent data structures, lazy sequences, transducers, that I can talk about.
I won't be able to cover everything, but I'll try my best to give you a flavour of this practical language.
Spark provides a functional programming interface for building parallel, distributed data processing jobs. Jaakko will talk about what Spark is and how to set it up, whilst demonstrating examples of developing with Sparqk.
We'll be meeting at 7pm at madlab as normal.
Pipes is a Haskell library based on a composable push/pull streaming abstraction.
Laziness is crucial for defining reusable algorithms which can be freely composed together, and most modern languages define an abstractions for lazy sequences such as Java 8 Streams and IEnumerable in C#. However laziness is problematic when streams are derived from resources such as file handles which are consumed incrementally and require prompt cleanup since streams hide the nature of the source from the consumer. This presents a risk of resource leaks if clients fail to consume the entire stream, or inefficient use of resources if the problem is avoided by consuming the entire stream eagerly.
This talk describes the abstraction defined by the Pipes library and demonstrates how it can be used to define reusable streaming components.
So, Haskell is "an advanced purely-functional programming language" which supports writing "declarative, statically typed code". It may be optimized for academic buzzwords you've never heard of but... is it any good for writing code in the way that you'd write Perl, Python, or Ruby?
Does Haskell have "whipuptitude" (being able to get things done quickly) as well as "manipulexity" (being able to manipulate complex things)? And perhaps most
What does a Perl programmer make of Haskell? What are the lessons that can be
Learning by Doing: Beginning Clojure by Solving Puzzles.
DJ had this to say about his talk:
"I'm teaching myself Clojure, because awesome. In this talk, I'll relate some of my experiences in trying to discover how natives speak, by tackling puzzles in Project Euler and Advent of Code. If you're a Clojure beginner too, or even if you're not, this might give you some confidence in taking a similar journey; if you're more experienced, it might be a comedy half hour. Either way it will be fun :-)"
So come and join us for an interesting tour in applying a modern Lisp to classic computing and problems
Besides reducing the boilerplate for creating new monads, they allow customising how the monads are interpreted.
Jakko demonstrated what free monads can be used for in practice, as well as how the free monad itself is structured.
The code examples in Haskell can be applied to other functional programming languages as well.
We'll be meeting @madlabuk at the usual time of 7pm.
API endpoints in Servant are represented as types which ensures implementations conform to the definition and enables safe routing and automatic client generation.
The talk will cover how to use Servant to create web APIs, and examine some of the features of the Haskell type system which make it possible.
Show and Tell
The lambda lounge this Monday are doing a show and tell. We'll meet at @madlabuk at 7pm as usual.
It's going to be a pretty informal round table discussion, so bring something along to chat about that you think will be interesting to the Lambda Lounge!
Things you could bring...
- A cool book you've read on Functional Programming or Computer Science
- An interesting paper, you've read on Computer Science, Types, Functional Programming etc...
- A neat algorithm
- An awesome API you've found
- A blog article you've found interesting.
Ideally you should be able to talk about what you've brought for a minute or two. Feel free to bring as many things as you want to chat about - just try and keep them relevant to computer science and/or PLT.
Don't worry if you don't have anything to bring - just come and join the conversations.
Adopting this pattern will free you to focus on the unique aspects of your problem.
The strategy was first described by Hadley Wickham with a implementation he wrote in GNU-R. With roots in Scheme and S, R is a statistical language and computing environment offering both functional programming features (first class functions, higher-order functions, and closures) and support for objects.Robin Gower, of Infonomics, is a data scientist with many years experience using R and he will be providing us with an overview of the split-apply-combine strategy and some live coded examples.
Application development with Purescript
There are also versions of Purescript in development that compile to Python and C++.
Rust is a systems programming language, that is gaining traction. Its features include an innovative borrow checker, and many zero-cost abstractions to ensure type and memory safety.
We're meeting at the usual time of 7pm @madlabuk, so we'll see you there!
Some useful features of Elm are a Time Travelling debugger (which is remarkably similar to Bret Victors'), hot code swapping, immutability, Union Types, type inference and of course FRP.
We will be meeting at Madlab as usual.
This talk will then segway nicely into a talk by Andrew Kirkham on the advantages of using React for Clojurescript UI's via either Om or Reagent.
In our third talk Daira Hopwood gives an introduction to the cool things you can do with dependent types and how they can help you write safer code.
We still have room for another lightning talk so if you'd like to talk for ~10-20mins, we'd love to listen!
We'll look at how Clojure's affordances make it a natural language for simplifying the process of cleaning tabular data and converting it into linked graph data and how we're building an interactive environment for lay users to write purely functional programs.
As usual we'll be meeting at 7pm at Madlab.
We are programming language agnostic, but have traditionally focused on exploring functional programming, though we are open to hosting more diverse talks on computer science topics.
We were born from the Manchester Clojure Dojo, when we decided there would be more demand for a broader group focusing on functional programming in general. We asked politely and took the name from the American revolutionaries, of the orignal Lambda Lounge in St Louis. Our logo was designed by the incredibly talented @hltn.
to a meeting and join our Google Group!
Want to talk?
If you want to talk then there's a good chance the Lambda Lounge will want to listen!
Our main focus is on functional programming, esoteric languages & computer science, however we're a diverse group so if you want to talk the chances are we'll want to listen!
You can submit ideas for talks, by emailing the Google Group.
Below you'll find our event archive covering events we've ran in previous years.
We'll be meeting at the normal time of 7pm, but we'll be located in Federation House (2 minutes walk from Madlab) again because of the ongoing Madlab refurbishments.
*NOTE* due to the Madlab refurbishment we have been kindly relocated just 2 minutes down the road at New Art Spaces - Federation House.
See here for directions.
Error handling is one of the most difficult problems in computer science and in practical programming. Incorrect error handling often leads to security vulnerabilities (such as many of the recent spate of bugs found in TLS implementations), data loss, and user frustration.
In this talk, we’ll first discuss why programs using existing error handling styles and mechanisms (return and status code checking, conditions and restarts, and exceptions) often fail to recover correctly from errors. We argue that this is due to a fundamental conflict between encapsulation and having enough information to recover a consistent state.
Then we explain how this conflict can be solved by providing language support for automatically recovering the state before the call that failed, so that failures cannot cause inconsistency. We also describe how the Ken protocol complements this automatic recovery and extends it to asynchronous and distributed systems.
Brett will also be giving us a lightning talk on cool Erlang tricks to debug production systems.
So you're using a functional language and doing Test Driven
Development? Maybe you're doing it wrong.
- Perhaps 50% of your time spent programming, coding tests, could be invested in the software itself.
- Perhaps there are better, less expensive and less wasteful methods of finding bugs.
- Perhaps there are better ways to design software than by writing tests.
- Perhaps functional programming makes TDD redundant.
- Perhaps Rick will commit career suicide as he questions the unquestionable.
Come to this Monday's lambda lounge to join the debate. We're meeting
at the usual time of 7pm at Madlab.
This month, Jan Macháček will explore how Reactive Streams address the challenges of systems that process flows of live data. Learn about the core principles (asynchrony & non-blocking, stream passing over asynchronous boundaries, back pressure) without worrying about any particular language or framework. For clarity & brevity, Jan will be using Akka Streams implementation of Reactive Streams in the code samples.
You will not need any extensive Scala or Akka experience to understand the core principles. Basic knowledge of Scala and Akka will help you understand the code portion of the talk, though the Akka Streams DSL is undestandable to even non-Scala folk.
This month Brett will be introducing us to Erlang, one of most commercially successful functional languages, which has found its home in robust systems such as telephony switches, Couch DB, Riak and Rabbit MQ.
Erlang was originally developed by Erricson for programming highly fault tolerant systems which have attained an alleged 99.9999999% availability.
Erlang has lots of cool features which set it apart from many other languages including:
- A crash first approach to error handling.
- A virtual machine that allows hot swapping code in production without service disruption.
- A highly concurrent Actor model, supporting millions of concurrent processes on a single machine.
- Pattern matching.
James Richardson will be introducing us to the basics, and helping us solve some logic problems.
We'll start at the usual time of 7pm, and be going to 57 Thomas for some drinks afterwards.
The party starts this friday at 18:30 and goes on till late... Drinks and snacks will be available, as well as a gaggle of geeks having fun!
Like every year, it'll be great fun... We'll see you there!
For more details see the official Madlab Christmas party page.
Functional programming events will resume as normal in 2014!!
Alex is a laptop musician and researcher based in Sheffield, performing as part of Slub and working at the Interdisciplinary Centre for Scientific Research in Music, University of Leeds. Alex is going to talk about his long term project of getting people to dance to code.
Live coders take advantage of dynamic interpreters to improvise live music (and/or video) with sourcecode, using a computer language as a musical environment. A live code edit
is something like changing the design of a machine while it runs, moving cogs and pistons around and adding new ones. Here though the machine is composed of text, describing the functions which the music flows out of. Music is not made by the machine, but by changes to the machine. The musicians editor is projected for the audience so that they see the live coders gestures within their text editor, and if they like, read the code as it is written.
In this talk Alex will show how he live codes in haskell to make music, including how he represents musical patterns as functions of time, interfaces with synthesis software over the OSC protocol, and uses emacs as an interface in musical improvisation. He'll also introduce his new visual editor for Tidal, called Texture.
It will be a high-level tour of common tools, language features, APIs and frameworks. Including SBT, Spray, Akka, Play!, the Cake Pattern and Slick.
As usual we will be kicking off at 7pm at Madlab.
The slides for this talk are now available.
This coming monday, (16th September) will be an introduction to programming in Scala by Lee Kitching.
We will be meeting at the normal time of 7pm.
Lee's talk will be followed by a deeper dive into Scala by Ian Murray on Monday 21st October where we will have a follow on presentation on Scala which will cover some more advanced areas of the language and its API's and tools.
Functional programming languages such as Haskell and ML are known for
their powerful type systems which can prevent many common programming
errors. Recently, these type systems have been growing more complex and confusing in order to capture more program properties.
At the same time, a number of languages have emerged which use Dependent Types instead, such as Coq, Agda and Idris. Dependent Types are more powerful than those of ML or Haskell, but are conceptually simpler. Their flexibility captures everything from dynamically-typed scripts up to fully verified systems.
This introductory talk will describe the basics of Dependent Types, work through some examples in the Idris language to incrementally verify more and more properties of a simple algorithm, then discuss the consequences and drawbacks of using dependently typed languages.
Having been inspired by Ian Johnson's talk on Arrows, Lambda Lounger, James Richardson went and implemented something in Scala to help understand the core concepts of arrows.
The process of implementing Monads and Arrows gave an interesting insight into their usage which he'll be sharing at this months Lambda Lounge.
This talk will work from the ground up, starting with some common (but simplified) programming problems we'll try to pull out some monad implementations. This will lead us to implement the maybe monad and the state monad. Next we'll try and generalise monad's into an arrow form before finally getting stuck with implementing monads as arrows in the Kleisli Arrow.
From this talk you'll hopefully get an understanding of the why/what/how of monads as well as a peek into what Scala has to offer the functional programmer.
Arrows allow the programmer to abstract and combine computation. Arrows present operators with which pipelines of computation can be constructed. Arrows are related to Monads but allow for more interesting pipelines to be constructed, allow computations with more than one input, and allow, possibly partially, static computation. It has been said that, "If your application works fine with monads, you might as well stick with them. But if you're using a structure that's very like a monad, but isn't one, maybe it's an arrow."
Ian has been working on the MosesCore project, funded by the European Commission 7th Framework Programme. "MosesCore aims to encourage the development and usage of open source machine translation tools. Computational pipelines occur often in machine translation systems and it was deemed necessary to design an easy method to compose and share pipelines and pipeline components. During this work a Python library called Pypeline. was written to support arrows. It defines monadic and arrow types and allows programmer to compose pipelines using helper functions. PCL, on the other hand, is a DSL that supports arrow operators so that programmers may easily construct and share pipelines, or bits of pipelines.
Ian will be taking you through the Pypeline library and, hopefully, you'll pick up what arrows are all about. Then we'll dive into PCL by looking at the packaged examples.
Rick will be giving us a taster of the magical world of Logic Programming with Clojure's core.logic. In this world programs can run both forwards and backwards, with surprising and powerful consequences.
Daniel Silverstone will be talking with us about a Haskell project of his where he's been trying to tie knots in functional data structures, use parser combinators and implement mini imperative Domain Specific Languages.
If you've got something functional you'd like to speak about, or ask advice on; come along, as the Lambda Lounge loves to listen!
We'll be pairing up to do some more work on our battleships admirals.
Meeting @madlab at the usual time of 7pm.
We will be meeting at the usual time of 7pm. Be sure to either pair up or bring a laptop for some head to head coding! It will help if you can setup a working Clojure environment beforehand.
Simon Holgate will be talking us through using battleships as a fun and interactive way of learning functional programming with Clojure. This month he'll be walking us through the setup, and diving into the implementation code. A future Lambda Lounge will see us compete our battleships head to head.
James Jeffries will also briefly be telling us about the Functional Programming exchange, and some of the interesting developments with GADT's in Haskell, Scala's Lift 3.0, and functional event sourcing. Some of which he hopes to talk about more formally at a future Lambda Lounge.
Additionally we'll be continuing with personal projects; such as our Conway's Game of Life implementations from last year.
We will be starting at 7pm @madlabuk as usual.
We will be pair programming, so bring a laptop!
Conway's game of life, shot to fame in the 1970's for showing how astonishing complexity; similar to that shown in nature can arise from a handful of simple deterministic rules.
Just like a butterfly flapping its wings, the smallest change to a cell in life can have massive unpredictable effects resulting in chaos within an entirely orderly world.
Not only does life have a lot to teach us about the nature of reality it has a strong history in theories of computation, with it being provable turing complete.
More importantly however life is fun, and should be a great starter project to learn a functional language such as Haskell or Clojure.
We will be pair programming, so bring a laptop!
Software Transactional MemoryThis month's lambda lounge sees Haskell enthusiast and developer Lee Kitching, talking about Haskell's Software Transactional Memory. We will be meeting at the usual time of 7pm.
The traditional approach to concurrency uses locks to co-ordinate access to shared state. This approach is flawed in a number of ways:
1: It requires a global ordering on lock acquisition to prevent deadlock
2: It is difficult to maintain consistency in the face of errors
3: Lock granularity has a significant impact on scalability.
An Introduction to applicative functors in Haskell
Applicative functors are an abstraction that sit between functors and monads: weaker (hence more widely occurring) than monads, and stronger than functors.
This practical talk will be split into two parts:
1. An introduction to the definition of the Applicative type class. Will show some examples of Applicative instances to get a feel for it. And then discuss how it's used; and how it achieves what a Functor can't.
Haskell is a purely functional programming language, where side-effects are forbidden by the type-system; and all functions must be pure.
Haskell's widely regarded as being on the cutting edge of programming language design, with its rigorous Hindley-Milner inferencing type system, lazy evaluation and infamous use of an obscure branch of abstract nonsense (category theory).
Haskell is best known for it's ability to lock up side effects where they belong, in an IO::Monad; preventing them from polluting your program with pain and non-determinism.The slides for this talk can be downloaded below.
After learning its syntax, semantics and special forms in Clojure's interactive development environment you'll free your mind of mutable thoughts and seek enlightenment with Value Oriented Programming; the secret behind safe and efficient concurrent programming with Clojure.
You'll discover how laziness is a virtue with Clojure's powerful sequence API, learn how to embrace the worlds largest set of open source class libraries with the most native foreign function interface ever defined, and take a look at how in Clojure code is data; allowing you to extend the Compiler and the language to better solve problems in your domain.
By the end of this session, you'll begin to appreciate how you might use Clojure to tackle programming problems with less ceremony, incidental complexity and a greater degree of expressiveness.