30 Aug 2022
Altreus er hold on, I think I do somewhere ... 13:46
jnthn: I added this script-mode option and I'm using it in the echo server example github.com/shuppet/raku-api-discor...kumod#L187 13:47
It definitely takes a tad longer to exit than it used to 13:48
I should say "bye" eh
oh, looks like it handles the close event and reconnects! 13:55
jnthn Haha...when your code fights itself :) 13:57
Altreus And looks like the close code in «whenever $!conn.closer -> $close» is BigEndian
Is that part of the websocket standard? As in is there scope for the closer promise to return something a bit smarter? 13:58
jnthn I'd assume endianness is part of the standard. Can't remember the details without looking at the standard (and have a meeting to disappear to now...) 14:00
Altreus no probs, "enjoy"! 14:01
1 Sep 2022
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
Oh shit! That worked! =D 16:56
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
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
5 Sep 2022
Altreus Hmm, turns out when I close the websocket it responds with 1002, which apparently means I violated the protocol 11:44
21 Sep 2022
SmokeMachine hi! is there any opinion about this suggestion? github.com/croservices/cro-webapp/issues/77 09:07