[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] Improve HTML engine code

From: Arun Isaac
Subject: Re: [PATCH 0/2] Improve HTML engine code
Date: Sun, 10 Sep 2023 06:17:54 +0100

Hi Ludo,

> Both are definitely worthwhile improvements! So here it is: 👍

Thanks for the quick thumbs up! I have pushed these two commits and a
ton of others as well. I have replaced much of the HTML table code with
actual CSS. There's still a little more. I will do that in time.

> It’d be tempting to use SXML in the HTML engine, but that’s probably
> tricky (markup writers are supposed to directly spit out partial output)
> and entails non-obvious tradeoffs (the whole SXML tree would have to be
> kept in memory, there may still be corner cases where “real” HTML is not
> SXML), plus the ‘!’ markup means that we need to be able to insert raw
> HTML in the output.  So yeah, no SXML i guess.

Indeed, my first instinct was to reach out for SXML. I was pretty
disappointed when I realized it's not possible thanks to the way markup
writers work. If you have any ideas about extending the notion of markup
writers to allow for SXML to be used, I'm all ears and will be happy to

The way our markup writers directly spit out strings to stdout is quite
side-effectful and contrary to the spirit of functional programming. So,
I would definitely be interested in alternatives. When we export a
single skribilo document to multiple html files (say one chapter per
html file), our html engine even directly mutates other files in
addition to its usual stdout output. That's even worse! :-) It makes
`evaluate-document' side-effectful and hinders clean composition. We
should do better.

Love to hear your ideas! :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]