Hey, welcome to the notes repository for my talk, Reducing Enumerable!
- RubyConf Talk Video: https://www.youtube.com/watch?v=x3b9KlzjJNM
- Keynote Slides: https://drive.google.com/open?id=1qtGmqZuWtktIWs1WDaHGNGiAkgy1R4Xb
- PDF Slides: https://drive.google.com/open?id=1utrizgZTKdfW1gSZShMWgjjbE4LAzlNL
I've broken this story down into various Medium posts to make it easier to read without needing full access to the slides. I've also adjusted and added a bit to the prose in certain places to round it out and make it into more of a story. Each segment is a 4 to 8 minute read.
- The Journey Begins
- Chartreuse — The Master of Map
- Indigo — The Master of Select
- Violet — The Master of Find
- Cerulean — The Master of Tally By
- A Final Lesson from Scarlet
In this repo you'll find some basic code examples from the talk and their associated specs. In the case of transducers, that's a bit more complicated and will be covered in the "Read More" section below.
From a few things.
This has been a long time interview question of mine, which was to reimplement Enumerable methods. I'd noticed that the first two or three methods would go well enough, but people would always struggle with the idea of reduce.
Because of that I took to writing about the concept and teaching people how to use it, as it's an incredibly powerful and useful tool to have in one's programming toolbelt.
This led to the original article the talk is based on:
https://medium.com/@baweaver/reducing-enumerable-the-basics-fa042ce6806
Now this is a series of articles, and does not have illustrations.
200+ hours of work, 50+ distinct illustrations, and 140 slides.
I had written an article about the version of this talk delivered at Southeast Ruby in August:
https://medium.com/@baweaver/creating-reducing-enumerable-an-illustrated-adventure-c6adfcc30d5b
Note that since then I've redrawn most if not all of the significant slides in the talk, adding about 20 more illustrations on top of the original work done and several hours. That's the problem with being an artist, you always want to redo everything once you get better at a style.
The talk was completely hand-illustrated by me using pencil, paper, an iPad Pro 12.9" with Apple Pencil, Illustrator Draw, and Keynote.
CW: Mental health
https://medium.com/@baweaver/lemurs-mean-hope-ae5d01f95700
Why not?
On a more serious note, I believe this started with early visits to the zoo as a child. After a while I had somehow hassled my parents into getting me a stuffed lemur, and I've kept it ever since. It lives on my desk back at home right next to my art supplies.
Now as to how that stuck, there was this great need to have an awesome and unique alias online. I'd tried everything I could think of, until I saw aforementioned stuffed lemur out of the corner of my eye in Junior High.
I decided right then that I would be known as "lemur", though the original alias was "GoldenLemur" as I wanted to be awesome like a certain flash cartoonist, "LegendaryFrog".
This later morphed into "keystonelemur", as is my twitter handle, from a love for Colorado and skiing in the area.
As to why now, and why illustrated lemur cartoons and Ruby, well that was all thanks to a certain lucky stiff. My first Ruby book was Why's Poignant Guide to Ruby, and as you can tell it left a bit of an impression.
The lemurs make an excellent learning device to add levity to an otherwise dense and hard to explain set of concepts, and are more accessible to people who would otherwise not be interested in programming.
I love Ruby, Lemurs, and teaching, so here we are brave reader.
I hope you enjoy them as much as I enjoy making them.
So you got through this, and you want to learn more! Well fear not, there are resources aplenty out there in the wild. Some Ruby, some not so much, but I promise you'll learn some interesting things nonetheless.
I'll be adding more to this section as I get time.
I started with this Javascript article:
https://medium.com/@roman01la/understanding-transducers-in-javascript-3500d3bd9624
Eventually I translated it into Ruby:
https://medium.com/@baweaver/understanding-transducers-in-ruby-209766372c39
You might be interested in Rich Hickey's initial talk on the subject, which evolved out of Clojure.
https://www.youtube.com/watch?v=6mTbuzafcII
I've written a few articles on FP in Ruby you may enjoy:
- https://medium.com/@baweaver/functional-programming-in-ruby-state-5e55d40b4e67
- https://medium.com/@baweaver/functional-programming-in-ruby-closures-ac80547eb40d
- https://medium.com/@baweaver/functional-programming-in-ruby-flow-control-565bbdcdf2a2
Personally I enjoy a lot of what's going on in Javascript and F# on the subject:
- Railway Oriented Programming - https://fsharpforfunandprofit.com/rop/
- Dr Boolean's Guide - https://mostly-adequate.gitbooks.io/mostly-adequate-guide/
I'll write more here later as I get time, and there's a lot of fun stuff out there on this subject.