Skip to content
0:00 / 0:00

#profunctors#lenses#purescript

Phil Freeman - Fun with Profunctors

Brainium

13K subscribers • 3 videos on Hallway

YouTube

Advanced. Deep dive for people who know the field.

17K views10 years ago1 recommendation

Programming languagesSoftware designHaskellFunctional programmingDesign patterns

Phil Freeman introduces profunctor optics, explaining how they generalize lenses, prisms, and traversals with practical examples.

Van Laarhoven lenses have become an indispensable part of the Haskell programmer's toolbox, and a powerful abstraction tool. However, it can be difficult to get a handle on this implementation of lenses. The Profunctor type class provides another motivation for this style of programming, and one which generalizes nicely to related concepts like Prisms and Traversals. In this talk, Phil will give an introduction to profunctor optics, with plenty of examples. profunctors: hackage.haskell.org/package/profunctors lens: hackage.haskell.org/package/lens purescript-profunctor-lenses: pursuit.purescript.org/packages/purescript-profunctor-lenses… purescript-optic-ui: github.com/zrho/purescript-optic-ui/ purescript-thermite: github.com/paf31/purescript-thermite/ This was recorded at Brainium in Santa Monica during a Santa Monica Haskell meetup: meetup.com/santa-monica-haskell/events/230270785/

Why it's here

1 person recommends this

What people say. Recommended as a deep dive into profunctor optics and lenses.

u/Faucelmein r/haskell • Recommends

Phil Freeman - Fun with Profunctors

u/gilmiin r/haskell • Mentions

On “What is a Profunctor, anyway?”

I recommend watching at least part of Phil Freeman's talk Fun with Profunctors.

u/iElectricin r/haskell • Mentions

On “Didn't struggle with monads as much as we're struggling with (product) profunctors”

I'd highly recommend watching link to this video twice :)

u/jan_pathin r/haskell • Mentions

On “What is a Profunctor, anyway?”

I know I'm a bit late to the party but I have yesterday watched the talk Fun with Profunctors where profunctor optics are presented. That really helped me get some intuition what Profunctors and their various subclasses are useful for. It is a long video, but if you are already familiar with lenses and the formal definition of a profunctor you may be able to skip or just skim over the first hour or so of the video as he takes about that much time to introduce `Functor`, `Contravariant`, `Profunctor` and `lens`. If however you are not already familiar with basic lens-likes this video is probably not that great, because although he does introduce them I'd imagine it's rather hard to get any…

u/nirglein r/haskell • Mentions

On “Any good material about how to think about and use profunctors?”

There's a few visuals here that help show how lenses are built up from simple functions: https://github.com/hablapps/DontFearTheProfunctorOptics/blob/master/ProfunctorOptics.md Phil Freeman has a 2-hour video on profunctors: Fun With Profunctors