Live data from Hacker News

Unusual Raku Features

buttondown.com

1–10 of 166 posts

Re: Unusual Raku Features

#4
post #2

> (2,4,8...*)[17] 262144 This one genuinely surprised me

My brain immediately reached for the word 'horrifying', with phrases 'terrible consequences' and 'halting problem' soon after, but to each their own.

Re: Unusual Raku Features

#5
post #2

> (2,4,8...*)[17] 262144 This one genuinely surprised me

The detecting of increments has been in Perl6 for ages so that's not new. [edit Perl6 not Perl)

I guess (apart from the Whatever), the laziness is new since Perl6/Raku.

Re: Unusual Raku Features

#6
> (2, 30, 4, 50).map(* + *) returns (32, 45)

Should it be `returns (32, 54)` ? i.e. 4+50 for the 2nd term.

Maybe this is a consequence (head translation) of some countries saying e.g. vierenvijftig (four and fifty) instead of the English fifty-four.

Re: Unusual Raku Features

#8

It 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

#10
post #2

> (2,4,8...*)[17] 262144 This one genuinely surprised me

The detecting of increments has been in Perl6 for ages so that's not new. [edit Perl6 not Perl) I guess (apart from the Whatever), the laziness is new since Perl6/Raku.

> 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.

Post reply on HN