Michael will be presenting the following sessions
filter_list help_outline
  • 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 1 year 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.

  • Michael Snoyman
    keyboard_arrow_down

    Michael Snoyman - Applied Haskell Workshop

    Michael Snoyman
    Michael Snoyman
    VP, Engineering
    FP Complete
    schedule 1 year 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.

1. What got you into Functional Programming (FP)?
I'd been programming Java and other languages for years, and as time went on I realized my productivity was holding me back. I worked with more lightweight tools, but never felt comfortable shipping to customers, knowing that I couldn't be confident in code quality. FP for me is the best of both worlds: a highly productive set of practices that ensure a higher quality bar. And great performance is a wonderful perk!
2. What has been your best moment or highlight working with FP?
This may sound surprising, but it's probably refactoring. I strongly believe that we overoptimize for first implementation of code, and forget that we spend most of our time maintaining existing code. Requirements change, and old architecture decisions no longer make sense. Strongly typed functional programming allows a level of refactoring, rearchitecting, and rewriting that I would never achieve in less strongly typed solutions. The compiler is my ally.
3. What are some of the greatest challenges of working with FP?

Finding the right balance between elegance and practicality. Most people who embrace FP have a strong desire to create beautiful solutions to problems. However, we can't boil the ocean for every problem, and sometimes standard solutions are perfectly acceptable. It takes a lot of experience and experimentation to decide when to pursue a new FP-inspired solution to a problem, and when to go with standard solutions.

4. All the mainstream programming languages are adding functional programming features. Most new languages and frameworks are strongly influenced by FP. What is your advice to object-oriented programmers?

Definitely embrace the functional features in your languages where available. They can be a massive productivity and sanity boost. For the best bang-for-your-buck, I'd recommend learning a pure functional language like Haskell or PureScript to force yourself to really learn the FP paradigms though. If you try to exclusively learn FP through a multiparadigm language, you'll constantly be tempted to fall back to OO or imperative techniques as a crutch.

5. What will be some of the key takeaways from your sessions at the conference?

Web applications:

  • Writing a web application in Haskell is easy
  • The core libraries are approachable and easy to understand
  • When you're ready to write something real, use a web framework!

Applied Haskell:

  • How to build real world application with Haskell
  • How to choose and understand libraries
  • Evaluation order in Haskell
  • Proper exception handling, including async exceptions
help