schedule Nov 16th 04:00 - 04:45 PM place Ball Room 1 people 15 Interested

We'll discuss how to use strongly typed functional programming to build a typesafe and highly declarative DSL to generate SQL, that allows better abstractions and minimises runtime errors. We'll focus on type systems, and build an intuition for row types and how it guarantees correctness for SQL. I'll cover some parts of actual SQL generation.

A similar talk was given at IIIT Delhi earlier, however that was more geared towards beginners to Functional Programming (link below). I plan to give a more intermediate level talk this time.

 
 

Outline/Structure of the Talk

  1. Introduction to FP and Relational Algebra, and why they are a good fit.
  2. Problems with Typing SQL in FP.
  3. How Row Types solve the problem.
  4. Real world examples with Ermine, and Purescript-Consequence

Learning Outcome

After the talk, attendees have a good idea why Functional Programming is a good fit for interfacing with Relational Databases.

Target Audience

People with some functional programming experience

Prerequisites for Attendees

Participants should have some understanding of strongly typed functional programming.

schedule Submitted 2 months ago

Public Feedback

comment Suggest improvements to the Speaker
  • Naresh Jain
    By Naresh Jain  ~  1 month ago
    reply Reply

    Hi Anupam,

    Thanks for the proposal. Based on your proposal, the topic seems fairly beginner level topic. Do you think this fits best under Mastering FP theme?

    • Anupam Jain
      By Anupam Jain  ~  1 month ago
      reply Reply

      Hi Naresh,

      The talk in the video was geared towards students with little functional programming experience.

      In this talk, I plan to skip over most of the initial introduction to FP and SQL, and instead focus more on the type level concepts, i.e. using (simulating) row types in Haskell, and with the running example of using row types to manipulate records, and guarantee correctness of sql generation. It's more of an intermediate talk than a beginner level talk.

      That said, I am open to changing the theme to something else if you think it would be more appropriate.

      • Naresh Jain
        By Naresh Jain  ~  1 month ago
        reply Reply

        Thanks for the clarification. Let's keep it in Mastering FP then.


  • Liked 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.

  • Liked Bruce Tate
    keyboard_arrow_down

    Bruce Tate - Coding LiveView

    Bruce Tate
    Bruce Tate
    Founder
    Groxio
    schedule 1 month ago
    Sold Out!
    45 Mins
    Demonstration
    Intermediate

    Startups and web developers take note. Phoenix LiveView is the revolutionary framework that allows rapid development of real-time web interactive applications without custom JavaScript. You read that right the first time, and the Elixir community is buzzing. So far, the performance numbers have been nothing short of earth-shattering.

    In this session, you’ll see how it all works. We will do some live coding to show you LiveView under the hood.

  • Liked Andrea Leopardi
    keyboard_arrow_down

    Andrea Leopardi - BEAM Architecture Handbook

    Andrea Leopardi
    Andrea Leopardi
    Core Team Member
    Elixir Lang
    schedule 3 months 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.
  • Liked Mohd Maqbool Alam
    keyboard_arrow_down

    Mohd 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.

  • Liked Harendra Kumar
    keyboard_arrow_down

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

    Harendra Kumar
    Harendra Kumar
    Founder
    Composewell Technologies
    schedule 2 months 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.

  • Liked Anupam Jain
    keyboard_arrow_down

    Anupam Jain - Supercharged Web Application development with Purescript

    45 Mins
    Workshop
    Beginner

    UPDATE: Please setup https://github.com/ajnsit/purescript-react-starter (follow the instructions in the README) on your laptops as a **prerequisite**.

    Purescript is a purely functional, strongly typed language, that compiles to Javascript.

    It provides several high quality libraries for frontend development, and comes with excellent tooling and editor support that makes writing code a snap!

    In this talk I will provide a quick introduction to some basics of Purescript, and then dive into an interactive demonstration of building a non-trivial web application from scratch. I will show how to interface with React bindings, and how to interface with some existing Javascript libraries (a React UI component lib).

    The presentation will be interactive and similar to an inpromptu talk I gave which is linked below. However, I will also demonstrate live coding of an actual purescript application which people can follow along.

    Bring your laptop to follow along.

  • Liked Anish George
    keyboard_arrow_down

    Anish George - Demystifying Function Sub-typing

    Anish George
    Anish George
    UI Developer
    Thoughtworks
    schedule 4 months ago
    Sold Out!
    20 Mins
    Talk
    Intermediate

    What is a Type for a function? When can you say that a function is a sub-type of another function? Why should you even bother?

    Function sub-typing is one of the most confusing areas of FP. In this talk, I'll take a deep dive and explain the core concepts of function types which applies to many different languages. More than just explaining the mere rules, I will be deriving those rules in a step-by-step fashion till the eureka moment so that you will never be confused again.

    The topics covered:

    1. Sub-typing basics
    2. Covariance & Contravariance
    3. Function sub-typing
    4. Implementation gotchas in different languages (Java, Scala, Haskell, JavaScript)
  • Liked Siddharth Bhat
    keyboard_arrow_down

    Siddharth Bhat - Monad-bayes: Probabilistic programming in haskell, tutorial & implementation

    Siddharth Bhat
    Siddharth Bhat
    Student
    IIIT Hyderabad
    schedule 2 months ago
    Sold Out!
    20 Mins
    Case Study
    Intermediate

    We take a dive into probabilistic programming, beginning with a high-level explanation of what probabilistic programming is. We then continue to see how to use the monad-bayes library for performing tasks such as regression in a bayesian formalism. We also look into the implementation of the library, which involves performing an interesting sampling method (markov-chain-monte-carlo) on a very unique space (the space of computational traces of the program). We finally end with next-steps for the haskell community to improve in the probablistic programming space, ala pyro for python

    Here is our tiny re-implementation of monad-bayes, boiled down to the essentials: https://github.com/bollu/shakuni

    Paper on which the talk is based on: http://mlg.eng.cam.ac.uk/pub/pdf/SciGhaGor15.pdf

  • Liked Ankit Jain
    keyboard_arrow_down

    Ankit Jain - Designing powerful real-time systems using Scala and Akka

    45 Mins
    Talk
    Intermediate

    Sky BML (Beat/Meet/Lose) is a streaming system that produces real time Competitive Intelligence about our Lodging Supply.

    This competitive information is being used, among others, for Market Managers to negotiate with hotels for better rates and avail. Competitiveness is proportional to the share of BML Losses that Expedia incurs. This is why Market Managers focus their energies on minimising losses.

    However, it is not easy to understand why losses occur and consequently their resolution takes proportionately long.Our system tries to simplify this and hence accelerate resolution of losses.

    To develop this system, we fully leveraged the power of different functional features of Scala and used Structured Spark Streaming as the processing engine in combination with Clustering(for better app supervision and lifecycle management of the nodes).

    Similarly, some of the complex challenges are solved very naturally using functional programming features of easily. We had this complex problem of traversing a decision tree (based on conditional expressions) and then evaluating the child nodes(which are also expressions) with different lookup services responsible for mapping the symbols used in Expressions.

    I will be discussing in detail on how we tactically use Functional Programming concepts like Implicits, currying, High-Order Functions to get rolling with this problem with ease.

    Similarly, I will discuss on the way we have apply OOP principles to handle different kinds of inputs(streaming/batch) with minimal code duplication.

    Overall, it will be lot of fun to discuss the way to think about our problems and how our thinking is shaped by different concepts available in Scala.

  • Liked Harmeet Singh
    keyboard_arrow_down

    Harmeet Singh - Type System: The Beauty And The Beast

    45 Mins
    Talk
    Intermediate

    The type system plays an important role in building type-safe applications that reduce runtime exceptions and developer mistakes. This sophisticated system is leveraged by Scala’s most famous functional libraries, such as Scala-Cats and ScalaZ. This feature-rich system allows implementing pure functional programming on the JVM. It is a beast due to its complex syntax, as it prevents developers from exploring its beautiful aspects like partially applying types in Scala. In this talk, we will tame the beast and use its beauty to solve real-life issues faced during coding. Our examples will be based on generics, constraints, type lambdas, and the kind projector plugin.

    The following are the learning objectives of this talk:

    1. Practical use cases of the type system using real-life coding.

    2. Implementing custom higher kinded types and handling partially applied types via type lambdas and the kind projector plugin.

  • Liked Sandesh Soni
    keyboard_arrow_down

    Sandesh Soni - Build Tetris Game with Elixir and Phoenix LiveView. Full day workshop.

    Sandesh Soni
    Sandesh Soni
    Full-stack developer
    Formulae.io
    schedule 2 months ago
    Sold Out!
    480 Mins
    Workshop
    Beginner

    Phoenix LiveView provides ability to build web application without any custom javascript.
    You can write all the code on Backend server and the connection is alive and stateful.

    In this workshop, you will build Tetris App in Elixir and Phoenix LiveView. The aim of this workshop is give more hands-on Elixir experience and cover various functions and syntax.

  • Liked Anupam Jain
    keyboard_arrow_down

    Anupam Jain - ActiveTasx - A Haskell DSL for building Multi User, Strongly Typed, Flexible Workflows

    45 Mins
    Talk
    Beginner

    We introduce a Strongly Typed Workflow DSL for Haskell called ActiveTasx, which allows writing Multi-User, Interactive, and Effecful workflow applications at a very high level.

    We will discuss the benefits of building ActiveTasx as a DSL in a functional programming language.

    For example, ActiveTasx improves upon existing imperative Workflow engines by using Functional Programming and design principles. It allows you to compose smaller workflows together using combinators, to build progressively more complex workflows, and the resulting workflows behave predictably at every step.

    ActiveTasx also exploits Haskell's laziness to allow self referential and infinite workflows without any extra syntax.

    Since the Workflows are first class in the DSL, it's also possible to pass them around, creating "Higher Order Workflows". For example, it's possible to create a workflow that allows a user 'A' to choose a workflow to assign to a different user 'B'. Again this is all possible without having to build any special handling in the language for this.

    Workflows created with ActiveTasx also come with -

    1. An automatically generated web user interface with authentication, and wizard like steps for providing information.
    2. Websocket based fast communication between client and server.
    3. Automatic data persistence.

  • Liked ganesan arunachalam
    keyboard_arrow_down

    ganesan arunachalam - What the hell is monad? Why should you care?

    ganesan arunachalam
    ganesan arunachalam
    Developer
    Thoughtworks
    schedule 2 months ago
    Sold Out!
    45 Mins
    Talk
    Intermediate

    Real world applications are hard to imagine without side effects such as writing to a DB or UI. IO-monads were introduced into the Haskell language to write programs in a robust way. And we have been using monads in our day to day job without even knowing those are monads such as IEnumerable/IObservable in languages like C#, Java.

    This talk is to give a basic understanding about monads and why should we care about that, and a little bit about onion/clean architecture.