Message from discussion
Proposal for "apropos" feature that searches exported symbols across all quicklisp libraries
Received: by 10.204.143.145 with SMTP id v17mr830524bku.7.1337335854284;
Fri, 18 May 2012 03:10:54 -0700 (PDT)
X-BeenThere: quicklisp@googlegroups.com
Received: by 10.204.154.7 with SMTP id m7ls2007997bkw.5.gmail; Fri, 18 May
2012 03:10:52 -0700 (PDT)
Received: by 10.204.152.217 with SMTP id h25mr1378915bkw.3.1337335852509;
Fri, 18 May 2012 03:10:52 -0700 (PDT)
Received: by 10.204.152.217 with SMTP id h25mr1378914bkw.3.1337335852491;
Fri, 18 May 2012 03:10:52 -0700 (PDT)
Return-Path: <glq-quickl...@m.gmane.org>
Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
by gmr-mx.google.com with ESMTPS id p5si9521939bks.1.2012.05.18.03.10.52
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 18 May 2012 03:10:52 -0700 (PDT)
Received-SPF: pass (google.com: domain of glq-quickl...@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of glq-quickl...@m.gmane.org designates 80.91.229.3 as permitted sender) smtp.mail=glq-quickl...@m.gmane.org
Received: from list by plane.gmane.org with local (Exim 4.69)
(envelope-from <glq-quickl...@m.gmane.org>)
id 1SVK93-0000Tl-NJ
for quicklisp@googlegroups.com; Fri, 18 May 2012 12:10:49 +0200
Received: from anantes-556-1-258-75.w2-1.abo.wanadoo.fr ([2.1.154.75])
by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
id 1AlnuQ-0007hv-00
for <quicklisp@googlegroups.com>; Fri, 18 May 2012 12:10:49 +0200
Received: from daimrod by anantes-556-1-258-75.w2-1.abo.wanadoo.fr with local (Gmexim 0.1 (Debian))
id 1AlnuQ-0007hv-00
for <quicklisp@googlegroups.com>; Fri, 18 May 2012 12:10:49 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: quicklisp@googlegroups.com
From: Daimrod <daim...@gmail.com>
Subject: Re: Proposal for "apropos" feature that searches exported symbols across all quicklisp libraries
Date: Fri, 18 May 2012 12:10:34 +0200
Lines: 80
Message-ID: <87396xiyud.fsf@gmail.com>
References: <295ff932-d105-42f7-bac0-b40cd098a...@o3g2000pby.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: use...@dough.gmane.org
X-Gmane-NNTP-Posting-Host: anantes-556-1-258-75.w2-1.abo.wanadoo.fr
User-Mail-Address: daim...@gmail.com
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)
Cancel-Lock: sha1:BPMBtZ0TPwtPtsIkKL3u0IpCxjI=
Paul Sexton <psexton...@gmail.com> writes:
> Hi,
> Quicklisp is really great. It reduces the pain of installing a lisp
> working environment, downloading dependencies, and keeping them
> updated by about 99.9%.
>
> I was looking at the alexandria library, and some of the other
> "miscellaneous utilities" libraries distributed by quicklisp, and
> thinking how I really have no idea what's in any of them, and no easy
> way to find out. Then I thought about whether an "apropos" command
> that searched exported symbols would be feasible.
>
> The idea is that part of the process of building each update to the
> quicklisp distribution would be to run a function that scans every
> library known to quicklisp, extracts all the symbols exported by the
> DEFPACKAGE forms within the source files of those libraries (by
> parsing the files without loading them), and saves that information to
> a text file that is included with the quicklisp distribution.
>
> The end user could then call a function from the REPL which would
> search the text file for occurrences of a string.
>
> I have written a proof-of-concept which can "grovel" ASDF systems and
> installed Quicklisp libraries for exported symbols. It uses
> com.informatimago.common-lisp.lisp-text, which will need to be
> installed via quicklisp.
>
> Example:
>
> CL-USER> (ql-search:ql-search-library "struct" "cffi")
>
> Parsing source file: #P"C:/Users/paul/quicklisp/dists/quicklisp/
> software/cffi_0.10.6/examples/examples.lisp"
> Parsing source file: #P"C:/Users/paul/quicklisp/dists/quicklisp/
> software/cffi_0.10.6/examples/gethostname.lisp"
> Parsing source file: #P"C:/Users/paul/quicklisp/dists/quicklisp/
> software/cffi_0.10.6/examples/gettimeofday.lisp"
> Parsing source file: #P"C:/Users/paul/quicklisp/dists/quicklisp/
> software/cffi_0.10.6/grovel/package.lisp"
> Parsing source file: #P"C:/Users/paul/quicklisp/dists/quicklisp/
> software/cffi_0.10.6/grovel/invoke.lisp"
> [etc]
>
> System "cffi-uffi-compat": cffi-uffi-compat:def-struct
> System "cffi": cffi:defcstruct
> System "cffi": cffi:define-c-struct-wrapper
> CL-USER>
>
> Note how it searches several ASDF systems (cffi, cffi-uffi-compat and
> others) contained in the cffi quicklisp library.
>
> The code is at:
> https://gist.github.com/1b7d2e444e21c139d12d
If you use SLIME there is slime-apropos-package bound to C-c C-d C-p.
e.g.
C-c C-d C-p ALEXANDRIA RET
ALIST-HASH-TABLE
Function: Returns a hash table containing the keys and values of the association list
ALIST-PLIST
Function: Returns a property list containing the same keys and values as the
APPENDF
Macro: Modify-macro for APPEND. Appends LISTS to the place designated by the first
ARRAY-INDEX
Type: Type designator for an index into array of LENGTH: an integer between
ARRAY-LENGTH
Type: Type designator for a dimension of an array of LENGTH: an integer between
ASSOC-VALUE
Function: ASSOC-VALUE is an alist accessor very much like ASSOC, but it can
Setf: (not documented)
[...]
WRITE-BYTE-VECTOR-INTO-FILE
Function: Write BYTES to PATHNAME.
WRITE-STRING-INTO-FILE
Function: Write STRING to PATHNAME.
XOR
Macro: Evaluates its arguments one at a time, from left to right. If more then one