News for hackers. Stuff that matters.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by fastball on Thursday November 02, 2023 @03:21AM (#38110009)
This is my first time hearing about Raku (the language this tool is apparently written in), and after a quick look at the website[1], I am not sure why I would want to use Raku vs any other language in particular.

According to the guide[2]:

> Raku is a high-level, general-purpose, gradually typed language. Raku is multi-paradigmatic. It supports Procedural, Object Oriented, and Functional programming.

That really doesn't tell me enough. Anyone else have any idea why I might want to use Raku vs one of the many other langs to which those adjectives can be applied?

[1] https://docs.raku.org/

[2] https://raku.guide/#_what_is_raku

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by adr1an on Thursday November 02, 2023 @03:32AM (#38110071)
RegEx probably, since raku is perl 6 afaik.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by dartos on Thursday November 02, 2023 @03:35AM (#38110095)
Yeah it’s basically a language purpose made for matching text
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by gmueckl on Thursday November 02, 2023 @06:28AM (#38111425)
It has evolved to be much, much more. It is a somewhat pragmatic, powerful, malleable multi-paradigm language that can be (has been) applied to many use cases beyond text processing. I am only vaguely familiar with the language, but I'm often impressed by examples of it's power and expressiveness.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by PhilipRoman on Thursday November 02, 2023 @03:54AM (#38110220)
Raku is a Perl descendant so it's goals are the same as Perl's (for the most part). From what I've seen it is supposed to be a terse language for rapid prototyping, it has syntax support for a lot of common idioms (and of course since it came from Perl you can expect some of the best pattern matching support in the world). For me the performance is a dealbreaker, but otherwise it looks pretty good.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by melezhik on Monday November 06, 2023 @10:13AM (#38163662)
The are lot of tasks that don’t require performance, so if you are not going to write embedded / real-time system - you should be fine
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by nsrahmad on Thursday November 02, 2023 @04:02AM (#38110292)
I really like this post about Raku: "Raku : A Language for Gremlins" https://buttondown.email/hillelwayne/archive/raku-a-language...
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by msla on Thursday November 02, 2023 @07:35AM (#38111966)
A good bit of Raku looks like a language construction kit: Build your own little language, using Raku as a huge bag of tools.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by pizzalife on Thursday November 02, 2023 @12:09PM (#38115618)
Wow, that looks absolutely horrible.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by kristopolous on Thursday November 02, 2023 @04:06AM (#38110323)
raku is perl 6, it's just called "raku" now.

Given that, it's 23 years old and done by Larry Wall so it's not exactly yet another fly-by-night hype language, just something that is not in the top 50.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by lloeki on Thursday November 02, 2023 @04:43AM (#38110600)
> raku is perl 6

It used to be, but not anymore.

It has grown to be its own thing with some happenstance parenthood through being born from an early attempt at Perl 6, and thus is now only being slightly more related to Perl than e.g Ruby is. Ok I'm pushing it but you get the idea: taking a biological analogy, it has mutated away far enough that it is now considered to be its own strain.

And if that helps clear some doubts, Perl 7 is on the table (if there ever needs to be a Perl 7):

    At some point in the future, the PSC may decide that the set of features, taken together, represent a big enough step forward to justify a new baseline for Perl. If that happens, then the version will be bumped to 7.0.
https://blogs.perl.org/users/psc/2022/05/what-happened-to-pe...

So Raku cannot be Perl 6!

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by kristopolous on Thursday November 02, 2023 @04:46AM (#38110620)
Well right, "perl 6" quickly became a bad name for the project - they should have switched to something like "raku" maybe 20 years ago.

Given that, nobody got the memo, so calling it "perl 6" is still a very fast way to orient people as to what it's a neighbor of.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by cduzz on Thursday November 02, 2023 @07:54AM (#38112210)
It's what happens when Larry Wall says "Hold My Beer" to ruby?
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by 2colours on Thursday November 02, 2023 @08:25AM (#38112537)
Maybe a fast way but is it a fair or even helpful way, if you recognize that it "quickly became a bad name for the project"?
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by topaz0 on Thursday November 02, 2023 @09:21AM (#38113144)
It is helpful for people who were paying attention to the perl community with any passing interest at any time in the past 20 years. It is not helpful for people who weren't. But the former describes a lot of people here.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by kristopolous on Thursday November 02, 2023 @07:05PM (#38121663)
Absolutely! In the same way that saying the "Dugong Dugon" is a type of fish even though it's technically a Sirenia.

Here, "some swimming creature" is the totality of the objective, we aren't trying to do a crash course in marine zoology or trying to explain what a Sirenia is or what a fish technically means.

Saying it's perl-6 means that it's not say, lisp-like or some kind of prolog or haskell. It's a relatively swift approximation and that's the totality of the objective.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by LukeShu on Thursday November 02, 2023 @08:30AM (#38112572)
It was Perl 6 from 2000 to 2019. It spent much more time as perl6 than it has as not-perl6.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by j16sdiz on Thursday November 02, 2023 @11:32AM (#38114955)
No. Pug was the Perl 6 until rakudo took over. Raku was not until rakudo.
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by benj111 on Thursday November 02, 2023 @01:25PM (#38116998)
I don't think the mutation analogy really works.

C of 40 years ago is nothing like modern c.

Same for basic.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by kristopolous on Sunday November 05, 2023 @05:56PM (#38156571)
I just found out recently that many k&r c'isms are actually obsoleted as in will break the compiler.

    int foo(s, f)
     char* s;
     float f;
    { ... }
That notably is now broken as per C 2X
Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by msla on Thursday November 02, 2023 @04:09AM (#38110352)
The big thing Raku offers is grammars as a built-in language feature:

https://docs.raku.org/language/grammar_tutorial

> Regular expressions (Regexes) work well for finding patterns in strings. However, for some tasks, like finding multiple patterns at once, or combining patterns, or testing for patterns that may surround strings regular expressions, alone, are not enough.

> When working with HTML, you could define a grammar to recognize HTML tags, both the opening and closing elements, and the text in between. You could then organize these elements into data structures, such as arrays or hashes.

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by zokier on Thursday November 02, 2023 @04:25AM (#38110476)
To me the first adjectives that come to mind for Raku are quirky and clever. I feel it can be extremely expressive at times, with really good happy path. It is at the same time anti-blub but also steers away from academic ivory towers, instead it is very much hacker/power-user oriented.

(disclaimer: I don't actually know Raku that well, but it is very high on my list of languages to learn)

Re:App: Rak – 21st century grep / find / ack / ag / rg on st... by melezhik on Monday November 06, 2023 @10:11AM (#38163637)
Because it provides one with a lot of flexibility out of the box while not forcing you into a specific programming style and without any additional overhead or costs …

OOP, functional programming, strong/dynamic typing, declarative /imperative - you’ve got it, we got you covered