Presented by
Brisbane Functional Programming Group
Curious minds interested in practice and theory of functional programming (FP). Our members range from absolute beginner to expert. All are welcome!
Hosted By
12 Went
BFPG Meetup - September 2026 - Data Type Diff, Optics and Event Sourcing
Registration
Past Event
About Event
Join the BFPG Discord: Join Discord Server
Agenda
18:00: Welcome and setup
Presentation #1: Data Type Diff, Optics and Event Sourcing - Tony Morris
20:00ish: Pack down, head to Criterion pub
# Data Type Diff, Optics & Event-sourcing Take two functions that ought to be inverses. Write down the two laws that say so. Do not do anything else. You are now in possession of an optic. Two very small data types — `Diff` and `Patch` — describe how two values differ, and how to apply a change to a value. Between them, they carry two round-trip laws. From those laws, and no further effort, an `Iso'` falls out in the total case, and a `Prism'` falls out in the fallible case. The isomorphism laws are exactly the round-trip laws, wearing different clothes. The same story turns out to be the story of parsers and printers that round-trip, and of event-sourced systems whose log and projections are honest with each other. Along the way we distinguish real event-sourcing from its "event-flavoured" imposter, via a property test that falls directly out of the round-trip laws. Familiarity with Haskell's `lens` is helpful, not required.
Location
Presented by
Brisbane Functional Programming Group
Curious minds interested in practice and theory of functional programming (FP). Our members range from absolute beginner to expert. All are welcome!
Hosted By
12 Went