🦋 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.
leont I wrote my first RakuAST code, converting Path::Finder's glob-to-regex code. I consider it a good sign I was able to do this without asking questions, the second article was helpful in getting me started. 01:05
lizmat glad to hear that! 09:32
nine lizmat: I don't have anything per se against .grep / .first on RakuAST nodes. I'm just wary of them in RakuAST core code, as we should traverse the tree as little as possible if we want any hope for the compiler to be reasonably fast. 10:52
lizmat well, this is more intended for RakuAST users, rather than internal uses 10:53
think rakudoc renderers
Geth rakudo/main: 14b803f519 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.pm6
RakuAST: add .map on RakuAST nodes based on gather/take

  - also re-implement .rakudoc / .grep using gather / take
10:55
lizmat also: since RakuAST::Node is an Any, .map / .grep / first were already available on nodes, better make them do something sensible / expected
Geth rakudo/main: 73a6ff6f44 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Deparse.pm6
RakuAST: deparse support for RakuAST::StatementPrefix::Phaser::Check
12:32
lizmat m: dd (1,2,3,4).first: -> $a, $b { dd $a, $b } # TIL that .first doesn't take Callables with multiple arguments 13:16
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
Geth rakudo/main: 213bacbb14 | (Elizabeth Mattijsen)++ | src/Raku/ast/doc-block.rakumod
RakuAST: some children in RakuAST::Doc:: *should* be visited
14:08
rakudo/main: fdb84124e6 | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Fixups.pm6
RakuAST: introduce @*LINEAGE in .map/grep/first

When using .map / .grep / .first on RakuAST::Node objects, the dynamic variable @*LINEAGE will be set with all of the parent objects of the topic.
Also make sure that .first(:end) does not actually visit all objects, but really starts from the end with actually visiting.
lizmat appears unstoppable: dev.to/lizmat/walking-the-rakuast-tree-3fbd 18:23
JRaspass I swear that was a three-part series when I last looked, it keeps growing! 18:33
tellable6 2023-02-11T13:24:21Z #raku <tbrowder> JRaspass i
2023-02-11T13:25:07Z #raku <tbrowder> JRaspass i've asked for some help on irc #raku-land
lizmat it was :-) 18:34
Xliff Those RakuAST nodes... they might be part Tribble! 20:54