Design Element
Comment on "TextMate Math Bundle Basics"
by Scott — Dec 22
Hmmm, slick native editor I spend all day in or a big hulking spreadsheet app that eats up a ton of memory and has little value to me. Is this a trick question? :)

Just how old is your system? Excel launches a lot faster on my MacBook than it would take me to hunt through the Math Bundle, Google for a Ruby one-liner, option-click click-n-drag across unwanted text columns, delete unneeded line endings... etc. In fact, one of the issues I've always had with text editors is that they quickly blimp up to include features that have nothing to do with text editing (c.f. emacs and vim). To me the Mac approach has always been lots of different apps working in concert rather than the monolithic you-should-never-need-to-leave-this-app approach that so many Windows apps take.

I don't quite follow. The Ruby code is shorter from what I see... Maybe I missed your point?

I was referring to the full Ruby code that made up the command, which also includes this:

print " = " + $\b([0-9]+(?:\. [0-9]+)?)\b/).inject(0.0) { |t,s| t + s[0].to_f() }.to_s.sub(/.0+\z/, '')

My one liner replaced everything right down to the "ls -lF". Also fyi, I forgot a trailing "g" in my substitution (right before the "; print") which is necessary if the total is >= 1,000,000.
Back to "TextMate Math Bundle Basics"
Design Element

Copyright © Scott Stevenson 2004-2015