all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: myglc2 <myglc2@gmail.com>
To: guix-devel@gnu.org
Subject: Re: Reorganizing guix package commands
Date: Mon, 18 Apr 2016 17:50:14 -0400	[thread overview]
Message-ID: <86bn56ziw9.fsf@gmail.com> (raw)
In-Reply-To: 877ffual6i.fsf@gnu.org

ludo@gnu.org (Ludovic Courtès) writes:

> Alex Kost <alezost@gmail.com> skribis:
>
>> I've just sent a message to bug#22587¹, but I realized it is better to
>> discuss it here in a separate thread.
>>
>> So, I think there are inconsistencies in guix commands.  For example, we
>> have "guix system build" to build a system, but "guix build" to build a
>> package.  IMO "guix package build" would be a better choice.
>>
>> In general, I think it would be good to move package commands inside
>> "guix package", e.g, to make "guix package lint", "guix package size",
>> etc.
>
> Why not consider “package” to be the default word?  :-)
> I can see how adding “package” everywhere helps categorize things
> mentally, but as a user interface, I think it would be rather bad.
>
> Also, it’s not that simple: “guix size” can take a store item instead of
> a package name, “guix graph” cannot do it yet but it would be useful if
> it could (“guix graph -t references $(readlink -f /run/current-system)”),
> etc.
>
> I still think that having aliases like “guix install” as Andy proposed
> long ago would be useful, though I never started working on it.
>
> There are probably other improvements to do around “guix package” (maybe
> turning some of its options into separate sub-commands as was suggested
> before.)  All we need is a clear view of where we’re going and patches.  :-)
>

I replied to the bug earlier, relevant parts are restated below, and a
discussion added below that.

For overall Guix usability, the overloading of a single guix command for
everything is not so good. When you eventually create a man page, it
will be intimidating for someone just trying to do per-user package
management, which the majority of, and least sophisticated users, will
be trying to do.

On the other hand there are several "classes" of commands as reflected
by the guix CLI being described in several logically different parts of
the doc. This structure is not so evident in the CLI structure.

A possibly better approach would be to explicitly split the guix
command-verse into command classes to better match the structure of the
doc and/or the class of the user. For example, per-user ('guix ...'),
global-system ('guix-sys ...'), and developer ('guix-dev ...'), or
something similar.

Since the most frequently used commands will be per-user package
management, I suggest you replace 'guix package' with 'guix' and promote
the non-package commands to be hyphenated (ALA guix-daemon).

This would, in turn, give rise to emacs functions something like:

OLD                                    NEW
-------------------------------------------------------------------
user:
guix-edit                              guix-view-definition
guix-installed-packages                guix-installed-packages
guix-installed-user-packages           NA

admin:
guix-installed-system-packages         guix-sys-installed-packages

developer:
guix-hydra-build-list-latest-builds    guix-dev-hydra-build-list-latest-builds
guix-edit                              guix-dev-edit-definition

While this would be not-so-nice for a power emacs user, it would make it
easier for a less experienced user to find a relevant command in the sea
of 'M-x guix-' commands in the *Completions* buffer.  This kind of
naming may not be typical in emacs, but I think it is probably justified
considering the range of disparate functions provided by Guix, as
discussed below.

***

Regarding the bigger picture, and sorry this is so long, thinking more
deeply about the situation, IMO, Guix usability challenges stem mostly
from the fact that Guix provides an unexpectedly large range of
functions: a per-user package manager, an OS, a system configuration
tool, a packaging tool, a package editor, an installer, VM managers,
developer utilities, hydra managers, and maybe some other things ;)

Further, Guix behavior is modal, e.g., which functions work depend on
how Guix was installed and/or configured. For example, in a Guix/Debian
install, 'guix system reconfigure config.scm' churns away happily for 15
minutes and then produces the error, 'guix system: error: symlink:
Permission denied: "/var/guix/profiles/system-1-link"'

OTOH, other things you might not expect to work actually do, e.g.  "guix
init ..."  will "upgrade" your Debian OS install to GuixSD ;)

So, the problem goes well beyond function names. The underlying problem
is that grouping such a large and disparate set of functions together in
a single package is counter-intuitive. And further accessing them all
under a single CLI/UI is challenging, to say the least.

As a result, Guix is difficult to document and understand.  The low user
list activity is evidence that many potential users find the www doc
intimidating and bail out before downloading. This may actually be OK
since you are probably not ready for them anyhow.

But users that do get as far as installing are confronted by 8 guix INFO
entry points and 120+ "M-x guix-" functions.  The only users that can be
expected to work this way are Guix developers or, perhaps, hardened
emacs criminals ;-) Others have trouble finding the relevant entry
point, e.g,

http://lists.gnu.org/archive/html/help-guix/2016-04/msg00056.html

To summarize, Guix has a lot of functionality and complexity. So to be
successful, we must consider carefully how to package and describe it.

One way would be to split guix into ~three pieces.  We could do this by
clearly identifying the classes of users we expect to serve and then
splitting out functions by user class.  Something like sysadmin,
end-user, and developer. This would probably be the simplest solution
(for users, that is), but I imagine we don't want this.

Alternatively, if we continue on the current path, we need to describe
the new software paradigm that motivates placing these disparate
functions together.  We need to explain how the functions fit
together. And we need to provide a map that helps each class of new user
to find their way in.

A while ago I took a crack at this:

http://lists.gnu.org/archive/html/guix-devel/2016-03/msg00674.html

http://lists.gnu.org/archive/html/guix-devel/2016-03/pngM78VCHVVDp.png

And it probably needs more work along the lines of explaining and
motivating the paradigm. Ludo used a couple of ideas in this commit:

http://lists.gnu.org/archive/html/guix-devel/2016-03/msg01038.html

But I think we should revisit the original objective, which is to
provide a brief illustrated Guix overview as an entry to all of
Guix.

Ideally this would provide a reference point in thinking about the
questions raised above. - George

  reply	other threads:[~2016-04-18 21:51 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18  8:57 Reorganizing guix package commands Alex Kost
2016-04-18 16:10 ` John Darrington
2016-04-19  8:01   ` Alex Kost
2016-04-18 17:20 ` Ludovic Courtès
2016-04-18 21:50   ` myglc2 [this message]
2016-04-19  5:17     ` John Darrington
2016-04-19 12:57       ` myglc2
2016-04-19 13:03         ` Thompson, David
2016-04-19 13:35           ` John Darrington
2016-04-19 13:51           ` myglc2
2016-04-19 15:24       ` Ludovic Courtès
2016-04-19 10:47     ` Alex Kost
2016-04-19 10:58       ` Ricardo Wurmus
2016-04-19 12:45       ` myglc2
2016-04-19  7:52   ` Alex Kost
2016-04-19  9:17     ` Taylan Ulrich Bayırlı/Kammer
2016-04-19 10:37       ` Alex Kost
2016-04-19  9:23     ` Hartmut Goebel
2016-04-19 10:16       ` Alex Kost
2016-04-19 14:39       ` John Darrington
2016-04-19 13:00     ` myglc2
2016-04-19 13:43       ` Ricardo Wurmus
2016-04-19 14:29         ` myglc2
2016-04-19 13:55     ` Ricardo Wurmus
2016-04-19 15:52     ` Ludovic Courtès
2016-04-19 19:56       ` Christopher Allan Webber
2016-04-20  3:45       ` myglc2
2016-04-20  5:34         ` John Darrington
2016-04-20  8:52           ` Alex Kost
2016-04-20 17:05             ` myglc2
2016-04-20  8:29       ` Alex Kost
2016-04-20  9:46         ` Taylan Ulrich Bayırlı/Kammer
2016-04-20 21:45           ` Ludovic Courtès
2016-04-21 12:34             ` myglc2
2016-04-21  5:20           ` John Darrington
2016-04-20  9:29       ` Taylan Ulrich Bayırlı/Kammer
2016-04-21  2:49         ` Efraim Flashner
2016-04-21  7:10           ` Taylan Ulrich Bayırlı/Kammer
2016-04-18 21:13 ` Hartmut Goebel

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=86bn56ziw9.fsf@gmail.com \
    --to=myglc2@gmail.com \
    --cc=guix-devel@gnu.org \
    /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.