[09:58] *** sena_kun joined [13:19] *** rypervenche left [13:24] *** rypervenche joined [18:39] *** sena_kun left [18:40] *** sena_kun joined [20:15] *** Xliff joined [20:15] Is there a way to have a sub run whenever a get or route block gets executed? [20:22] Xliff: Make it middleware? [20:39] japhb: Will it have access to the signature of the route handler? [20:42] Have anyone ever tried compiling Cro templates into js? Using rakudo.js? [20:45] Or is Cro template just an in memory data inside your Cro application after it’s compiled? [21:07] *** sena_kun left [21:08] *** sena_kun joined [21:18] *** sena_kun left [21:28] SmokeMachine: There was an attempt, but done using the fact that the template compiler first forms an AST, and then generates Raku code from that, but one could generate JS from the AST instead. [21:28] That's probably more practical than using rakudo.js [21:31] SmokeMachine: They all bottom out in $*CRO-ROUTE-SET.add-handler($method, &handler); you could mix in to $*CRO-ROUTE-SET and override that method (something like `sub special-route(&spec) { route { $*CRO-ROUTE-SET does MyRole; spec() } }` [21:31] oops, sorry, tht was for Xliff ^^ [21:32] Noting that a future Cro HTTP router is liable to make some or all of the DSL keywords into macros so it can form the route dispatcher at compile time [23:10] jnthn: np, thanks! Another question: is there a way to add slangs to Cro template?