Susan Potter

Functional Programming

software

A Haskell view of functional programming ("effectful")

This article explores Haskell’s techniques for isolating side effects, starting with the IO monad, which encapsulates impure code to enable reasoning about pure portions. It explains IO’s benefits like sequencing effects and isolating them from infecting other code. The article then provides a high-level overview of more advanced Haskell effect systems including MTL-style monad transformers and freer algebraic effects, comparing their strengths and weaknesses …

software

A Haskell view of functional programming (well-typedness)

Dive into an educational journey exploring the power of strong static typing, enforcing domain-specific constraints, and ensuring the validity of values. Uncover how well-typedness enhances code reliability, maintainability, and understandability, while enabling robust composability and scalability.

software

Flix Series Part 1: Higher-order functions & infix combinators

This article delves into the world of functional programming with the Flix programming language with higher-order functions and user-defined infix operators.

software

Getting Started with Flix, Part 0

Are you ready to embark on a coding adventure with Flix? This article introduces Flix, a programming language that combines the best features of functional languages like Scala and Haskell. But that's not all—Flix also brings its own innovative additions, such as row polymorphic extensible records and first-class support for Datalog constraints.

software

Algebraic Data Types in TypeScript

Note: the code for the TypeScript (to help you follow along) is available here: Encoding Algebraic Data Types in TypeScript code Background Recently I've been reviewing TypeScript code at work. A common pattern I've observed in pull requests and some open source projects is a type that looks like the following: type FooTag = 'Bar' | 'Baz' | 'Qux'; type Foo<A> = { _tag : FooTag, /* Required for the 'Bar' tagged values of Foo */ …

software

Algebraic Data Types: For the math(s) inclined

Unlock the mathematical elegance of algebraic data types (ADTs) and revolutionize your understanding of data modeling! Discover how algebraic principles can determine the cardinality of ADTs, allowing you to represent an astonishing number of values. Explore the power of sum types, where you can "sum up" the cardinalities of different data constructors to find the overall cardinality of the type. Dive into practical examples, such as representing colors with RGB and …

software

Experience report deploying PureScript to AWS Serverless (Lambda)

In this blog post, an experienced software engineer shares their successful deployment of a pure functional serverless function to AWS using PureScript. They spent around $15 per day on API Gateway and Lambda invocations without cost optimization, handling a peak load of 32k invocations per minute with low latency. The engineer highlights the need for adjustment in debugging and deployment processes and discusses challenges with tools and automation. Despite concerns, costs …

talks

From Zero to Haskell: Lessons Learned (ZuriHac)

Embarking on functional programming within an established software organization is a daunting task, but this talk reveals some secrets and wisdom acquired from experience trying to build a team this way. Discover how to manage existing systems while incorporating a functional mindset and building expertise. Learn approaches to reduce risks, foster a learning culture, and transition from ad-hoc workarounds to a profound understanding of the problem domain. Join us on this …

snippets

Profunctor exploration in less than 100 lines of Haskell

A snippet showing the design space around profunctors using Haskell as the teaching language Includes sighting of Strong, Choice, Cartesian and more profunctors.

talks

Functional Operations (Functional Programming at Comcast Labs Connect)

Maintaining configurations for different nodes and cloud resources in a [micro]service architecture has been an absolute nightmare in the past. The separation between CI/CD environments and production configuration has led to unpredictable results and false positives. Deploying code to staging and production has often resulted in unforeseen consequences that can't be identified beforehand, leaving users frustrated when problems arise. This session introduces the Nix and …

talks

Functional and Reactive Operations

If we were starting greenfield development of a service or web application today we would likely employ a number of practices and design choices that are known to optimise application responsiveness, resiliency, elasticity, and/or composability. Delivering our reactive applications on top of predictable infrastructure will set our project up for success. Some of us don't have that luxury. We must provision, deploy, and operationally maintain legacy monolithic Rails web …

talks

Put a Type On It: Idris Types as Propositions

Note from a talk I gave at Strangeloop showing how Curry-Howard can be applied to structuring types to represent logical propositions using Idris as the teaching language.

software

Parametricity: A Practitioners Guide

This post is a quick and handy guide that introduces the concept of parametricity and explains how it can be leveraged in software development. The article aims to target industry practitioners familiar with mainstream languages and methods, providing them with a practical understanding of parametricity and its benefits. It discusses the prerequisites and terminology related to parametricity, including the need for pure functions, total correctness, and support for parametric …

software

Algebraic Data Types

Unlock the power of algebraic data types to revolutionize your programming! Discover the flexibility of sum types, also known as tagged unions, and product types, also called record types. Dive into Scala examples and see how algebraic data types provide exhaustive and type-safe constructions. Explore the hybrid sum-product types and their applications in modeling complex domains like social network notifications. With algebraic data types, you can build robust and expressive …

talks

Functional Algebra: Monoids Applied

In functional programming, words from Category Theory are thrown around, but how useful are they really? This session looks at applications of monoids specifically and how using their algebraic properties offers a solid foundation of reasoning in many types of business domains and reduces developer error as computational context complexity increases. This will provide a tiny peak at Category Theory's practical uses in software development and modeling. Code examples will …