00:12 maylay left 00:13 maylay joined 00:28 maylay left 00:31 maylay joined 00:38 maylay left, maylay joined 00:41 hvxgr left 00:54 shareable6 left 00:56 shareable6 joined 01:07 maylay left 01:19 maylay joined
SmokeMachine I use dynvars a lot to stuff like: 01:20
m: sub html(&block, *%attrs) { my @*children; block; [ "<html { %attrs.map({ "{.key}={.value}" }).join: " " }>", @*children.join("\n").indent(4), "</html>", ].join: "\n" }; sub p($text) { @*children.push: "<p>{ $text }</p>" }; say html { p "a string" }'
camelia ===SORRY!=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> text }</p>" }; say html { p "a string" }<HERE>'
expecting any of:
infix
infix stopper
postfix…
SmokeMachine m: sub html(&block, *%attrs) { my @*children; block; [ "<html { %attrs.map({ "{.key}={.value}" }).join: " " }>", @*children.join("\n").indent(4), "</html>", ].join: "\n" }; sub p($text) { @*children.push: "<p>{ $text }</p>" }; say html { p "a string" }
camelia <html >
<p>a string</p>
</html>
01:30 maylay left 01:32 maylay joined
disbot6 <beato3> Ohh!! SmokeMachine 01:35
<beato3> That seems like a neat use indeed
<beato3> The async functionality I think is most relevant to my current program 01:38
01:39 maylay left
disbot6 <beato3> But I guess I wanna have an example of Raku best practice more generally 01:39
01:49 maylay joined 01:54 maylay left 02:02 maylay joined 02:13 hulk joined 02:14 kylese left
disbot6 <antononcube> Maybe look into “LLM::Graph” — it provides asynchronous execration of graph nodes with directed dependencies between them. 02:26
<antononcube> Shameless, plug, BTW. But, I found it neat for I can do asynchronous version of any function with wrappers. 02:27
02:31 maylay left 02:32 maylay joined 02:46 mahlay joined 02:47 maylay left 03:15 hulk left, kylese joined