all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* guix package: Rename "generation" options
@ 2019-11-08 12:47 Hartmut Goebel
  2019-11-12  8:58 ` Tanguy Le Carrour
  0 siblings, 1 reply; 5+ messages in thread
From: Hartmut Goebel @ 2019-11-08 12:47 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]

Hi,

i often stumble about generation related short-options being mixed lower
and upper-case:

  -l, --list-generations[=PATTERN]
  -d, --delete-generations[=PATTERN]
  -S, --switch-generation=PATTERN

I would prefer to have them consistent, so they are easier to remember.

Since interface design suggests more common options to be more easier to
type, which (means lower-case), I propose changing -l and -d to uppercase:

  -L, --list-generations[=PATTERN]
  -D, --delete-generations[=PATTERN]
  -S, --switch-generation=PATTERN

But this conflicts with

  -L, --load-path=DIR    prepend DIR to the package module search path

and with guix gc:

  -d, --delete-generations[=PATTERN]
  -D, --delete           attempt to delete PATHS

Any ideas?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix package: Rename "generation" options
  2019-11-08 12:47 guix package: Rename "generation" options Hartmut Goebel
@ 2019-11-12  8:58 ` Tanguy Le Carrour
  2019-11-12 10:55   ` zimoun
  2019-11-17 10:59   ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Tanguy Le Carrour @ 2019-11-12  8:58 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hi Hartmut!


Le 11/08, Hartmut Goebel a écrit :
> i often stumble about generation related short-options being mixed lower
> and upper-case:
> 
>   -l, --list-generations[=PATTERN]
>   -d, --delete-generations[=PATTERN]
>   -S, --switch-generation=PATTERN
> 
> I would prefer to have them consistent, so they are easier to remember.

Speaking of consistency, I've been wondering for months why `guix system`
and `guix package` do not work the same way!? One uses positional
arguments, the other options!

```
$ guix package --list-generations[=PATTERN]
$ guix package --delete-generations[=PATTERN]
$ guix package --switch-generation=PATTERN
```

*vs*

```
$ guix system list-generations [PATTERN]
$ guix system delete-generations [PATTERN]
$ guix system switch-generation PATTERN
```

Is this on purpose?!
I think `guix system` is better, as those are actions, not modifiers or options.
Does this make sense?!

Regards,

-- 
Tanguy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix package: Rename "generation" options
  2019-11-12  8:58 ` Tanguy Le Carrour
@ 2019-11-12 10:55   ` zimoun
  2019-11-17 10:59   ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: zimoun @ 2019-11-12 10:55 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel

Dear,

On Tue, 12 Nov 2019 at 09:59, Tanguy Le Carrour <tanguy@bioneland.org> wrote:

> Le 11/08, Hartmut Goebel a écrit :
> > i often stumble about generation related short-options being mixed lower
> > and upper-case:
> >
> >   -l, --list-generations[=PATTERN]
> >   -d, --delete-generations[=PATTERN]
> >   -S, --switch-generation=PATTERN
> >
> > I would prefer to have them consistent, so they are easier to remember.

I am not sure it will help.
As any short shortcut, the memory needs to be muscled. :-)



> Speaking of consistency, I've been wondering for months why `guix system`
> and `guix package` do not work the same way!? One uses positional
> arguments, the other options!
>
> ```
> $ guix package --list-generations[=PATTERN]
> $ guix package --delete-generations[=PATTERN]
> $ guix package --switch-generation=PATTERN
> ```
>
> *vs*
>
> ```
> $ guix system list-generations [PATTERN]
> $ guix system delete-generations [PATTERN]
> $ guix system switch-generation PATTERN
> ```
>
> Is this on purpose?!
> I think `guix system` is better, as those are actions, not modifiers or options.
> Does this make sense?!

As Konrad mentioned here [1], "guix package" should be split.
Even I agree that "actions" like "guix system" seems better, I always
type "guix package -l" and almost never "guix package
--list-generations" and I would not like to be forced to type "guix
package list-generations" instead.

[1] https://lists.gnu.org/archive/html/guix-devel/2019-11/msg00130.html


However, "--install" and "--remove" are actions too. And if they are
transformed into positional arguments, then you cannot install and
remove in the same transactions, e.g., "guix package -i foo -r bar".

And talking about consistency and options vs positional, with option
style you can ask non-sense. Compare:

  guix package -I -A
  guix package -A -I

It is expected because the pattern matching. But the fact that some
options exclude other ones is not currently taken in count; if I
understand well. And "option exclusion" will add a lot of complexity
for few improvements, IMHO.


Naming is hard and UI is harder. :-)


All the best,
simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix package: Rename "generation" options
  2019-11-12  8:58 ` Tanguy Le Carrour
  2019-11-12 10:55   ` zimoun
@ 2019-11-17 10:59   ` Ludovic Courtès
  2019-11-18 13:58     ` zimoun
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2019-11-17 10:59 UTC (permalink / raw)
  To: Tanguy Le Carrour; +Cc: guix-devel

Hello!

Tanguy Le Carrour <tanguy@bioneland.org> skribis:

> Le 11/08, Hartmut Goebel a écrit :
>> i often stumble about generation related short-options being mixed lower
>> and upper-case:
>> 
>>   -l, --list-generations[=PATTERN]
>>   -d, --delete-generations[=PATTERN]
>>   -S, --switch-generation=PATTERN
>> 
>> I would prefer to have them consistent, so they are easier to remember.

I think changing that would be extremely hard if you take all the
constraints into account, including consistency: ‘-L’ has to be
‘--load-path’ for consistency with all the software out there that uses
‘-L’ with this meaning.  Plus, I don’t think lower-case vs. upper-case
matters that much.

> Speaking of consistency, I've been wondering for months why `guix system`
> and `guix package` do not work the same way!? One uses positional
> arguments, the other options!
>
> ```
> $ guix package --list-generations[=PATTERN]
> $ guix package --delete-generations[=PATTERN]
> $ guix package --switch-generation=PATTERN
> ```
>
> *vs*
>
> ```
> $ guix system list-generations [PATTERN]
> $ guix system delete-generations [PATTERN]
> $ guix system switch-generation PATTERN
> ```
>
> Is this on purpose?!

Well, yes and no.  :-)

‘guix system’ arrived several years after ‘guix package’ and it was
designed from the start to have ‘guix system ACTION’, because it made a
lot of sense in that context.  Conversely, ‘guix package’ was never
meant to have sub-actions, and I agree with zimoun that it would be
inconvenient if we had to type (say) ‘guix package install foo’.

That said, I agree that the inconsistency is troubling.  Would it be
better to have ‘guix list-generations’, etc.?  Or maybe that ‘guix
profile’ command that has been proposed before?

Food for thought!

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guix package: Rename "generation" options
  2019-11-17 10:59   ` Ludovic Courtès
@ 2019-11-18 13:58     ` zimoun
  0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2019-11-18 13:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi,

On Sun, 17 Nov 2019 at 11:59, Ludovic Courtès <ludo@gnu.org> wrote:

> That said, I agree that the inconsistency is troubling.  Would it be
> better to have ‘guix list-generations’, etc.?  Or maybe that ‘guix
> profile’ command that has been proposed before?

Let add this to the current big discussion on the very topic of UI
proposed by Konrad. :-)

Personally, I am not fan with the multiplication of commands. And a
better direction seems to have a generic alias system "à la" Git or an
UI modifier via channel.


All the best,
simon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-18 13:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 12:47 guix package: Rename "generation" options Hartmut Goebel
2019-11-12  8:58 ` Tanguy Le Carrour
2019-11-12 10:55   ` zimoun
2019-11-17 10:59   ` Ludovic Courtès
2019-11-18 13:58     ` zimoun

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.