Episode 9 - Interesting software part#2 - Transducers.jl - a podcast by satyabrata pal

from 2020-12-16T16:54:11

:: ::

This is episode 9 and today we are going to talk about an interesting library in the Julia programming language ecosystem.



The library about which I am going to talk is known as "Transducers". So What is this package named Transducers?



I first heard this term in the Julia language community. There is a package in the Julia ecosystem known as "transducers". As per the readme file of this particular package the definition is as follows-



"Transducers are transformations of "sequence" of input that can be composed very efficiently. The interface used by transducers naturally describes a wide range of processes that is expressible as a succession of steps." In short Transducers can be thought of as software which takes in some input in sequence and then it transforms them into sort of pipeline.



To know more about transducers I looked up the origin of this concept.



My search led me to a blog post by "Rich Hickey' who is the creator of the "Clojure" programming language. This particular blog post was dated August 6,2014 where he had laid down the idea of transducers for the "Clojure" programming language. The equivalent package in Julia is the port of the transducers from the Clojure ecosystem.



In this elaborate blog post, Rich Hickey gives a very simple explanation of a 'transducer'. Which is as follows--



"Transducer is a function that takes one reducing function and returns another".



Building on this definition we can further simplify our earlier description of transducers to this--



" A transducer takes in a function, computes it's output, combines the function with another input in the sequence (which is a fucntion) and gives back a new reducing function."



So, this resembles a pipeline but the Real power of transducers comes from the fact that they are unaware of the input being fed to them and the job which the input objects are supposed to do.



This is a very thoughtful design due to which there is an inherent decoupling present in the Transducers, they have this plug and play ability which makes it easier to customize this in any package/project.



So, this was all about transducers and why I find them interesting.


References


https://cognitect.com/blog/2014/8/6/transducers-are-coming


https://juliafolds.github.io/Transducers.jl/dev/




How To Show Your Support To My Work🤗


Creating a content requires a lot of research, planning, writing and rewriting . This is important because I want to deliver practical content to you without any fluff.


If you like my work and my content and want to support me then the following are the ways to show your support →



  • If you like my work then click on this link to Buy me a coffee.


  • Buy my deep learning course at udemy. Just click on the course link in the show notes and get awesome discount on my deep learning course.


  • Subscribe to my publication and share it across so that more people can discover it.


  • Subscribe and share my podcast “SimpleAI” on google podcast or any other podcast player of your choice. Don’t forget to give it a 5 star.


  • Subscribe to my newsletter.


Further episodes of SimpleAI

Further podcasts by satyabrata pal

Website of satyabrata pal