Ruby quote time... Ruby is designed to be human-o...
# thinking-together
w
Ruby quote time... Ruby is designed to be human-oriented. It reduces the burden of programming. It tries to push jobs back to machines. You can accomplish more tasks with less work, in smaller yet readable code. (Matz) Ruby is a very free-form community. Matz is the most benevolent dictator I've had the pleasure to work with, and most of the community are true free-thinking artists. It's like the hippie commune of the language world. (Charles Nutter) Ruby seems so self-explanatory to me. It makes it almost boring; you try to focus on Ruby and you wind up talking about some problem domain instead of the language. (Steve Yegge)
❤️ 4
s
I have to admit that in my Ruby days, this was the only language where it happened to me surprisingly often that I would just write a piece of code without looking at the documentation thinking “I have no idea but I feel like this is how that should work” — and it did.
w
Ruby is so delightfully unsound: perpetually punting on precision and completeness, favoring a sort of joy and ease.
For example, here's one that broke me — just now. After writing it thousands of times, I cannot type this idiom anymore:
Copy code
hash_mapping_x_to_fx = Hash[xs.map{|x| [x, f(x)]]
From now on, I'm going with:
Copy code
hash_mapping_x_to_fx = xs.hap{|x| f(x)}
Remember "Ruby was a Lisp originally, in theory." So the definition, for those unfamiliar, can be simple as:
Copy code
module Enumerable
  def hap
    Hash[map{|x| [x, yield(x)]}]
  end
end
Certainly other languages have similar capabilities especially now that Ruby is getting to be about thirty.