每次使用 Quicklisp 时,我都觉得我在玩彩票。我找不到包含包列表和文档的网页。
作为一个具体的例子,我搜索了 (ql:system-apropos "random-access-list")
因为我ound an implementation of SRFI-101 ,它基于 Okasakis 纯函数数据结构,在 CL 中。我试过这个:
[1]> (ql:system-apropos-list "random-access-lists")
(#<QL-DIST:SYSTEM random-access-lists / random-access-lists-20120208-git / quicklisp 2016-03-18>)
[2]>
我知道名字
random-access-lists
不是很具体,因此可能还有其他具有该名称的软件包。上次我不太幸运,找到了 4 个部分匹配,其中最匹配的不是我要找的包。如何找到有关搜索结果的更多信息?
最佳答案
一个有点hacky的解决方案是下载系统并使用ASDF:SYSTEM-DESCRIPTION
查看它的描述。就像是
(defun describe-ql-system (system)
(let ((system (asdf:find-system
(ql-dist:name
(ql-dist:ensure-installed
(ql-dist:find-system system))))))
(format t "~a~%~@[~a~%~]"
(asdf:system-description system)
(asdf:system-long-description system))))
(describe-ql-system :random-access-lists)
; Persistent, random-access lists.
一个稍微精致的版本:
(defun describe-ql-system (system)
(let ((system (if (typep system 'ql-dist:system)
system
(ql-dist:find-system system))))
(unless (null system)
(ql-dist:ensure-installed system)
(handler-case
(let* ((name (ql-dist:name system))
(system (asdf:find-system name)))
(format t "~&~60,,,'=<~; ~a ~;~>~@
~@[Author: ~a~%~]~
~@[Maintainer: ~a~%~]~
~@[Description: ~a~%~]~
~@[Long description:~@
~a~%~]~%"
name
(asdf:system-author system)
(asdf:system-maintainer system)
(asdf:system-description system)
(asdf:system-long-description system)))
(asdf:missing-component ())))))
关于common-lisp - 如何在 Quicklisp 中获取包文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38684906/