Live data from Hacker News

Unusual Raku Features

buttondown.com

11–20 of 166 posts

Re: Unusual Raku Features

#11
post #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.

I believe that it only tries to DWIM with arithmetic and geometric sequences, and gives up otherwise. Of course there’s nothing keeping you from writing a module that would override infix:... in the local scope with a lookup in OEIS.

Re: Unusual Raku Features

#17

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

checked in rakudo, it does return (32 54), author fingers slipped

Re: Unusual Raku Features

#19
post #3

I’m not sure this page loaded properly for me, half of it is arbitrary punctuation characters assembled in bizarre nonsensical ways.

That's an interesting way to describe the English language.

Re: Unusual Raku Features

#20

    # Does weird things with nested lists too
    > [1, [2, 3], 4, 5] > [10, 20]
    [11 [22 23] 14 25]

This article makes me feel like I'm watching a Nao Geo/Animal Planet documentary. Beautiful and interesting to see these creatures in the wild? Absolutely. Do I want to keep my distance? As far away as possible.
Post reply on HN