[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30657] Add support for file-like objects to the Prosody configurati
From: |
Ludovic Courtès |
Subject: |
[bug#30657] Add support for file-like objects to the Prosody configuration |
Date: |
Fri, 02 Mar 2018 18:00:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Clément Lassieur <address@hidden> skribis:
> These patches add support for file-like objects to the Prosody service
> configuration. The idea is to replace this mechanism (which is used
> very often):
>
> (plain-file
> (with-output-to-string
> ...
> (format #t ...)
> ...))
>
> with this one:
>
> (mixed-text-file
> (flatten
> (with-tokens-to-list
> ...
> (push-tokens ...)
> ...))
>
> The point is that tokens don't have to be strings.
That’s a great improvement.
I’m wondering if we could somehow avoid building the token list in this
imperative manner.
We could arrange to procedure a string-value gexp, i.e.:
#~(string-append #$a #$b #$c)
What if each ‘serialize-*’ procedure produce a string-valued gexp that
can be directly spliced in this big #~(string-append …)?
That would require changing ‘serialize-*’ to return a value (currently
their return value is ignored.) WDYT? Doable? Pointless?
Thanks,
Ludo’.
- [bug#30657] Add support for file-like objects to the Prosody configuration,
Ludovic Courtès <=