🦋 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.
ab5tract c.a63: beta 25 should fix the mult-line REPL 02:46
c.a53: beta 25 should fix the mult-line REPL
lizmat clickbaits rakudoweekly.blog/2024/11/04/2024-43-one-of-21/ 12:46
SmokeMachine is there a way to avoid conflicts from local code when you call .AST on a string 15:46
?
like this:
m: class C {}; Q|class C {}|.AST 15:47
camelia ===SORRY!=== Error while compiling
Redeclaration of symbol 'C'.
at line
timo m: class C {}; package { say Q|class C {}|.AST } 15:49
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::Class.new(
name => RakuAST::Name.from-identifier("C"),
body => RakuAST::Block.new(
body => RakuAST::Blockoid.new(
Ra…
timo :D
ugexe you could make one my scoped if that is an option
m: class C {}; Q|my class C {}|.AST 15:50
camelia ( no output )
timo `my $eval_ctx := nqp::getattr(CALLER::,PseudoStash,'$!ctx');` the AST method is explicitly doing this and it doesn't look configurable
but it's also saying that the AST method is "for core debugging mainly" 15:51
SmokeMachine what about this? 15:55
m: class C { sub a is export {} }; package {say Q|class C { sub a is export {} }|.AST}
camelia ===SORRY!=== Error while compiling EVAL_0
A symbol '&a' has already been exported
at EVAL_0:1
timo m: class C { sub a is export {} }; my package { say Q|class C { sub a is export {} }|.AST } 15:56
camelia ===SORRY!=== Error while compiling EVAL_0
A symbol '&a' has already been exported
at EVAL_0:1
timo m: class C { sub a is export {} }; my package { say Q|my class C { sub a is export {} }|.AST }
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::Class.new(
scope => "my",
name => RakuAST::Name.from-identifier("C"),
body => RakuAST::Block.new(
body => RakuAST::Blo
timo m: class C { sub a is export {} }; package { say Q|my class C { sub a is export {} }|.AST }
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::Class.new(
scope => "my",
name => RakuAST::Name.from-identifier("C"),
body => RakuAST::Block.new(
body => RakuAST::Blo
timo the "my class" seems to do that as well, ugexe++
SmokeMachine my problem is that I'm searching by code on my home (this intends to become a tool) and when if finds the code I'm using to find the AST, it breaks... Something like this: usercontent.irccloud-cdn.com/file/.../image.png 16:02
timo yeah, i'd say steal the contents of the AST method and make a change or two. then use a context that doesn't have anything in it. i'm not sure what happens if you don't pass the "outer_ctx" named parameter to $compiler.compile, maybe that's exactly what you need 16:04
ab5tract SmokeMachine: you'll want to port the AST method anyway, I think, as it may be marked as an implementation detail or otherwise removed/replaced 16:33
coleman rebooting docs sites 20:05
SmokeMachine Thank you all! Sorry for the delay, I had to go back to work... I think that's almost there: usercontent.irccloud-cdn.com/file/.../image.png 20:24
Xliff \o 20:31
Who runs the @raku.rocks domain? 20:32
coleman I think Liz owns it 20:37
melezhik. Just dropped a small post on Raku/Golang integration in pipelines. Comments are welcome . news.ycombinator.com/item?id=42055130 21:16
coleman melezhik: i am reminded (favorably) of Puppet Bolt's task definitions and argument parsing 21:53