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=efv0SQNde5Q
The original Applicative paper: http://www.soi.city.ac.uk/~ross/papers/Applicative.pdf
Lots of information on Traversable: http://www.cs.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf
A write-up of this talk, as presented at the Bay Area Haskell Users Group: http://google-opensource.blogspot.com/2012/10/lenses-folds-and-traversals-haskell.html
The original Keynote version of the slides are available from http://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!
Haskell is a beautiful functional language, written by smart computer scientists, and having clever and elegant functional constructs. It clearly separates pure and impure parts of the program.
Game programming on the other hand is a very hands-on discipline, trying to wring out the most of the machine's performance, and aiming ...
Why is functional programming becoming such a hot topic? Just what _is_ functional programming anyway? And when am I going to have to know about it? In this talk Uncle Bob will walk you through the rationale that is driving the current push towards functional programming. He'll also introduce you ...
Boston Haskell, February 18, 2015
Nikhil builds an Enigma machine. First in Cryptol, then in hardware by way of Haskell.
Slides and code available here: https://github.com/rsnikhil/Enigma_Cryptol_Bluespec_BSV.git ...
The Model-View-Controller (MVC) approach to user interfaces was first proposed by Trygve Reenskaug in a 1979 Xerox PARC note. As Object Oriented methodologies gained popularity, MVC too gained traction as a natural and logical way to construct user interfaces despite obvious shortcomings. Even though OO researchers moved forward with alternative ...
Talk by ACM A.M. Turing Laureate Dana S. Scott during the ACM A.M. Turing Centenary Celebration, June, 2012.
A very fast development in the early 1930s, following Hilbert's codification of Mathematical Logic, led to the Incompleteness Theorems, Computable Functions, Undecidability Theorems, and the general formulation of recursive Function Theory. The so-called ...
Cross posted from msdn's channel 9.
Functional programming is increasing in popularity these days given the inherent problems with shared mutable state that is rife in the imperative world. As we march on to a world of multi and many-core chipsets, software engineering must evolve to better equip software engineers with ...