ack 2.24 is released, speeds up common cases

June 21, 2018 ack No comments

I’ve just uploaded a new version of ack, version 2.24, to the CPAN and posted it to

This version of ack introduces an optimization to not search most files line-by-line until after ack has read the whole file and determined that the pattern matches in the file at all. This speeds things up quite a bit. Here are some timings in seconds for acking against the Drupal codebase. It compares ack 2.22, the just-released 2.24 and the latest beta of ack version 3:

                                    |   2.22 |   2.24 | 3 beta
          ack zqj /home/andy/drupal |   1.93 |   1.53 |   1.46
ack zqj-not-there /home/andy/drupal |   1.85 |   1.50 |   1.45
          ack foo /home/andy/drupal |   1.99 |   1.66 |   1.62
       ack foo -w /home/andy/drupal |   1.94 |   1.63 |   1.57
  ack foo\w+ -C10 /home/andy/drupal |   4.54 |   2.13 |   1.97
ack (set|get)_\w+ /home/andy/drupal |   2.01 |   1.79 |   1.79

Of course ack doesn’t have the raw speed of a tool like ripgrep, but it’s got a different feature set. See this feature comparison chart of greplike tools for details.

The best open source project for someone might not be yours, and that’s OK

January 2, 2018 ack, Open source 1 comment , , , ,

If you work on an open source project, consider helping your users by pointing them to other “competing” projects that might be better choices for them.

You may be familiar with ack, a grep-like code searching tool that I created in 2005. Over the years, a number of similar tools have come along, with the two most prominent being ag and ripgrep.  I just published a chart that compares the features of ack, ag, ripgrep, git grep and plain ol’ GNU grep.

Some might say that ag and ripgrep and any of the other tools I list on are competing projects, but I think that way of thinking is wrong.  It’s only a competition if you see it as a competition.  I’m not competing against anyone for anything: Clicks, dollars, popularity, etc. If someone uses ripgrep instead of ack, it doesn’t hurt me.  It’s the difference between an abundance vs. scarcity view of the world.  I choose abundance.  I think most of us who work in open source do, too.

When I created ack, I created a tool that was useful for me.  After a while, I figured that others might find it useful as well.  I released it publicly and people loved it.  People wrote things like “ack is certainly one of those simple pleasures of life on the command line”, and they told me it made their lives easier.  Great!  That’s why I released it.

Other people have told me “I don’t need that, I can just use standard Unix tools”.  That’s great, too, if that’s what you need.  Sometimes when they tell me that, it seems like they’re expecting me to argue or be upset.  But why would I?  It doesn’t matter to me what tool you use so long as you’re happy with it.

Now, other tools have sprung up that do grep-like things that fit different needs, and drop features their authors didn’t find necessary.  I love that there are so many tools out there.  Maybe some day someone will create a tool that fits my needs better than ack does.  If that day comes, I’ll pass ack off to someone else, and I’ll use the new tool, and I’ll love it.

If you have a project, you probably know about the other projects that exist better than anyone else.  You’re keeping an eye on similar projects to see what features they’re adding and what people are saying about them.  Now, take that knowledge and help others by sharing it with them.

It might mean that a potential user of your project uses someone else’s project, and that’s just fine if they do.  Happy users are why we should be doing this.

Do you know of other projects that do this sort of comparison chart, or otherwise help potential users learn about “competing” projects with honest comparisons?  Please let me know in the comments below, or email me at