From: Maxime Devos <maximedevos@telenet.be>
To: "Andrew Tropin" <andrew@trop.in>, "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Xinglu Chen <public@yoctocell.xyz>,
guix-maintainers@gnu.org
Subject: Re: Return back original implementation for text-config serialization
Date: Sat, 05 Feb 2022 12:34:31 +0100 [thread overview]
Message-ID: <95f26136ec9babaf6b6544ca169495eb70953249.camel@telenet.be> (raw)
In-Reply-To: <87fspax5ac.fsf@trop.in>
[-- Attachment #1: Type: text/plain, Size: 2508 bytes --]
Andrew Tropin schreef op wo 26-01-2022 om 11:36 [+0300]:
> In addition to the problems I mentioned above:
>
> 1. Mixed usage of two configuration languages (nginx-conf and lisp).
> 2. Having a string, which should be properly escaped (luckily for
> this
> example it's not a problem).
Mixing two configuration languages can be avoided by supporting
everything with records.
>
> we also:
>
> 3. Have to implement our own templating engine (using format function
> in this case) to share the values from guile with the config.
This seems to be the same for this list based configuration system
and record based configuraiton system; for the nginx example you gave,
all these lists with parentheses need to turned into something with
brackets that nginx understands anyway.
> 4.1. Don't know where extra-content goes. (It goes to http section
> not the
> end of the file, so we have to start with "}" to get a correct
> configuration).
Can be solved by adding missing options to the Guix service definition
(and documentation) when the need arises.
> 4.2. Don't control where it must be placed. (Can be important in
> other
> use cases, which I can share if needed).
Likewise.
> 5. Have inconsistent implementation of extra-config, extra-content,
> raw-lines
> and other escape hatches (We need to learn it everytime we write a
> new
> service configuration).
Likewise.
Also, the mapping of upstream configuration files to lists in Guix
seems far from obvious to me: in https://issues.guix.gnu.org/52698,
how am I supposed to know that 'us,ru' must be a symbol, why isn't
it a string? If one of the strings for some property includes a
special character from the configuration language (say, '$'),
should it be escaped in Guix ((bindsym ... "[class=\"$100 dollars\"]"
...) or (bindsym ... "[class=\"\\$100 dollars\""]""))?
Why (bindsym ... "[class=\"foo\"]") instead of
(bindsym ... (= class "foo"))?
Why (bindsym ... exec emacsclient ...) and not
(bindsym ... exec (file-append emacs "/bin/emacsclient) ...)?
How am I supposed to know whether emacs is in the path or not,
and if it is, is this merely an implementation detail?
How would I know if it's (bindsym ... exec emacsclient -c --eval
"'(eshell)'") or (bindsym ... "exec emacsclient -c --eval
\"'(eshell)'\"")? Since the idea is to keep as close to the
configuration language as possible, shouldn't it be the second?
Why lists and not vectors?
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2022-02-05 11:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-09 9:12 Return back original implementation for text-config serialization Andrew Tropin
2022-01-09 11:19 ` Liliana Marie Prikler
2022-01-09 17:48 ` Andrew Tropin
2022-01-09 19:44 ` Liliana Marie Prikler
2022-01-10 9:49 ` Andrew Tropin
2022-01-10 20:12 ` Liliana Marie Prikler
2022-01-12 15:05 ` Andrew Tropin
2022-01-09 12:17 ` Maxime Devos
2022-01-09 12:19 ` Maxime Devos
2022-01-09 17:59 ` Andrew Tropin
2022-01-09 19:00 ` Maxime Devos
2022-01-18 14:26 ` Ludovic Courtès
2022-01-20 13:20 ` Andrew Tropin
2022-01-21 9:30 ` Maxime Devos
2022-01-26 8:34 ` Andrew Tropin
2022-01-27 5:04 ` Maxim Cournoyer
2022-01-28 15:48 ` Andrew Tropin
2022-02-05 11:09 ` Ludovic Courtès
2022-02-13 14:14 ` Andrew Tropin
2022-01-26 8:36 ` Andrew Tropin
2022-02-05 11:34 ` Maxime Devos [this message]
2022-02-13 14:09 ` Andrew Tropin
2022-01-24 15:37 ` Ludovic Courtès
2022-01-26 9:11 ` Andrew Tropin
2022-01-26 9:21 ` Andrew Tropin
2022-02-05 14:43 ` Xinglu Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95f26136ec9babaf6b6544ca169495eb70953249.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=andrew@trop.in \
--cc=guix-devel@gnu.org \
--cc=guix-maintainers@gnu.org \
--cc=ludo@gnu.org \
--cc=public@yoctocell.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).