Gisle S{lensminde <gisle@...> writes:
> On Fri, 31 Jan 2003, Daniel Barlow wrote:
>
> > Gisle S{lensminde <gisle@...> writes:
> >
> > > The function used in cmucl don't seem to work in sbcl
> > > (extension:save-lisp ..) , and I can't find documentation for
> > > how this works in sbcl. Does someone know how, or know where docs
> > > for this can be found or both?
> >
> > It got renamed: it's now SAVE-LISP-AND-DIE
> >
> > * (describe 'sb-ext:save-lisp-and-die)
> >
> > will show you the (fairly comprehensive) doc string
>
> Thanks, that helped. Is there any other way of finding the
> documentation of implementation specific functions and
> packages than reading the source of sbcl?
The introspective qualities of lisp are quite strong. You now know
that SB-EXT names the extension package of SBCL, so to find out all
the public extension symbols, you can do
* (do-external-symbols (s 'sb-ext) (print s))
which prints out 70-odd symbols. You can then ask about them; at
random, I'll choose
* (describe 'get-bytes-consed)
to get the information
Return the number of bytes consed since the program began. Typically
this result will be a consed bignum, so [...]
Its declared argument types are:
NIL
Its result type is:
UNSIGNED-BYTE
among other things.
Another useful querying function for the environment is apropos --
doing
* (apropos "save-lisp")
would probably have given you the nudge you needed.
If this smacks slightly of excuses for poor paper documentation or a
lacking user manual, well, that's probably true at present -- what is
needed is a way of ensuring that the user manual is kept in sync with
the extensions offered, preferably in an automated way, because at
least the minimal documentation offered by function documentation
strings is more likely to be in sync with the code :-)
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)
|