From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53344) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJu39-0004ba-K5 for guix-patches@gnu.org; Thu, 02 Apr 2020 03:14:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJu38-00086Z-L8 for guix-patches@gnu.org; Thu, 02 Apr 2020 03:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJu38-00086V-Hf for guix-patches@gnu.org; Thu, 02 Apr 2020 03:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJu38-0004cV-CM for guix-patches@gnu.org; Thu, 02 Apr 2020 03:14:02 -0400 Subject: [bug#40373] [PATCH] guix: new command "guix run-script" Resent-Message-ID: From: Konrad Hinsen In-Reply-To: <875zeiudjm.fsf@gnu.org> References: <875zeiudjm.fsf@gnu.org> Date: Thu, 02 Apr 2020 09:13:23 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 40373@debbugs.gnu.org Hi Ludo, > What about making that just a new =E2=80=98-s=E2=80=99 flag for =E2=80=98= guix repl=E2=80=99 (just like > Guile=E2=80=99s =E2=80=98-s=E2=80=99 flag)? =E2=80=98-q=E2=80=99 should = always be implied when doing that. > > Now, this wouldn=E2=80=99t be usable as a shebang due to the fact that on= ly one > argument is allowed, unless we do some extra argument tokenizing. That is one reason why I opted for a separate command. The other is that I am in tutorial-driven development mode: I need "guix run-script" in order to be able to insert my own scripts (for analyzing dependencies) into a Guix tutorial for an upcoming MOOC. So I need to make sure that people can run my scripts easily, but also that they understand what they are doing. A command that does something else than its name suggests, with a similarity that is only visible to experts, is no good for use in a tutorial. BTW, I opted for a lengthy name ("run-script" rather than just "run" or "script") according to the principle that short words should be left for frequently used concepts (a principle respected by human languages, but also by Lisp tradition). I am of course aware that much of the code in "run-script" is the same as in "repl", which is not good. But I'd rather think about a better framework for code sharing among Guix scripts than about pushing too much semantic differences into obscure options. An example would be reusable "option clusters", such as "options for Guile" or "options for channels". Cheers, Konrad.