(no title)
rmgk | 1 year ago
The systemd variant uses one of the universal DSLs for key-value pairs (key=value) and the universal DSL for calling programs (program name, space separated list of arguments).
The latter is even the same syntax that lisp uses for functions calls – thus I would argue the systemd config file looks more like a lisp program than the Guix version does.
As a person that has seen a reasonable amount of sexpression, this is what I would not bat an eye at:
(start /path/to/ntpd -n -c /etc/ntpd.conf -u ntpd -g)
Pay08|1 year ago
rmgk|1 year ago
If so, I fully agree, on the config being less powerful.
Maybe let me add to my original argument, because it does not seem to make it’s point well.
I think that it would be feasible (and worthwhile) to simplify the configuration structure while keeping Guile syntax, and have the complaint be a non issue. As opposed to keeping the semantic structure and just changing the syntax as the comment I replied to proposed.
bmacho|1 year ago
Yeah, don't do that. Both the program name, and the arguments can and do contain spaces. Do instead what every other languages do, that is, use a list of strings to invoke programs.
> The latter is even the same syntax that lisp uses for functions calls
No it's not.
rmgk|1 year ago
Choosing space for a very common thing in your language often makes sense, as you reduce the amount of visual elements. Thus space is often used to apply arguments to functions. Lisp and Haskell are common examples Though, you could argue that in Lisp it only is an application if it is within parenthesis.