From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Exploring a code base? Date: Sat, 7 Nov 2020 20:26:16 +0700 Message-ID: References: <57dcdf06-3bf4-4281-88d9-0e9c46adc757@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24182"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Dmitry Gutov Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 07 14:27:12 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kbOFM-000699-3n for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 14:27:12 +0100 Original-Received: from localhost ([::1]:55866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kbOFL-0005Dh-6i for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 07 Nov 2020 08:27:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kbOEi-0005DO-BZ for help-gnu-emacs@gnu.org; Sat, 07 Nov 2020 08:26:32 -0500 Original-Received: from mail-vs1-xe29.google.com ([2607:f8b0:4864:20::e29]:33572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kbOEg-0007oS-CF for help-gnu-emacs@gnu.org; Sat, 07 Nov 2020 08:26:31 -0500 Original-Received: by mail-vs1-xe29.google.com with SMTP id z123so2316384vsb.0 for ; Sat, 07 Nov 2020 05:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=66vqYTmNsfBf3H6Gean9n5+PMq8DAajwAwAitdiTfxs=; b=HqRWVY5tlbd0zLWON6z2yaP3u54izjioRAanHTfXpXGGNz7I2tre2lziuEwHWW7I6/ KkILCbTh+E8GKdBhjqj3ZhWKBIF0MyZ5mVPkC3+v/UodZQIZRHtf825kUGvAdUzY2Y6Z x02zxjGLQyO37NeaHN7EMAwl5IeMIBVmE+SMMlXF2gQ1oMC/2FCqnz+EN1zCyYHaxV3h fQ4A8qMNStS7SnH7qawu0QVx2EyoLMY4HfK2YhcaMCPscDB2sU4WJ1vfFgh1lcEpx7qb wdJZ7WEHfwaY/s9dF6V9AkTQDrmRaJ/0eTxpZqxUG9hN/pp7RGuxtrhkM5tm3MmnYTF+ dXkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=66vqYTmNsfBf3H6Gean9n5+PMq8DAajwAwAitdiTfxs=; b=GmL8aUDamI/RjSVKO9yjIbMuK8oJ2SaxDeIsYyk6ynAw2DUr1nAghTYVIuSHDmOck5 fGIa5fLDJoBJAVvmMaKwZHfa8bH9rSD4NYzl9c7Orc1pI1CXGQ5gLSmbSbbdL7qcXDr9 UguQLZ3C9ThmlLhoHQb3w/7zBzf08cA9jLYSgh/lyXNU1rnPl30O3ofY9gmWfwkVoDaW 2y9S8YYBCcgMYfKZrbSEw7jOsU8qhSe7B5RFNDMzPgOrIQptV1OxKzJuCQG1o+NlWpm/ 8W4DgsE0cH/WgozupS9j/PH15kTnDbgJPNqmuGxSzkl7NVN345Mi721vgR63aPm1qqcx 2AKQ== X-Gm-Message-State: AOAM530vGz6UqGMP8pBDXIuf3tk3xXF36kvQH7f+EQM3eJ1jjPoDhHI2 /n60HNYwkWkzxdHetKtQ2S4kMTZGvwrvBgk2bhU= X-Google-Smtp-Source: ABdhPJwL5o5naGnRk3CoiTmgO6ZjUreKerXjzPQv5Ftbtaa6XskcvM2mrtWSNgizQDREO25FlogBQkR6eAiBdBr7LBY= X-Received: by 2002:a67:b44d:: with SMTP id c13mr3911882vsm.38.1604755588159; Sat, 07 Nov 2020 05:26:28 -0800 (PST) In-Reply-To: <57dcdf06-3bf4-4281-88d9-0e9c46adc757@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::e29; envelope-from=yurivkhan@gmail.com; helo=mail-vs1-xe29.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:125088 Archived-At: On Wed, 28 Oct 2020 at 03:56, Dmitry Gutov 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 =E2=80=98l=E2=80=99 in xref and grep result b= uffers. > 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. =E2=80=9CWe know that it has no solution, too. But we wish to learn how to = solve it.=E2=80=9D I=E2=80=99m 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. > * 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. For one thing, I am not interested in all calls, only those through which a particular data type flows as an argument or [part of] the return value. This subgraph is smaller and simpler, and actually has a chance to embed into a plane without many edge intersections. 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=E2=80=99m looking for a tool in the latter category. [1]: http://esr.ibiblio.org/?p=3D7032