From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Composing service definitions (and maybe fmt) Date: Wed, 20 Jan 2016 10:37:37 +0100 Message-ID: References: <87oacloy61.fsf@dustycloud.org> <87fuxt5zh9.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLpD9-0001MI-Im for guix-devel@gnu.org; Wed, 20 Jan 2016 04:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLpD5-000823-7p for guix-devel@gnu.org; Wed, 20 Jan 2016 04:37:55 -0500 Received: from pegasus.bbbm.mdc-berlin.de ([141.80.25.20]:36060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLpD4-00081w-U6 for guix-devel@gnu.org; Wed, 20 Jan 2016 04:37:51 -0500 In-Reply-To: <87fuxt5zh9.fsf@dustycloud.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Christopher Allan Webber Cc: guix-devel@gnu.org Christopher Allan Webber writes: >> But I think we need some example cases first. My experiences is >> coloured by concatenating strings for udev rules. That=E2=80=99s not = nice, but >> I also would not want to have to learn a new Schemey way of expressing >> these rules =E2=80=94 especially when I just want to copy them with mi= nimal >> changes from documentation and don=E2=80=99t want to have to understan= d 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 t= o > from python web/deployment land. I think I didn=E2=80=99t express myself clearly: I=E2=80=99m in favour of= skribe-style string quasiquoting. The =E2=80=9CSchemey way of expressing=E2=80=9D thi= ngs like udev rules that =E2=80=9CI would not want to have to learn=E2=80=9D was referr= ing to using some sort of DSL rather than quasiquoting. But I=E2=80=99m still not clear on what exactly this means. For udev rul= es, for example, I probably would not have any need for =E2=80=9Cvariable substit= ution=E2=80=9D at all; I=E2=80=99d 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