I’m available to speak at conferences and meet ups, so please feel free to drop me an email email@example.com.
- Seemingly Impossible Swift Programs
- Server-Side Swift from Scratch, for web devs
- Server-Side Swift from Scratch
- Composable Reducers
- Playground-Driven Development
- Anything you can do, I can do better
- Swift Talks
- Monoids, Predicates and Sorting Functions
- The Two Sides of Writing Testable Code
- Finding Happiness in Functional Programming
- Lenses in Swift
- Proof in Functions
- Functional Programming in a Playground
December 2018: New Yrok, NY: In this talk I live code an implementation of a “seemingly impossible” Swift program. It’s one that for all intents and purposes should be impossible, yet somehow isn’t: we will perform an exhaustive search across an infinite space of values in finite time. Once this program is implemented I try to show some of the mathematics that explains how this could be true, and show that it has a surprising link to a field of mathematics known as topology.
I later turned this talk into a blog post “Seemingly Impossible Swift Programs”. All of the material in this talk can be found in a series of papers and articles by Martín Escardó:
- Infinite sets that admit fast exhaustive search – Martín Escardó
- Synthetic topology of data types and classical spaces – Martín Escardó
- Seemingly Impossible Functional Programs – Martín Escardó
- The topology of Seemingly impossible functional programs (Slides) – Martín Escardó
- Swift playground with code from this talk
October 2017: San Francisco, CA: A rapid tour through what is required of a server-side web framework, and how Swift’s type system can help solve very complex problems in an expressive and safe way. I mostly focus on:
- Server middleware as just a function that takes a request and produces a response. We use a technique known as phantom types to actually model the entire request-to-responsive lifecycle directly in the type system.
- An applicative style router that is invertible. This means it can both route requests to a first class value, and print requests from a value. It is based on the ideas in this paper.
- Lifting HTML and CSS views into Swift types so that we can transform them in new and interesting ways.
- Using Xcode and the Swift toolchain to do painless snapshot testing, screenshot testing and using Swift playgounds to create entire webpages.
September 2017: Berlin: I gave this talk at the Functional Swift Conference in Berlin, and it entirely focuses on the composability properties of reducers, which are functions of the form
(S, A) -> S. Turns out, there are lots of nice ways to compose such functions, and when applied to ways to model application state (e.g. in Elm and Redux), we show that this allows one to write very simple, local reducers while still leaving yourself open to compose them in a global manner.
September 2017: Paris: I gave this talk at FrenchKit in Paris, and it goes a little bit deeper into the topic I first discussed on “Swift Talk” with Chris Eidhof. It shows how we can replace a large portion of our everyday work in simulators and storyboards with Swift playgrounds. Towards the end of the talk I give a small preview of how I’ve even been using playgrounds to do server-side Swift development.
Anything you can do, I can do better
April 2017: Brooklyn, NY: Chris Eidhof and Florian Kugler of objc.io invited me to record a few guest appearances on their “Swift Talks” series about Kickstarter’s newly open-sourced code. It was a great opportunity to show how functional programming can be applied to a large codebase in real life.
Brandon from Kickstarter joins us and shows how the company uses view models to write highly testable code. We integrate Apple Pay payments and look at Kickstarter’s open-source codebase.
Brandon from Kickstarter joins us to discuss deep linking into an iOS app. We show how to unify all potential entry points into the app using a common route enum, and then we take a look at this pattern in Kickstarter’s open source codebase.
Brandon from Kickstarter is back to show us how the company uses playgrounds to prototype and style individual view controllers.
Monoids, Predicates and Sorting Functions
April 2017: Brooklyn, NY: At the 2017 Functional Swift Conference in Brooklyn I spoke about small atomic units of abstractions can piece together to build surprisingly complex, yet expressive, components. In particular, I used semigroups and monoids to build an expressive algebra for predicates and sorting functions. This talk is roughly based on the article I wrote “The Algebra of Predicates and Sorting Functions”.
March 2017: Tokyo: There are precisely two things that make functions fully testable: the isolation of effects and the surfacing of ‘co-effects’. We will explore a bit of the formal theory behind these two sides, and show how they lead to code that can be easily tested. We will also show how we do this at Kickstarter by diving into our recently open sourced codebase.
Finding Happiness in Functional Programming
Oct 2016: Budapest At the 2016 Functional Swift Conference in Budapest I spoke about how embracing simple, pure functions above all other abstractions has enabled my colleagues and me to build a well-tested, well-understood codebase. I first covered the basics of pure functions and the ideas of identifying effects and separating them from your functions. I then described how these ideas allowed us better our testing suites, enabled us to replace simulators and storyboards with Swift playgrounds, and ultimately a better working relationship with engineers, designers and product managers.
Lenses in Swift
Dec 2015: Brooklyn, NY At the 2015 Functional Swift Conference in Brooklyn I described the basics of lenses and how to implement them in Swift.
Proof in Functions
Feb 2015: Brooklyn, NY At the Brooklyn Swift Meetup I described how we can use the Swift type system to prove simple mathematical theorems. This talk covers most of everything I discussed in my post “Proof in Functions”.
Functional Programming in a Playground
Dec 2014: Brooklyn, NY At the 2014 Functional Swift Conference in Brooklyn I used Swift playgrounds as a highly interactive way for exploring functional programming ideas. In particular, I developed the ideas of transducers and show how they lead to highly composable data transformations.