Understanding some basic FP constructs by writing a simple Programming Language
What I cannot create, I do not understand - Richard Feynman
Most of the time, we end up being consumers of a language. Language creation is not something which many of us do as part of our daily job. And as such, we become consumers of using various concepts like types of a language, functions-as-first-class citizens, closures, let expressions, etc. But what are these? What is semantics behind them? And how do language creators enable a language to have these? Once we understand what these mean, we go beyond the language specific implementations and can be true polyglots who can think in terms of these composable abstractions.
This beginner focussed talk+demonstration hopes to clarify few fundamental concepts by building a language from the ground up. This talk has its foundations in a couple of academic courses which I got to be part of during 2012/2013.
Using Racket(a variant of Scheme) as a vehicle, a hypothesized programming language (MathL) is introduced with its specifications, syntax, and rules. And slowly this language is built up with more features.The language is realized via an interpreter/executor. [We would not be discussing compilers here].
Some tests also would be done which would help to verify the language implementation.
Outline/structure of the Session
Classification of languages
MathL v1.0 - Core language constructs
MathL v2.0 - Adding functions to the language
MathL v3.0 - Adding lambda and closure to the core language
MathL v4.0 - Adding let expressions to the core language
MathL v4.0 - Adding Pipe construct to our language
(The above agenda is tentative and may change)
1. Going back our desks, to be able to reason about the languages we come across in a better way.
2. Get an exposure to Racket language and Dr.Racket IDE
3. To appreciate the academic foundations behind the mainstream language features.
Beginners and non-FP Devs who want to know about FP concepts. A seasoned professional may find this basic.
schedule Submitted 1 month ago
People who liked this proposal, also liked:
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 to see how the solution looks using different programming languages and paradigms. This time the focus of code jugalbandi will be on solutioning in two different paradigms - functional programming and array-oriented paradigm.
During the session, Morten and Dhaval will take turns at coding the same problem using different languages and paradigms. There would be multiple such rounds during the Jugalbandi.
Practical eff monad for micro-servicesEric Torreborre
schedule 5 months agoSold Out!
This talk presents how we use the Eff monad at Zalando to structure a REST microservice. Even when programming with functions, modules and components still matter, and I will present a new approach for dependency injection using the Reader monad (classic) and tree rewriting (what?). Then we will see how to specify more precisely several components (authentication, request to other services and database access) with the Eff monad and support additional concerns like logging or asynchronous execution.
Once you get the basic idea, the possibilities are endless! Rate limiting is just another component and another set of effects involving time and state, testing becomes really clean and easy.
Haskell Design PatternsRyan Lemmer
schedule 1 month agoSold Out!
In this workshop we explore several areas of advances that make up Modern Haskell.
(This is an experiential workshop, we will code together, and explore ideas together from first principles. You will need GHC 7.10 and up.)
Patterns for IO
Experience the 3 styles of IO programming in Haskell, in the order in which they evolved:
* imperative style (the status quo)
* Lazy IO and its limitations
* Iteratee IO, the solution to Lazy IO
As we compare the different styles, we will pay attention to
* what controls evaluation
* space and resource management
* the relationship between producer and consumer
From Foldable, Traversable to Lenses
We follow the evolution of fold and map on lists, to their generalisation over arbitrary types with the Foldable and Traversable type-classes.
The Lens library raises Foldable and Traversable to an even higher level of abstraction. We will see how the Lens library gives a unified vocabulary for traversal of arbitrary data structures.
Functor, Applicative, Arrow, Monad
These data types fall on a spectrum of power and generality (Functor being the most general, and Monad the most powerful). By experiencing how these types differ in the way they compose, we can gain a clearer understanding of where and how each type may be used.
Datatype Generic Programming (bonus material)
This style of Haskell programming is based on a simple technique: instead of defining functions for ad-hoc types, we deconstruct our types into a more fundamental type representation, and then write generic functions against the lower-level type. These generic functions are impervious to changes in the original, higher-level data types.
We will experience datatype generic programming from first principles, and along the way uncover the key ingredient in the magic sauce called GHC.Generics.
Wormholes and teleporting with Transient.Abhiroop Sarkar
schedule 1 month agoSold Out!
The transient library in Haskell/Eta composes arbitrary pieces of software in concurrent, parallel and sequential settings using standard Haskell/Eta combinators like applicative, alternative, bind etc. It provides algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions and multithreading
It liberates the programmers from dealing with state machines, objects frameworks, routes, configurations and callbacks. Transient expresses business functionalities as compact category theoretical expressions which compose. These compositions are verified during compilation, although the code might be executing in different machines.
It presents a fresh new approach to programming concurrent and distributed systems.