Geth ¦ Blin: coke self-assigned Latest set of missingDependency github.com/Raku/Blin/issues/38 02:12
lizmat bisectable6: old=2022.01 say (1,2,3).are 09:47
bisectable6 lizmat, Cannot find revision “2022.01” (did you mean “2025.01”?)
lizmat bisectable6: old=2022.02 say (1,2,3).are 09:48
bisectable6 lizmat, On both starting points (old=2022.02 new=ac06359) the exit code is 0 and the output is identical as well
lizmat, Output on both points: «(Int)␤»
lizmat bisectable6: old=2021.01 say (1,2,3).are
bisectable6 lizmat, Cannot find revision “2021.01” (did you mean “2025.01”?)
lizmat bisectable6: old=2021.02 say (1,2,3).are
bisectable6 lizmat, Bisecting by exit code (old=2021.02 new=ac06359). Old exit code: 1
bisectable6 lizmat, There are 117 candidates for the first “new” revision. See the log for more details 10:05
lizmat bisectable6: thanks
bisectable6 lizmat, Anytime!
[Tux] Rakudo v2025.01-76-gac06359c4 (v6.d) on MoarVM 2025.01-24-g21d96b374
csv-ip5xs0.267 - 0.271
csv-ip5xs-201.112 - 1.117
csv-parser1.074 - 1.110
csv-test-xs-200.138 - 0.138
test1.891 - 1.938
test-t0.414 - 0.425
test-t --race0.275 - 0.278
test-t-205.184 - 5.232
test-t-20 --race1.330 - 1.363
10:28
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
Geth rakudo/main: 5cdf905675 | (Stefan Seifert)++ | src/Raku/Grammar.nqp
RakuAST: fix mis-spelled dynamic variable in parser
10:52
rakudo/main: 874250cda0 | (Stefan Seifert)++ | src/Raku/Grammar.nqp
RakuAST: throw KeywordAsFunction exception when appropriate
nine 1165
lizmat nice 10:53
Q: do we agree that the $!value attribute of a Scalar should never be a container itself ? 11:12
or are there use cases for that?
nine ab5tract vrurg
nine Sounds like a big assumption to make for a very core thing. Why shouldn't a Scalar contain a Scalar? 11:17
lizmat because a container inside a container is somehow causing the remaining issue in the last blin run: github.com/rakudo/rakudo/issues/5783 11:25
nine That doesn't mean that being able to store a container in a container is broken design in itself. It just means that either something puts a container into a container unexpectedly or that someone reacts wrongly to encountering a container in a container. 11:28
Btw. in Mu's method item(Mu \item:) what exactly does `self` refer to? How is it different from `item`? 11:30
lizmat it's the deconted version, as self is always deconted 11:32
nine m: my $i = 1; my $j = $i.VAR; $j<> = 2; say $i # A bit obscure but arguably better than symbolic references 11:43
camelia 2
lizmat yuck :-) 11:58
ok, so we don't agree :-)
btw, how would that be different from my $j := $i; ? semantically speaking 11:59
nine m: my $a = 0; my $b = 0; my $flip-flop; sub switch-flip-flop($target is rw) { $target = $++ %% 2 ?? $a.VAR !! $b.VAR }; for ^4 { switch-flip-flop($flip-flop); $flip-flop<>++; say "a: $a, b: $b"; } # That's arguably even cool 12:03
camelia a: 1, b: 0
a: 1, b: 1
a: 2, b: 1
a: 2, b: 2
lizmat feels like a lot of boilerplate for what essentially should be the capability of binding to a raw argument 12:26
nine Again that's just this one specific example. Point is, it may be useful to be able to pass nested containers around. 12:35
Wheres there's no good reason to forbid it. 12:36
s/there's no/we don't know of a/ 12:37
lizmat ok, fair enough 12:49
ab5tract Hmm, I wonder if this affects places where we check if a thingy is a scalar or not 13:29
Like the ‘is item’ stuff in dispatch 13:30
Probably not, actually 13:31
lizmat doubt it, as "is item" only works on @ and % sigilled, right? 13:42
afk& 13:52
nine m: sub more(@a, int $more) { gather for @a { note "$_ + $more"; take $_ + $more } }; my \ints = more((0, ), 1); say more(ints, 2)[0] 15:29
camelia 0 + 1
3
1 + 2
nine m: EVAL 'sub more(@a, int $more) { gather for @a { note "$_ + $more"; take $_ + $more } }; my \ints = more((0, ), 1); say more(ints, 2)[0]'.AST
camelia ===SORRY!=== Error while compiling <tmp>
EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma
to override this error but only if you're VERY sure your data contains
no injection attacks).
at <tmp>:1
------> ore((0, ), 1); …
nine m: 'sub more(@a, int $more) { gather for @a { note "$_ + $more"; take $_ + $more } }; my \ints = more((0, ), 1); say more(ints, 2)[0]'.AST.EVAL
camelia 0 + 2
4
2 + 2
nine What a bizarre error
m: sub more(@a, $more is copy) { gather for @a { note "$_ + $more"; my $m = $more; $more = 12; take $_ + $m } }; my \ints = more((0, ), 1); say more(ints, 2)[0] 15:31
camelia 0 + 1
3
1 + 2
nine m: 'sub more(@a, $more is copy) { gather for @a { note "$_ + $more"; my $m = $more; $more = 12; take $_ + $m } }; my \ints = more((0, ), 1); say more(ints, 2)[0]'.AST.EVAL
camelia 0 + 2
14
2 + 12
nine m: my $calls = 0; sub one-more(@a, $more) { my $call = ++$calls; gather for @a { note "$call: $_ + $more"; take $_ + $more } }; my \ints = one-more((0, ), 1); say one-more(ints, 2)[0] 15:34
camelia 1: 0 + 1
3
2: 1 + 2
nine m: 'my $calls = 0; sub one-more(@a, $more) { my $call = ++$calls; gather for @a { note "$call: $_ + $more"; take $_ + $more } }; my \ints = one-more((0, ), 1); say one-more(ints, 2)[0]'.AST.EVAL 15:35
camelia 2: 0 + 2
4
2: 2 + 2
nine Looks like this is related to the problem in github.com/rakudo/rakudo/commit/91...d6b1edf9d9 16:54
lizmat How about deprecating once in favour of the more general FIRST phaser? which in RakuAST can be called in any block, thanks to ab5tract 16:57
nine What happens is that we add all QAST::Blocks to the list of declarations of the surrounding lexical scope. However not every generated Block corresponds to such a scope. Thunks aren't lexical scopes, but we still generate QAST::Blocks for them. If thunks contain nested blocks those blocks then get code generated outside the thunk block. Thus when closure cloning the thunk block, we don't also clone the
nested blocks.
lizmat or codegenning the `once` as a FIRST phaser ?
nine It's not about once, it's about thunks or even everything that's sort of thunky. 16:58
In this case StatementPrefix::Thunky
lizmat ah, ok :-(
yeah, thunkiness is still a bit of a wonky subject :-(
nine Actually, I shouldn't be surprised at all. I predicted precicely this outcome just yesterday morning: irclogs.raku.org/raku-dev/2025-02-13.html#07:40 17:01
ab5tract nine: maybe we could take a similar approach as you used when handling whatevercodes
nine What did I do there?
ab5tract You migrated it from a top-down/inside out traversal to bottom up 17:02
Which was no mean feat. But I think you were able to re-use a lot of the existing infrastructure 17:04
nine Hm....maybe something like this will be necessary. Right now a lexical scope gather all the declarations of its children, including blocks. Seems to me like blocks are sufficiently different that we need to give them separate handling. We need to retain their hierarchy independent of lexical scopes. 17:08
Geth rakudo/main: f855604498 | (Elizabeth Mattijsen)++ | src/core.c/REPL.rakumod
Allow heredocs in the repl

Inspired by irclogs.raku.org/raku/2025-02-14.html#14:08
17:11
timo oh dang that was fast 17:12
i haven't looked, but does it also support multiple heredocs in one line, as well as heredocs in an incomplete line of code?
lizmat yeah, it does support multiple heredocs as well 17:16
having recently done a lot of work on the repl, it was easy enough 17:17
also, now in the REPL module :-)
timo very cool thing to have 17:20
lizmat hmmm... just noticed that with the REPL module, you can call "repl" in the repl, and have a new scope to work in 17:22
the on in Raku doesn't do that...
timo it's definitely very useful to be able to have a repl inside of a function you call from inside the repl 17:23
... now do that inside of a start block :) :) :) :) :) :)
lizmat hehe 17:26
just tried it: Terminal LineEditor can't handle it 17:27
timo yeah, how is it supposed to? :) 17:55
unless we implement some kind of mechanism where running repls can know about each other and allow the user to switch contexts on the fly, which could be cool tbh 17:56
lizmat well, since in the REPL module, you *can* call repl (because it's all object based), there shouldn't be much problem on switching between repl 17:57
timo probably mostly needs some UI work for the switching and showing the user what they are currently looking at and what's available, and then a bit of "infrastructure" to allow the REPLs to "find each other" and switch without messing up the line editor - or alternatively share a single line editor between them which would be a much safer idea actually 18:01
lizmat yeah... it should be relatively easy, basically just setting up a hash with the REPL objects as values, and the names of the REPLs as keys 18:10
well, in the REPL module
hmmm.. it's going to need a little more restructuring... 18:24
but shouldn't be too difficult
timo anyway, it was just a fun little thought i had 18:28
timo imagine if you will, a mode where every react block that starts up gets a repl that you can switch into ... 19:54
bartolin nine: regarding irclogs.raku.org/raku-dev/2025-02-13.html#10:41 I don't remember much, but I'm pretty sure that I totally didn't understand that putting those loops in parens made them lazy :/
from glancing at irclogs.raku.org/raku-dev/2020-04-10.html#18:45 it seems that I was looking for other cases of "labeled ... without loop construct" at that time 19:56
nine bartolin: so do you agree that those tests are just plain wrong? 21:54
Btw, even main has some questionable behavior here: 21:56
m: say @ = (LABEL: while 1 { while 1 { last LABEL } })
camelia [Label<LABEL>(at <tmp>:1, 'say @ = (<HERE>LABEL: while 1 { while 1 ')]
timo was it trying to output an error there? 21:58
nine m: my @a = (LABEL: while 1 { while 1 { last LABEL } }); say @a[0].^name 21:59
camelia Label
timo ah it literally puts the label there. is that what you get when you last with a label? it lasts the loop and also the value that it deposits as the reslut of the iteration is the label 22:09
not very useful huh
nine m: say my @a = (LABEL: while 1 { while 1 { last; }; last }); 22:15
camelia []
nine m: my $i = 0; say my @a = (LABEL: while True { last if $i++; 1 }); 22:20
camelia [1]
nine m: my $i = 0; say my @a = (LABEL: while True { last LABEL if $i++; 1 });
camelia [1 Label<LABEL>(at <tmp>:1, 'i = 0; say my @a = (<HERE>LABEL: while True { last')]
nine Really doesn't make any sense at all to include the label in the generated values
timo if "last foo" and "last 1" are for last-with-label and last-with-value respectively, can we not last-with-label-and-value? 22:41
nine Well that's the thing: there is no last <value> 22:44
Calling last(Int) will never work with any of these multi signatures: ( --> Nil) (Label:D $x --> Nil)
timo oh, well, i hadn't realized that :) 22:45
but do we want that maybe?
lizmat in 6.e last foo works 22:51
m: use v6.*; say (^10).map({ $_ < 5 ?? $_ !! (last 42) }
camelia ===SORRY!=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> (^10).map({ $_ < 5 ?? $_ !! (last 42) }<HERE><EOL>
expecting any of:
lizmat m: use v6.*; say (^10).map({ $_ < 5 ?? $_ !! (last 42) }) 22:52
camelia (0 1 2 3 4 42)
lizmat bisectable6: old=2025.01 class A { has $.a = 42; method b { $.a } }; use nqp; dd nqp::iscont(A.new.b) 23:08
bisectable6 lizmat, Bisecting by output (old=2025.01 new=f855604) because on both starting points the exit code is 0
lizmat, bisect log: gist.github.com/ec4f24b127a6d7f1dc...5e0d931b27 23:09
lizmat, (2025-02-10) github.com/rakudo/rakudo/commit/e3...29c4ee2032
lizmat [Coke]: ^^ is the underlying issue with PDF
too late for me to work on now, but will get to this deeper tomorrow 23:10
m: class A { has $.a = 42; method b { self.a } }; use nqp; dd nqp::iscont(A.new.b) 23:11
camelia 0
lizmat the weird thing is: how can a method that is not "is raw" return a container ? 23:12
sleep&