6 ms·
It's not clear from the README what advantages it offers over ripgrep.
by erezsh 3y ago
It's not clear from the README what advantages it offers over ripgrep.
- SPBS 3y agoIt's not clear from the README how even to install it, likely just an exploration of writing file searcher in Raku and not a serious attempt at replacing grep/find/ack/ag/rg.
- frou_dh 3y agoIt was introduced at a Raku Conf presentation. I remember watching it. https://conf.raku.org/talk/174 https://conf.raku.org/talk/174 https://dev.to/lizmat/its-time-to-rak-part-1-30ji https://dev.to/lizmat/its-time-to-rak-part-1-30ji
- imjonse 3y agoWhile ripgrep is also 21st century, it's not on steroids. /s
- kreetx 3y agoI would go as far as to say that steroids are not a good idea most of the time anyway. :)
- Lio 3y agoDepends on what you use them for. I squirt them up my nose to deal with dust allergies. Steroids work great! (...I am somewhat disappointed that I don't have a ridiculously buff nose by now but at least it matches the rest of my body).
- pwdisswordfishc 3y ago> /s Thanks, I wouldn't have been able to tell otherwise.
- undebuggable 3y ago> ripgrep Whait what's that? I'm stuck with ag and {a..z}grep.
- cies 3y agoBurntSushi (dev) built a grep replacement, `rg` (ripgrep), in Rust, that tends to run circles in terms of speed around grep itself and other grep replacements. The UX is also pretty nice. I install it everywhere now. I'm curious (like others here) how `rak` is better than `rg`. https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep
- GuB-42 3y agoIt is "better" in the sense that it uses Raku regexes, which are incredibly powerful, and if that's not enough for you, you can even write code. "rak" is giving you a general-purpose programming language (Raku) that is optimized for text processing, with convenient shortcuts for the most common tasks. In contrast "rg" only designed to search text files, but it does that really really fast. I makes sense to have both.
- tialaramex 3y agoIt definitely makes sense to have this tool if you're comfortable writing Raku. I'm not sure it makes a whole lot of sense for most people to learn Raku to use this tool, and if you're not going to learn Raku I don't think there's much value add over tools like ripgrep.
- librasteve 3y agoin a strange way I both agree and disagree with this: + I use raku a lot so it is very natural to embed raku code in a Rak CLI - I think that there a several benefits of the Rak tool that vanilla grep (or ripgrep) does not offer (eg. embedding code snippets in the expression, unicode, better regex syntax) that would probably make it worthwhile to learn the Rak examples while not having to bother with wider raku
- mkl 3y agoThe README seems to make it clear that increased finger exercise is an advantage (steroids are used for increasing muscle mass, after all). Instead of just typing rg '\bfoo\b' you get to type rak '/ << foo >> /' and instead of just typing rg -B2 -A2 foo or rg -C2 foo you get to type rak foo --before=2 --after=2 (over double the characters!) and instead of just typing rg 'foo.*bar|bar.*foo' you get to type rak '{.contains("foo") && .contains("bar")}' which has double the characters and also has the advantage of writing each pattern only once. Okay, I haven't actually tried it (and the README doesn't say how to), and rak does have a bunch of features and capabilities ripgrep doesn't have, but those first examples are not very inspiring after the big initial claim.
- sshine 3y agorg -B2 -A2 foo can be written as rg -C2 foo although this does not underline your point as much.
- darrenf 3y agoThe examples are all undeniably verbose, but the source shows that many short options are also supported, specifically to copy those you would expect if migrating from the alternatives: https://github.com/lizmat/App-Rak/blob/main/lib/App/Rak.rakumod#L31 https://github.com/lizmat/App-Rak/blob/main/lib/App/Rak.raku... So rak -C2 foo will do what you expect. [Edited to add] Also, the `\b...\b` form is shorter with rak - as the README also states where it documents this pattern form: > §string > If the pattern starts with §, then it indicates that the string should occur as a word (with word-boundaris on both ends) in the item. Basically a shortcut to specifying string --type=words. Any --smartcase, --smartmark, --ignorecase or --ignoremark arguments will be honoured.