From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:52061) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJvz8-0002lw-UQ for guix-patches@gnu.org; Thu, 02 Apr 2020 05:18:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJvz7-0005aB-Se for guix-patches@gnu.org; Thu, 02 Apr 2020 05:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJvz7-0005Zx-PV for guix-patches@gnu.org; Thu, 02 Apr 2020 05:18:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jJvz7-000335-L4 for guix-patches@gnu.org; Thu, 02 Apr 2020 05:18:01 -0400 Subject: [bug#40373] [PATCH] guix: new command "guix run-script" Resent-Message-ID: MIME-Version: 1.0 References: <875zeiudjm.fsf@gnu.org> In-Reply-To: From: zimoun Date: Thu, 2 Apr 2020 11:17:19 +0200 Message-ID: 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: Konrad Hinsen Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 40373@debbugs.gnu.org Hi Konrad, On Thu, 2 Apr 2020 at 09:14, Konrad Hinsen wro= te: > > What about making that just a new =E2=80=98-s=E2=80=99 flag for =E2=80= =98guix 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 shoul= d always be implied when doing that. > > > > Now, this wouldn=E2=80=99t be usable as a shebang due to the fact that = only 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". Initially, I thought the same as Ludo: "run-script" should be an option to "repl". And I understand your UI concerns. Maybe, we could deprecated "repl" and add "run" with: - guix run (same than the "guix run-script" proposal) - guix run or guix run --repl doing the what "guix repl" does. The new command "guix run" could have more or less the same option than "guile" but prepending all the paths correctly. I mean we need something like "guix name-it " mimicking "guile " adding the correct Guix modules, IMHO. BTW, thank you for this. Because it was missing in my toolbox and I was annoyed until now. Cheers, simon