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
