Loading...

CppCon 2015: Juan Pedro Bolívar Puente “Transducers: from Clojure to C++"

5,925 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Oct 17, 2015

http://www.Cppcon.org

Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/cppcon/cppcon2015

Transducers allow to express transformations on sequential inputs (like std::transform, std::filter, most of boost::range::adators [4] and more) in a way that is independent of the input source. They are simple high order functions agnostic of the notion of iterator or collection and can be combined by simple function composition. They can later be applied eagerly or lazily over iterators, but most interestingly, also to other kinds of "reactive" sources, like networked streams, inter-process channels or reactive observables (e.g. RxCpp [3]). Not only they provide an elegant decoupling between the "what" and the "how" and higher level of reuse, their implementation is often simpler and and more performant than similar boost::range adaptors.

Transducers were introduced in Clojure by Rich Hickey [2]. At Ableton we implemented them in C++ and released them as part of our Open Source modern C++ toolkit: Atria [1]. Our implementation introduces innovations of its own, like implementing state-full transducers without mutation, enabling further safety and reusability. We also use Eric Niebler's technique [5] to describe and check its concepts in standard compliant C++11.

In this session we will introduce the concept of transducers and how they can be implemented in modern C++. We will also cover some of the most interesting use-cases.

[1] https://github.com/AbletonAG/atria
[2] http://clojure.org/transducers
[3] https://github.com/Reactive-Extension...
[4] http://www.boost.org/doc/libs/1_58_0/...
[5] http://ericniebler.com/2013/11/23/con...

Juanpe is a Spanish software engineer currently based in Berlin, Germany. Since 2011 he works for Ableton, where he has helped building novel musical platforms like Push and Live and where he coordinates the "Open Source Guild" helping the adoption and contribution to FLOSS. He is most experienced in C++ and Python and likes tinkering with languages like Haskell or Clojure. He is an advocate for "modern C++" and pushes for adoption of declarative and functional paradigms in the programming mainstream. He is also an open source activist and maintainer of a couple of official GNU packages like Psychosynth which introduces new realtime audio processing techniques leveraging the newest C++ standards.

Videos Filmed & Edited by Bash Films: http://www.BashFilms.com

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...