News for hackers. Stuff that matters.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by librasteve on Thursday November 02, 2023 @07:08PM (#38121706)
in 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
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by burntsushi on Thursday November 02, 2023 @07:16PM (#38121787)
What Unicode support does Rak (or Raku) have that ripgrep does not?
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by lizmat on Thursday November 02, 2023 @07:52PM (#38122083)
- Support for NFG (Normalization Form Grapheme), which e.g. means that you only need to specify 'é' if you want to look for an 'é', and not have to worry about whether the text you're searching in, consists of the single codepoint 'é', or that it has the decomposed version.

- support for --ignoremark, which means you 'e' will match any accented 'e', such as éëêèęėē.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by burntsushi on Thursday November 02, 2023 @07:58PM (#38122155)
Ah yeah that's a good one! It does very likely have enormous implications for performance though. I wonder if I should add it as an opt-in feature to ripgrep. Although its support will be inherently limited in some capacity since character classes will always be limited to matching a single codepoint. (i.e., No UTS#18 Level 2 support.)

Have you found folks using these particular Unicode features in practice? I don't think anyone has request it for ripgrep.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by lizmat on Friday November 03, 2023 @05:15AM (#38126251)
> It does very likely have enormous implications for performance though.

Well, but that's only one of the reasons why rak is a lot slower. There's something else going on, but I currently don't have the mindset to investigate this deeply.