all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Exploring a code base?
Date: Sat, 7 Nov 2020 21:40:17 +0200	[thread overview]
Message-ID: <b828ee39-c860-c610-4587-5df93e933460@yandex.ru> (raw)
In-Reply-To: <CAP_d_8VHAVfLXaxt0+V_T3MZEHm84ETMHY=_zCYW+VF9H+=d=w@mail.gmail.com>

On 07.11.2020 15:26, Yuri Khan wrote:
> On Wed, 28 Oct 2020 at 03:56, Dmitry Gutov <dgutov@yandex.ru> wrote:
> 
>> Speaking of Xref, we could add some new commands: to remove items from
>> the list, to undo removals. And a stacking for searches, so you could go
>> back to the previous search result. Not sure how much that will help.
> 
> A stack/history would be very nice, yeah. To the point that I actually
> caught myself trying to press ‘l’ in xref and grep result buffers.

This shouldn't be too different to implement either. You can start with 
a bug report, and then we'll see who has the time to work on it first.

>> I don't have a solution, personally, and I usually work in a dynamic
>> language where this isn't a very feasible thing to do.
> 
> “We know that it has no solution, too. But we wish to learn how to solve it.”

;-)

> I’m working in Python, which is a dynamic language. Theoretically, in
> Python one does not have to declare argument and return types, and the
> call graph can change its structure at run time because functions are
> first-class values and because of class-based polymorphism. In
> practice, my project is mostly type-annotated (with mypy
> sanity-checking the annotations), and the use of polymorphism and
> dynamic binding is limited.

Python still has it easier than Ruby, because at least you have to 
explicitly import all packages and/or used functions in a given file. 
That means you can generally be sure where any function and class 
definition is from.

Of course, heavily dynamic code throws a wrench into this, but it's 
usually in the minority.

>> * https://github.com/beacoder/call-graph uses GNU Global.
>> * Here's a recipe for a graphical call graph:
> 
> Yeah, there exist many tools that attempt to take in the whole project
> and generate a complete call graph. In my experience, most of the
> time, for any project more complex than Hello World, the resulting
> graph is too messy to be helpful.

The call-graph features that looked relevant to me are how (looking at 
the list of commands and the gifs) you manually choose which nodes in 
the tree to expand further (which is necessary, since otherwise the tree 
can become very wide/unmanageable), as well as remove elements from it 
interactively.

But yeah, in the current state it's definitely not ideal.

> Eric S. Raymond once wrote up[1] the difference between automatons
> (programs that attempt to solve the problem fully without human
> involvement) and judgment amplifiers (programs that help the human
> solve the problem by automating parts of the process). I think I’m
> looking for a tool in the latter category.

It's a more difficult category, too, I think.

One has to balance the necessary features for the task at hand, and 
flexibility (to enable some set of related tasks), and efficiency as 
well (to minimize the manual work anyway).



  parent reply	other threads:[~2020-11-07 19:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 11:38 Exploring a code base? Yuri Khan
2020-10-27 11:58 ` Christopher Dimech
2020-10-27 14:15 ` Stefan Monnier
2020-10-27 15:55 ` Drew Adams
2020-10-27 20:56 ` Dmitry Gutov
2020-11-07 13:26   ` Yuri Khan
2020-11-07 13:56     ` Eli Zaretskii
2020-11-07 14:33       ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-11-07 14:47         ` Eli Zaretskii
2020-11-07 15:32           ` Gregory Heytings via Users list for the GNU Emacs text editor
2020-11-07 15:52             ` Stefan Monnier
2020-11-07 15:58               ` Eli Zaretskii
2020-11-07 17:24                 ` Eric Abrahamsen
2020-11-07 19:23               ` Dmitry Gutov
2020-11-07 19:40     ` Dmitry Gutov [this message]
2020-10-27 20:59 ` Perry Smith
2020-10-27 22:53 ` Daniel Martín
2020-10-27 23:15   ` Stefan Monnier
2020-10-28  0:59 ` Skip Montanaro

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=b828ee39-c860-c610-4587-5df93e933460@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=help-gnu-emacs@gnu.org \
    --cc=yuri.v.khan@gmail.com \
    /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/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.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.