Does code optimized for RAM usage need to be ugly? Find out, in this free episode of RubyTapas.
[boilerplate bypath=”rubytapas-sample”]
5 comments
Thanks for helping us keep the code clean and nice!
I discovered the enumerator-returning functionality by accident the other day when I wanted to create an array of multiple instances of a class.
First attempt of 2.times { Foo.new } didn’t work as it didn’t return an array. However, 2.times.collect { Foo.new } did the work (I find “collect” alias more expressive than “map” in this case). Another moment when I realized just how much I like working with Ruby.
Thanks for helping us keep the code clean and nice!
I discovered the enumerator-returning functionality by accident the other day when I wanted to create an array of multiple instances of a class.
First attempt of
2.times { Foo.new }
didn’t work as it didn’t return an array. However,2.times.collect { Foo.new }
did the work (I find “collect” alias more expressive than “map” in this case). Another moment when I realized just how much I like working with Ruby.RubyTapas is a beauty 🙂
What are you using for inline console in ST2?
First of all, it’s Emacs 😛
And I’m using xmpfilter. If you’re a subscriber, episode 56 goes into detail on it.
Emacs is just another plugin for ST2 I’m pretty sure.