Monday, June 06, 2011

Installing ack with Macports

Macports is awesome. Also, ack is awesome. ack is made to replace 99% of the use-cases of grep, and it's customizable with an runtime configuration too (~/.ackrc). To install one awesome thing with another awesome thing:

user@host $ sudo port install p5-app-ack

Not a very intuitive name for ack, but this is the naming convention for CPAN modules on Macports.

I was having a spot of trouble finding the package name for ack (port search ack returns way too many results to be meaningful, thank goodness for Google), and came across this blog post that complains about Macports deciding as soon as you want to install ack that the stock perl in OS X isn't good enough, and summarily takes over your computer by downloading and installing a more recent perl on your box.

This made me think. That's not nice.

But then I thought some more, and I decided, no, that is nice. In fact, it's awesome.

OS X ships once every couple of years (which is considered a pretty sprightly clip in the world of operating systems) and stock installations of OS X ship with obsolete versions of perl for the majority of the product's life-cycle.

I'm glad Macports takes over and updates my perl for me. It saves me the trouble of doing it, and worrying about dependencies. I don't want to worry about dependencies. That's why I installed Macports. If I wanted to "roll my own," I'd download tarballs and roll up my sleeves (right after I cut myself with shards of glass).

The first thing I'm going to do when I get a new Mac is install Macports. It's really so convenient.

I like to think of these package management systems as open-source App Stores, which they basically are, except you never have to pay. And to consider open source developers had mature implementations of these so many years before App Stores ever entered the mainstream.

Whatever those guys are doin', they're doin' it right.

2 comments:

Labels

About Me

My photo
Singapore
I write essays in my spare time on things that are important to me. The ones that I feel are any good, or make any sense, I put them up here. :)