News for hackers. Stuff that matters.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by Zak on Tuesday January 15, 2008 @01:41AM (#98585)
Let me see if I can translate that in to Ruby. Note that the expression isn't closed, so I'm changing it to:

  (each c (dedup (map downcase (trues [uvar _ topcolor] (keys profs*))))
    (do-stuff-with c))
which I think translates roughly to:

  keys(profs*).find_all{|prof| uvar(prof, topcolor)}.map(lambda {|str| str.downcase}).uniq.each do |c|
    do_stuff_with(c)
  end
This could be slightly off, as I'm having to guess at what some of this stuff does. It's almost as dense and no more readable.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by paul on Wednesday January 16, 2008 @12:26AM (#99102)
For me, your ruby version is more readable because the order is more sequential (like a pipeline). The arc version has to be read from the inside-out, vs left-to-right in ruby.
Re:Ask YC: Ruby and Lisp devs, please answer this (Not a fla... by brlewis on Wednesday January 16, 2008 @10:15AM (#99258)
I always read s-expressions left-to-right. The outer expression tells you what you're getting. I usually don't have to go very far in before I know what the code is intended to do.