Supercharged Web Application development with Purescript

schedule Nov 15th 02:00 - 02:45 PM place Meeting Room 1 people 54 Interested

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.

 
 

Outline/Structure of the Workshop

  1. Prerequisite - Participants can read up on Purescript and initialise a simple project via the template at https://github.com/ajnsit/purescript-react-starter.
  2. 5-10 minutes - Talk about the advantages of Purescript. Briefly outline the ecosystem. Discuss the structure of the Purescript application, best practices, and tools used in the template.
  3. 15 minutes - Live-code and run a hello-world style web application with Purescript and React bindings. Demonstrate making changes, IDE support etc.
  4. 20 minutes - Continue live-code. Add a third party UI component (https://github.com/frontend-collective/react-sortable-tree) and import it via FFI. Write a simple application that demonstrates wrapping and controlling the state of that component from Purescript.
  5. Take follow up questions if there is time.

Learning Outcome

Attendees will learn how to build a simple purely functional web application with Purescript. They will also gain an understanding of Purescript and its ecosystem, and be able to learn more on their own.

Target Audience

People new to strongly typed functional programming

Prerequisites for Attendees

  1. Read Up on Purescript
  2. Bring your laptop if you want to follow along.
  3. Follow the instructions in the README for this project - https://github.com/ajnsit/purescript-react-starter

schedule Submitted 3 months ago

Public Feedback

comment Suggest improvements to the Speaker
  • Nikhil Barthwal
    By Nikhil Barthwal  ~  2 months ago
    reply Reply

    The proposal looks good but I am concerned that in 20 mins of time, how much in depth would you be able to go? The content would be better presented in a 90 mins talk where attendees can bring their laptop and follow along in developing a simple but real-world application that demonstrate the power of Purescript.

     

    Would you be open to converting it into a 90 mins tutorial/workshop style proposal?

    • Anupam Jain
      By Anupam Jain  ~  2 months ago
      reply Reply

      I agree that 90 minute may be a better format for something that people can follow along on their laptops, and would leave enough time for questions.

      I can do something similar to this impromptu and interactive talk I gave at a Purescript meetup - https://www.youtube.com/watch?v=7Pir5KcVNLw&list=PLKRL4Pfe2WhqBc0QtFZ-EFkD6ts40-mGL which lasted around 45 minutes. Adding the live coding of a application from scratch would pad it to 90 minutes.

       

      • Anupam Jain
        By Anupam Jain  ~  2 months ago
        reply Reply

        I have changed the format to a 90 minute workshop.

        • Anupam Jain
          By Anupam Jain  ~  2 months ago
          reply Reply

          After some more consideration, a 45 minute workshop may be better. I will change it to that.

          • Naresh Jain
            By Naresh Jain  ~  2 months ago
            reply Reply

            Thanks, Anupam. Can you please update the outline with a time breakup for each topic?

            • Anupam Jain
              By Anupam Jain  ~  2 months ago
              reply Reply

              Hi Naresh, I updated the outline to have time breakup and some more details.


  • Liked Andrea Leopardi
    keyboard_arrow_down

    Andrea Leopardi - BEAM Architecture Handbook

    Andrea Leopardi
    Andrea Leopardi
    Core Team Member
    Elixir Lang
    schedule 4 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 Bruce Tate
    keyboard_arrow_down

    Bruce Tate - Coding LiveView

    Bruce Tate
    Bruce Tate
    Founder
    Groxio
    schedule 2 months 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 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 Anupam Jain
    keyboard_arrow_down

    Anupam Jain - Typesafe Functional SQL

    45 Mins
    Talk
    Intermediate

    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.

  • Liked Alexander Granin
    keyboard_arrow_down

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

    Alexander Granin
    Alexander Granin
    Sr. Haskell Developer
    Juspay
    schedule 4 months ago
    Sold Out!
    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.

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

  • Liked Harendra Kumar
    keyboard_arrow_down

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

    Harendra Kumar
    Harendra Kumar
    Founder
    Composewell Technologies
    schedule 3 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 Saurabh Nanda
    keyboard_arrow_down

    Saurabh Nanda - Why is Haskell so hard to learn? (and how to deal with it)

    Saurabh Nanda
    Saurabh Nanda
    Founder
    Vacation Labs
    schedule 3 months ago
    Sold Out!
    45 Mins
    Talk
    Beginner

    Haskell is notoriously hard to learn. I have struggled with the learning curve. I have seen others struggle with it. And I have seen developers struggling to wield the language effectively even after months of learning.

    We'll talk about five things that give Haskell this (understandably) bad rep, and how to effectively deal with them during your learning phase.

  • Liked Sreenidhi Nair
    keyboard_arrow_down

    Sreenidhi Nair - Learnings from using haskell in production

    Sreenidhi Nair
    Sreenidhi Nair
    Senior Haskell Developer
    ByteAlly
    schedule 3 months ago
    Sold Out!
    20 Mins
    Experience Report
    Intermediate

    Over a period of 7 years, we have applied Haskell across Web apps, compilers, parsers for our customers across various industries. This is our report on how some of the unique features of Haskell have not only helped us create stable production environments but also break barriers. On the other hand, there is a high cost of on-boarding new developers and few other pain points. So, is Haskell worth the investment?

  • Liked Siddharth Bhat
    keyboard_arrow_down

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

    Siddharth Bhat
    Siddharth Bhat
    Student
    IIIT Hyderabad
    schedule 3 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 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 3 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.