A script to sum all the numbers on stdin (one per line): #!/usr/bin/env ruby puts STDIN.each_line.map(&:to_i).reduce(:+)
-
-
-
@recursecenter@nelhage It's a hollow life that has no time for shell golf.
End of conversation
New conversation -
-
-
@patrickc@recursecenter Oh god I swear we already golfed this one to death on Slack. I think I even learned dc(1) to this end. -
@nelhage@recursecenter I was thinking about dc but I couldn't see an obvious short answer... - 11 more replies
New conversation -
-
This Tweet is unavailable.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.