Live data from Hacker News

Ripgrep 15.0

github.com

81–90 of 119 posts

Re: Ripgrep 15.0

#81
post #51

rg is a tool that feels like magic. when in reality, like most things that feel like magic, it’s a result of exceptionally good engineering and dedication to improvement, and actually takes advantage of the incredible hardware we all use daily. It’s also smithing that’s unleashed the ability of agents to explore and reason about code faster than waiting for some sort of “lsp-like” standard we probably would’ve had to…

genuinely curious what smithing means in this context!

I assume it's a typo from slide-to-type on a phone keyboard.

Re: Ripgrep 15.0

#82
post #29

Earlier quoted context omitted.

Sell me on fd. I occasionally use find, mostly with the -name or -iname flags.

You don't have to type -name for the 1000th time.

Thanks.

For other people, on Ubuntu install the `fd-find` package. The executable is named `fdfind` (no dash).

Re: Ripgrep 15.0

#83

Ripgrep has saved me so, so much time over the years. It's become an invaluable tool, something I install the moment I start up a new system. It's essential for navigating older codebases. My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now. Always glad to see it kee…

> My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now. If you have an example, I can try to explain for that specific case. But `-F/--fixed-strings` will 100% turn off any regex features in the pattern and instead will be treated as a simple literal. Where you might…

ripgrep has saved me so much time, I also use it now with LLMs and remind them they have ripgrep available! I added a donation on github, thanks for all your work.

Re: Ripgrep 15.0

#84

Earlier quoted context omitted.

What do you mean? You could pass an empty pattern. But that will match everything. Maybe talk about your use case at a higher level.

Thanks for the response. I would like to use fzf with rg to search file contents with a previewer open. However when I first open fzf I don't wish to pass any argument to rg, until I start typing. Something like Telescope live_grep.

Similar to other answers. With a nasty mix of vimscript generating shell commands for fzf to use, that's how I integrated rg and fd with "fzf.vim" in my neovim.

https://github.com/bombela/fzf.vim.rgfd

Nasty, but it works hey!

Re: Ripgrep 15.0

#85
post #76
post #36

ripgrep is one of the main reasons I got interested in rust. it worked so well, it piqued my interest that it was written in rust. many years later, very glad about that. been using `rg` daily since then as well!

[flagged]

I haven’t used qbasic in years, but hacking on nibbles is why I learnt qbasic, and I’d say that experience is a decent early chunk of why I’m an AI professor now. Nothing wrong with playing with languages that feature software you love!

Re: Ripgrep 15.0

#86

Ripgrep has saved me so, so much time over the years. It's become an invaluable tool, something I install the moment I start up a new system. It's essential for navigating older codebases. My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now. Always glad to see it kee…

> My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now. If you have an example, I can try to explain for that specific case. But `-F/--fixed-strings` will 100% turn off any regex features in the pattern and instead will be treated as a simple literal. Where you might…

How about -F -regexthatlookslikeaflag? Verbatim, that errors out as the command line parsing tries to interpret it as a flag. If you don’t have -F, then you can escape the leading hyphen with a backslash in a single quoted string: '\-regex…', but then you don’t get fixed string search. And -F '\-regex…' is a fixed string search for “backslash hyphen r e g e x”. The only way is to manually escape the regex and not use -F.

I think maybe a syntax like -F=-regex would work.

Re: Ripgrep 15.0

#87
Every time I set up a new machine--work, personal, whatever--the first thing I do is set up my rust toolchain and the second is 'cargo install ripgrep'. I really enjoyed your talk at the Boston Rust meetup a few years back on finite state transducers. Thanks for these (among many more) contributions you've made both to software and my education as a programmer.

Re: Ripgrep 15.0

#88

Earlier quoted context omitted.

ag is plenty fast (gigabytes in a fraction of a second) for me - I'd switch in a heartbeat if that wasn't so. Any bugs, hm, I guess I just haven't run into them. Thanks for the reply though! I realize who replied here ;)

Look at ag's issue tracker. There are some very critical bugs. You might be impacted by them and not even know it. As for perf, it's not hard to witness a 10x improvement that you'll actually feel. On my checkout of the Linux kernel: $ (time rg -wi '\w+(PM_RESUME|LINK_REQ)') | wc -l real 0.114 user 0.547 sys 0.543 maxmem 29 MB faults 0 444 $ (time ag -wi '\w+(PM_RESUME|LINK_REQ)') | wc -l real 0.949 user 6.618 sys 0.…

been using both for many years now, have never ran into issues or even been able to tell any difference in speed, let alone 10x

what I notice unfortunatly, is that I often miss search results with rg becuase I forget I need to pass the additional -i flag. this has shaped my perception of rg - extra focus on performance, sub-optimal ux

Re: Ripgrep 15.0

#90

Earlier quoted context omitted.

> My only complaint is there are a couple of characters that the -F (treat as literal) option seems to still treat as a special character needing some kind of escape - though I don't remember which ones now. If you have an example, I can try to explain for that specific case. But `-F/--fixed-strings` will 100% turn off any regex features in the pattern and instead will be treated as a simple literal. Where you might…

How about -F -regexthatlookslikeaflag? Verbatim, that errors out as the command line parsing tries to interpret it as a flag. If you don’t have -F, then you can escape the leading hyphen with a backslash in a single quoted string: '\-regex…', but then you don’t get fixed string search. And -F '\-regex…' is a fixed string search for “backslash hyphen r e g e x”. The only way is to manually escape the regex and not use…

Yeah, that's a good call out. You would need `rg -F -e -pattern`.
Post reply on HN