all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bokr@bokr.com
To: jgart <jgart@dismail.de>
Cc: John Kehayias <john.kehayias@protonmail.com>, guix-devel@gnu.org
Subject: Re: Should Guix support writing CLI Common Lisp scripts? (Think Roswell)
Date: Tue, 27 Dec 2022 23:06:31 +0100	[thread overview]
Message-ID: <20221227220631.GA49814@LionPure> (raw)
In-Reply-To: <5706580cffe4acd70e7a790ff7df810b@dismail.de>

Hi Jgart,

On +2022-12-27 19:23:18 +0000, jgart wrote:
> > 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? 
> 
> Yes, that is one feature that I was nodding ambiguously at. Sorry
> 
> > guix shell sbcl sbcl-cl-csv unoconv -- sbcl --load myscript.lisp ~/Downloads/*.xlsx
> 
> That command is too long. What Roswell does is create binaries and installs them in your PATH for your usage like a traditional script that you can call without also having to call the interpreter in your terminal invocation.
> 
> I want to type just the following and have `myscript` be an executable program available in my `guix home` environment:
> 
> > myscript ~/Downloads/*.xlsx

If bash is interpreting your script, could you use alias myscript=YOUR_MAGIC_HERE
to get the concise invocations you want?
(which bash BTW? -- from logind, child of that, or via a guix profile, or minimal-something ??)
┌──────────────────────────────────────────────────────────────────────────────┐
│                                  help alias                                  │
├──────────────────────────────────────────────────────────────────────────────┤
│ alias: alias [-p] [name[=value] ... ]                                        │
│     Define or display aliases.                                               │
│                                                                              │
│     Without arguments, `alias' prints the list of aliases in the reusable    │
│     form `alias NAME=VALUE' on standard output.                              │
│                                                                              │
│     Otherwise, an alias is defined for each NAME whose VALUE is given.       │
│     A trailing space in VALUE causes the next word to be checked for         │
│     alias substitution when the alias is expanded.                           │
│                                                                              │
│     Options:                                                                 │
│       -p      print all defined aliases in a reusable format                 │
│                                                                              │
│     Exit Status:                                                             │
│     alias returns true unless a NAME is supplied for which no alias has been │
│     defined.                                                                 │
└──────────────────────────────────────────────────────────────────────────────┘

> 
> I want an automated way to prepare the script for that command line user experience. That is the convenience that roswell provides. I agree that is is sweet sugar but I'm lazy and don't want to type long CLI invocations.
>

I think it's possible, the question for me is what language
do you want to code your automation in :)

> Thanks for sharing the above though.
> 
> It's great to see how people are using `guix shell`.
> 
> Given what I said, I might just do what you're suggesting John, because I'm not sure when I'll be able to implement a solution like the roswell one in Guix.
> 
> Thanks for your thoughts on the topic. They are appreciated.
> 
> all best,
> 
> jgart
>
--
Regards,
Bengt Richter


      parent reply	other threads:[~2022-12-27 22:07 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
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 [this message]

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

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

  git send-email \
    --in-reply-to=20221227220631.GA49814@LionPure \
    --to=bokr@bokr.com \
    --cc=guix-devel@gnu.org \
    --cc=jgart@dismail.de \
    --cc=john.kehayias@protonmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.