[Top][All Lists]

[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: André A . Gomes
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: Mon, 04 Oct 2021 18:57:47 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

João Távora <joaotavora@gmail.com> writes:

> Anyway, the reason I'm reasonably confident this _can_ be done is also
> because this _has_ been done, in Common Lisp implementations.  That's
> were xref.el comes from, ultimately.  They use even more advanced stuff,
> like macroexpansion, so they catch the make-foo of defstruct.  Some
> implementations have even more advanced stuff like proper who-calls,
> who-sets, who-macroexpands.  They've had it for decades!  Have a look at
> SLIME or Sly and plug them to SBCL or Allegro Common Lisp, for example.

Sadly, things don't change much over decades João!  Take a look at what
John Rose says regarding sophisticated programming environments (like
SLIME and Sly) and "good old" grep.  This an excerpt of a message from
1987.  Here's a fragment.

When a LispM[achine] loads code into its memory, it loads a lot of
debugging information too.  For example, each function records the names
of its arguments and local variables, the names of all macros expanded
to produce its code, documentation strings, and sometimes an interpreted
definition, just for good measure.

Oh, each function also remembers which file it was defined in.  You have
no idea how useful this is: there’s an editor command called
“meta-point” that immediately transfers you to the source of any
function, without breaking your stride.  ANY function, not just one of a
special predetermined set.  Likewise, there’s a key that causes the
calling sequence of a function to be displayed instantly.

Logged into a Sun for the last few days, my Meta-Point reflex has
continued unabated, but it is completely frustrated.  The program that I
am working on has about 80 files.  If I want to edit the code of a
function Foo, I have to switch to a shell window and grep for named Foo
in various files.  Then I have to type in the name of the appropriate
file.  Then I have to correct my spelling error.  Finally I have to
search inside the file.  What used to take five seconds now takes a
minute or two.  (But what’s an order of magnitude between friends?)  By
this time, I really want to see the Sun at its best, so I’m tempted to
boot it a couple of times.

Take a look at http://www.art.net/~hopkins/Don/unix-haters/preface.html
for more.

I may eat soup with a fork, but at least I admit it's worse.

André A. Gomes
"Free Thought, Free World"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]