Top
Best
New

Posted by jxmorris12 14 hours ago

Ripgrep is faster than grep, ag, git grep, ucg, pt, sift (2016)(burntsushi.net)
281 points | 121 commentspage 2
ventana 4 hours ago|
One thing I learned over the years is that the closer my setup is to the default one, the better. I tried switching to the latest and greatest replacements, such as ack or ripgrep for grep, or httpie for curl, just to always return to the default options. Often, the return was caused by a frustration of not having the new tools installed on the random server I sshed to. It's probably just me being unable to persevere in keeping my environment customized, and I'm happy to see these alternative tools evolve and work for other people.
wredcoll 4 hours ago||
This sort of thing is a constant tension and it's highly likely to be a different optimum for every individual, but it's also important not to ignore genuine improvements for the sake of comfort/familiarity.

I suspect, in general, age has a fair amount to do with it (I certainly notice it in myself) but either way I think it's worth evaluating new things every so often.

Something like rg in specific can be really tricky to evaluate because it does basically the same thing as the builtin grep, but sometimes just being faster crosses a threshold where you can use it in ways you couldn't previously.

E.g. some kind of find as you type system, if it took 1s per letter it would be genuinely unusuable but 50ms might take it over the edge so now it's an option. Stuff like that.

ozim 4 hours ago||
Story of my life basically. It is just too much effort to keep customization preserved.
evilturnip 3 hours ago||
nowgrep is supposedly even faster than ripgrep:

https://x.com/CharlieMQV/status/1972647630653227054

MrDrMcCoy 1 hour ago||
Closed-source, no-release. Why bother linking it?
temphaaa 3 hours ago|||
*on windows as the tweet says
GorbachevyChase 3 hours ago||
They discovered the nowgorithm.
groundzeros2015 5 hours ago||
That’s because it doesn’t do the same work. It’s not an equivalent tool to grep.
pipe01 12 hours ago||
(2016)
vintermann 8 hours ago|
Maybe the first rust "killer app" in retrospect.
ianberdin 10 hours ago||
It’s a pure delight to read this docs / pitch.
davikr 8 hours ago||
qgrep is faster if you're fine with indexing. worth it
staticassertion 7 hours ago|
Doesn't ripgrep support indexing too?
davikr 4 hours ago||
not yet, but Cursor is working on it.
tgtweak 4 hours ago||
codex is basically a ripgrep wrapper at this point :)
cbm-vic-20 8 hours ago||
fd:find::rg:grep

Someone please make an awesome new sed and awk.

scns 7 hours ago||
sd exists, dunno but awk.

https://github.com/chmln/sd

johnisgood 4 hours ago|||
How is GNU / BSD sed and awk not awesome?
MrDrMcCoy 1 hour ago||
Limited regex capabilities. A fast tool that does what sed and awk do with PCRE2 would be amazing.
johnisgood 16 minutes ago||
Well, I would like to tackle that but unfortunately I do not have enough time to do things for free. :(

Is there any demand for it anyway?

keybored 11 hours ago||
> The binary name for `ripgrep` is `rg`.

I don’t understand when people typeset some name in verbatim, lowercase, but then have another name for the actual command. That’s confusing to me.

Programmers are too enarmored with lower-case names. Why not Ripgrep? Then I can surmise that there might not be some program ripgrep(1) (there might be a shorter version), since using capital letters is not traditional for CLI programs.

Look at Stacked Git:

https://stacked-git.github.io/

> Stacked Git, StGit for short, is an application for managing Git commits as a stack of patches.

> ... The `stg` command line tool ...

Now, I’ve been puzzled in the past when inputing `stgit` doesn’t work. But here they call it StGit for short and the actual command is typeset in verbatim (stg(1) would have also worked).

qudat 9 hours ago||
Because we are constantly writing variables that are lowercase. Coming up with a name that is both short but immediately understandable is what we live for. Variables are our shrine, we stare at them everyday and are used to their beauty and simplicity.
Macha 10 hours ago|||
How would you capitalise it? RipGrep? RIPGrep? You’d need to pick a side and lose the pun. (And of course grep itself would need to be GReP if we took it all the way)
keybored 9 hours ago||
I wrote Ripgrep.
pentaphobe 8 hours ago||
And they wrote "... you'd need to pick a side and lose the pun.."
keybored 1 hour ago||
And I am able to read four sentences.
orf 11 hours ago|||
It’s only 2 characters - if you use it all the time it becomes muscle memory.
lpapez 11 hours ago|||
You can simply add a shell alias with whatever name you like and move on.
qsera 11 hours ago|||
True, but easier said than done, because one often need to work in more shells than their local machines..
pie_flavor 10 hours ago|||
This is a nonstandard tool. If you can't customize your machine, you already don't have it.
qsera 9 hours ago||
But it could be one day..
worksonmine 9 hours ago|||
Do something like this to fall back to plain grep. You will somehow have to share these configurations across machines though.

    alias g=grep
    command -v rg 2>&1/dev/null && alias g=rg
BiteCode_dev 10 hours ago|||
You can't in most corporate env machines.

You may be able to download ripgrep, and execute it (!), but god forbid you can create an alias in your shell in a persistant manner.

OkayPhysicist 2 hours ago|||
huh? If you can download and execute files, you can alias it. Either in your .bashrc file, or by making a symlink.
BiteCode_dev 2 hours ago||
I daily drive linux, but I hop from clients to clients and I have probably served about 200 different structures so far.

Most corporate machines are Windows boxes with ps and cmd.exe heavily restricted, no admin, and anti malware software surveilling I/O like a hawk.

You might get a git bash if you are lucky, but it's usually so slow it's completely unusable.

In one client I once tried to sneak in Clink. Flagged instantly by security and reported to HR.

It's easy to forget that life outside the HN bubble is still stuck there.

pentaphobe 8 hours ago||||
`[citation needed]`
worksonmine 9 hours ago|||
> You can't in most corporate env machines.

Really? "most" even? What CAN you do if you can't edit files in your own $HOME?

vortegne 9 hours ago||
Don't get me started on `nvim` to run neovim...
opan 5 hours ago||
This was my first thought as well. I think I end up just calling it nvim sometimes even conversationally, the binary name is the most "real" thing to me.
AdmiralAsshat 9 hours ago|
Is it still?
More comments...