🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm
Set by lizmat on 8 June 2022.
Geth rakudo/lizmat-classify-identity: a398cdbab2 | (Elizabeth Mattijsen)++ | src/core.c/Any.pm6
Allow * to be used as identity on classify|categorize

In response to github.com/rakudo/rakudo/issues/5134
Note that this also allows the :as parameter to be used, such as creating lists of indices of a particular value in a list:
   $ raku -e 'say (1,1,1,2,1,2).classify(*, :as({$++}))'
   {1 => [0 1 2 4], 2 => [3 5]}
11:47
rakudo: lizmat++ created pull request #5140:
Allow * to be used as identity on classify|categorize
[Tux] Rakudo v2022.12-1-gd52342eb0 (v6.d) on MoarVM 2022.12-3-g06856f0b2
csv-ip5xs0.875 - 0.883
csv-ip5xs-205.238 - 5.478
csv-parser3.529 - 3.707
csv-test-xs-200.414 - 0.419
test6.406 - 6.420
test-t1.443 - 2.011
test-t --race0.843 - 0.938
test-t-2020.402 - 20.933
test-t-20 --race6.747 - 7.005
12:43
Kaiepi i'm wary of what the locking the parameterization Array::Shaped!RE-INITIALIZE does via RI.SHAPED-ARRAY-STORAGE might do in a threaded environment, but i'm not sure on how to prove anything happens as a result... 17:12
Kaiepi i tried making 4 threads parameterize a bunch at the same time, but they seem to do it about the same speed? 17:14
compared to changing it not to parameterize
lizmat Kaiepi link? 17:18
Kaiepi lizmat, this is the benchmark script atm gist.github.com/Kaiepi/937162e3ca6...436a33a080 17:22
i'm testing through Array::Shaped.STORE on my list-copying branch, haven't tried main yet
lizmat I meant link to code in the core you're worried about 17:24
Kaiepi here github.com/rakudo/rakudo/blob/main...s.pm6#L489 17:33
Geth rakudo/main: 665375bab8 | (Elizabeth Mattijsen)++ | src/core.c/Cool.pm6
Improve error message on "foo".Order

By preventing the Failure of the conversion to Int to be eaten and thus cause an LTA "This type cannot unbox to a native integer" error
17:58