unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: tomas@tuxteam.de
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))
Date: Fri, 1 Oct 2021 14:15:35 +0100	[thread overview]
Message-ID: <CALDnm534y0CjqgprwZEQ-HC3VLuO=W_6LjpVtn4JOb-Acw56DA@mail.gmail.com> (raw)
In-Reply-To: <20211001070242.GC16352@tuxteam.de>

On Fri, Oct 1, 2021 at 8:03 AM <tomas@tuxteam.de> wrote:

> All those "magic action at a distance" things (and name prefix
> goes in that direction, but many things you see in contemporary
> Web frameworks do this too) make life harder for the "grep
> crowd".

Yes, of course.  So-called higher-level languages are all about
indirection. Pointers, function pointers, late binding, garbage
collectors, duck typing, namespaces,,, they all give us something and they
take something away.  Every time.

Grep is a tool, a tool to search text.  It is only able to respond to
questions about a program's source when that source is written in text
files (which it normally is) and when the programming language is
relatively poor on indirection.  Or to put it another way: the
usefulness of grep as a program-related question-answering machine is
inversely proportional to the indirection mechanisms in the language in
question and its expressive power (aka the power to say more with less).

That doesn't mean that one can't devise tools to answer questions about
programs in a way that makes _less_ assumptions about the multiple ways
in which these program's sources are encoded.

And the 'read' based tools that we're discussing in this thread are
efforts in that direction.  They will still be fallible, no doubt, but
not in the ways grep is.  And grep will still be useful.  I'll only be
slightly _less_ useful because a new language feature has increased the
number of questions that can be asked about a source.  But that is what
indirections ALWAYS do.  "What is this pointer pointing to?", "What
version of this C lib am I linking against?", "What the heck is the GC
doing", "Is this object that responds to .quack() really a duck?", etc
etc.

(Curiously, this is _exactly also_ the reason why these features are
also culpable for performance degradations, something that we're much
more trained into accepting, because we experience them less directly)

Language design never has been held back by the particular assumptions
of a search tool, popular and ubiquitous as it may be.

And it's frankly a bit bonkers to even conceive that. When I can, I _do_ put
the C brace on the function definition line so that grep tells me if
it's the definition or the declaration I'm looking at, but how crazy
would it have been to force C not to have forward declarations BECAUSE
it could hurt grep?? (as it quite obviously does!).

That's why these "modern web frameworks" are causing you "grep pain".
But programs today (and for a good number of years) and even more, the
ever complex programs in the higher-level languages of the future will
even cause you more pain!

It's the job of development tools -- with the Editor at the center -- to
help the programmer navigate these things.  Hence M$ IntelliSense, hence
SLIME, hence LSP, hence xref.el, etc, etc, etc.  Emacs is in a very good
place in this regard, to be honest.  We have incredible talent and Elisp
is a very good language, way waaayy better than JS, for example.

> Now the question: does it also find things hidden away in comments?
> This is one feature I wouldn't like to miss, as part of the "grep
> crowd".

The first iteration of the tool I'm thinking of answers questions like
what is referenced by source code, today.  It doesn't answer "what could
someday be referenced when one uncomments lines".  A symbol name stuck
in a comment probably shouldn't be there, at least not in Shorthand
form.  And anyway Shorthands don't operate on comments, so the point
may be moot.  So the answer is that it can be done, but not in this first
iteration.  I will think about it, though.

> Now I don't think this is in itself a reason to not do it. I've
> missed some kind of name space mechanism in Emacs for ages.

Of course!

> But taking the grep crowd into consideration is a nice touch; you
> might find yourself in that place some day, while wading through the
> swamps of a foreign country :-)

Yes.  The things that said here are taken into consideration ;-) And yes I
use grep.  To "wade" into your delightful image, it's like using made-up
sign language in a foreign country: it'll get you places, but you won't
be reading the classics or chatting up the bear that wants to eat you.

João



  reply	other threads:[~2021-10-01 13:15 UTC|newest]

Thread overview: 332+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28  0:38 Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Phil Sainty
2021-09-28  5:43 ` Lars Ingebrigtsen
2021-09-28  7:26   ` João Távora
2021-09-30  6:03   ` Richard Stallman
2021-09-30  8:20     ` Gregory Heytings
2021-09-30 10:31       ` André A. Gomes
2021-09-30 10:54         ` Alan Mackenzie
2021-09-30 11:18           ` João Távora
2021-09-30 11:40             ` André A. Gomes
2021-09-30 16:58             ` Alan Mackenzie
2021-09-30 20:25               ` João Távora
2021-10-01  3:01                 ` Stefan Monnier
2021-09-30 11:30           ` André A. Gomes
2021-09-30 17:37             ` Alan Mackenzie
2021-09-30 11:46         ` Gregory Heytings
2021-09-30 12:41           ` João Távora
2021-09-30 13:00             ` Tomas Hlavaty
2021-09-30 13:26               ` João Távora
2021-09-30 14:26                 ` Tomas Hlavaty
2021-09-30 14:57                   ` João Távora
2021-09-30 15:50                     ` Tomas Hlavaty
2021-09-30 16:02                       ` João Távora
2021-09-30 17:58                         ` Tomas Hlavaty
2021-09-30 23:30                           ` João Távora
2021-10-04 15:29                   ` André A. Gomes
2021-09-30 13:18             ` Gregory Heytings
2021-09-30 13:31               ` João Távora
2021-09-30 13:41                 ` Gregory Heytings
2021-09-30 16:23             ` [External] : " Drew Adams
2021-09-30 17:19               ` João Távora
2021-10-01  1:20                 ` Michael Heerdegen
2021-09-30 22:10               ` Michael Heerdegen
2021-09-30 22:22                 ` A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) João Távora
2021-09-30 23:23                   ` Michael Heerdegen
2021-09-30 23:38                     ` João Távora
2021-10-01  1:17                       ` Michael Heerdegen
2021-10-01  7:02                       ` tomas
2021-10-01 13:15                         ` João Távora [this message]
2021-10-01 13:53                           ` tomas
2021-10-01 14:30                           ` Dmitry Gutov
2021-10-01 14:40                             ` João Távora
2021-10-01 15:48                               ` Dmitry Gutov
2021-10-01 16:05                                 ` João Távora
2021-10-01 16:11                                   ` João Távora
2021-10-01 16:41                                     ` João Távora
2021-10-01 23:17                                       ` Michael Heerdegen
2021-10-02  1:14                                       ` Dmitry Gutov
2021-10-02  1:46                                         ` João Távora
2021-10-02  2:13                                           ` Dmitry Gutov
2021-10-04 15:57                                           ` André A. Gomes
2021-10-02  1:05                                   ` Dmitry Gutov
2021-10-02  1:30                                     ` João Távora
2021-10-02  1:43                                       ` Dmitry Gutov
2021-10-02  2:05                                         ` João Távora
2021-10-02  2:24                                           ` Dmitry Gutov
2021-10-02  8:39                                           ` Adam Porter
2021-10-02  8:36                                 ` Adam Porter
2021-10-02 12:16                                   ` Dmitry Gutov
2021-10-02 23:18                                 ` Richard Stallman
2021-10-03 21:17                                   ` Gregory Heytings
2021-10-07 22:21                                     ` Richard Stallman
2021-10-18 21:13                                       ` Gregory Heytings
2021-10-18 21:22                                       ` Gregory Heytings
2021-10-20  6:45                                         ` Richard Stallman
2021-10-20  8:00                                           ` Gregory Heytings
2021-10-23 23:26                                             ` Richard Stallman
2021-10-01 22:58                               ` Gregory Heytings
2021-10-01 23:03                                 ` João Távora
2021-10-02  8:50                                   ` Gregory Heytings
2021-10-02 10:29                                     ` João Távora
2021-10-02 11:57                                       ` Gregory Heytings
2021-10-02 12:44                                         ` João Távora
2021-10-02 14:50                                           ` João Távora
2021-10-02 15:01                                           ` Gregory Heytings
2021-10-02 15:22                                             ` Stefan Kangas
2021-10-02 15:33                                               ` But then what are namespaces ? (was: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))) João Távora
2021-10-02 19:42                                                 ` Gregory Heytings
2021-10-02 19:59                                                   ` But then what are namespaces ? Stefan Monnier
2021-10-02 20:41                                                     ` Gregory Heytings
2021-10-02 21:05                                                       ` Stefan Monnier
2021-10-02 21:09                                                         ` João Távora
2021-10-02 21:14                                                           ` Stefan Monnier
2021-10-02 22:41                                                             ` João Távora
2021-10-02 22:49                                                               ` João Távora
2021-10-02 23:31                                                               ` Stefan Monnier
2021-10-03 21:47                                                         ` Gregory Heytings
2021-10-02 20:00                                                   ` But then what are namespaces ? (was: A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master))) João Távora
2021-10-02 20:41                                                     ` Gregory Heytings
2021-10-02 20:46                                                       ` João Távora
2021-10-03  1:15                                                   ` [External] : " Drew Adams
2021-10-02 15:25                                             ` A read-based grep-like for symbols (el-search?) (was Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master)) João Távora
2021-10-02 16:08                                               ` Gregory Heytings
2021-10-01 22:58                           ` Gregory Heytings
2021-10-01 23:10                             ` João Távora
2021-10-02  9:03                               ` Gregory Heytings
2021-10-02 10:25                                 ` João Távora
2021-10-01 23:04                         ` Michael Heerdegen
2021-09-30 12:34         ` Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master) Tomas Hlavaty
2021-09-28  6:25 ` Eli Zaretskii
2021-09-28  7:41   ` João Távora
2021-09-28  8:04     ` Eli Zaretskii
2021-09-28  8:07     ` Helmut Eller
2021-10-02  1:06       ` João Távora
2021-09-28 12:40   ` Stefan Monnier
2021-09-28 15:28     ` João Távora
2021-09-28 19:21       ` Stefan Monnier
2021-09-28 17:25   ` Alan Mackenzie
2021-09-28 18:25     ` Eli Zaretskii
2021-09-28 19:05       ` Alan Mackenzie
2021-09-28 19:29         ` Eli Zaretskii
2021-09-30 12:23           ` Phil Sainty
2021-09-30 12:28             ` Gregory Heytings
2021-09-30 12:29               ` Gregory Heytings
2021-09-30 12:44             ` Joost Kremers
2021-09-30 13:18               ` Adam Porter
2021-10-01  0:11                 ` Stefan Kangas
2021-09-30 12:52             ` Tomas Hlavaty
2021-09-30 12:55               ` João Távora
2021-09-30 13:49                 ` Tomas Hlavaty
2021-09-30 13:17             ` Lars Ingebrigtsen
2021-10-01  0:21               ` João Távora
2021-09-30 14:12             ` Eli Zaretskii
2021-09-30 14:27               ` João Távora
2021-09-30 22:50               ` Phil Sainty
2021-10-01  0:44                 ` Stefan Kangas
2021-10-01  7:06                   ` Lars Ingebrigtsen
2021-10-01  7:24                     ` João Távora
2021-10-01 10:10                       ` Eli Zaretskii
2021-10-01  6:09                 ` Eli Zaretskii
2021-10-01 12:24                   ` Phil Sainty
2021-10-01 13:00                     ` Eli Zaretskii
2021-10-02  0:28                       ` Phil Sainty
2021-10-02  6:45                         ` Eli Zaretskii
2021-10-02  7:44                           ` Phil Sainty
2021-10-02  8:53                             ` Eli Zaretskii
2021-10-02 10:52                             ` João Távora
2021-10-04  0:12                               ` Richard Stallman
2021-10-04  0:16                               ` Richard Stallman
2021-10-04 13:09                                 ` Gregory Heytings
2021-10-04 15:44                                 ` João Távora
2021-10-04 16:51                                   ` Eli Zaretskii
2021-10-04 17:43                                     ` João Távora
2021-10-04 17:51                                       ` Eli Zaretskii
2021-10-04 18:34                                   ` Gregory Heytings
2021-10-04 19:15                                     ` João Távora
2021-10-04 19:30                                       ` Gregory Heytings
2021-10-05 21:20                                         ` Richard Stallman
2021-10-06 13:12                                         ` João Távora
2021-10-05 21:20                                   ` Richard Stallman
2021-10-05 21:20                                   ` Richard Stallman
2021-10-05 22:07                                     ` João Távora
2021-10-05 22:15                                       ` Stefan Monnier
2021-10-06 11:28                                         ` João Távora
2021-10-06 12:21                                           ` Stefan Monnier
2021-10-06 12:30                                             ` João Távora
2021-10-06 12:46                                               ` Stefan Monnier
2021-10-06 13:16                                                 ` João Távora
2021-10-06 16:23                                                   ` João Távora
2021-10-06 20:00                                                     ` Stefan Monnier
2021-10-06 21:10                                                       ` João Távora
2021-10-06 21:39                                                         ` Stefan Monnier
2021-10-10 21:09                                         ` Dmitry Gutov
2021-10-07 22:21                                       ` Richard Stallman
2021-10-07 22:24                                         ` João Távora
2021-10-08  6:08                                           ` Eli Zaretskii
2021-10-08 12:58                                             ` Stefan Monnier
2021-10-08 13:22                                               ` Eli Zaretskii
2021-10-10 21:06                                                 ` Dmitry Gutov
2021-10-10 21:18                                                   ` João Távora
2021-10-08 14:16                                               ` João Távora
2021-10-08 15:55                                                 ` Stefan Monnier
2021-10-08 17:34                                                   ` Eli Zaretskii
2021-10-08 18:16                                                     ` Stefan Monnier
2021-10-08 18:51                                                       ` Eli Zaretskii
2021-10-08 23:43                                                   ` João Távora
2021-10-01 22:38             ` Richard Stallman
2021-10-01 22:41               ` João Távora
2021-10-01 22:52               ` João Távora
2021-10-01 23:52               ` Phil Sainty
2021-10-02  1:38               ` T.V Raman
2021-09-28 19:30         ` Dmitry Gutov
2021-09-28 18:38     ` Stefan Monnier
2021-09-28 19:14       ` Alan Mackenzie
2021-09-28 19:22         ` Eli Zaretskii
2021-09-28 19:31           ` Alan Mackenzie
2021-09-28 19:41             ` Eli Zaretskii
2021-09-30 22:10         ` Richard Stallman
2021-09-30 23:59           ` Tomas Hlavaty
2021-09-28  7:21 ` João Távora
2021-09-28 12:49   ` Phil Sainty
2021-09-28 13:08     ` Dmitry Gutov
2021-09-28 14:04       ` Gregory Heytings
2021-09-28 15:01         ` Adam Porter
2021-09-28 15:20       ` João Távora
2021-09-28 19:23         ` Gregory Heytings
2021-09-28 15:15     ` João Távora
2021-09-30  6:06     ` Richard Stallman
2021-10-05  5:57       ` Elisp LSP Server Ag Ibragimov
2021-10-05  6:38         ` Po Lu
2021-10-05  9:50           ` Philip Kaludercic
2021-10-05 11:27             ` Po Lu
2021-10-05 11:46               ` Philip Kaludercic
2021-10-06 20:57                 ` Richard Stallman
2021-10-06 21:22                   ` Philip Kaludercic
2021-10-06 21:44                     ` Stefan Monnier
2021-10-07 22:27                     ` Richard Stallman
2021-10-07  0:49                   ` Po Lu
2021-10-10 12:48                     ` Ag Ibragimov
2021-10-10 14:19                       ` Daniel Martín
2021-10-10 16:49                         ` Philip Kaludercic
2021-10-10 19:25                           ` Daniel Martín
2021-10-11  7:44                         ` Po Lu
2021-10-11 21:15                           ` Richard Stallman
2021-10-12  5:29                           ` Ag Ibragimov
2021-10-12  5:48                             ` Po Lu
2021-10-12 17:14                               ` Ag Ibragimov
2021-10-12 17:46                                 ` Stefan Kangas
2021-10-12 20:53                                   ` dick
2021-10-13  2:29                                     ` Eli Zaretskii
2021-10-13 11:56                                       ` dick
2021-10-13 13:19                                         ` Eli Zaretskii
2021-10-13  4:47                                   ` Ag Ibragimov
2021-10-13  0:02                                 ` Po Lu
2021-10-27 14:36                                 ` Richard Stallman
2021-10-27 18:04                                   ` dick
2021-10-27 18:27                                     ` tomas
2021-10-27 18:33                                     ` Eli Zaretskii
2021-10-27 18:55                                     ` Karl Fogel
2021-10-27 19:15                                       ` dick
2021-10-12  7:14                             ` tomas
2021-10-12  8:04                               ` Ag Ibragimov
2021-10-12 22:43                             ` Richard Stallman
2021-10-13  3:42                               ` Ag Ibragimov
2021-10-13  5:20                                 ` Po Lu
2021-10-13 12:39                                   ` Eli Zaretskii
2021-10-13 12:49                                     ` Po Lu
2021-10-13 13:25                                       ` Eli Zaretskii
2021-10-13 13:37                                         ` Po Lu
2021-10-13 13:53                                           ` Eli Zaretskii
2021-10-13 23:42                                             ` Po Lu
2021-10-13 13:38                                         ` Philip Kaludercic
2021-10-14 22:22                                         ` Richard Stallman
2021-10-14 22:26                                     ` Richard Stallman
2021-10-15  6:35                                       ` Eli Zaretskii
2021-10-15  9:54                                         ` Tim Cross
2021-10-12 22:43                             ` Richard Stallman
2021-10-13  5:36                               ` Ag Ibragimov
2021-10-13 22:40                                 ` Richard Stallman
2021-10-10 23:45                       ` Dmitry Gutov
2021-10-11  7:34                       ` Po Lu
2021-10-11  9:10                         ` Alexandre Garreau
2021-10-11 10:46                           ` Po Lu
2021-10-11 10:48                             ` Alexandre Garreau
2021-10-11 21:16                             ` Richard Stallman
2021-10-12  7:17                               ` tomas
2021-10-14 12:48                               ` Alexandre Garreau
2021-10-15 22:47                                 ` Richard Stallman
2021-10-11 21:10                       ` Richard Stallman
2021-10-22 16:23                       ` Mathias Dahl
2021-10-22 16:40                         ` Dmitry Gutov
2021-10-22 16:45                           ` Alexandre Garreau
2021-10-22 19:59                             ` Tim Cross
2021-10-22 22:27                               ` Dmitry Gutov
2021-10-22 22:48                                 ` Tim Cross
2021-10-22 23:11                                   ` Dmitry Gutov
2021-10-23 23:27                                 ` Richard Stallman
2021-10-25  7:47                               ` Alexandre Garreau
2021-10-23  2:00                             ` Po Lu
2021-10-25  2:17                             ` Richard Stallman
2021-10-25  7:00                               ` Alexandre Garreau
2021-10-22 16:55                           ` Mathias Dahl
2021-10-22 20:55                             ` Dmitry Gutov
2021-10-25  2:17                             ` Richard Stallman
2021-10-25  7:22                               ` Alexandre Garreau
2021-10-25  7:45                                 ` Theodor Thornhill
2021-10-25  7:51                                   ` Alexandre Garreau
2021-10-25  8:23                                     ` Theodor Thornhill
2021-10-30  6:51                                 ` Richard Stallman
2021-11-01 11:48                                   ` Alexandre Garreau
2021-11-01 17:47                                     ` Tim Cross
2021-11-03  3:18                                     ` Richard Stallman
2021-11-03 20:06                                       ` Jostein Kjønigsen
2021-11-05  3:53                                         ` Richard Stallman
2021-11-05  5:55                                           ` Daniel Brooks
2021-11-05  6:25                                             ` Jostein Kjønigsen
2021-11-05  9:56                                       ` Alexandre Garreau
2021-10-25  5:46               ` Jostein Kjønigsen
2021-10-06 20:57             ` Richard Stallman
2021-10-06 21:35               ` Philip Kaludercic
2021-10-05 10:15         ` Joost Kremers
2021-10-06 20:57           ` Richard Stallman
2021-10-12  2:52             ` Ag Ibragimov
2021-10-12  3:37               ` dick
2021-10-12  3:43               ` Stefan Kangas
2021-10-12 22:41                 ` Richard Stallman
2021-10-12  4:08               ` Stefan Monnier
2021-10-12  5:55               ` Po Lu
2021-10-12  7:22                 ` Ag Ibragimov
2021-10-12 10:21                   ` Philip Kaludercic
2021-10-12 12:14                     ` tomas
2021-10-12 12:51                       ` Philip Kaludercic
2021-10-12 13:08                         ` tomas
2021-10-12 12:22                   ` Stefan Monnier
2021-10-12 22:41                 ` Richard Stallman
2021-10-13  0:00                   ` Po Lu
2021-10-13  0:22                     ` Dmitry Gutov
2021-10-13  0:31                   ` Tim Cross
2021-10-13 17:15                     ` Joost Kremers
2021-10-13 17:34                       ` Dmitry Gutov
2021-10-13 20:00                         ` Tim Cross
2021-10-13 21:47                           ` Stefan Monnier
2021-10-13 23:14                           ` Dmitry Gutov
2021-10-14  6:39                           ` Eli Zaretskii
2021-10-14  6:58                             ` Po Lu
2021-10-14  6:52                           ` Po Lu
2021-10-14 11:08                             ` dick
2021-10-14 13:34                           ` Augusto Stoffel
2021-10-14  8:20                         ` João Távora
2021-10-15 22:51                           ` Richard Stallman
2021-10-16 19:02                             ` João Távora
2021-10-17 23:49                               ` Richard Stallman
2021-10-17 23:58                                 ` Dmitry Gutov
2021-10-20 22:33                                   ` Richard Stallman
2021-10-18  0:32                                 ` Tim Cross
2021-10-18  1:18                                   ` Stefan Monnier
2021-10-18  2:23                                 ` Eli Zaretskii
2021-10-18 12:43                                   ` Stefan Monnier
2021-10-18 13:13                                     ` Eli Zaretskii
2021-10-14  7:01                       ` Po Lu
2021-10-14  8:43                         ` [OT] Elisp as a general purpose programming language (was: Elisp LSP Server) Joost Kremers
2021-10-14 10:37                           ` Jean-Christophe Helary
2021-10-14  7:03                     ` Elisp LSP Server Po Lu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm534y0CjqgprwZEQ-HC3VLuO=W_6LjpVtn4JOb-Acw56DA@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).