From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: Re: Profiles/manifests-related command line interface enhancements Date: Mon, 25 Nov 2019 12:06:16 +0100 Message-ID: References: <87mudrxvs8.fsf@ambrevar.xyz> <87mudd59ho.fsf@gnu.org> <877e4glyc3.fsf@ambrevar.xyz> <87v9rxx8ri.fsf@gnu.org> <87d0e4oy51.fsf@ambrevar.xyz> <878sop6icq.fsf@gnu.org> <87d0drscng.fsf@gnu.org> <87mucm4iyp.fsf@gnu.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:470:142:3::10]:47396) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZCCC-0000OR-Eu for guix-devel@gnu.org; Mon, 25 Nov 2019 06:06:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZCCB-0007vx-BK for guix-devel@gnu.org; Mon, 25 Nov 2019 06:06:20 -0500 In-Reply-To: <87mucm4iyp.fsf@gnu.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" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Hi Ludo, I'll start from the end: > What do we disagree on, actually? :-) This: >> 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. I'd say we should encourage people to write declarations as much as possible and resort to executable code only when declarations become too messy. As a corollary, we should support most configuration-style use cases with suitable declarative forms, much like these: > The goal for Guix was to have the =E2=80=98package=E2=80=99 and =E2=80=98= operating-system=E2=80=99 > forms, for instance, look exactly like what you=E2=80=99d write in JSON e= tc., > only with a different syntax. For better illustration, I'll try to rewrite my own manifests in the way I'd like to be able to write them. That's probably more useful than theory (a tough statement to make for a theoretician ;-) The main reason why I want to see more declarative style is: >> 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=E2=80=99t. = As for > reading, it=E2=80=99s subjective, but I don=E2=80=99t think a full-blown = language is > necessarily harder to read. It's harder to read because you need to understand the language's execution model if there is one. YAML etc. don't, there is nothing but literals. Which is also why they don't need a debugger. > (define lst (list 1 2 3)) > > lst =3D [1, 2, 3] Fine. But then a power user comes along and writes (define lst (cons* 1 2 '(3))) That may be bad style, but as a reader I have to be able to deal with it nevertheless. And bad style may in fact serve to obfuscate evil intentions. > Interesting! The conclusion you seem to draw is that embedded DSLs as > found in Racket fit the bill, and to me, that=E2=80=99s pretty much what = we=E2=80=99ve > been trying to do with Guix as well, no? Indeed, just not enough for my taste! Cheers, Konrad.