Live data from Hacker News

“You meant to install ripgrep”

crates.io

81–90 of 165 posts

Re: “You meant to install ripgrep”

#81

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?

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.

because it suits the pragmatic 90% case and not some "what if" scenario. It has quite adequately outlined what files it does search and also how to overcome the defaults. If you use CLI you can use --help as well and get the other options.

Re: “You meant to install ripgrep”

#83

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

I wouldn't sign off on this personally. It makes auditing harder. You see `cargo install rg` somewhere, but you also see that `cargo install ripgrep` is what's listed in ripgrep's README. So now you wonder, is `cargo install rg` correct? Then maybe ripgrep has to add a note about this to the README, and maybe you see it, maybe you don't.

Better to just make `cargo install rg` fail so that it never worked in the first place. `cargo install ripgrep` is also more self-describing and gives you a better search engine query.

Re: “You meant to install ripgrep”

#84
post #15

I maintain a Python package that parks names like this. There's a Python library called pypi-parker[0] that makes it really easy to do this via CI. [0]: https://pypi.org/project/pypi-parker/

For what it's worth: using a tool like pypi-parker technically violates PEP 541[1], since it uploads projects with no functionality solely to reserve parts of the namespace. You may or may not get away with using it, depending on how you use it, but PyPI's admins (who I do not speak for) would be within their enumerated rights to ban any account that uses it to squat names. [1]: https://peps.python.org/pep-0541/#inva…

Thanks for flagging this, I was unaware! I agree with your assessment; I just hope that this is considered to not be in breach of the spirit of the PEP. It seems like the PEP intended to disallow squatting in terms of pre-emptively reserving and hogging names, the way domain squatters do it. So hopefully typosquatting prevention for the sake of security is considered fine by the admins; especially since our project was designated a 'critical project' and stricter security measures apply to our maintainers.

Re: “You meant to install ripgrep”

#85
post #6
post #4

Is there no way to have a package mirror, or alias or something? Unless I'm missing a joke or something, this seems like an easily solvable problem.

I think you would rather have explicitly named dependencies. I don't want a bunch of aliased dependencies redirecting to wherever

I'm the same, I'd rather it be broken so I can figure out what's going on rather than bounced around all over the place.

Re: “You meant to install ripgrep”

#86
post #73

Earlier quoted context omitted.

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…

I love that ripgrep honors .gitignore, but the fact that it skips hidden files is annoying because of questionable decisions from tool makers who insist their configuration files should be hidden files. It is especially infuriating when working with GitHub and GitLab configuration directories. On the other hand I never want ripgrep to enter the .git directory. I recently came up with this alias to make ripgrep do wha…

Yeah that alias is a good one, here are some other avenues:

* The repo can add a `.ignore` or a `.rgignore` whitelisting things like `.github`. ripgrep will pick up that whitelist automatically and search `.github` even though it's hidden. But this relies on the repo adding ripgrep-specific config files, which is maybe not so realistic. (Or not universal enough to rely upon.) But it could work fine for repos under your control.

* Add '!.github/' to, e.g., `~/.config/ripgrep/ignore`, and then add `alias rg="--ignore-file ~/.config/ripgrep/ignore"`. That will become a global ignore file (with low precedent) that will whitelist `.github` everywhere.

Re: “You meant to install ripgrep”

#87
post #44

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.)

I use ripgrep on git bash for Windows, and my team members act like I’ve got searching superpowers. Searching on windows is such a pain and this makes it easy. Thanks so much for making this fantastic tool!

doesn't vscode use ripgrep under the hood when you search your open files/repos?

Re: “You meant to install ripgrep”

#88
post #11

Similar in the Python world: https://pypi.org/project/sklearn/ This one just depends on the correct `scikit-learn` package though.

Same for: https://pypi.org/project/pytorch/

> You tried to install “pytorch”. The package named for PyTorch is “torch”

Re: “You meant to install ripgrep”

#89
post #42

Wow, it's been years now since I typed "sl" at a terminal and got an ascii steam locomotive.

A friend of mine in college installed this on my laptop when I had my back turned. For a month or so, I wondered why anyone thought this feature was a good idea, and why no one I knew who used MacOS seemed to complain about it.
Post reply on HN