From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uN4lLy5AsV+pdAAA0tVLHw (envelope-from ) for ; Sun, 15 Nov 2020 14:50:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KL/eKi5AsV+cSQAAbx9fmQ (envelope-from ) for ; Sun, 15 Nov 2020 14:50:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 604AE9403A7 for ; Sun, 15 Nov 2020 14:50:22 +0000 (UTC) Received: from localhost ([::1]:41120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keJMD-00075D-98 for larch@yhetil.org; Sun, 15 Nov 2020 09:50:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keJLj-000752-Q9 for guix-devel@gnu.org; Sun, 15 Nov 2020 09:49:51 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:43922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1keJLh-0005qi-Py for guix-devel@gnu.org; Sun, 15 Nov 2020 09:49:51 -0500 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 8F21C33629A1; Sun, 15 Nov 2020 15:49:45 +0100 (CET) Date: Sun, 15 Nov 2020 15:49:42 +0100 From: Danny Milosavljevic To: zimoun Subject: Re: Discoverability at the REPL level Message-ID: <20201115154942.57e5f868@scratchpost.org> In-Reply-To: <86d00evkmr.fsf@gmail.com> References: <86d00evkmr.fsf@gmail.com> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/ZFjZP6oHjlg5KiaFg.gAUGS"; protocol="application/pgp-signature"; micalg=pgp-sha512 Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd26836.kasserver.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/15 09:49:46 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.11 X-TUID: /UY3NNwtmX3E --Sig_/ZFjZP6oHjlg5KiaFg.gAUGS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi zimoun, On Sun, 15 Nov 2020 14:02:04 +0100 zimoun wrote: > In an ideal world, the first =E2=80=99,a=E2=80=99 could provide hint for = the module to > =E2=80=99,use=E2=80=99 There is no "the" module. Any number of modules could have your searched-f= or symbol--and the procedures so found could do completely unrelated things. = One of the points of using modules in the first place is in order to group toge= ther related things (and in order not to have unrelated things together). What would be nice is for the module names to be easy to understand so you = know which module to import. That's currently not great. For example I have no idea when something goes into (guix packages) vs (gnu packages). Also, it would be nice and easy to implement to actually have the Guile REPL search for all possible loadable modules that contain some symbol if it encounters an unknown symbol, and print those, too (Guix often already does that anyway!). It should be easy to add such a thing to the guile repl. In addition to ",describe" and ",apropos" there would be ",search" which would loop through all modules, find the specified symbol and then print the docstrings of each of those, including the module to use for each. But since these modules can contain code that runs at module import time, that's maybe also not what you want to actually happen (it would execute code of random modules that are in the search path). Then again, guile has declarative modules, too. If those don't do that, maybe just search in those. Also, maybe you don't want Guile to actually IMPORT things into your namesp= ace when you do ",search". You just want guile to list them. That would be the only complication. ... in before someone points out that this already exists in guile ;) > and the =E2=80=99,d=E2=80=99 should provide both signature and docstring. I agree. It's useless to separate those. I mean it's nice that ",a" exists--but then having ",d" not list the signature is just causing more wo= rk for the developer. --Sig_/ZFjZP6oHjlg5KiaFg.gAUGS Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl+xQAYACgkQ5xo1VCww uqUuoQf/fmSsybQDFrXmgD8H04tEHw9cSRej+3Vz8kVmT9JpLmG4SGniCuj3KMv/ pOG4JhxsLc6RPqs83qnJX60s6IWG8PVmQKHes5ItyC4GQrCm2xad5Yvim8VcFlMu LgFB02kj6nm3iT50n3OcS494hsctyLm52elhr2M4RrGvrtYublkUMoqvcNPDuDVw cJ+CGPaVGoGy4Rf2WHIOJmQ1IeKr9TT5w7bq4+gFdu+Q4S4e+5DXLeSeD+DoLiXc CktO5mn82dCg1GZpPbWqtATbXRkMNiauxVit0ArdUKcg36Tv45Tzl2G2eLYCV6fR m2T+Ncp9CJtO8qQXq/OrgGk5x+sE8w== =Wy1S -----END PGP SIGNATURE----- --Sig_/ZFjZP6oHjlg5KiaFg.gAUGS--