Welcome the channel on the development of Cro, a set of libraries for building reactive distributed systems, lovingly crafted to take advantage of all the Raku Programming Language has to offer (cro.services). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Xliff \o 06:57
Is there a way I can stop a SIGINT? 06:58
jnthn Write a signal handler that does nothing? 09:19
start react whenever signal(SIGINT) { #`( disregard ) }
Xliff \o 12:12
Hi, jnthn. Thanks for the suggestion. 12:13
Sadly, my Cro-based server died just now after a solid 23 hours of operation.
Died with: Unhandled exception in code scheduled on thread 8
malloc(): smallbin double linked list corrupted
What's the best way to debug that?
I have the core file and hourly telemetry reports from the server if that will help. 12:20
Ah.. nope... no core file. Said it dumped, but it's not here. 12:21
jnthn Cro is pure Raku code, so it'd either be a VM bug or a bug in a module with native code. Presumably the core file can be used to get a stack trace. Without the core file, not much can be said. 12:32
Xliff OK, thanks. 13:05
jnthn Ah, also a tip: make sure the MoarVM is built with debug symbols, as that'll give more info. 13:15
Xliff Yep. I do that every week. :) 13:19
jnthn: Are Cro::WebApp templates compiled to code or bytecode? 15:52
Could precompiled templates be stored on a database, for example?
jnthn Turned into Raku code that is EVAL'd on first use of the template 16:12
Xliff Ah, thanks. 16:23
Does ::Template support comments?
I'd like to remove parts of a template without actually removing them. 16:24
Could such be added by the simple rule of: 16:27
token sigil-tag:sym<comment> { '<#' .+? '>' }?
Ah, no... because I need it to NOT end on any ending tag. 16:28
So maybe...
token sigil-tag:sym<comment> { '<#' .+? '#>' }? 16:29
jnthn Maybe the syntax should be <#> ... </#> 16:32
Xliff Don't mind either. How would yours be implemented? 16:34
token sigil-tag:sym<comment> { '<#>' .+? '</.#>' } 16:35
Would I need a <sequence-element>* in there? 16:36
Nope. Neither one works. 16:49
Last one fails with "Type check failed in assignment to @!children; expected Cro::WebApp::Template::AST::Node but got Any (Any" and that's probably because of the
action on sigil-tag
Wionder if this will work... method sigil-tag:sym<comment>($/) { make Nothing.new; } 16:53
Xliff Oh shit! That worked! =D 16:56
Xliff jnthn: Is there a way to trace cro routes? 18:33
Geth cro-webapp: Xliff++ created pull request #78:
- Adds the ability to write comments between <#> and </#> tags
18:43
jnthn Depends what you mean by trace; there's CRO_TRACE=1 which traces the progression through the pipeline 20:55
Xliff No. I want the ability to trace the router. But thanks. 21:52