Nevertheless, this was great.
There are probably a lot of fun variations to explore. Since this post seemed to resonate, I may be motivated to try some more experiments.
If the visuals were vertical then the filtering might look more natural because time would be left-to-right and balls would have natural gravity and fall "down" through filters? Code runs top to bottom so I'm guessing it would still be clear.
And putting a number in each of the balls might help clarity too :-)
The only crazy thing is that Haskell lazy is pull (right) whereas Ruby lazy is still push - so the lazy keyword is somewhat confusing but that can't be fixed.
I am not criticising and certainly don't want to make unnecessary work for you. Graphic design and animation are dark arts!
https://news.ycombinator.com/item?id=42652775 (different submitter; 29 points, 3 comments)
Excuse me while I go back through my code and make sure I’m using lazy enumeration wherever I’m iterating over large collections….
Some examples:
I wrote a utility gem a while ago that lets you lazily intersect, union, etc various potentially infinite streams of data. https://github.com/maxim/enum_utils/
I also used lazy enumeration for traversing the wordmap in my no-RAM static storage gem. https://github.com/maxim/wordmap/
Later I found out laziness in the whole system by default leads to some difficult issues, which quite a few people seem to agree with. Simon Peyton Jones (Haskell co-creator) apparently has said "The next Haskell will be strict". (https://news.ycombinator.com/item?id=14011943)
Python 3 changed to being lazy-by-default. I assume that improves CPU/memory usage, but in some cases it does have less predictable behaviour. I can see why Ruby, with its goal of "developer happiness", would choose to retain the predictable behaviour of eager-by-default.