[Tux] Rakudo v2024.12-20-ge5a715ab7 (v6.d) on MoarVM 2024.12-8-gf4680765f
csv-ip5xs0.258 - 0.267
csv-ip5xs-201.112 - 1.121
csv-parser1.466 - 1.504
csv-test-xs-200.142 - 0.143
test1.834 - 1.856
test-t0.407 - 0.413
test-t --race0.271 - 0.274
test-t-205.098 - 5.220
test-t-20 --race1.260 - 1.274
11:27
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
15:24 sena_kun left, guifa left, sena_kun joined 15:28 sena_kun left 15:30 sena_kun joined
[Coke] c: HEAD say 3 17:00
committable6 [Coke], ¦HEAD(e5a715a): «3␤»
lizmat m: my %h; if %h<a> andthen $_ == 666 { } elsif %h<a> andthen $_ == 666 { } } 17:02
camelia ===SORRY!===
Cannot find method 'blocktype' on object of type QAST::Op
lizmat meh
[Coke] kicks off a one week blin run 17:03
lizmat ah, already reported 2+ years ago: #4847 17:04
[Coke] R#4847
linkable6 R#4847 [open]: github.com/rakudo/rakudo/issues/4847 [tests committed][Fixed in RakuAST] elsif andthen gives compilation error and weird message
bartolin m: say q["foo & bar"].trans(/(" "+)/ => {" " ~ ("\&nbsp;" x ($0.chars - 1))}, /(\W)/ => {"&#{ord($0)};"}) 20:23
camelia &#34;foo &nbsp;&#38; &nbsp;&nbsp;bar&#34;
bartolin This fails on the JVM backend now. The test is from github.com/Raku/roast/blob/428a5c2...ans.t#L194 20:24
The error is: Cannot resolve caller ord(Nil:U: ); none of these signatures matches: (Cool:D $:: *%_ --> Int:D)
And the backtrace points to this nqp::push_s: github.com/rakudo/rakudo/blob/e5a7...umod#L3202 20:25
^^ lizmat Do you have an idea what could go wrong there? 20:26
m: 'say q["f"].trans(/(" "+)/ => {}, /(\W)/ => {"&#{ord($0)};"})' 20:35
camelia WARNINGS for <tmp>:
Useless use of constant string "say q[\"f\"].trans(/(\" \"+)/ => {}, /(\\W)/ => {\"&#{ord($0)};\"})" in sink context (line 1)
bartolin m: say q["f"].trans(/(" "+)/ => {}, /(\W)/ => {"&#{ord($0)};"})
camelia MVMArray: Index out of bounds
in block <unit> at <tmp> line 1
bartolin is trying to golf the problem a bit. But this looks like an internal error leaking out 20:36
timo are you still looking? should i take a look as well? 20:52
bartolin I'm still trying to shorten the problem a bit. For now I'm at 20:58
m: say "x".trans(/y/ => "y", /./ => {$0 ~~ Nil ?? "N" !! $0})
camelia x
bartolin This gives a "N" on the JVM backend
m: say "x".trans(/x/ => "x", /./ => {$0 ~~ Nil ?? "N" !! $0}) ## This one works on the JVM as well 20:59
camelia x
bartolin But if I leave out the first pair, both backends respond with "N": 21:00
m: say "x".trans(/./ => {$0 ~~ Nil ?? "N" !! $0})
camelia N
bartolin I'm not even sure what .trans is supposed to do with multiple Pairs. I guess it should do the transformation from the first Pair and then do the transformation from the second Pair on the result of the first transformation? 21:03
timo i'm not sure either 21:12
i haven't used trans a lot in the past
bartolin neither
well, it looks like the second Pair is used for the part of the input string that hasn't been transformed yet 21:31
m: say "xyzxyz".trans(/y/ => "a", /./ => {$++})
camelia 0a12a3
timo maybe each is tried in turn for every location? 21:55
m: say "xyz x y z ".trans(/y/ => "a", /<?after \s>./ => {$++})
camelia xaz 0 a 1
bartolin m: say "xyzxyz".trans(/y/ => "a", /<?after "y">./ => {$++}) 22:06
camelia xa0xa1
bartolin yes, that makes sense. every Pair seems to work on the original input. 22:08
I'll call it a day. thanks for looking :) 22:09
lizmat m: my $/ = 42; say $0
camelia Potential difficulties:
Redeclaration of symbol '$/'.
at <tmp>:1
------> my $/<HERE> = 42; say $0
42
lizmat m: $/ = 42; say $0
camelia 42
lizmat bartolin: ^^ what does that say on the JVM ? 22:10
bartolin also 42
lizmat hmmmm 22:14
bartolin I mostly wonder where this $0 is coming from (or not coming from): 22:17
m: say "x".trans(/y/ => "y", /./ => {$0 ~~ Nil ?? "N" !! $0}), "x".trans(/./ => {$0 ~~ Nil ?? "N" !! $0})
camelia xN
lizmat m: "x".trans(/./ => { dd $/, $_; $/) 22:20
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> "x".trans(/./ => { dd $/, $_; $/<HERE>)
expecting any of:
statement end
statement modifier
statement modifier loop
timo try .WHERE and .VAR.WHERE on $/ in different places
lizmat m: "x".trans(/./ => { dd $/, $_; $/ })
camelia $/ = Match.new(:orig("x"), :from(0), :pos(1))
$/ = Match.new(:orig("x"), :from(0), :pos(1))
bartolin oh, about my question, it's a different candidate 22:21
lizmat m: "x" ~~ /./; dd $/
camelia $/ = Match.new(:orig("x"), :from(0), :pos(1))
lizmat m: "x" ~~ /./; dd $/, $0
camelia $/ = Match.new(:orig("x"), :from(0), :pos(1))
Nil = Nil
lizmat huh?
m: "x" ~~ /./; say $/, $0
camelia 「x」Nil
lizmat m: "x" ~~ /./; say $/, $/[0] 22:22
camelia 「x」Nil
lizmat m: "x" ~~ /(.)/; say $/, $0
camelia 「x」
0 => 「x」「x」
lizmat m: ":" ~~ /(\W)/; say $0 22:23
camelia 「:」
lizmat bartolin: ^^ what does that say on the JVM ? 22:24
bartolin same output: 「:」
lizmat m: "4" ~~ /(.*)/; say "&#&ord($0);" 22:26
camelia &#52;
lizmat ^^ what does that say on the JVM ? 22:27
bartolin also the same output
lizmat meh
is that one of the tests I recently unfudged ?
ah, nope 22:28
bartolin no, it's an old one.
lizmat what do $/ say in the outer and the inner closure? 22:29
aka: {say $/; "&#{say $/; ord($0)};"}
bartolin m: say $/; "&#{say $/; ord($0)};" ## you mean like this? 22:30
camelia WARNINGS for <tmp>:
Nil
Nil
Useless use of "&#{say $/; ord($0)};" in expression "&#{say $/; ord($0)};" in sink context (line 1)
Cannot resolve caller ord(Nil:U: ); none of these signatures matches:
(Cool:D $:: *%_ --> Int:D)
in block…
bartolin it's basically the same output on the JVM. (the exception has one more uninteresting line.) 22:32
lizmat no, inside the whole .trans line
bartolin oh, mom 22:33
m: say "x".trans(/(y)/ => "y", /./ => {say $/; "&#{say $/; ord($0)};"}) 22:34
camelia x
x
&#120;
22:34 sena_kun left
bartolin on the JVM that's: "Nil\nNil\nCannot resolve caller ord(Nil:U: ); none of these signatures matches:\n (Cool:D $:: *%_ --> Int:D)" 22:34
lizmat yea, so $/ is not being propagated on the JVM 22:35
m: ":".trans/(\W)/ => {"&#{ord($0)};"})
camelia ===SORRY!=== Error while compiling <tmp>
Preceding context expects a term, but found infix => instead.
at <tmp>:1
------> ":".trans/(\W)/ =><HERE> {"&#{ord($0)};"})
lizmat m: ":".trans(/(\W)/ => {"&#{ord($0)};"}) 22:36
camelia ( no output )
lizmat m: say ":".trans(/(\W)/ => {"&#{ord($0)};"})
camelia &#58;
lizmat what does that say on the JVM ?
bartolin it has the correct output
lizmat ok, please make an issue for it, I'll look at it tomorroq 22:37
w
bartolin btw, I think it fails if I pass that as a List
lizmat yeah, it probably will
m: say ":".trans((/(\W)/ => {"&#{ord($0)};"},)) 22:38
camelia &#58;
lizmat those are different code paths
bartolin yeah, that gives the error "Cannot resolve .."
ok, I can't say when I'll be able to create the issue. Hopefully tomorrow ... 22:39
bartolin now really heads for bed
lizmat ok fair enough, I'll make the issue then
bartolin thanks. but it's nothing urgent ... 22:40
o/
lizmat github.com/rakudo/rakudo/issues/5744 22:46
afk& 22:47