🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs can be inspected at colabti.org/irclogger/irclogger_log/raku
Set by lizmat on 1 May 2021.
kawaii tyil: I think the IRC <-> Discord bot has been dead for some time, were you the person hosting that or was it someone else? 13:20
tyil that was me, yes 13:22
I'll put it on my todo list to bring it back 13:23
kawaii Thanks! 13:28
codesections is it possible for class A to trust class B without A and B living in the same file? 17:58
Xliff \o 20:23
Is there a way to access the grammar used to parse Raku code from Raku user code? 20:24
codesections m: say $*LANG.slang_grammar('MAIN'); # maybe? 20:27
camelia Dynamic variable $*LANG not found
in block <unit> at <tmp> line 1
codesections I _think_ ^^^ gives you something when not in a REPL, but I don't really understand that aspect (yet). 20:28
it's not really documented
Xliff Huh! Lang used to work! 21:06
Xliff Aha! Looks like it can only be seen inside an EXPORT() 21:11
Well that sucks. 21:12
Xliff OK, so $*LANG is a Perl6::Grammar. Promising! 21:13
Xliff Trying to use $*LANG.parse results in "Could not locate compile-time value for symbol Block" 21:22
And that's where I think I'm going to take a break.
Xliff What rule in Perl6::Grammar will parse a class def? 22:24
[Coke] m: say 3; say 4; # if I pipe this to | head -1, it complains. how to make it stop? 22:44
camelia 3
4
ugexe $*OUT.out-buffer = 1; ? 22:45
raydiak Xliff: package_declarator:sym<class> 22:46
Xliff And that's where I think I'm going to take a break. 22:47
Um. Bad keyboard. 22:48
radiak: How do I pass that to the grammar?
when I do this: "$*LANG.parse($class-parse, rule => 'term');"
Raku gives error: "No such method 'CALL-ME' for invocant of type 'Str'"
Gotta go. Cat's need to be fed. 22:49
raydiak Xliff: sorry, I don't know very much about such things. I just read the grammar to find the rule you were looking for 23:13