mijoharason Hacker News • Recommends
On “How I Start: Haskell”
#lenses#lenslibrary#traversals
2.7K subscribers • 3 videos on Hallway
Advanced. Deep dive for people who know the field.
54K views13 years ago5 recommendations
Programming languagesSoftware designFunctional programmingHaskellDesign patterns
Edward Kmett explains how to build highly composable combinators for accessing and modifying complex data structures using the lens library.
Slides: comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.pdf This was a talk I gave at the second New York Haskell User Group Meeting (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: 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: youtube.com/watch?v=efv0SQNde5Q The original Applicative paper: soi.city.ac.uk/~ross/papers/Applicative.pdf Lots of information on Traversable: cs.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf A write-up of this talk, as presented at the Bay Area Haskell Users Group: google-opensource.blogspot.com/2012/10/lenses-folds-and-trav… The original Keynote version of the slides are available from comonad.com/haskell/Lenses-Folds-and-Traversals-NYC.key Thanks go to Johan Kiviniemi, who worked magic when it came to cleaning up the audio for this recording!What people say. Recommended as a mind-blowing and comprehensive guide to understanding lenses and functional references in Haskell.
mijoharason Hacker News • Recommends
On “How I Start: Haskell”
programming-talkscurated list on GitHubRecommends
Under “Haskell”
jerfon Hacker News • Recommends
On “Why is the C++ STL so heavily based on templates?”
dllthomason Hacker News • Recommends
On “Letter to a Young Haskell Enthusiast”
u/haskellgr8in r/haskell • Mentions
u/Competitive_Ad2539in r/haskell • Mentions
u/ElCthuluIncognitoin r/haskell • Mentions
u/fosskersin r/haskell • Mentions
On “fmap fmap fmap fmap fmap fmap fmap fmap”
u/haskmanin r/haskell • Mentions
On “From Lenses to Yoneda Embedding”
u/crvdgcin r/haskell • Mentions
On “Deriving not-so-complex types”
u/penguinlandin r/haskell • Mentions
On “A Little Lens Starter Tutorial - School of Haskell”
u/mishachin r/haskell • Mentions
On “Any advanced / complete Lens reference?”
u/crvdgcin r/haskell • Mentions
On “Point-free”
u/stevelyin r/haskell • Mentions
On “School of Haskell—Basic Lensing”
u/arianvpin r/haskell • Mentions
On “The Haskell Cast: Episode 1 - Edward Kmett on Lenses”