What's interesting is that ripgrep now also powers VS Code search with a Node.js wrapper. https://www.npmjs.com/package/@vscode/ripgrep
Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
101–110 of 198 posts
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#102Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#103Earlier quoted context omitted.
I tested this on a large repo in 2016 when I installed several tools (including rg and ag) to compare speed. I don't have the metrics anymore, but the results were pretty clear then. According to the benchmarks from the OP, git grep is pretty comparable to rg in a large git repo. I guess different benchmarks give slightly different results, but the OP acknowledges that git grep is very fast. Bonus is that it comes pr…
Author of ripgrep here. It really just depends. The way I like to characterize `git grep` (at present) is that it has sharp performance cliffs. ripgrep has them too, to be sure, but I think it has fewer of them. If you're just searching for a simple literal, `git grep` is decently fast: $ git remote -v origin git@github.com:torvalds/linux (fetch) origin git@github.com:torvalds/linux (push) $ git rev-parse HEAD f1fcba…
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#104Earlier quoted context omitted.
I hadn't heard of this before. Thanks!
Add one or a few drops of water to your roasted coffee beans with your hand and shake well after weighing it out to stop the grinds from sticking to the walls of your grinder from static.
> Add one or a few drops of water to your roasted coffee beans
Ah, RDT (Ross Droplet Technique)[0].
A little atomizer (“spritz” bottle) of plain water serves well here. NB: this is for single-dose grinding - e.g. measuring a small amount of beans loaded into a grinder to grind immediately. If you have a grinder with a “big” hopper on top that has (e.g.) the weeks worth of coffee (even though you grind on-demand for ea. espresso/french press/aeropress/pourover/drip/…) this isn’t for you.
[0] https://thebasicbarista.com/en-us/blogs/topics/how-rdt-broke...
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#105It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#106Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#107What are the reasons for grep not being replaced/improved? This topic seems a bit old by now.
ripgrep is a specialist, opinionated tool, designed primarily to search through source code repositories.
There's not much you can add to general purpose text search to make it faster; you can make it use mmap() at the risk of it crashing on truncated files, you can reduce the expressiveness of regular expressions so they can be computed faster. You could throw out general support for all locales and charsets and hardcode support for only UTF-8 / UTF-16, but you shouldn't.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#108I switched from from ripgrep to ugrep and never looked back. It's just as fast, but also comes with fuzzy matching (which is super useful), a TUI (useful for code reviews), and can also search in PDFs, archives, etc. The optional Google search syntax also very convenient. https://ugrep.com
I think the killer feature is compatibility with existing grep command line switches. Not needing to learn a whole new set of options is quite nice.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#109It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
Vim is almost broken for me without fzf+rg. Feels like I’m manually grinding coffee instead of using electricity.
Re: Ripgrep is faster than grep, ag, Git grep, ucg, pt, sift (2016)
#110It's fast indeed. And I can't help keeping promoting the combination with fzf :) For those who want to try it out, this is a Powershell function but the same principle applies in any shell. Does ripgrep then puts fuzzy searching in the resulting files+text on top while showing context in bat: function frg { $result = rg --ignore-case --color=always --line-number --no-heading @Args | fzf --ansi ` --color 'hl:-1:underl…
With fzf you can add lots of files to git while skipping some if you want: fza = "!git ls-files -m -o --exclude-standard | fzf -m --print0 | xargs -0 git add" With that in the [alias] section of a gitconfig file, running git fza brings up a list of modified and not yet added files, space toggles each entry and moves to the next entry. That alias as well as fzf+fd really speed up some parts of my workflow. Oh and sham…
git ls-files -m -o --exclude-standard | fzf -m --print0 --preview "git diff {1}" | ....
And that's just the start: it could even be that by binding a key to the fzf reload command to then display the diff in it's finder, and in turn a key to stage the selected line, you could turn that into an interactive git staging tool.