News for hackers. Stuff that matters.
Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by anyfoo on Friday September 07, 2018 @07:55PM (#17938533)
I've been using ag, the silver searcher, for a few years now. It's blazingly fast (easily searching a massive code base in single-digit seconds), automatically ignores files I almost never want to be searched (anything in .git for example), and has convenient defaults around color highlighting and showing context.

I'm more than open to add ripgrep to my collection of everyday tools, however, if there is a real benefit. Does ripgrep do anything that would replace or complement my ag usage?

Note that it may also be possible that for new users, ripgrep is the better tool, but that ag is still more than good enough if you already based workflows and habits around it.

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by burntsushi on Friday September 07, 2018 @08:02PM (#17938577)
ripgrep does everything you say about ag, and has much less buggy support for gitignore. It is also quite a bit faster for bigger workloads. For smaller work loads you might not notice a difference. However, ripgrep is good enough to even replace uses of grep where ag might otherwise behave sub-optimally.

Specifically, with this release, ag no longer has any major features that ripgrep doesn't have. Additionally, ripgrep gives you almost every flag found in GNU grep, and then some.

I think some of this is addressed in the README. :)

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by dfabulich on Friday September 07, 2018 @08:04PM (#17938590)
It'd be great if you'd go back and update your blog post https://blog.burntsushi.net/ripgrep/ now that so many of the "anti-pitch" bullets are fixed (and I can only assume that the numbers have changed in the last two years)
Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by burntsushi on Friday September 07, 2018 @08:06PM (#17938603)
Yeah, I have been superficially updating that post, but haven't yet for the latest release.

Updating the benchmarks is harder because of the analysis. I would need to redo almost all of it, which took weeks. The TL;DR though is that ripgrep is faster than it was then. Other tools like ag and grep have roughly remained the same.

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by icc97 on Saturday September 08, 2018 @06:27AM (#17940326)
ripgrep is simply phenomenal. The rest of my team are stuck using IDEs where they can only look at one project at a time, where as I can structure them as I want and rg over them all.
Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by dfabulich on Friday September 07, 2018 @08:02PM (#17938582)
riggrep is shockingly even faster than ag. (I couldn't believe it.) https://blog.burntsushi.net/ripgrep/

> My hope is that this article not only convinced you that rg is quite fast, but more importantly, that you found my analysis of each benchmark educational. String searching is an old problem in computer science, but there is still plenty of work left to do to advance the state of the art.

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by acdha on Friday September 07, 2018 @09:05PM (#17938801)
Just in case you were inclined discount burntsushi’s comment for [justified] pride, it’d be a mistake. I happily used ag for years but switched to ripgrep awhile back after seeing that everything worked a bit faster and better (i.e. I haven’t had to think about gitignore file parsing for at least a year). I don’t even have ag or ack installed anymore, after years of them being one of the first things I’d add to a new system.
Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by andy128k on Friday September 07, 2018 @08:04PM (#17938588)
I also use ag for years. Recently I tried to use rg and found it is even faster than ag. Few times I compared results and somehow ag skipped few files but rg found matches.

My reflexes are still to type ag but I already want to switch to rg.

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by meowface on Friday September 07, 2018 @08:12PM (#17938627)
alias ag="rg" is what I've just started doing. Both tools are great, but rg is just better and faster, while also not missing anything that ag has (at least from my own experience).
Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by coldtea on Saturday September 08, 2018 @08:19AM (#17940561)
rg is faster. Handles unicode better. Could never get ag and others to fully respect .gitignore files properly either (had to specially craft dedicated rules for edge cases), this does it out of the box.

Plus, I like the regular updates and that you can also use parts of it (regex engine etc) as libraries for your own Rust programs.

Re:Ripgrep 0.10.0 released (PCRE2 and multi-line support) by loeg on Friday September 07, 2018 @10:15PM (#17939019)
I have also been a long-time ag user (including submitting some patches) and transitioned to rg with little effort. Both tools are great and I use them more or less interchangeably.