Upload

Loading icon Loading...

This video is unavailable.

Lenses, Folds, and Traversals

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like Edward Kmett's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike Edward Kmett's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add Edward Kmett's video to your playlist.

Published on Dec 20, 2012

Slides: http://comonad.com/haskell/Lenses-Fol...

This was a talk I gave at the second New York Haskell User Group Meeting (http://www.meetup.com/NY-Haskell/) on the new lens library, which provides a highly composable toolbox for accessing and modifying multiple parts of data structures.

Starting with building blocks such as fmap and (.), we build up combinators suitable for working with a wide array of data structures. These generalize the notions you already know how to use into a form that is easier to compose and simultaneously allow them to be used for monomorphic containers such as Data.Text.

All without compromising on your ability to reason about them using laws!

Finally, once I've built up some foundations, I do a bit of a deep dive, exploring consequences of this design. In particular we discuss the efficient generic programming programming framework exported by lens, and type-safe Traversal-based zippers.

Familiarity with the Applicative and Traversable classes from the Haskell base libraries will be helpful (links provided below), but a basic understanding of the concepts get introduced as I go along.

Useful (but not mandatory) references:

The lens library and documentation: http://hackage.haskell.org/package/lens
A previous, more introductory talk on how to use the lenses Edward Kmett wrote for the scalaz in the Scala programming language: https://www.youtube.com/watch?v=efv0S...
The original Applicative paper: http://www.soi.city.ac.uk/~ross/paper...
Lots of information on Traversable: http://www.cs.ox.ac.uk/jeremy.gibbons...
A write-up of this talk, as presented at the Bay Area Haskell Users Group: http://google-opensource.blogspot.com...

The original Keynote version of the slides are available from http://comonad.com/haskell/Lenses-Fol...

Thanks go to Johan Kiviniemi, who worked magic when it came to cleaning up the audio for this recording!

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

The interactive transcript could not be loaded.

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Loading icon Loading...

Advertisement
Loading...
Working...
to add this to Watch Later

Add to