[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A read-based grep-like for symbols (el-search?) (was Do shorthands break
From: |
João Távora |
Subject: |
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: |
Thu, 30 Sep 2021 23:22:38 +0100 |
On Thu, Sep 30, 2021 at 11:11 PM Michael Heerdegen
<michael_heerdegen@web.de> wrote:
>
> Drew Adams <drew.adams@oracle.com> writes:
>
> > > Tools that understand the symbolic nature of the Lisp
> > > family of languages. For the example you have since,
> > > Tools that rely on way or the other really on the
> > > 'read' Lisp primitive.
> >
> > https://github.com/emacsmirror/el-search
>
> Yes, thanks Drew. Indeed I was wondering whether shorthands would break
> el-search, but it was trivial to add support for them because el-search
> is (solely) based on `read'ing. Therefore it's slower than grepping of
> course, but it's still acceptable (~ 10 seconds for the entire Emacs
> Lisp code base)
The "searching for symbols" problem is one of those embarrassingly parallel
ones, right?
Also, I can of course imaging that the `read' ing sexps is lower than reading
lines, but once you fill up an obarray with all the symbols you read, you don't
pay for the string comparison, since matching symbols to the search pattern
(presumably also a symbol) should be much faster since you can just use
the hashing of the obarray.
I haven't read or tried your code yet, I'm just speculating on possible
approaches.
João
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), (continued)
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Tomas Hlavaty, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Gregory Heytings, 2021/09/30
- RE: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Drew Adams, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), João Távora, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Michael Heerdegen, 2021/09/30
- Re: [External] : Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Michael Heerdegen, 2021/09/30
- 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 <=
- 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)), Michael Heerdegen, 2021/09/30
- 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)), João Távora, 2021/09/30
- 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)), Michael Heerdegen, 2021/09/30
- Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Tomas Hlavaty, 2021/09/30
Re: Do shorthands break basic tooling (tags, grep, etc)? (was Re: Shorthands have landed on master), Eli Zaretskii, 2021/09/28