News for hackers. Stuff that matters.
Re:Ack 2.0 has been released by saidajigumi on Friday April 19, 2013 @02:49PM (#5578097)
Anyone have a sense of how the new Ack 2.0 compares to The Silver Searcher[1] (aka Ag)? I've been using TSS for some time now and it's been completely awesome in both performance and functionality compared to Ack v1.

[1] https://github.com/ggreer/the_silver_searcher

Re:Ack 2.0 has been released by cpeterso on Friday April 19, 2013 @03:26PM (#5578280)
I had never heard of The Silver Searcher. Thanks! A test search of a huge codebase (Firefox) took 38 seconds with ack, but only 17 with ag! After my page cache had been warmed up, ack then took 10 seconds and ag only took 3. That said, I am using ack 1.96, not ack 2.0.

  $ brew uninstall ack
Re:Ack 2.0 has been released by petdance on Friday April 19, 2013 @03:32PM (#5578304)
It's OK to have two similar tools in your toolbox. When you need the --output option, for example, you use ack. When you want crazy speed, you use ag.

You don't have to choose one over the other. That's why I changed the name from "betterthangrep.com" to "beyondgrep.com". There's no need to have a ranking of "I use this over that."

Re:Ack 2.0 has been released by __david__ on Friday April 19, 2013 @04:17PM (#5578496)
Ah, you Perl guys and your "there's more than one way to do it". :-) Disclaimer: I'm a Perl guy and I agree.
Re:Ack 2.0 has been released by petdance on Friday April 19, 2013 @03:33PM (#5578307)
Also, take a look at http://beyondgrep.com/more-tools/. There are a dozen other tools on there as well that you might well like as much as ack and ag.

An abundance of tools is good.

Re:Ack 2.0 has been released by jdhore on Friday April 19, 2013 @04:53PM (#5578661)
I've contributed to ag and followed it quite closely. That being said, I still have ack on all my systems because sometimes, being able to just do:

ack --python search-term is REALLY useful.

Re:Ack 2.0 has been released by lloeki on Saturday April 20, 2013 @04:13AM (#5580754)
Turning things around, I often have SQL dumps around, so ack --no-sql is a real lifesaver in my Rails (i.e ruby, coffee, less, shell and whatnot) projects.
Re:Ack 2.0 has been released by masklinn on Friday April 19, 2013 @03:31PM (#5578303)
Though I've switched to ag, I still miss Ack's selection and deselection flags. Those are much sweeter than ag's -g and -G and it looks like they've improved further
Re:Ack 2.0 has been released by pyre on Saturday April 20, 2013 @04:47AM (#5580811)
As mentioned above, there's no need to have 'one search tool to rule them all.' You don't uninstall grep from your system when installing ag or ack.
Re:Ack 2.0 has been released by petdance on Saturday April 20, 2013 @08:41AM (#5581199)
> You don't uninstall grep

Beautiful. Thank you. I am stealing that for when I discuss this in other places.

Re:Ack 2.0 has been released by epmatsw on Friday April 19, 2013 @02:50PM (#5578104)
It would be interesting to see benchmarks on this. I know TSS was faster before, and this release didn't seem to highlight any performance improvements.
Re:Ack 2.0 has been released by petdance on Friday April 19, 2013 @02:58PM (#5578150)
Chances are that if there are any performance changes, it might even be a decrease in speed because of having to find .ackrc files. We haven't gone profiling 2.0 yet, but that's near the top of our list.
Re:Ack 2.0 has been released by epmatsw on Friday April 19, 2013 @03:07PM (#5578192)
That's pretty much what I figured. If we wait a bit, I wouldn't be surprised to see a writeup from Geoff, the author of Ag. His blog posts when he started development on it were really interesting.

http://geoff.greer.fm/2011/12/27/the-silver-searcher-better-...

Re:Ack 2.0 has been released by ggreer on Friday April 19, 2013 @03:26PM (#5578283)
When it comes to improving Ag's speed, there's not much more to write about. I've used every dirty trick I know: mmap()ed I/O, threads, Boyer-Moore-Horspool strstr(), PCRE-JIT, etc. Now when I profile, Ag spends the majority of its time reading files off disk. On most systems, this is true even if the files have been cached in memory by the OS. The limiting factor is memory bandwidth.

Anyways, I don't really have the time for long analysis posts these days. I'm busy working on something that captures value in addition to creating it. :)

Re:Ack 2.0 has been released by burke on Friday April 19, 2013 @02:53PM (#5578125)
No mention of mmap in the ack release notes, so I'd imagine ag is still much faster.
Re:Ack 2.0 has been released by Groxx on Friday April 19, 2013 @03:11PM (#5578211)
sounds great - thanks! I hadn't heard of this before