🦋 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.
00:33 RakuIRCLogger left, kjp left 00:35 kjp joined 08:38 finanalyst joined 09:33 librasteve_ joined 09:55 finanalyst left 09:56 finanalyst joined
Geth rakudo/main: cfd4449601 | (Elizabeth Mattijsen)++ | lib/Test.rakumod
Add single named arg candidate to subtest

  "subtest" accepts a Pair as a single positional argument, expecting
a description and a Callable to execute. Because of some weird argument capture logic, this also worked for:
   subtest foo => { ... }
... (14 more lines)
10:37
11:40 finanalyst left
lizmat TIL the evilness underlying the subsignature handling on a Pair 14:09
m: (foo => "bar").Capture
camelia ( no output )
lizmat m: dd (foo => "bar").Capture
camelia \(:key("foo"), :value("bar"))
lizmat this Capture is the reason that this works: 14:10
m: for foo => "bar" -> (:key($left), :value($right)) { dd $left, $right } 14:11
camelia "foo"
"bar"
lizmat m: my ($p) := a => 'b' # and the reason this breaks
camelia Too few positionals passed to '<unit>'; expected 1 argument but got 0
in block <unit> at <tmp> line 1
lizmat and there I was thinking all these years the reason -> (:key($left), :value($right)) works was because it would call the .key and .value methods on the Pair 14:35
github.com/rakudo/rakudo/issues/60...4047286215 14:39
17:00 [Coke] joined 17:36 RakuIRCLogger joined
Geth rakudo/main: 5c93e18bf9 | (Elizabeth Mattijsen)++ | src/core.c/Pair.rakumod
Make for %h -> (:$key, :$value) { ... } 2x as fast

  github.com/rakudo/rakudo/issues/6053 finally got me grokking
this idiom. What I hadn't realized before is that in the case of a sub-signature (as indicated by the parentheses) it will actually call the .Capture method on the object the iterator produced, and then try to bind that to the sub-signature. ... (9 more lines)
19:01
rakudo/main: 5c93e18bf9 | (Elizabeth Mattijsen)++ | src/core.c/Pair.rakumod
Make for %h -> (:$key, :$value) { ... } 2x as fast

  github.com/rakudo/rakudo/issues/6053 finally got me grokking
this idiom. What I hadn't realized before is that in the case of a sub-signature (as indicated by the parentheses) it will actually call the .Capture method on the object the iterator produced, and then try to bind that to the sub-signature. ... (9 more lines)
rakudo/main: babc6ca406 | (Elizabeth Mattijsen)++ | src/core.c/Pair.rakumod
Make for %h -> (:$key, :$value) { ... } another 5% faster

By using nqp ops in Pair.Capture
19:09
rakudo/main: babc6ca406 | (Elizabeth Mattijsen)++ | src/core.c/Pair.rakumod
Make for %h -> (:$key, :$value) { ... } another 5% faster

By using nqp ops in Pair.Capture
lizmat so I wonder whether it would make sense to actually automatically create a customized Capture method for classes at compose time, if they don't have a Capture method already that isn't Mu::Capture 19:15
otoh, people playing these type of Capture tricks, would know what they were doing anyway... 19:16
Geth rakudo/lizmat-comb-Cool: ac55cc6aaf | (Elizabeth Mattijsen)++ | src/core.c/Rakudo/Iterator.rakumod
Make .comb accept Cool values for limit

In response to github.com/rakudo/rakudo/issues/6030
So "foobar".comb(/\w/, 2.0) will produce ("f","o").Seq
19:58
rakudo: lizmat++ created pull request #6083:
Make .comb accept Cool values for limit
19:59
19:59 finanalyst joined 21:36 finanalyst left
ab5tract lizmat: thanks for digging into this! 22:15