location_city Bengaluru schedule Nov 16th 12:00 - 12:45 PM IST place Ball Room 2 people 71 Interested

The term zipper is a colloquial used to describe n-hole (most often, 1-hole) contexts. That is, a data structure that has a _hole_ or _pointer_ focused on a specific element with the ability to efficiently traverse to its neighbouring elements, providing an elegant solution for the need to efficiently traverse and _modify_ immutable data structures.

In this talk, we will look at examples of zippers for canonical data structures such as lists and other products and sums. We will then define comonads and see the relationship between zippers and comonads.

Most of this talk will be spent on the practical application of zippers in everyday programming. We will solve some simple problems using zippers. We will then contrast why we might use a zipper, compared to a lens.

Finally, for a fun and interesting observation, we will look at the algebraic structure of products and sums, then compute the derivative of these structures. Turns out, a derivative of a data structure is its zipper ("McBride, Conor, et al (2005). ∂ for Data: Differentiating Data Structures").

 
 

Outline/Structure of the Talk

A 45 minute talk and questions on the use-cases for which zippers are appropriate, for any data structure. We will look at some trivial and not-so-trivial data structures, their associated zipper, and how we might use it.

Learning Outcome

Gaining confidence with using immutable data structures in your work.

Target Audience

Programmers working out navigating immutable data structures

Prerequisites for Attendees

  • A light familiarity with Haskell syntax
  • Have tried using immutable data structures before

Slides


Video


schedule Submitted 3 years ago

  • Edward Kmett
    keyboard_arrow_down

    Edward Kmett - Logic Programming à la Carte

    45 Mins
    Keynote
    Intermediate

    I've been working on a logic programming framework in Haskell, called guanxi (關係) with an eye towards scalability. To build it I leaned heavily on my previous work on propagators and a bunch of other little bits and pieces of algebra and category theory in the design process. A number of patterns have arisen repeatedly throughout the process of building this library. I'll give a tour through the current state of guanxi and try to extract some of the more reusable bits of its design for your inspection.

  • Naresh Jain
    keyboard_arrow_down

    Naresh Jain / Aaron Hsu / Andrea Leopardi / Bruce Tate / Edward Kmett / Saurabh Nanda - Q & A Session With Functional Conf Speakers

    45 Mins
    Keynote
    Beginner

    During the conference you might have had questions that did not get answered, this is your opportunity to get them answered by our expert panel group

  • Aaron Hsu
    keyboard_arrow_down

    Aaron Hsu - Programming Obesity: A Code Health Epidemic

    Aaron Hsu
    Aaron Hsu
    Computer Researcher
    Dyalog Ltd.
    schedule 3 years ago
    Sold Out!
    45 Mins
    Keynote
    Beginner

    Programs are getting fat. They're becoming slow. They're taking up more computing resources. They're getting harder to maintain and more complex from the ground up. Layer upon layer of sophistication is causing us to lose our ability to predict what software will do. Where's that bug? Why is everything going so slowly? Am I even using the right data structures? Where's that important point in the documentation again?

    What's happened to us? In this meta-dive into the nature of our approach to programming, we will explore some of the dangers of our current approaches to programming and the how/why of our current programming obesity problem. We will look at real case studies and see just how bad the situation can be.

    But we will also explore how we can battle these sources of obesity. In this passionate plea for code that we can gain control over again, we will look at examples of how we can return to a state of high-performance on all levels, from code size to code scalability. We will look at the principles that can help us to reach leaner, more efficient, more usable, less buggy code. We will hopefully find some light at the end of the tunnel, and how we can change our outlook on programming to push ourselves towards code that benefits not only ourselves, but also those that will come after us.

  • 45 Mins
    Demonstration
    Intermediate

    There are a lot of algorithms that revolve around iterating a form of information propagation until it attains a deterministic fixed point. CRDTs, Datalog, SAT solving, functional reactive programming, and constraint programming all fit into this mold.

    One framework for these sorts of algorithms is the notion of a “propagator” due to Sussman and Radul, but until now little rigor has applied to know how such algorithms terminate with consistent results. Another framework is Lindsey Kuper’s work on the notion of “lattice variables” (LVars), which addresses termination, parallelism and eventual consistency well, but not iteration.

    By blending these frameworks, I’ll build up a series of sufficient conditions for propagators to terminate with consistent results and proceed to show how we can use this common framework to steal insights and quirks from each individual domain to try to optimize the rest.

  • Andrea Leopardi
    keyboard_arrow_down

    Andrea Leopardi - BEAM Architecture Handbook

    Andrea Leopardi
    Andrea Leopardi
    Core Team Member
    Elixir Lang
    schedule 3 years ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    If you are writing a stateless web application backed up by a database, there is a good chance Elixir is a great fit. However, this is not where it shines. In this talk, we will discuss how to architect Elixir applications in order to leverage the features of the language and of its runtime.

    We will look at this both from a lower level, talking about the architecture of processes inside an Elixir application, as well as from a higher perspective of writing Elixir services and architecting systems to play to Elixir's strengths. We will see practical use cases and discuss design patterns.
  • Naresh Jain
    keyboard_arrow_down

    Naresh Jain / Andrea Leopardi / Bruce Tate / Mohammad Maqbool Alam / Nikhil More / Ravi Chandra Padmala / Sujatha Hemmady - Q & A Panel Discussion with Code Beam Lite India Speakers

    45 Mins
    Talk
    Beginner

    During the Code Beam Lite conference you might have had questions that did not get answered, this is your opportunity to get them answered by our expert panel group

  • Mohammad Maqbool Alam
    keyboard_arrow_down

    Mohammad Maqbool Alam - Building a MySQL Database Driver in Elixir

    45 Mins
    Demonstration
    Intermediate

    Have you ever wondered what happens beneath the covers when you talk to your Database? Well, you are in for a treat! In this talk, we are going to uncover the dark magic behind Database Drivers. We will look at everything that is needed to talk to a database, query its data and transform it into the native data types in Elixir.

  • Michael Snoyman
    keyboard_arrow_down

    Michael Snoyman - Your first Haskell web app with WAI and Warp

    Michael Snoyman
    Michael Snoyman
    VP, Engineering
    FP Complete
    schedule 3 years ago
    Sold Out!
    45 Mins
    Tutorial
    Beginner

    Haskell's Web Application Interface (WAI- pronounced "why") provides an abstraction between web applications and web servers. This allows many different web frameworks (e.g., Yesod, Spock, and Servant) to share servers like Warp and middlewares.

    Haskell's web frameworks offer a wide variety of feature sets, type-level and metaprogramming, and intended use cases. And for most use cases, I would recommend using an existing web framework, which will help you avoid common pitfalls and more quickly address common use cases.

    But not today! In this tutorial, we're going to step through building a functioning web server using just the bare-bones WAI interface and Warp as a server. Familiarity with the basics of Haskell will be a plus, but this will be a talk open to all FP and Haskell skill levels.

  • Alexander Granin
    keyboard_arrow_down

    Alexander Granin - Hierarchical Free Monads and Software Design in Functional Programming

    45 Mins
    Talk
    Advanced

    Functional Programming is going through the same process of rethinking as Object Oriented Programming has passed already. FP today is not only something mystical, something barely applicable for day-to-day tasks, but rather a whole philosophy of building big, complex applications, with own tools, approaches and methodologies. We can see a lot of ideas about software design and architecture emerging from the FP community: talks, books, articles. We’re actively discussing Final Tagless, Free Monads, effect systems and other approaches, but it seems the theme not yet covered and we don’t know about possibilities we have.

    In this talk, I’ll tell you about the power of Free Monads in building complex applications in Haskell and PureScript. These applications will be satisfying the requirements like maintainability, testability, simplicity. You’ll know how to create a safe concurrent application state, how to divide the application into layers and how to keep the code sane. In fact, you can do the same with Final Tagless or extensible effects, but the approach with hierarchical Free Monads has some specific properties making it the best tool to separate concerns and create a very interesting eDSLs with different semantics.

    The talk is based on the ideas I’m describing in my book “Functional Design and Architecture”. I also gave several talks about this theme earlier (you can find all my talks here).

    I’ve used these ideas to build software for different companies, including Juspay (Bengaluru), Restaumatic (Poland), Enecuum (Hong Kong). We’ve created several interesting technologies that were not possible to make without Free Monads. Some of them are open sourced.

  • Michael Snoyman
    keyboard_arrow_down

    Michael Snoyman - Applied Haskell Workshop

    Michael Snoyman
    Michael Snoyman
    VP, Engineering
    FP Complete
    schedule 3 years ago
    Sold Out!
    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.

  • Tony Morris
    keyboard_arrow_down

    Tony Morris - An Intuition for List Folds

    Tony Morris
    Tony Morris
    Software Engineer
    Simple Machines
    schedule 3 years ago
    Sold Out!
    45 Mins
    Talk
    Beginner

    In this talk, we go back to first principles, defining and examining the definition for a cons list, then take a look at the ubiquitous right and left fold functions on a list.

    The primary focus of this talk is to develop an intuition for how these functions work so that we can best decide when to apply them. Multiple programming languages will be used to help emphasise the independence of the gained intuition. This talk will generally be interactive with the audience as we solve problems and build confidence in our new knowledge.

    Knowing how to apply the various list fold functions is a common question by the student of FP. This talk aims to provide a solid, reliable answer to this question. No prior understanding of list folds is necessary.

  • Saurabh Nanda
    keyboard_arrow_down

    Saurabh Nanda - Getting property-based testing to work after struggling for 3 years

    Saurabh Nanda
    Saurabh Nanda
    Founder
    Vacation Labs
    schedule 3 years ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    I got excited about property-based testing after hearing John Hughes talk at Functional Conf 2016. I tried it that year with QuickCheck, but failed miserably (it almost derailed the entire project delivery). I cribbed about it in my talk at Functional Conf 2017. In 2018, Srihari's talk got me excited again. This time, I tried with Hedgehog, and got it to work!

    This talk is about this journey and its learnings. We'll talk about how Hedgehog was used to test [1]:

    • A Postgres backed task/job queue
    • A small Wai/Servant based webapp

    And no, we will not talk about the most common (and completely useless) example of reversing a list!

    [1] Both of these are part of an open-sourced task/job queue library.

  • Harendra Kumar
    keyboard_arrow_down

    Harendra Kumar - Streamly: Declarative Concurrency and Dataflow Programming in Haskell

    Harendra Kumar
    Harendra Kumar
    Founder
    Composewell Technologies
    schedule 3 years ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    Overview: Streamly is a Haskell library for writing programs in a high level, declarative data flow programming paradigm. It provides a simple API, very close to standard Haskell lists. A program is expressed as a composition of data processing pipes, generally known as streams. Streams can be generated, merged, chained, mapped, zipped, and consumed concurrently – enabling a high level, declarative yet concurrent composition of programs. Programs can be concurrent or non-concurrent without any significant change. Concurrency is auto scaled based on consumption rate. Programmers do not have to be aware of threads, locking or synchronization to write scalable concurrent programs. Streamly provides C like performance, orders of magnitude better compared to existing streaming libraries.

    Motivation: Haskell has a beautiful abstraction capability. Haskell lists, several streaming and concurrency libraries are some examples of good programming abstractions. The problem is that concurrency is not handled elegantly and declaratively by these libraries. Moreover, the lack of good performance gives rise to special purpose performance centric libraries like text and bytestring creating more confusion. Streamly unifies, lists, streaming, concurrency, logic programming and reactive programming with unparalleled performance. We can finally have a unified string handling.

    Audience: Streamly is designed to express the full spectrum of programs. Do not think that if you are writing a small and simple program it may not be for you. It expresses a small program with the same efficiency, simplicity and elegance as a large scale concurrent application. It unifies many different aspects of special purpose libraries into a single yet simple framework. It is especially suitable for high performance and scalable backend data processing systems. If you use or plan to use any real time streaming or data flow programming frameworks including Apache Flink, Apache Spark or asynchronous/reactive programming frameworks like ReactiveX/RxJs then you may be interested in Streamly.

  • Sujatha Hemmady
    keyboard_arrow_down

    Sujatha Hemmady - My journey with Erlang at Redbus

    Sujatha Hemmady
    Sujatha Hemmady
    Tech Lead
    Redbus
    schedule 3 years ago
    Sold Out!
    45 Mins
    Talk
    Beginner

    Going from Java to Erlang is not hard if given proper support. This talk is about the roller coaster journey with Erlang to build a scalable, soft real-time transaction platform. If you are a Java developer struggling to understand and adapt to Erlang this talk is for you.

  • Tamizhvendan S
    keyboard_arrow_down

    Tamizhvendan S / Ravindra Jaju - JVM Language Interoperability

    45 Mins
    Demonstration
    Beginner

    Language interoperability is the capability of two different programming languages to natively interact as part of the same system. Interoperability is advantageous because different programming languages are optimized for specific tasks, and allowing them to communicate can create better systems.

    Apart from the Java language, the most common or well-known JVM languages are:

    • Scala, a statically-typed object-oriented and functional programming language
    • Clojure, a modern, dynamic, and functional dialect of the Lisp programming language
    • Kotlin, a statically-typed language

    In this session, we'll demonstrate how your program can interop with different JVM languages.

  • Anmol Sahoo
    keyboard_arrow_down

    Anmol Sahoo - GADTs in OCaml

    Anmol Sahoo
    Anmol Sahoo
    Research Associate
    IIT Madras
    schedule 3 years ago
    Sold Out!
    90 Mins
    Tutorial
    Intermediate

    OCaml is a multi-paradigm programming language with a pragmatic mix of functional and imperative programming features. OCaml, which has been around since 1996, has grown to be a battle tested language, widely deployed and used in production systems. In this talk, we will look at the support for Generalized Algebraic Data Types (GADTs), a powerful generalization of the more mundane Algebraic Data Types (ADTs). We will start with an example of building an interpreter for a small language and add type safety through GADTs. We will then look at a few powerful type-safe design patterns that GADTs enable.

  • Dhaval Dalal
    keyboard_arrow_down

    Dhaval Dalal - Booting into FP

    90 Mins
    Tutorial
    Beginner

    This session is an whirlwind tour of the FP land and is primarily meant for developers wanting to embark on their functional programming journey. We will use Java to understand most of the concepts, however, where it falls short to explain certain concepts, we will use Scala or Groovy or Clojure or even Haskell to demonstrate it. Starting with the basics - introducing the concepts with examples, we will evolve our understanding to take the mystery out of the monads (hopefully!)

  • Edward Kmett
    keyboard_arrow_down

    Edward Kmett / Tony Morris - Let's Lens

    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.

  • Andrea Leopardi
    keyboard_arrow_down

    Andrea Leopardi - Building a real-time, reliable, resilient web application in one day with Elixir and Phoenix

    Andrea Leopardi
    Andrea Leopardi
    Core Team Member
    Elixir Lang
    schedule 3 years ago
    Sold Out!
    480 Mins
    Workshop
    Beginner

    We'll explore how to built connected, real-time web applications using Elixir and the Phoenix framework.

    • Look at the basics of Elixir, or rather the things we need to dive into the workshop
    • Get started with the basics of Phoenix and how to build simple HTML web applications with it
    • Introduce channels and learn how to use them in order to communicate with clients in real time
    • Talk about distribution and how to work with Phoenix on multiple servers
    • Talk about LiveView and learn how to update data on a page from the server without any JavaScript

  • Anne Ogborn
    keyboard_arrow_down

    Anne Ogborn - Introduction to Logic Programming and SWI-Prolog

    Anne Ogborn
    Anne Ogborn
    Logic Programmer
    DataChemist.com
    schedule 3 years ago
    Sold Out!
    480 Mins
    Workshop
    Beginner

    As machine learning matures, it is becoming obvious that we need explainable solutions. As functional programming matures it becomes obvious that we need inference and nondeterminism. And linked open data demands reasoning. This all day workshop will introduce the logic programming paradigm, in which programs are expressed as a set of logical rules and executed by finding proofs of queries.

    SWI-Prolog is the most highly developed and widely used language for logic programming.

    The language, which has been in continuous use in academic research settings since it's invention in 1972, provides unparalleled power. Many problems which would be difficult to express in other languages are simple in SWI-Prolog. SWI-Prolog is a 'batteries included' modern language, ready for real world tasks like web development and process control.

    In this dynamic hands on workshop we'll learn the basics of SWI-Prolog, and look at some of the amazing things it can do.

help