3 ms·
Ruby 2.0 Works Hard So You Can Be Lazy (2013)
- geraldbauer 9y agoIf you're interested in ruby and the upcoming ruby 2.5 release on Dec/25th - may I highlight the Ruby Advent Calendar 2017 [1] incl. Ruby 2.5 news and highlights 25 ruby libraries / gems. Happy holidays / christmas and hacking w/ ruby. [1]: https://planetruby.github.io/advent2017 https://planetruby.github.io/advent2017
- izietto 9y agoI love this thing that Ruby publishes a new release on Christmas. I usually don't like Christmas, but this is an appreciated present.
- iddan 9y agoRelevant to Python 3 as well: a lot of methods has updated to use iterators when they can making the lazy and much more efficient
- kevin_thibedeau 9y agoIterators on small lists aren't always more efficient.
- trop 9y agoHence the first lazy evaluation example becomes something like import itertools list(itertools.islice(itertools.count(),10)) Though perhaps there is a more elegant (if not more efficient) way to do this?
- gr33nman 9y agoNo tax breaks for Ruby.
- stevebmark 9y agoDoes optimizing Ruby have diminishing returns? It doesn't have a JIT and it's all late method lookups, seems like that would be a much higher performance win, to remove the runtime metaprogrammed nightmare soup. I also wonder if that's even compatible with the language at all.
- rubystallion 9y agoWould be nice to have an implementation in pure ruby of this to play around with. In the meantime it's good the article is well illustrated.