unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Kehayias <john.kehayias@protonmail.com>
To: jgart <jgart@dismail.de>
Cc: glv@posteo.net, Charles <charles.b.jackson@protonmail.com>,
	contact@conses.eu, guix-devel@gnu.org
Subject: Re: Should Guix support writing CLI Common Lisp scripts? (Think Roswell)
Date: Tue, 27 Dec 2022 18:25:24 +0000	[thread overview]
Message-ID: <87r0wkk8kx.fsf@protonmail.com> (raw)
In-Reply-To: <24871675f2ccdf7f3c46c46832b3f3f9@dismail.de>

Hi Guixers/Lispers,

On Tue, Dec 27, 2022 at 06:14 PM, jgart wrote:

> Hi Guixers,
>
> Should Guix support writing CLI Common Lisp scripts? (Think Roswell)
>
>> Although Roswell is a unified interface to Common Lisp implementations, it also
>> encourages writing scripts with it.
>> A "Roswell script" is an implementation-independent script which can be invoked from a
>> shell command line, launched by > Roswell and run under standard CL environment.
>
> Just insert "Guix" wherever you see Roswell mentioned in the above quote.
>
>> * A roswell script can be distributed using quicklisp's infrastructure
>
> Just insert "Guix" wherever you see quicklisp is mentioned in the above quote.
>
>> If you're the author of the library, then consider adding the ros file to the repository
>> and automatically providing a roswell-installable command-line interface to it.
>
> Same above, insert Guix.
>
> I think we should make it easier for Lispers to write CLI scripts with Guix.
>
> WDYT
>
> <https://roswell.github.io/Roswell-as-a-Scripting-Environment.html>

I'm not sure what you mean if it is something beyond what we can do already with 'guix shell.' Do you mean using a particular hashbang as well? I haven't done that but my simplistic usage is quick and easy for me.

For example, I like to have some CL scripts I use for file processing that lives as a single .lisp file. To run it I just do:

guix shell sbcl sbcl-cl-csv unoconv -- sbcl --load myscript.lisp ~/Downloads/*.xlsx

where I can include the compiler/interpreters sbcl, needed library, and an external tool that is called by the script for pre-processing. Works great, and of course instantly after the first caching. This could be combined with a manifest, version/channel pinning, making my script a package in a channel, guix.scm file, and so on, to make it more reproducible. But for me this is already super handy and easy, just one line.

John



  reply	other threads:[~2022-12-27 18:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 18:14 Should Guix support writing CLI Common Lisp scripts? (Think Roswell) jgart
2022-12-27 18:25 ` John Kehayias [this message]
2023-01-16  1:01   ` Charles
2022-12-27 19:23 ` jgart
2022-12-27 19:58   ` Russell Sim
2022-12-27 21:06   ` jgart
2022-12-27 21:42     ` Russell Sim
2023-01-17 10:07       ` Attila Lendvai
2022-12-27 22:06   ` bokr

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87r0wkk8kx.fsf@protonmail.com \
    --to=john.kehayias@protonmail.com \
    --cc=charles.b.jackson@protonmail.com \
    --cc=contact@conses.eu \
    --cc=glv@posteo.net \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).