Ruby Rogues Text Processing Podcast
Wherein I steal quotes from a Ruby Rogues Podcast starring Rob Miller, author of Text Processing with Ruby. I just purchased his book and can’t wait to apply concepts to a data set from the Bureau of Labor Staticsics I’m interested in.
Ruby Is Perl with Taste
At one point while talking about Ruby’s Perl Origins, Rob quips:
Yeah, Ruby is Perl with taste, isn’t it?
Perl started as a way to glue together text processing tools that come with Unix (sed, awk, grep, etc). Its origins as a tool for processing text (as opposed to say accounting systems) are reflected in its design. Perl emphasizes expressiveness and feels more like a human language than an algebra (Haskell). Perl detractors sometimes point to this as a problem. If there is more than one way to say it, everybody WILL say it a different way, resulting in unmaintainable code only readable by its author. Ruby improves on Perl Babel with an opinionated philosophy: “While there’s more than one way to say it, there is also a Right Way to say it”.
Data Exploration: A Ruby core competency
Ruby existed for over 12 years before Rails even existed. … if you look at Ruby’s Perl heritage as well … Ruby was a general purpose programming language with a huge emphasis on text processing in a general kind of day-to-day ad hoc stuff for longer than it has been a language that is viewed as primarily centered around web development
From Ad Hoc to Production. And Beyond!
Later one of the hosts summarized something that I have come to really appreciate about Ruby:
Yeah, that’s beautiful. So Ruby scales in that way. It scales from the exploratory, just quick one-off command line into a production program gradually and then it’s a re-factor, not a re-write.
Some other fun tidbits:
ruby -ine *
FIXME do something useful with this:- –i is the modify
- -n
- -e to change all of the source code in
https://github.com/solnic/transproc - apply this somwhere.
https://devchat.tv/ruby-rogues/235-rr-processing-textual-data-with-ruby-with-rob-miller
https://tinyletter.com/data-is-plural - lots of interesting data sets