News for hackers. Stuff that matters.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by darrenf on Thursday November 02, 2023 @06:46AM (#38111576)
The 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.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.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by mkl on Thursday November 02, 2023 @06:56AM (#38111663)
Yes, I'm mainly complaining at the choice of examples, which don't seem to back up the claim of being "rg on steroids" at all.

Typing § is not very easy on most keyboards, and is actually impossible on some keyboard-OS combinations (including mine): https://en.wikipedia.org/wiki/Section_sign#Keyboard_entry

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by 2colours on Thursday November 02, 2023 @08:38AM (#38112673)
Some diversity doesn't hurt, though. On my keyboard, it's actually easier to type than the backslash for starters.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by switch007 on Thursday November 02, 2023 @07:11AM (#38111764)
> §string

> If the pattern starts with §,

Is it April 1st already?!

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by ta8645 on Thursday November 02, 2023 @09:41AM (#38113386)
Raku embraces Unicode in a big way, and probably influenced this decision.

I wonder if keyboards in the future will settle on a way to provide access to more characters, than is currently common.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by throwawaaarrgh on Thursday November 02, 2023 @11:02AM (#38114463)
Fwiw, § is ASCII code 167, the "Section symbol". Long been used as a record separator and section marker.

I agree the keyboard thing is really annoying. Maybe the West should investigate the efforts China has put into different typing systems.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by burntsushi on Thursday November 02, 2023 @11:10AM (#38114594)
That's not correct. ASCII has only 128 codepoints and its maximum value is 127 or 0x7F. Code 167 is not part of ASCII. You're probably thinking of ISO 8859-1.

U+00A7 (codepoint 167) is also the Unicode codepoint for §. Its use on this very web page is via Unicode and the UTF-8 encoding as the bytes \xC2\xA7.

(This is meant as a narrow correction. It doesn't really change the broader point that § is not exactly easy to type on most keyboards. Whether its ASCII or not.)

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by throwawaaarrgh on Thursday November 02, 2023 @11:22AM (#38114777)
Sorry, you're right. I guess I meant 8859-1 as opposed to Windows codepages or Unicode-exclusive. My Western bias is showing as I don't know if there are old locales that wouldn't have it that would affect any international users, but I assume not?
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by lizmat on Monday November 06, 2023 @06:24AM (#38161151)
FWIW, on some MacBook Pro keyboards, the § is right next to 1:

https://keyshorts.com/blogs/blog/37615873-how-to-identify-ma...