I’m not sure this page loaded properly for me, half of it is arbitrary punctuation characters assembled in bizarre nonsensical ways.
Unusual Raku Features
41–50 of 166 posts
Re: Unusual Raku Features
#42Earlier quoted context omitted.
> The detecting of increments has been in Perl for ages so that's not new. But this is detecting that the increment is multiplicative, rather than additive. It might seem like a natural next step, but, for example, I somewhat suspect (and definitely hope) that Raku wouldn't know that `(1, 1, 2...*)` is a (shifted) list of Fibonacci numbers.
Ah, I missed that. Nevertheless it's been in Perl6 for a while! You're safe WRT Fibonacci. > Unable to deduce arithmetic or geometric sequence from: 1,1,2
$ raku -e 'say (1, 1, *+* ... *)[0..10]'
(1 1 2 3 5 8 13 21 34 55 89)Re: Unusual Raku Features
#43> (2,4,8...*)[17] 262144 This one genuinely surprised me
very cohesive, [7] > (1,3,9...*)[4,5] (81 243) [8] > (1,3,9...*)[(1..3)] (3 9 27) and nestable [0] > (1,2,4...*)[(1,2,4...*)[1,2,3]]
Re: Unusual Raku Features
#44Wow. Sign me up for leaving the industry before I ever have to maintain a Raku codebase.
You can see that in Raku's ability to define keyword arguments with a shorthand (e.g. :global(:$g)' as well as assuming a value of 'True', so you can just call match(/foo/, :g) to get a global regex match). Perl has tons of this stuff too, all aimed at making the language quicker and more fun to write, but less readable for beginners.
Re: Unusual Raku Features
#45It is absolutely mindbending to me that all of this language development has happened on top of Perl, of all things.
> It is absolutely mindbending to me that all of this language development has happened on top of Perl, of all things. Why "of all things?" The Perl philosophy of TIMTOWTDI, and Wall's interest in human-language constructs and the ways that they could influence programming-language constructs, seem to make its successor an obvious home for experiments like this.
Re: Unusual Raku Features
#46Wow. Sign me up for leaving the industry before I ever have to maintain a Raku codebase.
Same as Perl, nobody wants to maintain it, but it's extremely fun to write. It has a lot of expression. You can see that in Raku's ability to define keyword arguments with a shorthand (e.g. :global(:$g)' as well as assuming a value of 'True', so you can just call match(/foo/, :g) to get a global regex match). Perl has tons of this stuff too, all aimed at making the language quicker and more fun to write, but less rea…
Yes its nice to write dense fancy code, however, something very boring to write like PHP is a lot of "loop over this bucket and do something with the fish in the bucket, afterwards, take the bucket and throw it into the bucket pile" that mirrors a 'human follows these steps' type.
Re: Unusual Raku Features
#47Re: Unusual Raku Features
#48"templated-regular-expression" on npm, GitHub: https://github.com/tolmasky/templated-regular-expression
To be clear, programming languages should just have actual parsers and you shouldn't use regular expressions for parsers. But if you ARE going to use a regular expression, man is it nice to break it up into smaller pieces.
Re: Unusual Raku Features
#49I got the title confused for "Roku".