Skip to content
0:00 / 0:00

#clojure#transducers#richhickey

"Transducers" by Rich Hickey

Strange Loop Conference

88K subscribers • 107 videos on Hallway • Conference channel

YouTube
  • Recommended by 10 people: 6 on Hacker News, 1 on Lobsters, 2 in engineering communities and 1 curated list.
  • A classic. People kept recommending it from 2014 to 2025.
  • Presented by Rich Hickey, creator of Clojure

Advanced. Deep dive for people who know the field.

115K views12 years ago10 recommendations

Programming languagesSoftware designFunctional programmingLisp and ClojureDesign patterns

Rich Hickey introduces transducers, a composable and context-free way to apply map, filter, and other algorithms across different data sources.

People keep implementing map, filter and other fundamental algorithms in different contexts - eagerly over collections, over lazy sequences, in parallel, over enumerables/iterables, over observables, over channels/streams etc. In addition to duplication of effort, this yields bloated APIs, and, when implemented in the classic way, often involves the creation of expensive intermediate objects/values that can be difficult to optimize away. Most problematic is that this approach keeps us from composing core algorithms in a context-independent way which would facilitate reuse and engender greater flexibility. This talk will describe transducers, a new library feature for Clojure (but of interest to other languages) that emphasizes composable, context-free, intermediate-free notions like 'mapping' and 'filtering' and their concrete reuse across all of the contexts above. by Rich Hickey (@richhickey) - Cognitect Rich Hickey, the author of Clojure and designer of Datomic, is a software developer with over 25 years of experience in various domains. Rich has worked on scheduling systems, broadcast automation, audio analysis and fingerprinting, database design, yield management, exit poll systems, and machine listening, in a variety of languages. Rich is CTO of Cognitect, Inc.

Why it's here

10 people recommend this

What people say. Highly recommended as the definitive introduction to the transducer pattern and its benefits.

Moments people linked to

u/n00bombin r/Clojure • Recommends

"Transducers" by Rich Hickey

ianbishopon Lobsters • Recommends

"Transducers" by Rich Hickey (Strange Loop)

jwron Hacker News • Recommends

On “Transducer: Composition, abstraction, performance (2018)”

Transducers are IMHO one of the most under-appreciated features of Clojure. If you want a really good intro, watch Rich Hickey's talk about transducers: link to this video (Rich is an excellent speaker and most of his talks are really worth watching, even if you don't use Clojure). The thing about transducers is that once you start using them, the abstractions click in your mind and you start using them more and more in your code. Many things our software does can be looked at as pipelines, and transducers let you write composable functions and put them together into pipelines. As you see more pipelines in your code, you will write those composable functions and reuse them in various places. Experience…

u/friedrichRiemannin r/ProgrammingLanguages • Recommends

"Transducers" by Rich Hickey

programming-talkscurated list on GitHubRecommends

Under “Programming Language Design”

Transducers 00:45:00 by **Rich Hickey** (2014)

rymohron Hacker News • Recommends

On “Transducers for JavaScript”

That and they're collection agnostic. I highly recommend watching Rich Hickey's talk for more background: link to this video

ultimapeon Hacker News • Recommends

On “Rich Hickey – Inside Transducers [video]”

Here's another video by Rick Hickey about transducers: link to this video - it was referenced in this great post detailing the transducer notion with Clojure, Scala, and Haskell: link

talkingtabon Hacker News • Recommends

On “Why would anyone need JavaScript generator functions?”

Transducers. See Richard Hickey's talk about transducers here: link to this video You can implement transducers in JavaScript using generators. It was somewhat mind bending but fun.

devinon Hacker News • Recommends

On “My mental model of Clojure transducers”

Rich gave a talk on this, and there is an associated HN thread for the talk, but some of you may be interested in the original transducers presentation. You can view it here: link to this video

ThatGeoGuyon Hacker News • Recommends

On “Reflecting on transducers in Scheme (2023)”

…is meant to be general across operations that work on all of these types, so I chose language that intentionally departs from thinking in a list-focused way. Now, my main question. Transducer? I'm curious on the etymology of that word. By itself, I don't think I could ever guess what it was referencing. :( This is from Rich Hickey's presentation: link to this video It's not a reducer, because they serve as higher-order functions that operate on reducers. Instead, the values they accept are transient through the function(s), so they transduce. You should watch the video, I think Rich explains the origins of his language very well…

drRobertzon Stack Overflow • Mentions

A stateful transducer is expected to flush its state by calling the "step" arity (i.e. ([result input ) ) as many times as needed, before calling the "complete" arity (i.e. (result ) ). My question is how early termination (with reduced ) is to be handled here. On https://clojure.org/reference/transducers#_early_termination it says In the completion step, a transducer with reduction state should flush state prior to calling the nested transformer’s completion function, unless it has previously seen a reduced value from the nested step in which case pending state should be discarded. but what does "has previously seen" mean? There are three possible interpretations of the above…
10View the answer

asoloveon Hacker News • Mentions

On “Talking about “types””

Rich brought this up in his Strange Loop talk 1. All the attempts he had seen either disallowed perfectly valid uses or allowed invalid ones. I believe to really guarantee early termination and a few other tricky invariants of reducers you would need a linear type system. 2 1 link to this video 2 link

brandonbloomon Hacker News • Mentions

On “Type-safe Transducers in Clojure, Scala, and Haskell”

This is interesting, but it's still missing some very important features of transducers. As you alluded, stateful operations 1 won't work at all in your Haskell model. Also, you've missed early termination 2, which Rich's talk 3 covered well. 1 link 2 link 3 link to this video

mgaruson Hacker News • Mentions

On “Has UML died without anyone noticing?”

This reminds me of a talk by Rich Hickey 0, where he introduces the Transducer pattern, which is actually an abstraction for map/reduce/fold/filter etc. (But I'm not trying to invalidate your claim that patterns exist in FP in general, only that specific case. Afaik, the Transducer abstraction isn't even widely-known nor used.) 0: link to this video