all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Package file indexing
Date: Thu, 9 Jan 2020 15:36:56 +0100	[thread overview]
Message-ID: <CAJ3okZ3qqUO1qdEDuLjdR8sq0TyihskuHwz7+N1e4xO4fgOx2A@mail.gmail.com> (raw)
In-Reply-To: <875zhk90pa.fsf@ambrevar.xyz>

On Thu, 9 Jan 2020 at 15:14, Pierre Neidhardt <mail@ambrevar.xyz> wrote:

> >> > I agree that explicit keywords, e.g., "file:" and "package:", avoid confusion.
> >>
> >> I disagree.  What about matching a path which contains "file:" or
> >> "package:"?  Then you end up with confusing commands.
> >
> > About "file:", no issue:
> >     guix search file:file:
>
> It might not be ambiguous for the machine, but it is to the human
> reader! :)
>
> --8<---------------cut here---------------start------------->8---
>   guix search /file:
> --8<---------------cut here---------------end--------------->8---
>
> is more readable in my opinion.

I disagree. Ah cheese and wine taste... ;-)

As I said, I am suggesting to have the both syntax.


> >> Simon, regarding your examples:
> >>
> >> >  - guix search bin/gmsh gimp
> >> >  - guix search file:ieee*.sty bin/gmsh latex
> >> >  - guix search file:bin/gmsh
> >>
> >> why mixing both the "file:" prefix and the "/"?
> >
> > Yes, I am suggesting to mix both.
> >
> > I would like to have all this syntax:
> >
> >>  - guix search file:gmsh.h gimp
> >>  - guix search bin/gmsh gimp
> >>  - guix search file:ieee*.sty bin/gmsh latex
> >>  - guix search file:bin/gmsh
> >>  - guix search package:gimp
>
> But for which benefit?  It seems that this single example
>
> >>  - guix search bin/gmsh gimp
>
> covers all your needs.

No.

For example:

> >>  - guix search file:gmsh.h gimp

I am looking for the file gmsh.h and I do not know nothing more.

> >>  - guix search bin/gmsh gimp

I need to know the name of the file and the path.

> >>  - guix search file:ieee*.sty bin/gmsh latex

I know nothing about the path of the file ieee*.sty and it does not
belong to the package gmsh.


Whatever!

To summary, I think:

 - the syntax '/' is cool to turn on the "file-search" feature
 - I find more meaningful the syntax "file:" to turn on "file-search"
 - I find more meaningful to have "file:foo.h package:bar" than "/.foo.h bar"



> > Now, if we speak about the "search" command-line syntax, today the way
> > is to write a regexp and then to filter with 'recsel'. It is UNIX
> > philosophy to compose via pipes but the drawback is: one *has to*
> > first (read the Guix manual [1] to) know the existence of 'recsel' and
> > second read the documentation of 'recutils' for complex filtering. So,
> > long time ago, I was thinking to add more syntax [2]. Today, the
> > syntax is:
> >
> >    guix search "" | recsel -C -e 'name ~ "agda"  && !(name ~ "mode")'
> > -p synopsis
> >
> > and I find more welcoming something avoiding the pipe, e.g.,
> >
> >   guix search 'name ~ "agda" && !(name ~ "mode") -p synopsis'
>
> This is still rather arcanic (understand: too hard to be useful to the
> general user) in my opinion.  Every time I use a program that has some
> search semantic, I need to look up the manual because I forgot the
> syntax and other intricacies.  So I end up not doing it often.

I agree...

> For advanced search, we could provide "explorable" features with a
> graphical user interface (which I plan to work on later) or Emacs (a big
> like `guix-packages-by-name', but more general).  Those interface would
> allow the user to chain searches by narrowing down lists.  What you
> print in the end is irrelevant since you can have an interactive
> presentation (unlike the shell).

...but at some point you need some semantic for filtering, at least for regexp.

Graphical presentation does not change the issue.

> Example:
>
> - Display list of all packages.
> - Run "agda" search against names.
> - Narrow down.
> - Run "mode" search against names.
> - Narrow down to the complement.
> - Run a general search against "foo bar".
> - Print the result.
> - Display synopsis only of the result.

Well you did kind of some semantic. ;-)

(You have right that it is more easy to remember how to do when it is
graphical and step by step. :-))


> For the general case, a "do what I mean" search field that works like
> Internet search engines is a better approach in my opinion.

I agree.

On my side, as I explained elsewhere I would like to try to improve
the 'relevance' function by applying well-known NLP stuff. :-)


Cheers,
simon

  reply	other threads:[~2020-01-09 14:37 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-14 18:31 Improve package search mikadoZero
2019-03-14 20:49 ` Leo Famulari
2019-03-14 22:01   ` Tobias Geerinckx-Rice
2019-03-14 22:09     ` Tobias Geerinckx-Rice
2019-03-14 22:46     ` Pierre Neidhardt
2019-03-14 23:09       ` Tobias Geerinckx-Rice
2019-03-23 16:27       ` Package file indexing Ludovic Courtès
2019-03-25  8:46         ` Pierre Neidhardt
2019-03-26 12:41           ` Ludovic Courtès
2020-01-02 17:12             ` Pierre Neidhardt
2020-01-02 19:15               ` Christopher Baines
2020-01-03 11:26                 ` Ludovic Courtès
2020-01-09 11:19                   ` Pierre Neidhardt
2020-01-09 12:24                     ` zimoun
2020-01-09 13:01                       ` Pierre Neidhardt
2020-01-09 16:49                     ` Christopher Baines
2020-01-10 12:35                       ` Pierre Neidhardt
2020-01-10 13:30                         ` Christopher Baines
2020-01-11 18:26                           ` Pierre Neidhardt
2020-01-12 13:29                             ` Christopher Baines
2020-01-13 14:28                               ` Pierre Neidhardt
2020-01-13 17:57                                 ` Christopher Baines
2020-01-13 18:21                                   ` Pierre Neidhardt
2020-01-13 19:45                                     ` Christopher Baines
2020-01-14  9:21                                       ` Pierre Neidhardt
2020-01-02 22:50               ` zimoun
2020-01-03 16:00                 ` raingloom
2020-01-06 16:56                   ` zimoun
2020-01-09 13:01                     ` Pierre Neidhardt
2020-01-09 13:53                       ` zimoun
2020-01-09 14:14                         ` Pierre Neidhardt
2020-01-09 14:36                           ` zimoun [this message]
2020-01-09 15:38                             ` Pierre Neidhardt
2020-01-09 16:59                               ` zimoun
2020-01-09 12:57                   ` Pierre Neidhardt
2020-01-09 12:55                 ` Pierre Neidhardt
2020-01-09 14:05                   ` zimoun
2020-01-09 14:21                     ` Pierre Neidhardt
2020-01-09 14:51                       ` zimoun
2020-01-09 15:41                         ` Pierre Neidhardt
2020-01-09 17:04                           ` zimoun
2020-01-09 17:27                             ` Pierre Neidhardt
2020-01-15 16:23         ` Pierre Neidhardt
2020-01-15 17:27           ` Nicolò Balzarotti
2020-01-15 18:02             ` Pierre Neidhardt
2020-01-15 22:14               ` Ludovic Courtès
2019-03-16  2:11     ` Improve package search mikadoZero

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=CAJ3okZ3qqUO1qdEDuLjdR8sq0TyihskuHwz7+N1e4xO4fgOx2A@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=mail@ambrevar.xyz \
    /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.