all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Konrad Hinsen <konrad.hinsen@fastmail.net>
Cc: guix-devel@gnu.org
Subject: Re: Profiles/manifests-related command line interface enhancements
Date: Sat, 23 Nov 2019 18:10:22 +0100	[thread overview]
Message-ID: <87mucm4iyp.fsf@gnu.org> (raw)
In-Reply-To: <m1imnisrx4.fsf@ordinateur-de-catherine--konrad.home> (Konrad Hinsen's message of "Sun, 17 Nov 2019 11:44:55 +0100")

Howdy!

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

>> I’d like to think that writing Guile declarations for the OS config,
>> manifest, etc. is not just for “power users”.  After all people, or
>> rather “computer-savvy” people in a broad sense, write JSON, YAML,
>> custom config files etc. routinely, and I don’t think the typical config
>> we propose is any “harder”.  You may say I’m a dreamer, but I’m not the
>> only one. 𝅗𝅥𝅘𝅥  ;-)
>
> The problem with powerful formal languages (read: Turing-complete) is
> not writing, but (1) debugging and (2) reading.

Yes and no.  Guile has a debugger, whereas XML/JSON/YAML don’t.  As for
reading, it’s subjective, but I don’t think a full-blown language is
necessarily harder to read.

  (define lst (list 1 2 3))

  lst = [1, 2, 3]

  lst:
    - 1
    - 2
    - 3

The goal for Guix was to have the ‘package’ and ‘operating-system’
forms, for instance, look exactly like what you’d write in JSON etc.,
only with a different syntax.

> 1. Writing a manifest file in Guile is no harder than writing a list
>    in YAML or whatever. But leave out the closing quote behind a
>    package name, and you will get an error message that will make
>    no sense to someone unfamiliar with the *complete* Scheme syntax.
>    For a small and simple file, you can usually spot the problem by
>    inspection (i.e. without the error message), but for more complex
>    files, it makes sense to use a more constrained language in order
>    to provide better error reporting.

Error-reporting is tricky, but it’s tricky also (perhaps even more!)
when parsing YAML.

I agree there’s room for improvement in Guile in that area, but it’s not
that bad either if you compare to error reporting with most YAML, JSON,
etc. libraries.  Also Guile can report errors about semantics.

>    BTW, the Racket team makes that point to argue for their rather
>    complex macro system. It takes much longer to master than traditional
>    Lisp or Scheme macros, but it supports writing macros with error
>    reporting that makes sense to someone who didn't read the macro code.

‘syntax-parse’ is wonderful for that, I agree.

> 2. Power users will always write code in powerful languages that exceed
>    what less advanced users can deal with. And since power users are not
>    necessarily benevolent, this creates a trust issue for the less
>    advanced ones.

Good point.  I tend to (naively?) view it the other way around: that it
gives people an incentive to try and write actual code rather than mere
declarations.

> For a long version of these arguments, see
>    https://hal.archives-ouvertes.fr/hal-01966145/document

Interesting!  The conclusion you seem to draw is that embedded DSLs as
found in Racket fit the bill, and to me, that’s pretty much what we’ve
been trying to do with Guix as well, no?

What do we disagree on, actually?  :-)

Thanks again for your feedback!

Ludo’.

  parent reply	other threads:[~2019-11-23 17:10 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 16:37 Profiles/manifests-related command line interface enhancements Pierre Neidhardt
2019-10-24  9:00 ` Mark H Weaver
2019-10-24  9:32   ` Pierre Neidhardt
2019-10-24 16:28     ` Pierre Neidhardt
2019-10-24 16:42     ` Danny Milosavljevic
2019-10-24 18:16       ` Pierre Neidhardt
2019-10-24 19:23         ` Mark H Weaver
2019-10-24 20:04           ` Pierre Neidhardt
2019-10-24 21:35             ` Mark H Weaver
2019-10-25  9:29               ` Pierre Neidhardt
2019-10-31 11:38                 ` Pierre Neidhardt
2019-11-03 14:18 ` Ludovic Courtès
2019-11-04 10:39   ` Pierre Neidhardt
2019-11-04 11:06     ` zimoun
2019-11-05  6:26     ` Konrad Hinsen
2019-11-05  8:35       ` Hartmut Goebel
2019-11-05  9:03         ` Konrad Hinsen
2019-11-05  9:09           ` Hartmut Goebel
2019-11-05  9:22             ` Pierre Neidhardt
2019-11-05 15:36       ` zimoun
2019-11-05 16:05         ` Konrad Hinsen
2019-11-06 12:09           ` zimoun
2019-11-07 13:07             ` Konrad Hinsen
2019-11-06 17:07           ` Ludovic Courtès
2019-11-06 22:21             ` Bengt Richter
2019-11-07 13:52             ` Konrad Hinsen
2019-11-06 16:35       ` Ludovic Courtès
2019-11-07  7:46         ` Konrad Hinsen
2019-11-07  9:04           ` Pierre Neidhardt
2019-11-07 11:14             ` Konrad Hinsen
2019-11-07 11:36               ` Pierre Neidhardt
2019-11-09 17:59               ` Ludovic Courtès
2019-11-10  9:36                 ` Konrad Hinsen
2019-11-11 15:56                   ` A better XML, config is code (was Re: Profiles/manifests-related command line...) Giovanni Biscuolo
2019-11-13 15:28                     ` Konrad Hinsen
2019-11-12  8:55                   ` Profiles/manifests-related command line interface enhancements Andy Wingo
2019-11-12 20:07                     ` Konrad Hinsen
2019-11-13 20:58                     ` Bengt Richter
2019-11-16 22:02                   ` Ludovic Courtès
2019-11-17 10:44                     ` Konrad Hinsen
2019-11-18 14:25                       ` zimoun
2019-11-19 10:24                         ` Konrad Hinsen
2019-11-23 17:10                       ` Ludovic Courtès [this message]
2019-11-25 11:06                         ` Konrad Hinsen
2019-11-26  9:51                           ` On DSLs Ludovic Courtès
2019-12-02 19:05                             ` zimoun
2019-12-02 19:11                               ` Julien Lepiller
2019-12-03 10:19                                 ` Konrad Hinsen
2019-12-03 14:12                                   ` Ricardo Wurmus
2019-12-03 15:46                                     ` zimoun
2019-12-04  6:33                                     ` Bengt Richter
2019-12-10 16:26                                 ` Ludovic Courtès
2019-12-08  8:48                               ` Konrad Hinsen
2019-12-03 10:26                             ` Konrad Hinsen
2019-12-03 12:00                               ` zimoun
2019-11-11 14:13           ` Profiles/manifests-related command line interface enhancements Hartmut Goebel
2019-11-16 22:27           ` Ludovic Courtès
2019-11-17 11:30             ` Konrad Hinsen
2019-11-18 14:40               ` zimoun
2019-12-22 19:40               ` Andreas Enge
2019-12-22 20:39                 ` Pjotr Prins
2019-11-18 14:15             ` zimoun
2019-11-26  9:36               ` Ludovic Courtès
2019-11-06 16:42     ` Ludovic Courtès
2019-11-07 12:57       ` zimoun
2019-11-17 10:35         ` Package inputs in manifests Ludovic Courtès
2019-11-17 23:11           ` Bengt Richter
2019-11-18 17:14             ` zimoun
2019-11-23 14:05             ` Ludovic Courtès
2019-11-24  5:49               ` Bengt Richter
2019-11-24  7:17                 ` Timothy Sample
2019-11-25  3:42                   ` Bengt Richter
2019-11-18 16:18           ` zimoun

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mucm4iyp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=konrad.hinsen@fastmail.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.