From: Bengt Richter <bokr@bokr.com>
To: zimoun <zimon.toutoune@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Discoverability at the REPL level
Date: Mon, 16 Nov 2020 15:21:16 +0100 [thread overview]
Message-ID: <20201116142116.GA10128@LionPure> (raw)
In-Reply-To: <86d00evkmr.fsf@gmail.com>
Hi Simon,
On +2020-11-15 14:02:04 +0100, zimoun wrote:
> Dear,
>
> Preparing the online Guix Days, maybe this discussion is worth. It
> echoes first with the talks “Guix compared to Nix” then with the recent
> discussion about Emacs-Guix [1].
>
>
> The topic is discoverability at the REPL level.
>
>
> Well, I have a proposal draft «“guix repl” and beyond» that I never
> sent, where the ideas was to discuss ’~/.guile’ and how to extend Guix
> ending with these questions:
>
> 1. Does Guix want a system of aliases? For example, let the script
> “~/.config/guix/scripts/foo.scm“ and then ‘guix foo’.
>
> 2. How could the API be more discoverable?
>
I find this bash script useful:
--8<---------------cut here---------------start------------->8---
#!/usr/bin/bash
echo "----from apropos:"
guile <<EOF | grep ": ${1:-help}"
,a ${1:-help}
EOF
guile <<EOF | tail -n +9
(display "----describe:\n")
,d ${1:-help}
(display "----\n")
EOF
--8<---------------cut here---------------end--------------->8---
Just name it, e.g., guap (for GU.ile AP.ropos :)
chmod 755 guap
then try e.g.
guap string=
--8<---------------cut here---------------start------------->8---
----from apropos:
(guile): string= #<procedure string= (_ _ #:optional _ _ _ _)>
(guile): string=? #<procedure string=? (#:optional _ _ . _)>
----describe:
- Scheme Procedure: string= s1 s2 [start1 [end1 [start2 [end2]]]]
Return `#f' if S1 and S2 are not equal, a true value otherwise.
----
--8<---------------cut here---------------end--------------->8---
Have fun tailoring to suit yourself.
Maybe some variations on restricting
the apropos output better than my grep :)
Or add some other ,xxx stuff or guile code to taste.
Note that you can of course invoke guap from emacs
like inserting the output of any bash command, as I did
for the above snip (writing this in emacs as mutt's editor choice).
> 3. Is the experimental ‘guix repl --gui’ reasonable?
>
>
> The #1 popup’ed up in #38529 [2,3] and it is not related to
> discoverablity but not orthogonal either.
>
> The #3 means open Guile-Studio or any other front-end and echoes the
> recent discussion about GUI front-end [4].
>
>
> Therefore, here materials about the point #2. :-)
>
>
> (The attentive reader is waiting for parametrized package PoC :-) and a
> first discussion and arguments are this long thread [5].)
>
>
> Feed back and ideas welcome. Especially about:
>
> There are probably several ways to address it, including the
> unbound-variable hints and documentation.
>
>
> All the best,
> simon
>
>
> 1: https://yhetil.org/guix-devel/87tuttci4z.fsf_-_@gnu.org
> 2: https://yhetil.org/guix-bugs/87y2jie1aj.fsf@gmail.com/
> 3: http://issues.guix.gnu.org/issue/38529#60
> 4: https://yhetil.org/guix-devel/CAF-xJgsynM3KSzuM__f9dSPUC0epJ2QKdFwDftiLhTTuMfaTxw@mail.gmail.com
> 5: https://yhetil.org/guix-devel/87woitz1xx.fsf@gnu.org/
>
[...]
--
Regards,
Bengt Richter
prev parent reply other threads:[~2020-11-16 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-15 13:02 Discoverability at the REPL level zimoun
2020-11-15 14:49 ` Danny Milosavljevic
2020-11-16 11:46 ` Ludovic Courtès
2020-11-16 14:03 ` Tobias Geerinckx-Rice
2020-11-16 14:47 ` zimoun
2020-11-16 14:21 ` Bengt Richter [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=20201116142116.GA10128@LionPure \
--to=bokr@bokr.com \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.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.