guix-devel
[Top][All Lists]
Advanced

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

Re: Composing service definitions (and maybe fmt)


From: Christopher Allan Webber
Subject: Re: Composing service definitions (and maybe fmt)
Date: Tue, 19 Jan 2016 07:58:30 -0800

Ricardo Wurmus writes:

> Christopher Allan Webber <address@hidden> writes:
>
>> (I've also thought that some sort of string reader similar to skribe's
>> [foo ,(bar)] string-quasiquoting may make things easier.  Might even be
>> complimentary...)
>
> I like this idea.  It seems unrealistic to me to have configuration file
> writers for each of the many ideosyncatic configuration file formats.

You're probably right.  It would be a lot of work to write that many
writers, and a lot to ingest every time.

> I also don’t enjoy having to concatenate strings to generate
> configuration files and I think that it would be useful if we had
> string-quasiquoting.

Yes, I think so.  It brings a lot of the advantages of other string
templating system without having some massively lossy DSl.

> But I think we need some example cases first.  My experiences is
> coloured by concatenating strings for udev rules.  That’s not nice, but
> I also would not want to have to learn a new Schemey way of expressing
> these rules — especially when I just want to copy them with minimal
> changes from documentation and don’t want to have to understand them
> first.

I agree that learning a bunch of writer functions for expressing rules
would *usually* just be too much to learn.  So maybe fmt is total
overkill.  (You can build lesser string generator functions yourself
that can be combined together anyhow, even if they aren't quite as
combinator'y.)

Though I think skribe-style string quasiquoting is not hard for a
schemer to learn.  I picked it up almost immediately.  And it's a lot
cleaner than the jinja2 style string templating I've grown accustomed to
from python web/deployment land.



reply via email to

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