Please log in to watch this conference skillscast.
Clojure's sequence library and the threading macro make lazy sequence operations like map, filter, and reduce composable, and their immutable semantics allow efficient re-use of intermediate results. Core.reducers combine multiple map, filter, takes, et al into a single *fold*, taking advantage of stream fusion--and in the upcoming Clojure 1.7, transducers abstract away the underlying collection entirely.
I've been working on concurrent folds, where we sacrifice some order in exchange for parallelism. Tesser generalizes reducers to a two-dimensional fold: concurrent reductions over independent chunks of a sequence, and a second reduction over those values. Higher-order fold combinators allow us to build up faceted data structures which compute many properties of a dataset in a single pass. The same fold can be run efficiently on multicore systems or transparently distributed--e.g. over Hadoop.
YOU MAY ALSO LIKE:
- Got The Perfect Agile Model? Here’s What You Should Know About Agnostic Agile (in London on 16th August 2017)
- Uncle Bob's Advanced TDD (in London on 30th - 31st October 2017)
- Uncle Bob's Clean Code: Agile Software Craftsmanship (in London on 1st - 3rd November 2017)
- Agile Testing & BDD eXchange 2017 (in London on 9th - 10th November 2017)
Tesser: Another Level of Indirection
Kyle Kingsbury (aphyr) is a software engineer at Factual, the lead author of the Riemann monitoring system, and principal instigator behind Jepsen: an exploration of distributed systems safety. He's obsessed with Clojure, databases, and networks.