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: Ricardo Wurmus
Subject: Re: Composing service definitions (and maybe fmt)
Date: Wed, 20 Jan 2016 10:37:37 +0100

Christopher Allan Webber <address@hidden> writes:

>> 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.

I think I didn’t express myself clearly: I’m in favour of skribe-style
string quasiquoting.  The “Schemey way of expressing” things like udev
rules that “I would not want to have to learn” was referring to using
some sort of DSL rather than quasiquoting.

But I’m still not clear on what exactly this means.  For udev rules, for
example, I probably would not have any need for “variable substitution”
at all; I’d just copy and paste them verbatim.

What kind of configuration files do need substitution?  What would that
look like?  Is it only to reference store items as in gexps?

~~ Ricardo



reply via email to

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