🦋 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.
01:35 lizmat_ joined 01:38 lizmat left 02:14 MasterDuke joined 07:39 lizmat_ left, lizmat joined 08:16 sena_kun joined 09:07 raiph joined
Geth ¦ rakudo: lizmat self-assigned `[Numeric, 42].are` # No such method 'mro' github.com/rakudo/rakudo/issues/5568 09:25
rakudo/main: e227a4f29c | (Elizabeth Mattijsen)++ | src/core.c/Any-iterable-methods.rakumod
Make sure type objects without MRO don't break .are

As spotted by raiph++ in github.com/rakudo/rakudo/issues/5568
09:36
roast: 05945b94b5 | (Elizabeth Mattijsen)++ | S32-list/are.t
Add test for (Numeric,42).are

As reported in github.com/rakudo/rakudo/issues/5568
09:37
09:51 raiph left 13:09 rypervenche left 13:23 rba left, rba joined
[Tux] Rakudo v2024.04-86-ge227a4f29 (v6.d) on MoarVM 2024.04-4-gc1eedd502
csv-ip5xs0.265 - 0.266
csv-ip5xs-201.120 - 1.144
csv-parser1.554 - 1.596
csv-test-xs-200.141 - 0.143
test1.937 - 2.008
test-t0.420 - 0.429
test-t --race0.281 - 0.290
test-t-205.141 - 5.152
test-t-20 --race1.226 - 1.228
14:28
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
jdv do we know how that compares to the Perl versions? 14:37
[Coke] don't we have perl numbers in that listing? 14:51
jdv only if you consider Perl6 being Perl:) 15:02
oh, i mean in the graphs 15:03
right
oh in the logs 15:05
i guess one would have to cobble it from irc
*or
i never looked at the repo before but after doing that, and given the current numbers, am i correct that perl is ~36x faster than raku here? 15:19
ab5tract I honestly never managed to make heads or tails out of which tests relate to which versions of what things :) 15:46
There should be a smaller gap to non-xs based Perl 5 vs Raku, iirc 15:47
jdv i dont think the numbers posted on irc include non xs perl 15:56
you dont think xs is a fair comparison? raku has types, way more opti, 2 jits even:) 15:58
lizmat indeed, I don't think XS is a fair comparison: a pure perl version would be a fair comparison 15:59
jdv sure, in a way. but in other ways, part of the promise of raku was not needing stuff like xs. 16:40
Xliff I don't. :) 16:42
jdv i guess the better answer to something like text csv xs would be the easier ffi and just use a libcsv or whatever from raku 16:43
Xliff Although I do have to admit, in some cases, XS would have given me greater freedom to interoperate with C. Like macros.
1,126,000 lines of Raku now.
Across 74 projects in various stages of completion.
jdv i doubt i'll write that much raku in my lifetime, geez. 16:44
Xliff I'm porting every GNOME library including GNOME Shell
jdv RNOME? 16:47
Xliff Camel Lawn Ornaments? 16:49
20:11 rypervenche joined
lizmat m: .say for (1,2,3,4).first(-> $a, $b { say "a = $a, b = $b" }) # TIL .first only takes Callable with a single arg 20:15
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
lizmat m: .say for (1,2,3,4).first(-> $a, $b = 42 { say "a = $a, b = $b" })
camelia a = 1, b = 42
1
20:45 hankache joined 20:47 hankache left
ab5tract I'm having trouble imagining how multiple args would work. Isn't it sort of by its nature a one-at-a-time thingy? 21:12
japhb ab5tract: I can imagine someone wanting to do "first element that is More than the previous element", so there is at least a potential use for multiple args. 21:53
ab5tract It seems like a state variable would have that use case covered 21:54
anyway, I was just more trying to imagine how it would work implementation wise. 21:57
ugexe .say for (1,2,3,4,6,5).batch(2).first(-> *@ [$a, $b] { $a > $b }) 22:00
evalable6 6
5
ab5tract but then again, I didn't actually realize that you could do this with map
m: (1,2,3).map: -> $a,$b,$c { dd [+] $a,$b,$c }
camelia 6
ab5tract but it wouldn't work for the comparison use case, since it chews through N at a time, rather than moving at an N-sized window 22:03
ugexe .rotor(2, -1) or whatever
ab5tract (it = implementing first with the same semnantics as map)
ugexe: just to be clear, I wasn't saying your demonstration wouldn't work 22:04
ugexe m: (1..10).rotor(3 => -2, :partial).flat.map: -> $a,$b,$c { dd [+] $a,$b,$c } 22:06
camelia 6
9
12
15
18
21
24
27
Too few positionals passed; expected 3 arguments but got 2
in block <unit> at <tmp> line 1
ugexe sliding window, but it breaks down on :partial item 22:07
m: (1..10).rotor(3 => -2, :partial).flat.map: -> $a?,$b?,$c? { dd [+] $a,$b,$c }
camelia 6
9
12
15
18
21
24
27
Cannot resolve caller infix:<+>(Int:D, Mu:U); none of these signatures matches:
($x = 0)
(\a, \b)
(Real $a, Real $b)
(Int:D $a, Int:D $b --> Int:D)
(int $a, int $b --> int)
(uin…
lizmat m: (1..10).rotor(3 => -2, :partial).flat.map: -> $a,$b = 0,$c = 0 { dd [+] $a,$b,$c } 22:09
camelia 6
9
12
15
18
21
24
27
19
ab5tract Still surprised that map auto-rotors based on the degree of the provided block’s signature. From that detail, it’s not really such a leap to expect the same from first 22:14
22:15 sena_kun left
ab5tract Though I find it more to be an argument against that feature in map than an argument for that feature in first ;) 22:16
lizmat the feature is very handy in: 22:21
m: <a b c>.kv.map( -> $key, $value { say "$key: $value } ) 22:22
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1)
at <tmp>:1
------> -> $key, $value { say "$key: $value } )⏏<EOL>
expecting …
lizmat m: <a b c>.kv.map( -> $key, $value { say "$key: $value" } )
camelia 0: a
1: b
2: c