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. |
|||
04:47
AlexDaniel left
04:48
AlexDaniel joined
08:49
patrickb joined
09:57
patrickb left
|
|||
lizmat | sanity check: Cro::WebApp::Template does not have the concept of an "else" does it ? | 10:19 | |
10:21
sena_kun joined
|
|||
Altreus | rolling for a sanity check at this time of day seems like a doomed endeavour | 10:31 | |
Instead of knocking that question off with spam I think i'll start a GH discussion | 10:32 | ||
lizmat | Altreus++ | 10:34 | |
jnthnwrthngtn | lizmat: No | 10:36 | |
lizmat | jnthnwrthngtn++ # clarity :-) | ||
Altreus | github.com/croservices/cro-webapp/issues/44 | 10:52 | |
hope I represented that correctly | |||
I'm kind of eager to see this now! | |||
I haven't used a structure-aware language since Odoo removed their awesome PDF template language | |||
and replaced it with, you guessed it, a dumb byte-stream generator | 10:53 | ||
jnthnwrthngtn | Beyond what lizmat said, I think | 10:55 | |
<$_.link^? a href="<$_.link>"><$_.text></$> | |||
Should be spelled | |||
<?$_.link a href="<$_.link>"><$_.text></$> | |||
Basically the whole thing hangs of that in Raku terms would be a TTIAR error | 10:56 | ||
lizmat | funny how I just wrote that as well :-) | ||
jnthnwrthngtn | gah | ||
*hangs off | |||
*what | |||
Also all the $_ mentions are not needed | 10:57 | ||
Altreus | ?X and ^?X would be different | ||
Yeah I realised that towards the end | |||
jnthnwrthngtn | Would be: <?.link a href="<.link>"><.text></?> | 10:58 | |
lizmat | jnthnwrthngtn: shouldn't that close with </?> instead of </$> ? | ||
ok | |||
jnthnwrthngtn | lizmat: Yes, just noticed that also :) | ||
Altreus | yeah that's nice consistency | ||
jnthnwrthngtn | What's the ^ about? | ||
I didn't really get why that's there | |||
Altreus | conditional wrap vs conditional entire tree | ||
^? is *this tag* is conditional | |||
? is *this tree* is conditional | 10:59 | ||
<^?x>y</^?> would always print y | |||
lizmat | what's the difference ? | ||
ah | |||
jnthnwrthngtn | Oh, I see. Hmmm. | ||
Altreus | but sometimes it would wrap it with whatever is in the special tag | ||
jnthnwrthngtn | OK, I get the use case. I don't like that exact syntax proposal. | 11:00 | |
Altreus | This is my single most hated problem in writing temlpated HTML | ||
that's OK, I wanted to express the use case and not the syntax :D | |||
jnthnwrthngtn | Altreus++ # this is a really nice idea overall | ||
Altreus | thanks :D | ||
jnthnwrthngtn | It doesn't make the parse nor compilation excessively more complex either, and hangs off something that'd be an error today | 11:01 | |
Altreus | oh good, that was my original premise | 11:02 | |
jnthnwrthngtn | If folks wouldn't confuse it with something hash-like % would be a natural choice for "put this either side" :) | ||
lizmat | %% ? | 11:03 | |
Altreus | I feel like <SYMBOL ...> is a useful space to explore | ||
I picked ^? because it sort of meant "maybe parent" in my head | |||
jnthnwrthngtn | The overall principle is < followed by a non-identifier char is for the template engine. We do play with fire a little on doctype declarations and comments. | 11:05 | |
Altreus | good thing comments have such a long token | ||
jnthnwrthngtn | Yeah, those aren't so bad | 11:06 | |
Altreus | also CDATA I suppose | ||
jnthnwrthngtn | I'm slightly pondering whether we refine it from "identifier char" to "letter char", because I don't think there's any HTML elements or things in that space starting with _ | ||
Then folks could write <_(.blah)> instead of <&_(.blah)> for inserting a translation | 11:07 | ||
Altreus | Based on my vague memories of using custom elements, _ is not valid in a tag name | ||
jnthnwrthngtn | Given if folks are doing that they probably will write it really quite often. | 11:08 | |
Altreus | / '<' $NON-TAG-CHAR / | ||
jnthnwrthngtn | (There's already a PR for basic i18n stuff that does it with `<&_(.blah)>`) | 11:09 | |
lizmat | fwiw, I think <_(.blah)> would be too hard to read | 11:10 | |
I like it that the <& indicates something will get executed | |||
and probably would continue using <&_ myself | 11:11 | ||
Altreus | I spent all my attention mojo on this :( | 11:17 | |
Now I don't wanna do my job | |||
jnthnwrthngtn is trying to do work on the thing he's meant to today rather that trying to implement the idea :) | 11:24 | ||
Altreus | :) | 11:25 | |
11:40
patrickb joined
13:21
patrickb left
14:00
sena_kun left
14:11
sena_kun joined
16:33
japhb left
19:36
patrickb joined
21:19
patrickb left
22:10
xinming left
22:12
xinming joined
22:55
sena_kun left
|