Re:A visual demo of Ruby's lazy enumerator
by robocat on Sunday January 12, 2025 @02:08AM
(#42671812)
I love the visuals - they are fantastic at showing the difference.
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!
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!