unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* command-not-found
@ 2016-01-23  4:57 Ben Woodcroft
  2016-01-23 10:33 ` command-not-found Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Woodcroft @ 2016-01-23  4:57 UTC (permalink / raw)
  To: guix-devel@gnu.org

Hi,

Seeing as guix is becoming more and more complete, it would be great to 
have 'command-not-found' [1] or similar available, so that typing in the 
name of an uninstalled binary begets a suggestion on which package(s) to 
install, like Ubuntu gives:

$ gitk
The program 'gitk' is currently not installed. You can install it by typing:
sudo apt-get install gitk

The database for this I imagine could be generated by hydra, no?

I note that ruby 2.3 comes with this implemented for method names which 
I find to be quite handy too.

Thanks,
ben

[1]: http://packages.ubuntu.com/wily/command-not-found

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

* Re: command-not-found
  2016-01-23  4:57 command-not-found Ben Woodcroft
@ 2016-01-23 10:33 ` Ricardo Wurmus
  2016-01-23 11:03   ` command-not-found Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2016-01-23 10:33 UTC (permalink / raw)
  To: Ben Woodcroft; +Cc: guix-devel@gnu.org


Ben Woodcroft <woodibe@gmail.com> writes:

> Seeing as guix is becoming more and more complete, it would be great to 
> have 'command-not-found' [1] or similar available, so that typing in the 
> name of an uninstalled binary begets a suggestion on which package(s) to 
> install, like Ubuntu gives:
>
> $ gitk
> The program 'gitk' is currently not installed. You can install it by typing:
> sudo apt-get install gitk

For the record: I never liked this feature (and the delay it caused) and
I’m not too keen on having something like this for Guix.

> The database for this I imagine could be generated by hydra, no?

It wouldn’t be good to rely on Hydra.  We are trying to encourage
alternative distribution models (via “guix publish” and eventually via
GNUnet), and it would be a step in the opposite direction (in my
opinion) to rely more on Hydra.

If the package expressions themselves contained information about the
contents of their “bin/” directories then it wouldn’t *have* to be
generated by Hydra.

We discussed something similar for identifying what packages contained
certain files.  It is quite ugly, of course, to have a long list of
files produced by the package as part of the tidy package expression, so
I cannot recommend any real alternative to what you suggest.

~~ Ricardo

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

* Re: command-not-found
  2016-01-23 10:33 ` command-not-found Ricardo Wurmus
@ 2016-01-23 11:03   ` Ludovic Courtès
  2016-01-23 16:45     ` command-not-found Mathieu Lirzin
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2016-01-23 11:03 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel@gnu.org, Ben Woodcroft

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ben Woodcroft <woodibe@gmail.com> writes:
>
>> Seeing as guix is becoming more and more complete, it would be great to 
>> have 'command-not-found' [1] or similar available, so that typing in the 
>> name of an uninstalled binary begets a suggestion on which package(s) to 
>> install, like Ubuntu gives:
>>
>> $ gitk
>> The program 'gitk' is currently not installed. You can install it by typing:
>> sudo apt-get install gitk
>
> For the record: I never liked this feature (and the delay it caused) and
> I’m not too keen on having something like this for Guix.

+1

>> The database for this I imagine could be generated by hydra, no?
>
> It wouldn’t be good to rely on Hydra.  We are trying to encourage
> alternative distribution models (via “guix publish” and eventually via
> GNUnet), and it would be a step in the opposite direction (in my
> opinion) to rely more on Hydra.

OTOH, for those who want it, ‘guix publish’ could provide such a file
lookup service.  It would probably need to build its own database
though.

> If the package expressions themselves contained information about the
> contents of their “bin/” directories then it wouldn’t *have* to be
> generated by Hydra.

Too ugly!  :-)

Thanks,
Ludo’.

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

* Re: command-not-found
  2016-01-23 11:03   ` command-not-found Ludovic Courtès
@ 2016-01-23 16:45     ` Mathieu Lirzin
  2016-01-23 21:49       ` command-not-found Ludovic Courtès
  2016-01-23 21:50       ` command-not-found Ricardo Wurmus
  0 siblings, 2 replies; 6+ messages in thread
From: Mathieu Lirzin @ 2016-01-23 16:45 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel@gnu.org, Ben Woodcroft

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

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Ben Woodcroft <woodibe@gmail.com> writes:
>>
>>> Seeing as guix is becoming more and more complete, it would be great to 
>>> have 'command-not-found' [1] or similar available, so that typing in the 
>>> name of an uninstalled binary begets a suggestion on which package(s) to 
>>> install, like Ubuntu gives:
>>>
>>> $ gitk
>>> The program 'gitk' is currently not installed. You can install it by typing:
>>> sudo apt-get install gitk
>>
>> For the record: I never liked this feature (and the delay it caused) and
>> I’m not too keen on having something like this for Guix.
>
> +1

I guess you never liked it because it is has never been helpful to you.
IMO this feature can be really useful for novice or casual GNU/Linux
users.  Even if Guix/GuixSD is currently not adapted for this audience,
it goes in the right direction of empowering not just the seasoned users
which is part of the social mission of Free Software.

I don't know the details of implementing such feature, or the supposed
“delay”.  Maybe there is a valid technical reason for not having it, but
it would be better to not dismiss this idea on a vague assumption
(Especially when someone seems to be motivated to do the job).

Could this feature be made optional?

--
Mathieu Lirzin

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

* Re: command-not-found
  2016-01-23 16:45     ` command-not-found Mathieu Lirzin
@ 2016-01-23 21:49       ` Ludovic Courtès
  2016-01-23 21:50       ` command-not-found Ricardo Wurmus
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2016-01-23 21:49 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel@gnu.org, Ben Woodcroft

Mathieu Lirzin <mthl@gnu.org> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> Ben Woodcroft <woodibe@gmail.com> writes:
>>>
>>>> Seeing as guix is becoming more and more complete, it would be great to 
>>>> have 'command-not-found' [1] or similar available, so that typing in the 
>>>> name of an uninstalled binary begets a suggestion on which package(s) to 
>>>> install, like Ubuntu gives:
>>>>
>>>> $ gitk
>>>> The program 'gitk' is currently not installed. You can install it by typing:
>>>> sudo apt-get install gitk
>>>
>>> For the record: I never liked this feature (and the delay it caused) and
>>> I’m not too keen on having something like this for Guix.
>>
>> +1

Sorry, I didn’t mean to imply that we should not have it, rather that
I’m not a big fan of it, FWIW.

> I guess you never liked it because it is has never been helpful to you.
> IMO this feature can be really useful for novice or casual GNU/Linux
> users.  Even if Guix/GuixSD is currently not adapted for this audience,
> it goes in the right direction of empowering not just the seasoned users
> which is part of the social mission of Free Software.

Sure, I can see that it can improve “discoverability”, which is not bad
in itself.

> I don't know the details of implementing such feature, or the supposed
> “delay”.  Maybe there is a valid technical reason for not having it, but
> it would be better to not dismiss this idea on a vague assumption
> (Especially when someone seems to be motivated to do the job).
>
> Could this feature be made optional?

Yes, definitely.

The main issue is that it has to depend on a database provided by a
third party, which is why making it optional is best.  NixOS implements
it by having the equivalent of ‘guix pull’ download an SQLite database
that maps file names to package names (so there’s no significant delay,
nor any privacy breach, but still a trust issue.)

Ludo’.

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

* Re: command-not-found
  2016-01-23 16:45     ` command-not-found Mathieu Lirzin
  2016-01-23 21:49       ` command-not-found Ludovic Courtès
@ 2016-01-23 21:50       ` Ricardo Wurmus
  1 sibling, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2016-01-23 21:50 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel@gnu.org, Ben Woodcroft


Mathieu Lirzin <mthl@gnu.org> writes:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Ricardo Wurmus <rekado@elephly.net> skribis:
>>
>>> Ben Woodcroft <woodibe@gmail.com> writes:
>>>
>>>> Seeing as guix is becoming more and more complete, it would be great to 
>>>> have 'command-not-found' [1] or similar available, so that typing in the 
>>>> name of an uninstalled binary begets a suggestion on which package(s) to 
>>>> install, like Ubuntu gives:
>>>>
>>>> $ gitk
>>>> The program 'gitk' is currently not installed. You can install it by typing:
>>>> sudo apt-get install gitk
>>>
>>> For the record: I never liked this feature (and the delay it caused) and
>>> I’m not too keen on having something like this for Guix.
>>
>> +1
>
> I guess you never liked it because it is has never been helpful to you.
> IMO this feature can be really useful for novice or casual GNU/Linux
> users.  Even if Guix/GuixSD is currently not adapted for this audience,
> it goes in the right direction of empowering not just the seasoned users
> which is part of the social mission of Free Software.

The only time I ever noticed that this feature existed was when I
mistyped a command.  In a case like this I would have preferred
something like this oddly-named tool:

    https://github.com/nvbn/thefuck

When a person is comfortable enough to use the command line on GuixSD,
they probably don’t have a problem figuring out that they need to
install software when the tool they want to use isn’t available.

> I don't know the details of implementing such feature, or the supposed
> “delay”.

The delay was a result of my computer looking up an invalid (because
mistyped) command that I didn’t ask it to search for me in a database.
It can get very annoying when you have to wait a couple of seconds to
get back your prompt, when all you did was mistype the command.

> Maybe there is a valid technical reason for not having it, but
> it would be better to not dismiss this idea on a vague assumption
> (Especially when someone seems to be motivated to do the job).

I do admit that it may be useful to figure out what files (including
executables) a package provides before installing it, and to be able to
do a reverse search.  We cannot and don’t want to attach these metadata
to the package expressions (because it would be large and ugly); and we
don’t want to have to rely on central substitute servers.

If we also provided a searchable index that could be retrieved when
using “guix publish” and it would not be restricted to hydra, maybe it
could be done.  But as I wrote earlier: I do not know what the best
approach here is.

It certainly was not my intent to seem as if I “dismiss[ed] this idea on
a vague assumption”.

~~ Ricardo

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

end of thread, other threads:[~2016-01-23 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23  4:57 command-not-found Ben Woodcroft
2016-01-23 10:33 ` command-not-found Ricardo Wurmus
2016-01-23 11:03   ` command-not-found Ludovic Courtès
2016-01-23 16:45     ` command-not-found Mathieu Lirzin
2016-01-23 21:49       ` command-not-found Ludovic Courtès
2016-01-23 21:50       ` command-not-found Ricardo Wurmus

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).