🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:16 yewscion joined 00:21 yewscion left 00:22 yewscion joined 00:27 yewscion left 01:32 hulk joined 01:33 kylese left 02:15 hulk left, kylese joined 02:41 Aedil joined 04:30 kylese left 04:34 kylese joined 05:30 kylese left 05:32 kylese joined 06:28 Some-body_ joined 06:29 DarthGandalf left 06:32 Some-body_ is now known as DarthGandalf, yewscion joined 06:34 apac left 06:37 yewscion left 06:39 Sgeo left 07:03 yewscion joined 07:08 yewscion left 08:01 sena_kun joined 08:12 dakkar joined
melezhik. antononcube: I see , interesting. You can use Sparrow as a dog folding ))) 08:20
Fooding 08:21
08:27 jpn joined
grondilu here is an impressive error message : 08:49
MoarVM panic: Internal error: Unwound entire stack and missed handler
apparently Moar didn't like it when I put a `return` inside a `react` 08:52
so instead of `sub () { given someprocess { react { whenever something { return this } } } }` 08:53
I had to do `sub () { given someprocess { my $result; react { whenever something { $result = this } } }; return $this; }` 08:54
I'll push it so I can show you actual code 08:55
09:01 sena_kun left
grondilu github.com/grondilu/chess/blob/8d7...kumod#L362 09:07
09:07 Guest48 joined
Guest48 ? 09:08
09:11 Guest48 left 10:25 ecocode left, ecocode joined 11:10 Aedil left 11:18 yewscion joined 11:23 JimmyZhuo joined 11:27 yewscion left 11:42 jpn left 11:44 jpn joined 11:49 jpn left
Xliff_ grondilu: Hmm... How are you exiting the react block? 12:10
grondilu well the error showed up when I was exiting with return. I guess it's bad to do that. 12:51
12:59 Aedil joined
grondilu unrelated: 13:03
m: grammar { token TOP { '"' ~ '"' <+alpha-["]>* } }.parse: q{"foo"}, actions => class {}
camelia ( no output )
13:03 Aedil left
grondilu m: grammar { token TOP { '"' ~ '"' <+print-["]>* } }.parse: q{"foo"}, actions => class {} 13:03
camelia Cannot resolve caller print(<anon|2>:U: <anon|1>:D); none of these signatures matches:
(Mu $:: *%_)
in regex TOP at <tmp> line 1
in block <unit> at <tmp> line 1
grondilu m: grammar { token TOP { '"' ~ '"' <+print-["]>* } }.parse: q{"foo"}
camelia ( no output ) 13:04
grondilu m: grammar { token TOP { '"' ~ '"' <+graph+space-cntrl-["]>* } }.parse: q{"foo"}, actions => class {} 13:06
camelia ( no output )
13:06 jpn joined 13:18 jpn left, Aedil joined 13:19 jpn joined 13:35 yewscion joined 13:47 JimmyZhuo left 14:04 yewscion left 14:05 yewscion joined
antononcube This a good read for all LLM enthusiasts (non-LLM, too): surfshark.com/research/chart/ai-ch...ts-privacy 14:20
cdn.discordapp.com/attachments/633...617c3&
ugexe i thought return inside a react would return a specific error 14:30
as in not a weird moarvm error 14:31
m: sub { react { whenever Promise.in(0) {return} } }() 14:33
camelia MoarVM panic: Internal error: Unwound entire stack and missed handler
ugexe from github.com/rakudo/rakudo/issues/2753
grondilu: ^ 14:34
14:37 yewscion left 14:47 yewscion joined 15:51 jpn left 16:24 codesections joined 16:30 jpn joined 16:36 yewscion__ joined 16:37 dakkar left 16:38 jpn left, yewscion left 16:43 codesections left 16:52 codesections joined 16:57 jpn joined 17:08 codesections1 joined, yewscion__ left 17:09 codesections left, codesections1 is now known as codesections 17:10 yewscion joined 17:15 codesections left 17:44 [Coke] left, [Coke] joined 17:52 jpn left 18:17 notna joined 18:48 notna left 18:52 jpn joined 18:57 jpn left 19:03 notna joined 19:04 notna left 19:37 yewscion left 19:38 yewscion joined
Voldenet m: sub x { react whenever $^x { return $_ } }; my $c = Channel.new; start { sleep 1; $c.send(42); }; say x($c); 19:41
camelia MoarVM panic: Internal error: Unwound entire stack and missed handler
Voldenet heh, fascinating bug
19:42 yewscion left
Voldenet and it doesn't happen in all cases 19:51
m: sub x { react whenever $^x { return $_ } }; say x("foo".Supply);
camelia foo
Voldenet m: sub x { say $*THREAD; react whenever $^x { say $*THREAD; return $_ } }; say x("foo".Supply); 19:58
camelia Thread #1 (Initial thread)
Thread #1 (Initial thread)
foo
Voldenet m: sub x { say $*THREAD: react whenever $^x { say $*THREAD; return $_ } }; my $c = Channel.new; start { sleep 1; $c.send(42); }; say x($c);
camelia Thread #4 (GeneralWorker)
MoarVM panic: Internal error: Unwound entire stack and missed handler
ugexe m: sub x { start react whenever 1 { return 1 } }; await x() 19:59
camelia An operation first awaited:
in block <unit> at <tmp> line 1

Died with the exception:
A react block:
in code at <tmp> line 1

Died because of the exception:
Attempt to return outside of immediately-enclosing Ro…
ugexe i wonder if that is the error that should be getting thrown 20:00
Voldenet I'm suspecting that nqp::const::CONTROL_RETURN for the sub is handled on the Thread#1, but not the #4 20:01
m: use nqp; sub x { react whenever $^x { nqp::throwpayloadlexcaller(nqp::const::CONTROL_RETURN, 42) }; }; my $c = Channel.new; start { sleep 1; $c.send(42); }; say x($c); 20:03
camelia A react block:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Died because of the exception:
Attempt to return outside of any Routine
in block at <tmp> line 1
Voldenet Hm, maybe it's a different error
but there's an error regarding missing "react" return handler, so it's kind of similar 20:06
20:07 Aedil left
Voldenet m: use nqp; sub x { react whenever $^x { die ":(" }; }; my $c = Channel.new; start { sleep 1; $c.send(42); }; say x($c); # wrong stack trace 20:07
camelia A react block:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Died because of the exception:
:(
in block at <tmp> line 1
20:07 maylay left
Voldenet m: use nqp; sub x { react whenever $^x { die ":(" }; }; my $c = Channel.new; $c.send(42); say x($c); # right stack trace 20:07
camelia A react block:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Died because of the exception:
:(
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
20:10 maylay joined 20:17 ky left
Voldenet m: sub x { my $n; react whenever $^x { CATCH { default { $n = $_; } }; die ":(" }; die $n if $n }; my $c = Channel.new; start { sleep 1; $c.send(42); $c.close() }; say x($c); # obvious workaround 20:19
camelia :(
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
Voldenet similar thing had to be done in C# before catch could handle async code in async state machines 20:21
though there's going to be discontinuity in stack traces that way 20:23
m: sub blah { die ":("; }; sub x { my $n; react whenever $^x { CATCH { default { $n = $_; } }; blah; }; die $n if $n }; say x(Promise.in(1)); 20:24
camelia :(
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1
Voldenet m: sub blah { die ":("; }; sub x { my $n; react whenever $^x { blah; }; die $n if $n }; say x(Promise.in(1)); # wrong either way
camelia A react block:
in sub x at <tmp> line 1
in block <unit> at <tmp> line 1

Died because of the exception:
:(
in sub blah at <tmp> line 1
in block at <tmp> line 1
20:41 jpn joined 20:53 kybr joined 20:56 Xliff_ left 21:09 yewscion joined 21:14 yewscion left 22:14 sena_kun joined 22:17 jpn left 23:24 sena_kun left 23:25 Sgeo joined 23:27 yewscion joined 23:33 yewscion left