🦋 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.
releasable6 Next release in ≈6 days and ≈15 hours. 2 blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 03:00
07:29 lizmat joined 08:15 lizmat left 08:17 lizmat joined 08:21 lizmat left 09:23 finanalyst joined
[Tux] Rakudo v2025.03-236-gbe3d06a71 (v6.d) on MoarVM 2025.03-13-gb405e940e
csv-ip5xs0.260 - 0.276
csv-ip5xs-201.093 - 1.112
csv-parser1.115 - 1.123
csv-test-xs-200.138 - 0.138
test1.835 - 1.880
test-t0.403 - 0.407
test-t --race0.269 - 0.274
test-t-204.984 - 5.001
test-t-20 --race1.237 - 1.265
09:41
tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log
nine attach = set node origin, bring node to begin time and attach it to the tree, so expected 10:37
10:40 [Tux] left 10:44 [Tux] joined 12:29 JimmyZhuo joined
JimmyZhuo I use Visual Studio, it shows MVM_disp_inline_cache_get_kind takes about 20% times, total 130s for parse time, 11% GC(about 14s) 12:30
and ntdll 40% times
14:28 JimmyZhuo left
nine That just tells you that a lot of calls take place which is hardly surprising 14:47
At this point it's really about finding places where we e.g. calculate the same information multiple times. 14:48
timo since we have the call graph, we can for example look what routines have really really many different spots in the call graph where they are called. that's a potentially interesting angle that is unfortunately not trivial to look at with the current moarperf, and even less easy with the original html profiler 15:26
would be great to have a "call graph explorer" kind of thing that is closely tied to a code editor 16:21
[Coke] tried updating Blin to do RAKUDO_RAKUAST=1 on a run: immediately explodes. 16:56
releasable6: next 16:57
releasable6 [Coke], Next release in ≈6 days and ≈2 hours. 2 blockers. 236 out of 236 commits logged
[Coke], Details: gist.github.com/1daeb709c13c83d311...6136630c49
[Coke] (on its own lib/Blin/Tester/Zef.rakumod) 16:59
timo how about using rakuast for the stuff it builds but not blin itself?
nine m: module Foo::Bar { class Foo::Bar { } }; say Foo::Bar.HOW.^name 17:09
camelia Perl6::Metamodel::ClassHOW
nine m: module Foo::Bar { class Foo::Bar {} }; say Foo::Bar::Foo::Bar
camelia Could not find symbol '&Bar' in 'Foo::Bar::Foo'
in block <unit> at <tmp> line 1
nine m: module Foo::Bar { class Baz::Qux {} }; say Foo::Bar::Baz::Qux 17:10
camelia (Qux)
[Coke] timo; I didn't set it until already running blin 17:11
timo but the rakudo process that was running the blin code had rakuast turned on?
there might be some unexpected re-compilation happening. or do we force re-compilation of stuff when we go from rakuast no to yes? 17:12
nine Maybe Blin is a few steps too far for a massive rewrite. How about make test in rakudo? Then maybe try zef or even just its dependencies?
[Coke] no, the raku process running blin did not have it turned on. 17:15
timo ok
nine Is that running the bootstrap branch or main?
[Coke] nine - yup. testing zef first is a great idea.
I only have main here on the blin box. 17:16
nine Somehow no one seems to care about the make install situation :)
[Coke] I missed that part - what's up?
nine Well it gets to about the very first line of the install-core-dist script 17:17
17:29 vrurg left 17:31 vrurg joined 18:21 kawaii joined
Geth nqp/code_generated_for_proto_regex: b4190372e1 | (Timo Paulssen)++ | 6 files
experiment to code-gen versions of protoregex subs

This would be a prerequisite if we ever want to try generating code inside spesh or the jit for a known-constant NFA.
Unfortunately, this doesn't get us all the way to where an NFA can be known constant at spesh time.
18:30
timo right, you can really take just the very first line from the file into a rakudo -e and it will asplode the same way: 18:58
env RAKUDO_RAKUAST=1 rakudo -e 'constant LMAO = "lib/CompUnit/Repository/Staging.rakumod".IO.slurp.EVAL'
===SORRY!=== Error while compiling -e
An exception X::Comp::AdHoc occurred while evaluating a BEGIN:
No lexical found with name '$_'
18:58 MasterDuke joined 18:59 lizmat joined
MasterDuke looking into install-core-dist.raku on the bootstrap-rakuast branch. the first line, which is where it's dying, is `my constant Staging = "lib/CompUnit/Repository/Staging.rakumod".IO.slurp.EVAL;` 19:00
remove the `.EVAL` and it's fine. run that file (i.e., `RAKUDO_RAKUAST=1 '/home/dan/Source/raku/rakudo/rakudo-m' --ll-exception lib/CompUnit/Repository/Staging.rakumod`) and it's fine 19:01
timo yeah
MasterDuke oh! change from `my constant Staging...` to `my $Staging...` and it's fine! 19:03
but then i get gist.github.com/MasterDuke17/e8b6c...cfaf93ddd4 when running install-core-dist.raku after making that change 19:05
timo should be easy to figure out what that is just by giving the mainline of install-core-dists have a handler for the warn control exception? 19:07
MasterDuke looks like it's dying when trying to create suggestions for an unknown routine
timo i'm trying `my \Staging = BEGIN ...` and getting Cannot find method 'add_attribute' on object of type Perl6::Metamodel::ModuleHOW 19:08
in block <unit> at /var/home/timo/raku/rakudo/tools/build/install-core-dist.raku line 50
MasterDuke fwiw, `BEGIN my $Staging...` give the same no handler for warn exception 19:09
timo ah that happens inside actual precompilation of a module 19:10
tried putting a CONTROL { .say } before that?
it's the MoarVM::Profiler module that fails with my error message 19:12
and it's possible to just get the same error with: RAKUDO_RAKUAST=1 rakudo lib/MoarVM/Profiler.rakumod 19:14
MasterDuke yeah, `RAKUDO_RAKUAST=1 '/home/dan/Source/raku/rakudo/rakudo-m' --ll-exception -Ilib/ -e 'use MoarVM::Profiler'` dies with `Cannot find method 'add_attribute' on object of type Perl6::Metamodel::ModuleHOW`
timo oh i wonder if I accidentally used the already-installed rakudo-m from an earlier commit for a few of these commands i've tried 19:21
ok i have a lead 19:22
MasterDuke i put some `BEGIN say ...` and they print up to the `class MoarVM::Profiler {` 19:24
but not after
the `has %.foo; has @.bar` cause it to die 19:27
timo env RAKUDO_RAKUAST=1 '/var/home/timo/raku/rakudo/rakudo-m' -e 'unit module MoarVM::Profiler; class MoarVM::Profiler { has $.foo }'
this fails
when it's trying to put the attribute on MoarVM::Profiler, it explodes because MoarVM::Profiler isn't a class, it's a module
m: unit module MoarVM::Profiler; class MoarVM::Profiler { has $.foo } 19:28
camelia ( no output )
timo but on non-rakuast it works
there it refers to the class instead of the module
MasterDuke nice find
timo that may be wrong
but whether it's wrong or not, that's the difference that causes this issue 19:29
m: unit module MoarVM::Profiler; class MoarVM::Profiler { }; say MoarVM::Profiler.HOW.^name
camelia Perl6::Metamodel::ClassHOW
MasterDuke fwiw, if i change `class MoarVM::Profiler` to `class MoarVM::Profiler::App` and use that in the rest of the script, `make install` still dies later 19:31
nine m: module Foo::Bar { class Foo::Bar {} }; say Foo::Bar::Foo::Bar 19:32
camelia Could not find symbol '&Bar' in 'Foo::Bar::Foo'
in block <unit> at <tmp> line 1
nine That's what I posted earlier
It's the flip side of this problem.
RakuAST is broken in one way, but even if you fix the immediate issue, you get an X::Redeclaration because of this 19:33
The EVAL thing is because the constant declaration tries to interpret the EVAL method call, but doing it this way does not give it an outer $_, so the getlexouter to initialize $_ fails
timo yeah i was worried that it might be related to the same stuff i've seen here the last few days with nested modules and multi-part names and such 19:42
19:42 MasterDuke left
nine The fix will involve finding some set of rules that lets the compiler not find the outer MoarVM::Profiler in module MoarVM::Profiler { class MoarVM::Profiler { } } but find the outer X in module Test { my class X::SubtestSkipped { } } 20:29
And yeah, the inverse our vs my makes this all the more horrible 20:30
20:31 kawaii left 20:39 MasterDuke joined
MasterDuke i'm probably not going to be much help, i know next to nothing about modules/packages/etc. but with these changes gist.github.com/MasterDuke17/d8909...55832a5908 `RAKUDO_RAKUAST=1 make -j12 install` works 20:42
timo how about my \Staging = BEGIN "lib/CompUnit/Repository/Staging.rakumod".IO.slurp.EVAL; 20:43
then you don't have to use $
MasterDuke yep, that works 20:45
there are some warnings, though i think you get at least one of them during the build also: 20:47
```
Out-of-sync package detected in LANG1 at  started: { ($last<thid> - $fi
  (value in braid: RakuAST::Class, value in $*PACKAGE: RakuAST::Class)
Out-of-sync package detected in LANG1 at  Process #$*PID ({Instant.from
  (value in braid: RakuAST::Class, value in $*PACKAGE: NQPMu)
Potential difficulties:
    Useless use of , in sink context
    at core#sources/3252DC7507AEE4CA709889A6DBC8A5D8D40EB819 (Test):644
    Installed 24 core modules in 11.225732271 seconds!
```
timo out-of-sync package sounds like you might have edited files under the installation 20:48
oh, wait, that's something entirely different?
MasterDuke well, even if it's pebkac, the two values appearing to be the same in the first warning is odd 20:54
oh, and Geth appears to be down. i just pushed a commit removing the useless ',' 20:59
21:22 MasterDuke left 21:23 Geth left, Geth joined
Geth rakudo/main: c2a5b8c3ab | (Daniel Green)++ | lib/Test.rakumod
Remove useless `,`

This was detected by running `RAKUDO_RAKUAST=1 make install` and getting:
Potential difficulties:
   Useless use of , in sink context
   at core#sources/3252DC7507AEE4CA709889A6DBC8A5D8D40EB819 (Test):644
It looks like it was just a typo that the current frontend doesn't warn about.
21:23
22:36 MasterDuke joined
MasterDuke does anyone else get those `Out-of-sync package detected in LANG1` messages when building on bootstrap-rakuast? the three places it happens are all heredocs, but those are another thing i know nothing about 22:41
22:53 finanalyst left
releasable6 Next release in ≈5 days and ≈19 hours. 2 blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft 23:00
23:18 MasterDuke left