Live data from Hacker News

“You meant to install ripgrep”

crates.io

61–70 of 165 posts

Re: “You meant to install ripgrep”

#61
post #55

Earlier quoted context omitted.

A file searcher akin to grep, ack, or ag (aka the silver searcher) it's programmed in Rust so it is decently fast with good support for UTF-8. Unfortunately it defaults to parsing a git tree's gitignore file and skipping over files listed in it.

> it defaults to parsing a git tree's gitignore file and skipping over files listed in it Is that true? How could anybody think that this non-orthogonal monstrosity would make any sense?

Because you hardly ever want to grep through your build artifacts or node modules? I don’t remember any one time I had to explicitly tell ripgrep to search through all the files in a repository

Re: “You meant to install ripgrep”

#62
post #55

Earlier quoted context omitted.

A file searcher akin to grep, ack, or ag (aka the silver searcher) it's programmed in Rust so it is decently fast with good support for UTF-8. Unfortunately it defaults to parsing a git tree's gitignore file and skipping over files listed in it.

> it defaults to parsing a git tree's gitignore file and skipping over files listed in it Is that true? How could anybody think that this non-orthogonal monstrosity would make any sense?

It's the correct default for me. I don't want to grep heinous output files by default, like my gigabytes of generated KML files. I appreciate that rg (and ag) ignores those files by default, and 90% of the people I show it to agree.

Re: “You meant to install ripgrep”

#63

Earlier quoted context omitted.

Right. So then you add burnsushi/ripgrep instead. See the problem? Namespaces are a solution or mitigation to some problem, but that problem is not malicious typo-squatting.

>See the problem? The only problem I see is that I don't know who owns ripgrep, so sticking some random name in front of it only adds to my confusion.

Yes. And the "random name" can be typo-squatted too. Compare burnsushi and burntsushi. I myself make that typo on occasion. :)

Re: “You meant to install ripgrep”

#64

Earlier quoted context omitted.

> it defaults to parsing a git tree's gitignore file and skipping over files listed in it Is that true? How could anybody think that this non-orthogonal monstrosity would make any sense?

Because you hardly ever want to grep through your build artifacts or node modules? I don’t remember any one time I had to explicitly tell ripgrep to search through all the files in a repository

Ah, someone who hasn't experienced the... experience of working on a project that does very esoteric autotools magic.

I will agree that in a sane project setup you don't need to search through all files including build artifacts ignored by git.

Re: “You meant to install ripgrep”

#65
post #55
post #53

What is ripgrep? Edit: Because I'm on a Zoom call that will never end. "ripgrep is a line-oriented search tool that recursively searches the current directory for a regex pattern. By default, ripgrep will respect gitignore rules and automatically skip hidden files/directories and binary files." https://github.com/BurntSushi/ripgrep

A file searcher akin to grep, ack, or ag (aka the silver searcher) it's programmed in Rust so it is decently fast with good support for UTF-8. Unfortunately it defaults to parsing a git tree's gitignore file and skipping over files listed in it.

It also defaults to ignoring hidden and binary files. It's also simultaneously the thing folks cite as their favorite part about ripgrep.

The idea behind it is that it acts a heuristic for reducing false positives from your search results. For example, ripgrep replaced several little grep wrapper scripts I had in ~/bin.

And fortunately the default behavior is easy to disable. `rg -uuu foo` will search the same stuff as `grep -r foo ./`, but will do it faster.

Re: “You meant to install ripgrep”

#66

Hah! TIL. I had no idea someone did this. But it's smart. I should have thought of it! (I'm the author of ripgrep.)

`ripgrep` is my favorite of the "new" linux utilities, it makes searching for a single string across all of my cloned repos extremely easy, and especially for diving into multiple versions of vendored dependencies.

Re: “You meant to install ripgrep”

#68
post #55

Earlier quoted context omitted.

A file searcher akin to grep, ack, or ag (aka the silver searcher) it's programmed in Rust so it is decently fast with good support for UTF-8. Unfortunately it defaults to parsing a git tree's gitignore file and skipping over files listed in it.

> it defaults to parsing a git tree's gitignore file and skipping over files listed in it Is that true? How could anybody think that this non-orthogonal monstrosity would make any sense?

That monstrosity is easily one of the two most popular reasons cited by folks as being the reason why they use/like ripgrep. (With the other reason being performance.)

Orthogality is a means to an end, not an end itself.

Re: “You meant to install ripgrep”

#69

Why not just add ripgrep as a dependency, effectively making it an alias of the original package?

Maybe it's only for me, but I've never liked this of too-smart solutions.

Let people do the mistakes once and learn the correct package name, instead of relying on a hack and potentially introduce confusion later.

Re: “You meant to install ripgrep”

#70

Earlier quoted context omitted.

Right. So then you add burnsushi/ripgrep instead. See the problem? Namespaces are a solution or mitigation to some problem, but that problem is not malicious typo-squatting.

>See the problem? The only problem I see is that I don't know who owns ripgrep, so sticking some random name in front of it only adds to my confusion.

yup! And what if i reserve ripgrep/ripgrep as a typosquat, while the real one is burntsushi/ripgrep?
Post reply on HN