Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsless/2021-nov-transducers-workshop
https://github.com/bsless/2021-nov-transducers-workshop
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/bsless/2021-nov-transducers-workshop
- Owner: bsless
- Created: 2021-11-02T19:15:38.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-19T18:27:23.000Z (about 3 years ago)
- Last Synced: 2025-01-15T14:05:32.883Z (5 days ago)
- Language: HTML
- Size: 450 KB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+TITLE: re:Clojure transducers workshop
* Description
Transducers are a powerful abstraction added relatively recently to Clojure.
In spite of this and the noticeable performance benefits, they remain a
daunting subject for many Clojurians.There is no reason such an important subject remain impenetrable.
We will approach them in this workshop from first principles and see how
they emerge naturally as a general property in many places.By the end of the workshop, participants will have a better
understanding of transducers, their use cases, and will be comfortable
writing their own simple transducers when the need arises.* Agenda
- loop/reduce equivalence: everything written using a loop can be
written using reduce, and vice versa
- implementing your own map and filter: for some it's easier with loop.
the previous point shows there is a transformation to reduce
- understanding the invariant: in a reducing context, always one
quantity is decreased while the other is increased (reducible and
accumulator)
- Factoring out accumulation and consumption from reduction step. doing
it twice for map and filter is sufficient
- Understanding the underlying push-pull semantics
- Understanding what's a reducing function
- Transducers as a transformation of a reducing function
- Stateful transducers* Material
see the [[PRESENTATION.org]] for a literate programming walk-through of the
workshop.Go along with the workshop by hacking on the scratch.clj file
See [[extra.org]] for further exercises and discussion