[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A read-based grep-like for symbols (el-search?) (was Do shorthands b
From: |
João Távora |
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 15:40:30 +0100 |
On Fri, Oct 1, 2021 at 3:30 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 01.10.2021 16:15, João Távora wrote:
> > Language design never has been held back by the particular assumptions
> > of a search tool, popular and ubiquitous as it may be.
>
> Certain language designers intentionally limit the language's power due
> to usability considerations, keeping in mind their audience.
What languages, what evidence for this? Anyway, many more limit the power
due to performance considerations. Counts as "usability"? I guess. IME
language audiences that are interested in performance usually don't
care so much
about ergonomics and vice versa.
> Speaking of shorthands, if only the "local" part of every symbol's name
> was something reliable (as is often the case in module/package systems
> out there), we could still implement the search for references using
> Grep fairly efficiently: you Grep across the files for the local name,
> and then post-filter the references by looking at the end of the file.
Yes, yes, that's basically what happens with Common Lisp, because things
are separated by `:`. And in many other languages as you say. Unfortunately,
it's not 100% clean in Elisp because it relies on convention, not syntax. But
possible, yes. Would you like to work on that `thing-at-pt.el` front?
> If that approach is not feasible, we're limited to searching for the
> instances of 'require' forms (when the symbol/function can be mapped to
> a package name) and then searching inside every such file on the second
> pass.
That's not the approach I was thinking of, but I hope to present a working
prototype soon, which is a better way to present ideas.
> read-ing the contents of every Lisp file is pretty expensive, in comparison.
Have you benchmarked? What exactly have you benchmarked? Just `read` or
`read` + `parse-partial-sexp` (i.e. building the syntax-ppss cache)?
Versus what?
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)), tomas, 2021/10/01
- 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/10/01
- 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)), tomas, 2021/10/01
- 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)), Dmitry Gutov, 2021/10/01
- 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 <=
- 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)), Dmitry Gutov, 2021/10/01
- 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/10/01
- 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/10/01
- 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/10/01
- 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/10/01
- 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)), Dmitry Gutov, 2021/10/01
- 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/10/01
- 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)), Dmitry Gutov, 2021/10/01
- 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)), André A . Gomes, 2021/10/04
- 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)), Dmitry Gutov, 2021/10/01