Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get package documentation in Quicklisp

I feel I'm playing the lottery every time I'm using Quicklisp. I cannot find a web page with package lists and documentation.

As a concrete example I searched (ql:system-apropos "random-access-list") since I found an implementation of SRFI-101, which is based on Okasakis purely functional data structures, in CL. I tried this:

[1]> (ql:system-apropos-list "random-access-lists")
(#<QL-DIST:SYSTEM random-access-lists / random-access-lists-20120208-git / quicklisp 2016-03-18>)
[2]> 

I know that the name random-access-lists are not very specific so there might be other packages with that name. Last time I was less lucky and found 4 partial matches and the one that was best match was not the package I was looking for.

How do I find more about the search results?

like image 937
Sylwester Avatar asked Jul 31 '16 14:07

Sylwester


2 Answers

A somewhat hacky solution would be to download the system and use ASDF:SYSTEM-DESCRIPTION to see a description for it. Something like

(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.

A slightly more polished version:

(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 ())))))
like image 97
jkiiski Avatar answered Nov 18 '22 21:11

jkiiski


Maybe quickdocs can help here. Note, that it is not maintained by Zach Beane but by Eitaro Fukamachi, so I am not sure, how up to date this documentation is.

like image 1
Dirk Avatar answered Nov 18 '22 22:11

Dirk