home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #2 / Amiga Plus CD - 1995 - No. 2.iso / internet / faq / englisch / lisp < prev    next >
Encoding:
Text File  |  1995-04-11  |  341.0 KB  |  6,938 lines

  1. Archive-name: lisp-faq/part1
  2. Last-Modified: Fri Mar 10 17:06:50 1995 by Mark Kantrowitz
  3. Version: 1.54
  4. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  5. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  6. Size: 79107 bytes, 1627 lines
  7.  
  8. ;;; ****************************************************************
  9. ;;; Answers to Frequently Asked Questions about Lisp ***************
  10. ;;; ****************************************************************
  11. ;;; Written by Mark Kantrowitz and Barry Margolin
  12. ;;; lisp_1.faq 
  13.  
  14. This post contains Part 1 of the Lisp FAQ.
  15.  
  16. If you think of questions that are appropriate for this FAQ, or would
  17. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  18.  
  19. Note that the lisp-faq mailing list is for discussion of the content
  20. of the FAQ posting only.  It is not the place to ask questions about Lisp;
  21. use either the common-lisp@ai.sri.com mailing list or the
  22. comp.lang.lisp newsgroup for that.  If a question appears frequently
  23. in one of those forums, it will get added to the FAQ list.
  24.  
  25. *** Copyright:
  26.  
  27. Copyright (c) 1992-94 by Mark Kantrowitz and Barry Margolin. 
  28. All rights reserved. 
  29.  
  30. This FAQ may be freely redistributed in its entirety without
  31. modification provided that this copyright notice is not removed.  It
  32. may not be sold for profit or incorporated in commercial documents
  33. (e.g., published for sale on CD-ROM, floppy disks, books, magazines,
  34. or other print form) without the prior written permission of the
  35. copyright holder.  Permission is expressly granted for this document
  36. to be made available for file transfer from installations offering
  37. unrestricted anonymous file transfer on the Internet.
  38.  
  39. If this FAQ is reproduced in offline media (e.g., CD-ROM, print form,
  40. etc.), a complimentary copy should be sent to Mark Kantrowitz, School
  41. of Computer Science, Carnegie Mellon University, 5000 Forbes Avenue,
  42. Pittsburgh, PA 15213-3891 USA.
  43.  
  44. This article is provided AS IS without any express or implied warranty.
  45.  
  46. *** Recent Changes:
  47.  
  48. ;;; 1.51:
  49. ;;; 13-OCT-94 mk    Added [2-21] How do I tell if a symbol names a function
  50. ;;;                 and not a macro?
  51. ;;; 20-OCT-94 mk    Added [5-7] Common CLOS Blunders by Marty Hall.
  52. ;;;  3-NOV-94 mk    Added Christian Queinnec's Lisp book to [1-4].
  53. ;;;  4-NOV-94 mk    Updated CMU CL entry. 17f w/ Solaris, SGI MIPS, and DEC
  54. ;;;                 Alpha released.
  55. ;;; 10-NOV-94 mk    Digitool to produce PowerPC version of MCL.
  56. ;;; 11-NOV-94 mk    Updated ISO Lisp paragraph in [4-10].
  57. ;;; 11-NOV-94 mk    Updated LispWorks for Harlequin entry in part 4.
  58. ;;;
  59. ;;; 1.52:
  60. ;;; 14-NOV-94 mk    Corrected ftp location of GBB, part 6.
  61. ;;;  1-DEC-94 mk    Updated AKCL entry (beta DOS implementation) thanks to Ken
  62. ;;;                 Nakata.
  63. ;;;  1-DEC-94 mk    HTML version of CLtL2 in [1-2].
  64. ;;; 12-DEC-94 mk    Miscellaneous small fixes to mentions of LispWorks in
  65. ;;;                 [2-11], [2-14], [4-1], and so on.
  66. ;;; 12-DEC-94 mk    Updated Lisp & Symbolic Computation's editors.
  67. ;;;
  68. ;;; 1.53:
  69. ;;; 16-JAN-95 mk    Removed prices from Lucid entry.
  70. ;;; 17-JAN-95 mk    Expanded Hasemer and Domingue entry, thanks to Andrew
  71. ;;;                 Knight.
  72. ;;; 19-JAN-95 mk    Common Lisp now an ANSI standard [4-10].
  73. ;;; 24-JAN-95 mk    Updated Xerox Tagger info in part 6.
  74. ;;; 31-JAN-95 mk    Updated Poplog Common Lisp entry in [4-1].
  75. ;;;
  76. ;;; 1.54:
  77. ;;;  8-MAR-95 mk    Removed the CORBA entry from part 5 of the FAQ, since
  78. ;;;                 Donald Vines is no longer at NEC. Thus there's nobody at
  79. ;;;                 NEC to provide support for the CLOS binding.
  80. ;;; 10-MAR-95 mk    Added Xgcl entry to part 7.
  81.  
  82. *** Topics Covered:
  83.  
  84. There are currently seven parts to the Lisp FAQ:
  85.  
  86.    1. Introductory Matter and Bibliography of Introductions and References
  87.    2. General Questions
  88.    3. Common Programming Pitfalls
  89.    4. Lisp Implementations and Mailing Lists
  90.    5. Object-oriented Programming in Lisp
  91.    6. FTP Archives and Resources
  92.    7. Lisp Window Systems and GUIs
  93.  
  94. All parts are posted to comp.lang.lisp. Part 5 is cross-posted to the
  95. comp.lang.clos newsgroup.  
  96.  
  97. Topics Covered (Part 1):
  98.  
  99.   [1-0]   What is the purpose of this newsgroup?
  100.   [1-1]   What is the difference between Scheme and Common Lisp?
  101.   [1-2]   Lisp books, introductions, documentation, periodicals,
  102.           journals, and conference proceedings. 
  103.   [1-3]   How can I improve my Lisp programming style and coding efficiency?
  104.   [1-4]   Where can I learn about implementing Lisp interpreters and compilers?
  105.   [1-5]   What is the "minimal" set of primitives needed for a Lisp
  106.           interpreter? 
  107.   [1-6]   What does CLOS, PCL, X3J13, CAR, CDR, ... mean? 
  108.   [1-7]   Lisp Job Postings
  109.  
  110. Topics Covered (Part 2):
  111.  
  112.   [2-1]   Is there a GNU-Emacs interface to Lisp?
  113.   [2-2]   When should I use a hash table instead of an association list?
  114.   [2-3]   What is the equivalent of EXPLODE and IMPLODE in Common Lisp?
  115.   [2-4]   Is Lisp inherently slower than more conventional languages such as C?
  116.   [2-5]   Why does Common Lisp have "#'"?
  117.   [2-6]   How do I call non-Lisp functions from Lisp?
  118.   [2-7]   Can I call Lisp functions from other languages?
  119.   [2-8]   I want to call a function in a package that might not exist at
  120.           compile time. How do I do this?  
  121.   [2-9]   What is CDR-coding?
  122.   [2-10]  What is garbage collection?
  123.   [2-11]  How do I save an executable image of my loaded Lisp system?
  124.           How do I run a Unix command in my Lisp? How do I exit Lisp?
  125.   [2-12]  I'm porting some code from a Symbolics Lisp machine to some
  126.           other platform, and there are strange characters in the code.
  127.           What do they mean?  
  128.   [2-13]  History: Where did Lisp come from?
  129.   [2-14]  How do I find the argument list of a function?
  130.           How do I get the function name from a function object?
  131.   [2-15]  How can I have two Lisp processes communicate via unix sockets?
  132.   [2-16]  How can I create a stream that acts like UNIX's /dev/null
  133.           (i.e., gobbles any output and immediately signals EOF on
  134.           input operations)?
  135.   [2-17]  Read-time conditionalization of code (#+ #- and *features*)
  136.   [2-18]  What reader macro characters are used in major Lisp systems?
  137.   [2-19]  How do I determine if a file is a directory or not? 
  138.           How do I get the current directory name from within a Lisp 
  139.           program? Is there any way to create a directory?
  140.   [2-20]  What is a "Lisp Machine" (LISPM)?
  141.   [2-21]  How do I tell if a symbol names a function and not a macro?
  142.  
  143. Common Pitfalls (Part 3):
  144.  
  145.   [3-0]  Why does (READ-FROM-STRING "foobar" :START 3) return FOOBAR
  146.          instead of BAR?  
  147.   [3-1]  Why can't it deduce from (READ-FROM-STRING "foobar" :START 3)
  148.          that the intent is to specify the START keyword parameter
  149.          rather than the EOF-ERROR-P and EOF-VALUE optional parameters?   
  150.   [3-2]  Why can't I apply #'AND and #'OR?
  151.   [3-3]  I used a destructive function (e.g. DELETE, SORT), but it
  152.          didn't seem to work.  Why? 
  153.   [3-4]  After I NREVERSE a list, it's only one element long.  After I
  154.          SORT a list, it's missing things.  What happened? 
  155.   [3-5]  Why does (READ-LINE) return "" immediately instead of waiting
  156.          for me to type a line?  
  157.   [3-6]  I typed a form to the read-eval-print loop, but nothing happened. Why?
  158.   [3-7]  DEFMACRO doesn't seem to work.
  159.          When I compile my file, LISP warns me that my macros are undefined
  160.          functions, or complains "Attempt to call <function> which is 
  161.          defined as a macro.
  162.   [3-8]  Name conflict errors are driving me crazy! (EXPORT, packages)
  163.   [3-9]  Closures don't seem to work properly when referring to the
  164.          iteration variable in DOLIST, DOTIMES, DO and LOOP.
  165.   [3-10] What is the difference between FUNCALL and APPLY?
  166.   [3-11] Miscellaneous things to consider when debugging code.
  167.   [3-12] When is it right to use EVAL?
  168.   [3-13] Why does my program's behavior change each time I use it?
  169.   [3-14] When producing formatted output in Lisp, where should you put the
  170.          newlines (e.g., before or after the line, FRESH-LINE vs TERPRI,
  171.          ~& vs ~% in FORMAT)?
  172.   [3-15] I'm using DO to do some iteration, but it doesn't terminate. 
  173.   [3-16] My program works when interpreted but not when compiled!
  174.  
  175. Lisp Implementations and Mailing Lists (Part 4):
  176.  
  177.   [4-0]   Free Common Lisp implementations.
  178.   [4-1]   Commercial Common Lisp implementations.
  179.   [4-1a]  Lisp-to-C translators
  180.   [4-2]   Scheme Implementations
  181.   [4-4]   Free Implementations of Other Lisp Dialects
  182.   [4-5]   Commercial Implementations of Other Lisp Dialects
  183.   [4-6]   What is Dylan?
  184.   [4-7]   What is Pearl Common Lisp?
  185.   [4-9]   What Lisp-related discussion groups and mailing lists exist?
  186.   [4-10]  Where can I get a copy of the ANSI Common Lisp standard?
  187.           What is ISO Lisp?
  188.  
  189. Object-oriented Programming in Lisp (Part 5):
  190.  
  191.   [5-0]   What is CLOS (PCL) and where can I get it?
  192.           How do you pronounce CLOS? What is the Meta-Object Protocol (MOP)?
  193.   [5-1]   What documentation is available about object-oriented
  194.           programming in Lisp?  
  195.   [5-2]   How do I write a function that can access defstruct slots by
  196.           name?  I would like to write something like 
  197.           (STRUCTURE-SLOT <object> '<slot-name>).   
  198.   [5-3]   How can I list all the CLOS instances in a class?
  199.   [5-4]   How can I store data and CLOS instances (with possibly circular
  200.           references) on disk so that they may be retrieved at some later
  201.           time? (Persistent Object Storage)
  202.   [5-5]   Given the name of a class, how can I get the names of its slots?
  203.   [5-6]   Free CLOS software.
  204.   [5-7]   Common CLOS Blunders
  205.  
  206. FTP Resources (Part 6):
  207.  
  208.   [6-0] General information about FTP Resources for Lisp
  209.   [6-1] Repositories of Lisp Software
  210.   [6-3] Publicly Redistributable Lisp Software
  211.   [6-6] Formatting code in LaTeX (WEB and other literate programming tools)
  212.   [6-7] Where can I get an implementation of Prolog in Lisp?
  213.   [6-8] World-Wide Web (WWW) Resources
  214.  
  215. Lisp Window Systems and GUIs (Part 7):
  216.   [7-1] How can I use the X Window System or other GUIs from Lisp?
  217.   [7-2] What Graphers/Browsers are available?
  218.  
  219. Search for \[#\] to get to question number # quickly.
  220.  
  221. *** Introduction:
  222.  
  223. Certain questions and topics come up frequently in the various network
  224. discussion groups devoted to and related to Lisp.  This file/article is
  225. an attempt to gather these questions and their answers into a convenient
  226. reference for Lisp programmers.  It (or a reference to it) is posted
  227. periodically.  The hope is that this will cut down on the user time and
  228. network bandwidth used to post, read and respond to the same questions
  229. over and over, as well as providing education by answering questions
  230. some readers may not even have thought to ask.
  231.  
  232. This is not a Lisp tutorial, nor is it an exhaustive list of all Lisp
  233. intricacies.  Lisp is a very powerful and expressive language, but with
  234. that power comes many complexities.  This list attempts to address the
  235. ones that average Lisp programmers are likely to encounter.  If you are
  236. new to Lisp, see the answer to the question "How can I learn Lisp?".
  237.  
  238. The latest version of this FAQ is available via anonymous FTP from CMU:
  239.  
  240.    To obtain the files from CMU, connect by anonymous FTP to 
  241.       ftp.cs.cmu.edu:/user/ai/pubs/faqs/lisp/  [128.2.206.173]
  242.    using username "anonymous" and password "name@host" (substitute your
  243.    email address) or via AFS in the Andrew File System directory
  244.       /afs/cs.cmu.edu/project/ai-repository/ai/pubs/faqs/lisp/
  245.    and get the files lisp_1.faq, lisp_2.faq, lisp_3.faq, lisp_4.faq,
  246.    lisp_5.faq, lisp_6.faq and lisp_7.faq.
  247.  
  248. You can also obtain a copy of the FAQ by sending a message to
  249. ai+query@cs.cmu.edu with 
  250.    Send Lisp FAQ
  251. in the message body.
  252.  
  253. The FAQ postings are also archived in the periodic posting archive on
  254.    rtfm.mit.edu:/pub/usenet/news.answers/lisp-faq/ [18.181.0.24]
  255. If you do not have anonymous ftp access, you can access the archive by
  256. mail server as well.  Send an E-mail message to
  257. mail-server@rtfm.mit.edu with "help" and "index" in the body on
  258. separate lines for more information.
  259.  
  260. An automatically generated HTML version of the Lisp FAQ is accessible by
  261. WWW as part of the AI-related FAQs Mosaic page. The URL for this
  262. resource is
  263.    http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/top.html
  264. The direct URL for the Lisp FAQ is
  265.    http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  266.  
  267. Unless otherwise specified, the Lisp dialect referred to is Common Lisp,
  268. as defined by "Common Lisp: the Language" (aka "CLtL1") as well as
  269. corrections (but not enhancements) from "Common Lisp: the Language, 2nd
  270. Edition" (aka "CLtL2"), both by Guy L. Steele, Jr. and published by
  271. Digital Press. Note that CLtL2 is NOT an official specification for
  272. the language; ANSI Committee X3J13 is preparing such a specification.
  273. See question [4-10] for information on the status of the ANSI
  274. specification for Common Lisp. Enhancements such as CLOS, conditions,
  275. and the LOOP macro will be referred to separately.
  276.  
  277. If you need to cite the FAQ for some reason, use the following format:
  278.    Mark Kantrowitz and Barry Margolin, "Answers to Frequently Asked
  279.    Questions about Lisp", comp.lang.lisp, <month>, <year>,
  280.    ftp.cs.cmu.edu:/user/ai/pubs/faqs/lisp/lisp_?.faq, ai+lisp-faq@cs.cmu.edu.
  281.  
  282. ----------------------------------------------------------------
  283. Subject: [1-0] What is the purpose of this newsgroup?
  284.  
  285. The newsgroup comp.lang.lisp exists for general discussion of
  286. topics related to the programming language Lisp. For example, possible
  287. topics can include (but are not necessarily limited to):
  288.    announcements of Lisp books and products
  289.    discussion of programs and utilities written in Lisp
  290.    discussion of portability issues
  291.    questions about possible bugs in Lisp implementations
  292.    problems porting an implementation to some architecture
  293. Postings should be of general interest to the Lisp community. See also
  294. question [4-9]. Postings asking for solutions to homework problems are
  295. inappropriate. 
  296.  
  297. Every so often, somebody posts an inflammatory message, such as
  298.    My programming language is better than yours (Lisp vs. C/Prolog/Scheme). 
  299.    Loop (or Series) should/shouldn't be part of the language.
  300. These "religious" issues serve no real purpose other than to waste
  301. bandwidth. If you feel the urge to respond to such a post, please do
  302. so through a private e-mail message. 
  303.  
  304. Questions about object oriented programming in Lisp should be directed
  305. to the newsgroup comp.lang.clos. Similarly, questions about the
  306. programming language Scheme should be directed to the newsgroup
  307. comp.lang.scheme. Discussion of functional programming language issues
  308. should be directed to the newsgroup comp.lang.functional. Discussion
  309. of AI programs implemented in Lisp should sometimes be cross-posted to
  310. the newsgroup comp.ai.
  311.  
  312. ----------------------------------------------------------------
  313. Subject: [1-1] What is the difference between Scheme and Common Lisp?
  314.  
  315. Scheme is a dialect of Lisp that stresses conceptual elegance and
  316. simplicity. It is specified in R4RS and IEEE standard P1178. (See
  317. the Scheme FAQ for details on standards for Scheme.) Scheme is much
  318. smaller than Common Lisp; the specification is about 50 pages,
  319. compared to Common Lisp's 1300 page draft standard. (See question
  320. [4-10] for details on standards for Common Lisp.) Advocates of Scheme
  321. often find it amusing that the Scheme standard is shorter than the
  322. index to CLtL2. 
  323.  
  324. Scheme is often used in computer science curricula and programming
  325. language research, due to its ability to represent many programming
  326. abstractions with its simple primitives. Common Lisp is often used for
  327. real world programming because of its large library of utility
  328. functions, a standard object-oriented programming facility (CLOS), and
  329. a sophisticated condition handling system.
  330.  
  331. See the Scheme FAQ for information about object-oriented programming
  332. in Scheme. 
  333.  
  334. In Common Lisp, a simple program would look something like the
  335. following:
  336.  
  337.    (defun fact (n)
  338.      (if (< n 2)
  339.          1
  340.          (* n (fact (1- n)))))
  341.  
  342. In Scheme, the equivalent program would like like this:
  343.  
  344.    (define fact
  345.      (lambda (n)
  346.        (if (< n 2)
  347.            1
  348.          (* n (fact (- n 1))))))
  349.  
  350. Experienced Lisp programmers might write this program as follows in order
  351. to allow it to run in constant space:
  352.  
  353.    (defun fact (n)
  354.      (labels ((tail-recursive-fact (counter accumulator)
  355.                 (if (> counter n)
  356.                     accumulator
  357.                     (tail-recursive-fact (1+ counter)
  358.                                          (* counter accumulator)))))
  359.        (tail-recursive-fact 1 1)))
  360.  
  361. Whereas in Scheme the same computation could be written as follows:
  362.  
  363.    (define fact
  364.      (lambda (n)
  365.        (letrec ((tail-recursive-fact
  366.                  (lambda (counter accumulator)
  367.                    (if (> counter n)
  368.                        accumulator
  369.                      (tail-recursive-fact (+ counter 1)
  370.                                           (* counter accumulator))))))
  371.                (tail-recursive-fact 1 1))))
  372.  
  373. or perhaps (using IEEE named LETs):
  374.  
  375.    (define fact
  376.      (lambda (n)
  377.        (let loop ((counter n)
  378.                   (accumulator 1))
  379.             (if (< counter 2)
  380.                 accumulator
  381.               (loop (- counter 1)
  382.                     (* accumulator counter))))))
  383.  
  384. Some Schemes allow one to use the syntax (define (fact n) ...) instead
  385. of (define fact (lambda (n) ...)).
  386.  
  387. ----------------------------------------------------------------
  388. Subject: [1-2] Lisp books, introductions, documentation, periodicals,
  389.                journals, and conference proceedings. 
  390.  
  391. There are several good Lisp introductions and tutorials:
  392.  
  393.    1. David S. Touretzky
  394.       "Common Lisp: A Gentle Introduction to Symbolic Computation"
  395.       Benjamin/Cummings Publishers, Redwood City, CA, 1990. 592 pages.
  396.       ISBN 0-8053-0492-4 ($42.95). 
  397.            Perhaps the best tutorial introduction to the language. It has
  398.            clear and correct explanations, and covers some fairly advanced
  399.            topics. The book is an updated Common Lisp version of the 1984
  400.            edition published by Harper and Row Publishers. 
  401.  
  402.            Three free Lisp educational tools which were used in the book --
  403.            Evaltrace, DTRACE and SDRAW -- are available by anonymous ftp from
  404.               b.gp.cs.cmu.edu:/usr/dst/public/lisp/
  405.               b.gp.cs.cmu.edu:/usr/dst/public/evaltrace/
  406.        Evaltrace is a graphical notation for explaining how evaluation
  407.        works and is described in "Visualizing Evaluation in
  408.        Applicative Languages" by David S. Touretzky and Peter Lee,
  409.        CACM 45-59, October 1992. DTRACE is a "detailed trace" which
  410.        provides more information than the tracing tools provided with
  411.        most Common Lisp implementations. SDRAW is a read-eval-draw
  412.        loop that evaluates Lisp expressions and draws the result as a
  413.        cons cell diagram (for both X11 and ascii terminals). Also
  414.        available is PPMX, a tool for pretty printing macro expansions.
  415.  
  416.    2. Robert Wilensky.
  417.       "Common LISPcraft"
  418.       W. W. Norton, New York, 1986. 500 pages. ISBN 0-393-95544-3.
  419.  
  420.    3. Wade L. Hennessey.
  421.       "Common Lisp"
  422.       McGraw-Hill, New York, 1989. 395 pages. ISBN 0-07-028177-7, $26.95.
  423.            Fairly good, but jumps back and forth from the simple to the
  424.            complex rather quickly, with no clear progression in difficulty.
  425.  
  426.    4. Laurent Siklossy.
  427.       "Let's Talk LISP"
  428.       Prentice-Hall, NJ, 1976. 237 pages, ISBN 0-13-53276-2-8.
  429.            Good introduction, but quite out of date.
  430.  
  431.    5. Stuart C. Shapiro.
  432.       "Common Lisp: An Interactive Approach"
  433.       Computer Science Press/W.H. Freeman, New York, 1992. 
  434.       358 pages, ISBN 0-7167-8218-9. 
  435.          The errata for the book may be obtained by anonymous ftp from
  436.          ftp.cs.buffalo.edu:/users/shapiro/clerrata.ps
  437.  
  438. Other introductions to Lisp include:
  439.  
  440.    1. A. A. Berk.
  441.       "LISP, The Language of Artificial Intelligence"
  442.       Van Nostrand Reinhold, 1985. 160 pages, ISBN 0-44-22097-4-6.
  443.  
  444.    2. Paul Y. Gloess.
  445.       "An Alfred handy guide to Understanding LISP"
  446.       Alfred Publishers (Sherman Oaks, CA), 1982. 
  447.       64 pages, ISBN 0-88-28421-9-6, $2.95.
  448.  
  449.    3. Ward D. Maurer.
  450.       "The Programmer's Introduction to LISP"
  451.       American Elsevier, New York, 1972. 112 pages, ISBN 0-44-41957-2-6.
  452.  
  453.    4. Hank Bromley and Richard Lamson.
  454.       "LISP Lore: A Guide to Programming the LISP Machine", 2nd edition
  455.       Kluwer Academic, Boston, 1987. 337 pages, ISBN 0-89-83822-8-9, $49.95.
  456.  
  457.    5. Sharam Hekmatpour.
  458.       "Introduction to LISP and Symbol Manipulation"
  459.       Prentice Hall, New York, 1989. 303 pages, ISBN 0-13-53749-0-1, $40.
  460.  
  461.    6. Deborah G. Tatar
  462.       "A programmer's guide to Common Lisp"
  463.       Digital Press, 1987. 327 pages. ISBN 0-932376-87-8.
  464.            Good introduction on Common Lisp for programmers familiar
  465.            with other programming languages, such as FORTRAN, PASCAL, or C.
  466.  
  467.    7. Timothy Koschmann
  468.       "The Common Lisp Companion"
  469.       John Wiley & Sons, 1990. 459 pages, ISBN 0-471-503-8-8.
  470.            Targeted for those with some programming experience who wish to 
  471.            learn draft-ANSI Common Lisp, including CLOS and the CL condition 
  472.            system. Examples progress incrementally from simple numerical 
  473.            calculation all the way to a logic-programming extension to CL.
  474.   
  475. More advanced introductions to Lisp and its use in Artificial
  476. Intelligence include:
  477.  
  478.    1. Peter Norvig.
  479.       "Paradigms of AI Programming: Case Studies in Common Lisp"
  480.       Morgan Kaufmann, 1992. 946 pages. ISBN 1-55860-191-0 ($49.95).
  481.  
  482.         Provides an in-depth exposition of advanced AI programming techniques
  483.         and includes large-scale detailed examples. The book is the most
  484.         advanced AI/Common-Lisp programming text and reference currently
  485.         available, and hence is not for the complete novice.  It focuses on the
  486.         programming techniques necessary for building large AI systems,
  487.         including object-oriented programming, and has a strong performance
  488.         orientation.
  489.  
  490.         The text is marked by its use of "non-toy" examples to illustrate the
  491.         techniques. All of the examples are written in Common Lisp, and copies
  492.         of the source code are available by anonymous ftp from
  493.         unix.sri.com:/pub/norvig and on disk in Macintosh or DOS format from
  494.         the publisher. Some of the techniques described include rule-based
  495.         pattern matching (GPS, Eliza, a subset of Macsyma, the Emycin expert
  496.         system shell), constraint propagation and backtracking (Waltz
  497.         line-labelling), alpha-beta search (Othello), natural language
  498.         processing (top-down, bottom-up and chart parsing), logic-programming
  499.         (unification and Prolog), interpreters and compilers for Scheme, and
  500.         object-oriented programming (CLOS).
  501.  
  502.         The examples are also used to illustrate good programming style and
  503.         efficiency. There is a guide to trouble-shooting and debugging Lisp
  504.         programs, a style guide, and a discussion of portability problems.
  505.         Some of the efficiency techniques described include memoization,
  506.         data indexing, compilation, delaying computation, proper use of
  507.         declarations, avoiding garbage collection, and choosing and using the
  508.         correct data structure.
  509.  
  510.         The book also serves as an advanced introduction to Common Lisp, with
  511.         sections on the Loop macro, CLOS and sequences, and some coverage of 
  512.         error handling, series, and the package facility.
  513.  
  514.    2. Eugene Charniak, Christopher K. Riesbeck, Drew V. McDermott
  515.       and James R. Meehan.
  516.       "Artificial Intelligence Programming", 2nd edition.
  517.       Lawrence Erlbaum Associates (Hillsdale, NJ), 1987. 
  518.       533 pages, ISBN 0-89-85960-9-2, $29.95.
  519.  
  520.            Provides many nice code fragments, all of which are written
  521.            in Common Lisp. The first half of the book covers topics
  522.            like macros, the reader, data structures, control structures,
  523.            and defstructs. The second half of the book describes
  524.            programming techniques specific to AI, such as
  525.            discrimination nets, production systems, deductive database
  526.            retrieval, logic programming, and truth maintenance.
  527.  
  528.    3. Patrick H. Winston and Berthold K. P. Horn.
  529.       "LISP", 3rd edition.
  530.       Addison-Wesley (Reading, MA), 1989. 611 pages. ISBN 0-201-08319-1
  531.            Covers the basic concepts of the language, but also gives a lot
  532.            of detail about programming AI topics such as rule-based expert
  533.            systems, forward chaining, interpreting transition trees, 
  534.            compiling transition trees, object oriented programming,
  535.            and finding patterns in images. Not a tutorial. Has many
  536.            good examples. Source code for the examples is available by
  537.            anonymous ftp from ftp.ai.mit.edu:/pub/lisp3/. (The code runs in
  538.            Lucid, Allegro, KCL, GCLisp, MCL, Symbolics Genera. Send mail
  539.            with subject line "help" to ai3@ai.mit.edu for more information.)
  540.  
  541.    4. John R. Anderson, Albert T. Corbett, and Brian J. Reiser.
  542.       "Essential LISP"
  543.       Addison-Wesley (Reading, MA), 1987. 
  544.       352 pages, ISBN 0-20-11114-8-9, $23.95.
  545.            Concentrates on how to use Lisp with iteration and recursion.
  546.  
  547.    5. Robert D. Cameron and Anthony H. Dixon
  548.       "Symbolic Computing with Lisp"
  549.       Prentice-Hall, 1992, 326 pages. ISBN 0-13-877846-9.
  550.            The book is intended primarily as a third-year computer science
  551.            text. In terms of programming techniques, it emphasizes recursion
  552.            and induction, data abstraction, grammar-based definition of Lisp
  553.            data structures and functional programming style. It uses
  554.            two Lisp languages: 
  555.                 (1) a purely functional subset of Lisp called Small Lisp and
  556.                 (2) Common Lisp.
  557.            An MS-DOS interpreter for Small Lisp (including source) is
  558.            provided with the book.  It considers applications of Lisp
  559.            to formal symbolic data domains: algebraic expressions,
  560.            logical formulas, grammars and programming languages. 
  561.  
  562.    6. Tony Hasemer and John Domingue.
  563.       "Common Lisp Programming for Artificial Intelligence"
  564.       Addison-Wesley, Reading, MA, 1989. 444 pages, ISBN 0-20-11757-9-7.
  565.  
  566.      This book presents an introduction to Artificial Intelligence
  567.      with an emphasis on the role of knowledge representation. Three
  568.      chapters focus on object-oriented programming, including the
  569.      construction and use of a subset of CLOS.
  570.  
  571.      The authors' research into the problems faced by novice Lisp
  572.      users influenced the content and style of the book. (The authors
  573.      are members of the Human Cognition Research Laboratory at the
  574.      Open University in the United Kingdom.) The book employs a
  575.      tutorial approach, especially in areas that students often find
  576.      difficult, such as recursion.  Early and progressive treatment of
  577.      the evaluator promotes understanding of program execution.
  578.      Hands-on exercises are used to reinforce basic concepts.
  579.  
  580.      The book assumes no prior knowledge of Lisp or AI and is a
  581.      suitable textbook for students in Cognitive Science, Computer
  582.      Science and other disciplines taking courses in Lisp or AI
  583.      programming as well as being invaluable for professional
  584.      programmers who are learning Lisp for developing AI applications.
  585.  
  586.    7. Steven Tanimoto
  587.       "The Elements of Artificial Intelligence Using Common Lisp", 2nd edition
  588.       Computer Science Press, New York, 1995.
  589.       562 pages, ISBN 0-71-67826-9-3, (ISBN 0-71-67823-0-8, 1990, $48).
  590.  
  591.    8. Patrick R. Harrison
  592.       "Common Lisp and Artificial Intelligence"
  593.       Prentice Hall, Englewood Clifs, NJ, 1990. 
  594.       244 pages, ISBN 0-13-1552430, $22.50.
  595.  
  596.    9. Paul Graham
  597.       "On Lisp: Advanced Techniques for Common Lisp"
  598.       Prentice Hall, Englewood Clifs, NJ, 1994. 413 pages, ISBN 0-13-030552-9.
  599.          Emphasizes a bottom-up style of writing programs, which he
  600.          claims is natural in Lisp and has advantages over the
  601.          traditional way of writing programs in C and Pascal.
  602.          Also has in-depth sections on writing macros with several
  603.          nice examples. Source code is available by anonymous ftp from
  604.             ftp.das.harvard.edu:/pub/onlisp/ 
  605.          as a single 56kb file.
  606.  
  607.   10. John A. Moyne
  608.       "Lisp: A first language for computing"
  609.        Van Nostrand Reinhold, New York, 1991. 278 pages, ISBN 0442004265.
  610.  
  611. General Lisp reference books include:
  612.  
  613.    1. Guy L. Steele
  614.       "Common Lisp: The Language" [CLtL1]
  615.       Digital Press, 1984. 465 pages. ISBN 0-932376-41-X.
  616.  
  617.    2. Guy L. Steele
  618.       "Common Lisp: The Language, 2nd Edition" [CLtL2]
  619.       Digital Press, 1990. 1029 pages, ISBN 1-55558-041-6 paperbound ($39.95).
  620.  
  621.       [Butterworth-Heinemann, the owners of Digital Press, have made
  622.        the LaTeX sources to this book available by anonymous FTP from
  623.           cambridge.apple.com:/pub/CLTL/ 
  624.        A copy of the distribution is also available from
  625.           ftp.cs.cmu.edu:/user/ai/lang/lisp/doc/cltl/
  626.        The paperbound version of the book is, of course, available at
  627.        fine bookstores, or contact them directly at Digital Press, 
  628.        225 Wildwood Street, Woburn, MA 01801, call 800-366-2665
  629.        (617-928-2527), or fax 800-446-6520 (617-933-6333). A copy of
  630.        the Digital Press book catalog is available from the same FTP location.]
  631.  
  632.        A html version, produced using latex2html on the latex sources,
  633.        is accessible via the URL:
  634.            http://www.cs.cmu.edu:8001/Web/Groups/AI/html/cltl/cltl2.html
  635.  
  636.    3. Franz Inc. 
  637.       "Common Lisp: The Reference"
  638.       Addison-Wesley, Reading, MA 1988. ISBN 0-201-11458-5
  639.            Entries on Lisp (CLtL1) functions in alphabetical order.
  640.  
  641.    4. Rosemary Simpson
  642.       "Common Lisp, the Index"
  643.       Franz Inc., Berkeley, CA, 1987. 71 pages, $4.95. 
  644.            A cross-referenced index to Steele's book, 1st edition.
  645.  
  646. Lisp periodicals include:
  647.         
  648.    1. LISP Pointers.
  649.       Published by ACM SIGPLAN six times a year. Volume 1, Number 1
  650.       was April-May 1987. 
  651.       Subscriptions: ACM Members $12; ACM Student Members $7; Non-ACM
  652.       members $25. Mail checks payable to the ACM to ACM Inc., PO Box
  653.       12115, Church Street Station, New York, NY 10249.
  654.  
  655.    2. LISP and Symbolic Computation, Kluwer Academic Press. Volume 1
  656.       was published in 1989. (Robert Kessler <kessler@cons.cs.utah.edu>
  657.       and Carolyn Talcott <clt@sail.stanford.edu> are the editors).
  658.       ISSN 0892-4635.
  659.       Subscriptions: Institutions $169; Individuals $80. Add $8 for
  660.       air mail. Kluwer Academic Publishers, PO Box 322, 3300 AH Dordrecht, 
  661.       The Netherlands, or Kluwer Academic Publishers, PO Box 358, Accord
  662.       Station, Hingham, MA 02018-0358. 
  663.  
  664.       A full table of contents of all published issues, aims and scope, and
  665.       instructions for authors are available by anonymous ftp from
  666.          ftp.std.com:/Kluwer/journals/
  667.       as the files lisp.toc and lisp.inf.
  668.  
  669.    3. Proceedings of the biannual ACM Lisp and Functional Programming
  670.       Conference. (First one was in 1980.)
  671.  
  672.    4. Proceedings of the annual Lisp Users and Vendors Conference.
  673.  
  674. Implementation-specific questions:
  675.  
  676.    1. Lucid. See the wizards.doc file that comes with the Lucid
  677.       release. It describes functions, macros, variables and constants that
  678.       are not official parts of the product and are not supported.
  679.       Constructs described in this file include: the interrupt facility, the
  680.       source file recording facility, the resource facility, multitasking,
  681.       writing your own streams, lisp pipes, i/o buffers, the compiler,
  682.       floating-point functions, memory management, debugger information, the
  683.       window tool kit, extensions to the editor, the foreign function
  684.       interface, clos information, delivery toolkit information, and Lucid
  685.       lisp training classes. The wizards.doc file also covers i/o
  686.       constructs, functions for dealing with DEFSTRUCT, functions and
  687.       constants for dealing with procedure objects, functions and constants
  688.       for dealing with code objects, function for mapping objects,
  689.       additional keyword argument to DISKSAVE, function used in the
  690.       implementation of arrays, function for monitor-specific behavior for a
  691.       process, additional keyword argument to RUN-PROGRAM, and load-time
  692.       evaluation.
  693.  
  694. Many books on Scheme are worth reading even if you use Common Lisp,
  695. because many of the issues are similar. Scheme is a simpler language
  696. to learn, so it is often used in introductory computer science
  697. classes.  See the Scheme FAQ for a list of introductions and
  698. references for Scheme. The two key introductions are Abelson and
  699. Sussman's "Structure and Interpretation of Computer Programs" and 
  700. Friedman and Felleisen's "The Little LISPer". 
  701.  
  702. Special Topics:
  703.  
  704.    Garbage Collection:
  705.  
  706.       Wilson, Paul R., "Uniprocessor Garbage Collection Techniques"
  707.       Proceedings of the 1992 International Workshop on Memory Management.
  708.       Springer Lecture Notes #637. Surveys garbage collection techniques. 
  709.       Includes an excellent bibliography. Available by anonymous ftp from
  710.          cs.utexas.edu:/pub/garbage/gcsurvey.ps.
  711.       The BibTeX format of the bibliography is also available in this
  712.       directory, along with several other papers. Contact wilson@cs.utexas.edu
  713.       for more info.
  714.  
  715. ----------------------------------------------------------------
  716. Subject: [1-3] How can I improve my Lisp programming style and 
  717.                coding efficiency?
  718.  
  719. There are several books about Lisp programming style, including:
  720.    
  721.    1. Molly M. Miller and Eric Benson
  722.       "Lisp Style and Design"
  723.       Digital Press, 1990. 214 pages, ISBN 1-55558-044-0, $26.95.
  724.            How to write large Lisp programs and improve Lisp programming 
  725.            style. Uses the development of Lucid CL as an example. 
  726.  
  727.    2. Robin Jones, Clive Maynard, and Ian Stewart.
  728.       "The Art of Lisp Programming"
  729.       Springer-Verlag, 1989. 169 pages, ISBN 0-387-19568-8 ($33).
  730.  
  731.    3. W. Richard Stark.
  732.       "LISP, Lore, and Logic: An Algebraic View of LISP
  733.        Programming, Foundations, and Applications"
  734.       Springer-Verlag, 1990. 278 pages. ISBN 0-387-97072-X paper ($42).
  735.            Self-modifying code, self-reproducing programs, etc.
  736.  
  737.    4. CMU CL User's Manual, Chapter 7, (talks about writing
  738.       efficient code). It is available by anonymous ftp from any CMU CS 
  739.       machine (e.g., ftp.cs.cmu.edu [128.2.206.173]) as the file
  740.         /afs/cs.cmu.edu/project/clisp/docs/cmu-user/cmu-user.ps 
  741.       [when getting this file by anonymous ftp, one must cd to 
  742.       the directory in one atomic operation, as some of the superior
  743.       directories on the path are protected from access by anonymous ftp.]
  744.  
  745.    5. See also Norvig's book, SICP (Abelson & Sussman), SAP
  746.       (Springer and Friedman).
  747.  
  748.    6. Hallvard Tretteberg's Lisp Style Guide is available by anonymous
  749.       ftp in ftp.think.com:/public/think/lisp/style-guide.text. There is
  750.       a fair bit of overlap between Hallvard's style guide and the notes
  751.       below and in part 3 of this FAQ.
  752.  
  753.    7. Rajeev Sangal
  754.       "Programming Paradigms in Lisp"
  755.       McGraw-Hill, 1991. ISBN 0-07-054666-5.
  756.  
  757.    8. Rodney A. Brooks.
  758.       "Programming in Common Lisp"
  759.       John Wiley & Sons, New York, 1985. 303 pages. ISBN 0-471-81888-7.
  760.       Chapter 5 discusses Lisp programming style.
  761.  
  762. Here are some general suggestions/notes about improving Lisp
  763. programming style, readability, correctness and efficiency:
  764.  
  765.    General Programming Style Rules:
  766.  
  767.       - Write short functions, where each function provides a single,
  768.         well-defined operation. Small functions are easier to
  769.         read, write, test, debug, and understand.
  770.  
  771.       - Use descriptive variable and function names. If it isn't clear
  772.         from the name of a function or variable what its purpose is,
  773.         document it with a documentation string and a comment. In fact,
  774.         even if the purpose is evident from the name, it is still worth
  775.         documenting your code.
  776.  
  777.       - Don't write Pascal (or C) code in Lisp. Use the appropriate
  778.         predefined functions -- look in the index to CLtL2, or use the
  779.         APROPOS and DESCRIBE functions. Don't put a close parenthesis
  780.         on a line by itself -- this can really irritate programmers
  781.         who grew up on Lisp. Lisp-oriented text editors include tools
  782.         for ensuring balanced parentheses and for moving across 
  783.         pairs of balanced parentheses. You don't need to stick
  784.         comments on close parentheses to mark which expression they close.
  785.  
  786.       - Use proper indentation -- you should be able to understand
  787.         the structure of your definitions without noticing the parentheses. 
  788.         In general, the way one indents a form is controlled by the
  789.         first symbol of the form. In DEFUNs, for example, one puts the
  790.         symbol DEFUN, the function name, and the argument list all on
  791.         the same line. If the argument list is too long, one can break
  792.         it at one of the lambda keywords. Following the argument list,
  793.         one inserts a carriage return and lists the expressions in the
  794.         body of the definition, with each form starting on its own
  795.         line indented three spaces relative to the open parenthesis of
  796.         the parent (in this case the DEFUN). This general style -- of
  797.         putting all the significant elements of a form on a single
  798.         line, followed by a carriage return and the indented body --
  799.         holds for many Lisp constructs. There are, of course, variations,
  800.         such as keeping the first clause on the same line as the COND
  801.         or CASE symbol, and the rules are relaxed in different ways to
  802.         keep line lengths to a manageable size. If you find yourself having
  803.         trouble fitting everything in even with line breaking and
  804.         relaxing the rules, either your function names are too long or your
  805.         code isn't very modular. You should perceive this as a signal that
  806.         you need to break up your big definitions into smaller chunks, each
  807.         with a clearly defined purpose, and possibly replace long function
  808.         names with concise but apt shorter ones.
  809.  
  810.       - Use whitespace appropriately. Use whitespace to separate
  811.         semantically distinct code segments, but don't use too much
  812.         whitespace. For example,
  813.            GOOD: 
  814.               (defun foo (x y)
  815.                 (let ((z (+ x y 10)))
  816.                   (* z z)))
  817.  
  818.            BAD: 
  819.               (defun foo(x y)(let((z(+ x y 10)))(* z z)))
  820.  
  821.               (defun foo ( x  y )
  822.                 (let ( ( z (+ x y 10) ) )
  823.                   ( * z z )
  824.                   )
  825.                 )    
  826.          Although the Lisp reader and compiler don't care which you
  827.          use, most experienced Lisp programmers find the first example 
  828.          much easier to read than the last two.
  829.  
  830.        - Don't use line lengths greater than 80 characters. People who
  831.          write code using Zmacs on Symbolics Lisp Machines are notoriously
  832.          guilty of violating this rule, because the CPT6 font allows
  833.          one to squeeze a tremendous amount of code on the display,
  834.          especially if one spreads the code out horizontally. This
  835.          makes it more difficult to read when printed out or read on
  836.          an 80x24 xterm window. In fact, use a line length of 72 characters
  837.          because it leaves a strip of white space at the edge of the window.
  838.  
  839.    The following functions often abused or misunderstood by novices. 
  840.    Think twice before using any of these functions.
  841.  
  842.       - EVAL. Novices almost always misuse EVAL. When experts use
  843.         EVAL, they often would be better off using APPLY, FUNCALL, or
  844.         SYMBOL-VALUE. Use of EVAL when defining a macro should set off
  845.         a warning bell -- macro definitions are already evaluated
  846.         during expansion. See also the answer to question 3-12.
  847.         The general rule of thumb about EVAL is: if you think you need
  848.         to use EVAL, you're probably wrong.
  849.  
  850.       - PROGV. PROGV binds dynamic variables and is often misused in
  851.         conjunction with EVAL, which uses the dynamic environment. 
  852.         In general, avoid unnecessary use of special variables.
  853.         PROGV is mainly for writing interpreters for languages embedded
  854.         in Lisp. If you want to bind a list of values to a list of
  855.         lexical variables, use
  856.             (MULTIPLE-VALUE-BIND (..) (VALUES-LIST ..) ..)
  857.         or
  858.             (MULTIPLE-VALUE-SETQ (..) (VALUES-LIST ..))
  859.         instead. Most decent compilers can optimize this expression. 
  860.         However, use of this idiom is not to be encouraged unless absolutely
  861.         necessary.
  862.  
  863.       - CATCH and THROW. Often a named BLOCK and RETURN-FROM are
  864.         more appropriate. Use UNWIND-PROTECT when necessary.
  865.  
  866.       - Destructive operations, such as NCONC, SORT, DELETE,
  867.         RPLACA, and RPLACD, should be used carefully and sparingly.
  868.         In general, trust the garbage collector: allocate new
  869.         data structures when you need them.
  870.  
  871.    To improve the readability of your code,
  872.  
  873.       - Don't use any C{A,D}R functions with more than two
  874.         letters between the C and the R. When nested, they become
  875.         hard to read. If you have complex data structures, you
  876.         are often better off describing them with a DEFSTRUCT,
  877.         even if the type is LIST. The data abstraction afforded by
  878.         DEFSTRUCT makes the code much more readable and its purpose
  879.         clearer. If you must use C{A,D}R, try to use
  880.         DESTRUCTURING-BIND instead, or at least SECOND, THIRD, 
  881.         NTH, NTHCDR, etc.
  882.  
  883.       - Use COND instead of IF and PROGN. In general, don't use PROGN if
  884.         there is a way to write the code within an implicit
  885.         PROGN. For example, 
  886.            (IF (FOO X)
  887.                (PROGN (PRINT "hi there") 23)
  888.                34)
  889.         should be written using COND instead.
  890.  
  891.       - Never use a 2-argument IF or a 3-argument IF with a second
  892.         argument of NIL unless you want to emphasize the return value;
  893.         use WHEN and UNLESS instead. You will want to emphasize the
  894.         return value when the IF clause is embedded within a SETQ,
  895.         such as (SETQ X (IF (EQ Y Z) 2 NIL)). If the second argument 
  896.         to IF is the same as the first, use OR instead: (OR P Q) rather
  897.         than (IF P P Q). Use UNLESS instead of (WHEN (NOT ..) ..)
  898.         but not instead of (WHEN (NULL ..) ..).
  899.  
  900.       - Use COND instead of nested IF statements. Be sure to check for
  901.         unreachable cases, and eliminate those cond-clauses.
  902.  
  903.       - Use backquote, rather than explicit calls to LIST, CONS, and
  904.         APPEND, whenever writing a form which produces a Lisp form, but
  905.         not as a general substitute for LIST, CONS and APPEND. LIST, 
  906.         CONS and APPEND usually allocate new storage, but lists produced
  907.         by backquote may involve destructive modification (e.g., ,.).
  908.  
  909.       - Make the names of special (global) variables begin and end
  910.         with an asterisk (*): (DEFVAR *GLOBAL-VARIABLE*)   
  911.         Some programmers will mark the beginning and end of an internal
  912.         global variable with a percent (%) or a period (.).
  913.         Make the names of constants begin and end with a plus (+):
  914.         (DEFCONSTANT +E+ 2.7182818)
  915.         This helps distinguish them from lexical variables. Some people
  916.         prefer to use macros to define constants, since this avoids
  917.         the problem of accidentally trying to bind a symbol declared
  918.         with defconstant.
  919.  
  920.       - If your program is built upon an underlying substrate which is
  921.         implementation-dependent, consider naming those functions and
  922.         macros in a way that visually identifies them, either by placing
  923.         them in their own package, or prepending a character like a %, ., 
  924.         or ! to the function name. Note that many programmers use the
  925.         $ as a macro character for slot access, so it should be avoided
  926.         unless you're using it for that purpose.
  927.  
  928.       - Don't use property lists. Instead, use an explicit hash table.
  929.         This helps avoid problems caused by the symbol being in the wrong
  930.         package, accidental reuse of property keys from other
  931.         programs, and allows you to customize the structure of the table. 
  932.  
  933.       - Use the most specific construct that does the job. This lets
  934.         readers of the code see what you intended when writing the code.
  935.         For example, don't use SETF if SETQ will do (e.g., for lexical
  936.         variables). Using SETQ will tell readers of your code that you
  937.         aren't doing anything fancy. Likewise, don't use EQUAL where EQ
  938.         will do. Use the most specific predicate to test your conditions. 
  939.         
  940.       - If you intend for a function to be a predicate, have it return T
  941.         for true, not just non-NIL. If there is nothing worth returning
  942.         from a function, returning T is conventional. But if a function
  943.         is intended to be more than just a predicate, it is better to 
  944.         return a useful value. (For example, this is one of the differences
  945.         between MEMBER and FIND.)
  946.  
  947.       - When NIL is used as an empty list, use () in your code. When NIL
  948.         is used as a boolean, use NIL. Similarly, use NULL to test for an
  949.         empty list, NOT to test a logical value. Use ENDP to test for the
  950.         end of a list, not NULL.
  951.  
  952.       - Don't use the &AUX lambda-list keyword. It is always clearer to
  953.         define local variables using LET or LET*.
  954.  
  955.       - When using RETURN and RETURN-FROM to exit from a block, don't
  956.         use (VALUES ..) when returning only one value, except if you
  957.         are using it to suppress extra multiple values from the first
  958.         argument. 
  959.  
  960.       - If you want a function to return no values (i.e., equivalent to
  961.         VOID in C), use (VALUES) to return zero values. This signals
  962.         to the reader that the function is used mainly for side-effects.
  963.  
  964.       - (VALUES (VALUES 1 2 3)) returns only the first value, 1.
  965.         You can use (VALUES (some-multiple-value-function ..)) to suppress
  966.         the extra multiple values from the function. Use MULTIPLE-VALUE-PROG1
  967.         instead of PROG1 when the multiple values are significant.
  968.  
  969.       - When using MULTIPLE-VALUE-BIND and DESTRUCTURING-BIND, don't rely
  970.         on the fact that NIL is used when values are missing. This is
  971.         an error in some implementations of DESTRUCTURING-BIND. Instead,
  972.         make sure that your function always returns the proper number of
  973.         values.
  974.  
  975.       - Type the name of external symbols, functions, and variables
  976.         from the COMMON-LISP package in uppercase. This will allow your
  977.         code to work properly in a case-sensitive version of Common Lisp,
  978.         since the print-names of symbols in the COMMON-LISP package
  979.         are uppercase internally. (However, not everybody feels that
  980.         being nice to case-sensitive Lisps is a requirement, so this
  981.         isn't an absolute style rule, just a suggestion.)
  982.  
  983.     Lisp Idioms:
  984.  
  985.       - MAPCAN is used with a function to return a variable number of
  986.         items to be included in an output list. When the function returns zero
  987.         or one items, the function serves as a filter. For example,
  988.            (mapcan #'(lambda (x) (when (and (numberp x) (evenp x)) (list x)))
  989.                    '(1 2 3 4 x 5 y 6 z 7))
  990.  
  991.     Documentation:
  992.  
  993.       - Comment your code. Use three semicolons in the left margin before
  994.         the definition for major explanations. Use two semicolons that
  995.         float with the code to explain the routine that follows. Two
  996.         semicolons may also be used to explain the following line when the
  997.         comment is too long for the single semicolon treatment. Use
  998.         a single semicolon to the right of the code to explain a particular
  999.         line with a short comment. The number of semicolons used roughly
  1000.         corresponds with the length of the comment. Put at least one blank
  1001.         line before and after top-level expressions.
  1002.  
  1003.       - Include documentation strings in your code. This lets users
  1004.         get help while running your program without having to resort to
  1005.         the source code or printed documentation. 
  1006.  
  1007.    Issues related to macros:
  1008.  
  1009.       - Never use a macro instead of a function for efficiency reasons.
  1010.         Declaim the function as inline -- for example, 
  1011.           (DECLAIM (INLINE ..))
  1012.         This is *not* a magic bullet -- be forewarned that inline
  1013.         expansions can often increase the code size dramatically. INLINE
  1014.         should be used only for short functions where the tradeoff is
  1015.         likely to be worthwhile: inner loops, types that the compiler
  1016.         might do something smart with, and so on.
  1017.  
  1018.       - When defining a macro that provides an implicit PROGN, use the
  1019.         &BODY lambda-list keyword instead of &REST.
  1020.  
  1021.       - Use gensyms for bindings within a macro, unless the macro lets
  1022.         the user explicitly specify the variable. For example:
  1023.             (defmacro foo ((iter-var list) body-form &body body)
  1024.               (let ((result (gensym "RESULT")))
  1025.                 `(let ((,result nil))
  1026.                    (dolist (,iter-var ,list ,result)
  1027.                      (setq ,result ,body-form)
  1028.                      (when ,result
  1029.                         ,@body)))))        
  1030.         This avoids errors caused by collisions during macro expansion
  1031.         between variable names used in the macro definition and in the
  1032.         supplied body.
  1033.  
  1034.       - Use a DO- prefix in the name of a macro that does some kind of
  1035.         iteration, WITH- when the macro establishes bindings, and
  1036.         DEFINE- or DEF- when the macro creates some definitions. Don't
  1037.         use the prefix MAP- in macro names, only in function names.
  1038.  
  1039.       - Don't create a new iteration macro when an existing function
  1040.         or macro will do.
  1041.  
  1042.       - Don't define a macro where a function definition will work just
  1043.         as well -- remember, you can FUNCALL or MAPCAR a function but 
  1044.         not a macro.
  1045.  
  1046.       - The LOOP and SERIES macros generate efficient code. If you're
  1047.         writing a new iteration macro, consider learning to use one
  1048.         of them instead.
  1049.   
  1050.    File Modularization:
  1051.  
  1052.       - If your program involves macros that are used in more than one
  1053.         file, it is generally a good idea to put such macros in a separate
  1054.         file that gets loaded before the other files. The same things applies
  1055.         to primitive functions. If a macro is complicated, the code that
  1056.         defines the macro should be put into a file by itself. In general, if
  1057.         a set of definitions form a cohesive and "independent" whole, they
  1058.         should be put in a file by themselves, and maybe even in their own
  1059.         package. It isn't unusual for a large Lisp program to have files named
  1060.         "site-dependent-code", "primitives.lisp", and "macros.lisp". If a file
  1061.         contains primarily macros, put "-macros" in the name of the file.
  1062.  
  1063.    Stylistic preferences:
  1064.  
  1065.       - Use (SETF (CAR ..) ..) and (SETF (CDR ..) ..) in preference to
  1066.         RPLACA and RPLACD. Likewise (SETF (GET ..) ..) instead of PUT.
  1067.  
  1068.       - Use INCF, DECF, PUSH and POP instead instead of the corresponding
  1069.         SETF forms.
  1070.  
  1071.       - Many programmers religiously avoid using CATCH, THROW, BLOCK,
  1072.         PROG, GO and TAGBODY.  Tags and go-forms should only be necessary
  1073.         to create extremely unusual and complicated iteration constructs. In
  1074.         almost every circumstance, a ready-made iteration construct or
  1075.         recursive implementation is more appropriate.
  1076.  
  1077.       - Don't use LET* where LET will do. Don't use LABELS where FLET
  1078.         will do. Don't use DO* where DO will do.
  1079.  
  1080.       - Don't use DO where DOTIMES or DOLIST will do.
  1081.  
  1082.       - If you like using MAPCAR instead of DO/DOLIST, use MAPC when
  1083.         no result is needed -- it's more efficient, since it doesn't
  1084.         cons up a list. If a single cumulative value is required, use
  1085.         REDUCE. If you are seeking a particular element, use FIND,
  1086.         POSITION, or MEMBER.
  1087.  
  1088.       - If using REMOVE and DELETE to filter a sequence, don't use the
  1089.         :test-not keyword or the REMOVE-IF-NOT or DELETE-IF-NOT functions.
  1090.         Use COMPLEMENT to complement the predicate and the REMOVE-IF
  1091.         or DELETE-IF functions instead.
  1092.  
  1093.       - Use complex numbers to represent points in a plane.
  1094.  
  1095.       - Don't use lists where vectors are more appropriate. Accessing the
  1096.         nth element of a vector is faster than finding the nth element
  1097.         of a list, since the latter requires pointer chasing while the
  1098.         former requires simple addition. Vectors also take up less space
  1099.         than lists. Use adjustable vectors with fill-pointers to
  1100.         implement a stack, instead of a list -- using a list continually
  1101.         conses and then throws away the conses.
  1102.  
  1103.       - When adding an entry to an association list, use ACONS, not
  1104.         two calls to CONS. This makes it clear that you're using an alist.
  1105.  
  1106.       - If your association list has more than about 10 entries in it,
  1107.         consider using a hash table. Hash tables are often more efficient.
  1108.         (See also [2-2].)
  1109.  
  1110.       - When you don't need the full power of CLOS, consider using
  1111.         structures instead. They are often faster, take up less space, and
  1112.         easier to use.
  1113.  
  1114.       - Use PRINT-UNREADABLE-OBJECT when writing a print-function.
  1115.  
  1116.       - Use WITH-OPEN-FILE instead of OPEN and CLOSE.
  1117.  
  1118.       - When a HANDLER-CASE clause is executed, the stack has already
  1119.         unwound, so dynamic bindings that existed when the error
  1120.         occured may no longer exist when the handler is run. Use
  1121.         HANDLER-BIND if you need this. 
  1122.  
  1123.       - When using CASE and TYPECASE forms, if you intend for the form
  1124.         to return NIL when all cases fail, include an explicit OTHERWISE
  1125.         clause. If it would be an error to return NIL when all cases
  1126.         fail, use ECASE, CCASE, ETYPECASE or CTYPECASE instead.
  1127.  
  1128.       - Use local variables in preference to global variables whenever
  1129.         possible. Do not use global variables in lieu of parameter passing.
  1130.         Global variables can be used in the following circumstances:
  1131.           *  When one function needs to affect the operation of
  1132.              another, but the second function isn't called by the first.
  1133.              (For example, *load-pathname* and *break-on-warnings*.)
  1134.           *  When a called function needs to affect the current or future
  1135.              operation of the caller, but it doesn't make sense to accomplish
  1136.              this by returning multiple values.
  1137.           *  To provide hooks into the mechanisms of the program.
  1138.              (For example, *evalhook*, *, /, and +.)
  1139.           *  Parameters which, when their value is changed, represent a
  1140.              major change to the program.
  1141.              (For example, *print-level* and *print-readably*.)
  1142.           *  For state that persists between invocations of the program.
  1143.              Also, for state which is used by more than one major program.
  1144.              (For example, *package*, *readtable*, *gensym-counter*.)
  1145.           *  To provide convenient information to the user.
  1146.              (For example, *version* and *features*.)
  1147.           *  To provide customizable defaults. 
  1148.              (For example, *default-pathname-defaults*.)
  1149.           *  When a value affects major portions of a program, and passing
  1150.              this value around would be extremely awkward. (The example
  1151.              here is output and input streams for a program. Even when
  1152.              the program passes the stream around as an argument, if you
  1153.              want to redirect all output from the program to a different
  1154.              stream, it is much easier to just rebind the global variable.)
  1155.  
  1156.       - Beginning students, especially ones accustomed to programming
  1157.         in C, Pascal, or Fortran, tend to use global variables to hold or pass
  1158.         information in their programs. This style is considered ugly by
  1159.         experienced Lisp programmers. Although assignment statements can't
  1160.         always be avoided in production code, good programmers take advantage
  1161.         of Lisp's functional programming style before resorting to SETF and
  1162.         SETQ. For example, they will nest function calls instead of using a
  1163.         temporary variable and use the stack to pass multiple values. When
  1164.         first learning to program in Lisp, try to avoid SETF/SETQ and their
  1165.         cousins as much as possible. And if a temporary variable is necessary,
  1166.         bind it to its first value in a LET statement, instead of letting it
  1167.         become a global variable by default. (If you see lots of compiler
  1168.         warnings about declaring variables to be special, you're probably
  1169.         making this mistake. If you intend a variable to be global, it should
  1170.         be defined with a DEFVAR or DEFPARAMETER statement, not left to the
  1171.         compiler to fix.)
  1172.  
  1173.    Correctness and efficiency issues:
  1174.  
  1175.       - In CLtL2, IN-PACKAGE does not evaluate its argument. Use defpackage
  1176.         to define a package and declare the external (exported)
  1177.         symbols from the package. 
  1178.  
  1179.       - The ARRAY-TOTAL-SIZE-LIMIT may be as small as 1024, and the
  1180.         CALL-ARGUMENTS-LIMIT may be as small as 50. 
  1181.  
  1182.       - Novices often mistakenly quote the conditions of a CASE form.
  1183.         For example, (case x ('a 3) ..) is incorrect. It would return
  1184.         3 if x were the symbol QUOTE. Use (case x (a 3) ..) instead.
  1185.  
  1186.       - Avoid using APPLY to flatten lists. Although 
  1187.            (apply #'append list-of-lists)
  1188.         may look like a call with only two arguments, it becomes a 
  1189.         function call to APPEND, with the LIST-OF-LISTS spread into actual
  1190.         arguments. As a result it will have as many arguments as there are
  1191.         elements in LIST-OF-LISTS, and hence may run into problems with the
  1192.         CALL-ARGUMENTS-LIMIT. Use REDUCE or MAPCAN instead:  
  1193.            (reduce #'append list-of-lists :from-end t)
  1194.            (mapcan #'copy-list list-of-lists)
  1195.         The second will often be more efficient (see note below about choosing
  1196.         the right algorithm). Beware of calls like (apply f (mapcar ..)).
  1197.  
  1198.       - NTH must cdr down the list to reach the elements you are
  1199.         interested in. If you don't need the structural flexibility of
  1200.         lists, try using vectors and the ELT function instead.
  1201.  
  1202.       - CASE statements can be vectorized if the keys are consecutive
  1203.         numbers. Such CASE statements can still have OTHERWISE clauses.
  1204.         To take advantage of this without losing readability, use #. with 
  1205.         symbolic constants:
  1206.  
  1207.             (eval-when (compile load eval)
  1208.                (defconstant RED 1)
  1209.                (defconstant GREEN 2)
  1210.                (defconstant BLUE 3))
  1211.  
  1212.             (case color
  1213.               (#.RED   ...)
  1214.               (#.GREEN ...)
  1215.               (#.BLUE  ...)
  1216.               ...)
  1217.  
  1218.       - Don't use quoted constants where you might later destructively
  1219.         modify them. For example, instead of writing '(c d) in
  1220.            (defun foo ()
  1221.              (let ((var '(c d)))
  1222.                ..))
  1223.         write (list 'c 'd) instead. Using a quote here can lead to
  1224.         unexpected results later. If you later destructively modify the 
  1225.         value of var, this is self-modifying code! Some Lisp compilers
  1226.         will complain about this, since they like to make constants
  1227.         read-only. Modifying constants has undefined results in ANSI CL.
  1228.         See also the answer to question [3-13].
  1229.  
  1230.         Similarly, beware of shared list structure arising from the use
  1231.         of backquote. Any sublist in a backquoted expression that doesn't
  1232.         contain any commas can share with the original source structure.
  1233.  
  1234.       - Don't proclaim unsafe optimizations, such as
  1235.            (proclaim '(optimize (safety 0) (speed 3) (space 1))) 
  1236.         since this yields a global effect. Instead, add the
  1237.         optimizations as local declarations to small pieces of
  1238.         well-tested, performance-critical code:
  1239.            (defun well-tested-function ()
  1240.               (declare (optimize (safety 0) (speed 3) (space 1)))
  1241.              ..)
  1242.         Such optimizations can remove run-time type-checking; type-checking
  1243.         is necessary unless you've very carefully checked your code
  1244.         and added all the appropriate type declarations.
  1245.  
  1246.       - Some programmers feel that you shouldn't add declarations to
  1247.         code until it is fully debugged, because incorrect
  1248.         declarations can be an annoying source of errors. They recommend
  1249.         using CHECK-TYPE liberally instead while you are developing the code.
  1250.         On the other hand, if you add declarations to tell the
  1251.         compiler what you think your code is doing, the compiler can
  1252.         then tell you when your assumptions are incorrect.
  1253.         Declarations also make it easier for another programmer to read
  1254.         your code. 
  1255.  
  1256.       - Declaring the type of variables to be FIXNUM does not
  1257.         necessarily mean that the results of arithmetic involving the 
  1258.         fixnums will be a fixnum; it could be a BIGNUM. For example,
  1259.            (declare (type fixnum x y))
  1260.            (setq z (+ (* x x) (* y y)))
  1261.         could result in z being a BIGNUM. If you know the limits of your
  1262.         numbers, use a declaration like
  1263.            (declare (type (integer 0 100) x y))
  1264.         instead, since most compilers can then do the appropriate type
  1265.         inference, leading to much faster code.
  1266.  
  1267.       - Don't change the compiler optimization with an OPTIMIZE
  1268.         proclamation or declaration until the code is fully debugged
  1269.         and profiled.  When first writing code you should say 
  1270.         (declare (optimize (safety 3))) regardless of the speed setting.
  1271.  
  1272.       - Depending on the optimization level of the compiler, type
  1273.         declarations are interpreted either as (1) a guarantee from
  1274.         you that the variable is always bound to values of that type,
  1275.         or (2) a desire that the compiler check that the variable is
  1276.         always bound to values of that type. Use CHECK-TYPE if (2) is
  1277.         your intention.
  1278.  
  1279.       - If you get warnings about unused variables, add IGNORE
  1280.         declarations if appropriate or fix the problem. Letting such
  1281.         warnings stand is a sloppy coding practice.
  1282.  
  1283.    To produce efficient code,
  1284.  
  1285.       - choose the right algorithm. For example, consider seven possible
  1286.         implementations of COPY-LIST:
  1287.  
  1288.            (defun copy-list (list)
  1289.              (let ((result nil))
  1290.                (dolist (item list result)
  1291.                  (setf result (append result (list item))))))
  1292.  
  1293.            (defun copy-list (list)
  1294.              (let ((result nil))
  1295.                (dolist (item list (nreverse result))
  1296.                  (push item result))))
  1297.  
  1298.            (defun copy-list (list)
  1299.              (mapcar #'identity list))
  1300.  
  1301.            (defun copy-list (list)
  1302.              (let ((result (make-list (length list))))
  1303.                (do ((original list (cdr original))
  1304.                     (new result (cdr new)))
  1305.                    ((null original) result)
  1306.                  (setf (car new) (car original)))))
  1307.  
  1308.            (defun copy-list (list)
  1309.              (when list
  1310.                (let* ((result (list (car list)))
  1311.                       (tail-ptr result))
  1312.                  (dolist (item (cdr list) result)
  1313.                    (setf (cdr tail-ptr) (list item))
  1314.                    (setf tail-ptr (cdr tail-ptr))))))
  1315.         
  1316.             (defun copy-list (list)
  1317.               (loop for item in list collect item))
  1318.  
  1319.             (defun copy-list (list)
  1320.               (if (consp list) 
  1321.                   (cons (car list)
  1322.                         (copy-list (cdr list)))
  1323.                   list))
  1324.  
  1325.         The first uses APPEND to tack the elements onto the end of the list.
  1326.         Since APPEND must traverse the entire partial list at each step, this
  1327.         yields a quadratic running time for the algorithm.  The second
  1328.         implementation improves on this by iterating down the list twice; once
  1329.         to build up the list in reverse order, and the second time to reverse
  1330.         it. The efficiency of the third depends on the Lisp implementation,
  1331.         but it is usually similar to the second, as is the fourth.  The fifth
  1332.         algorithm, however, iterates down the list only once. It avoids the
  1333.         extra work by keeping a pointer (reference) to the last cons of the 
  1334.         list and RPLACDing onto the end of that. Use of the fifth algorithm 
  1335.         may yield a speedup. Note that this contradicts the earlier dictum to
  1336.         avoid destructive functions. To make more efficient code one might
  1337.         selectively introduce destructive operations in critical sections of
  1338.         code. Nevertheless, the fifth implementation may be less efficient in
  1339.         Lisps with cdr-coding, since it is more expensive to RPLACD cdr-coded
  1340.         lists. Depending on the implementation of nreverse, however,
  1341.         the fifth and second implementations may be doing the same
  1342.         amount of work. The sixth example uses the Loop macro, which usually
  1343.         expands into code similar to the third. The seventh example copies
  1344.         dotted lists, and runs in linear time, but isn't tail-recursive. 
  1345.  
  1346.         There is a long-running discussion of whether pushing items
  1347.     onto a list and then applying NREVERSE to the result is faster or
  1348.     slower than the alternatives. According to Richard C. Waters (Lisp
  1349.     Pointers VI(4):27-34, October-December 1993), the NREVERSE strategy is
  1350.     slightly faster in most Lisp implementations. But the speed difference
  1351.     either way isn't much, so he argues that one should pursue the option
  1352.     that yields the clearest and simplest code, namely using NREVERSE.
  1353.  
  1354.         Here's code for a possible implementation of NREVERSE. As is
  1355.         evident, most of the alternatives to using NREVERSE involve
  1356.         essentially the same code, just reorganized. 
  1357.  
  1358.        (defun nreverse (list)
  1359.          ;; REVERSED is the partially reversed list, 
  1360.          ;; CURRENT is the current cons cell, which will be reused, and
  1361.          ;; REMAINING are the cons cells which have not yet been reversed.
  1362.          (do* ((reversed nil)        
  1363.            (current list remaining)
  1364.            (remaining (cdr current) (cdr current)))
  1365.          ((null current)
  1366.           reversed)
  1367.            ;; Reuse the cons cell at the head of the list:
  1368.            ;;    reversed := ((car remaining) . reversed)
  1369.            (setf (cdr current) reversed)
  1370.            (setf reversed current)))
  1371.  
  1372.       - use type declarations liberally in time-critical code, but
  1373.         only if you are a seasoned Lisp programmer. Appropriate type
  1374.         declarations help the compiler generate more specific and
  1375.         optimized code. It also lets the reader know what assumptions
  1376.         were made. For example, if you only use fixnum arithmetic,
  1377.         adding declarations can lead to a significant speedup. If you
  1378.         are a novice Lisp programmer, you should use type declarations
  1379.         sparingly, as there may be no checking to see if the
  1380.         declarations are correct, and optimized code can be harder to
  1381.         debug. Wrong declarations can lead to errors in otherwise
  1382.         correct code, and can limit the reuse of code in other
  1383.         contexts. Depending on the Lisp compiler, it may also 
  1384.         be necessary to declare the type of results using THE, since
  1385.         some compilers don't deduce the result type from the inputs.
  1386.  
  1387.       - check the code produced by the compiler by using the
  1388.         disassemble function
  1389.  
  1390. ----------------------------------------------------------------
  1391. Subject: [1-4] Where can I learn about implementing Lisp interpreters 
  1392.                and compilers?
  1393.  
  1394. Books about Lisp implementation include:
  1395.  
  1396.    1. John Allen
  1397.       "Anatomy of Lisp"
  1398.       McGraw-Hill, 1978. 446 pages. ISBN 0-07-001115-X
  1399.            Discusses some of the fundamental issues involved in
  1400.            the implemention of Lisp.  
  1401.  
  1402.    2. Samuel Kamin
  1403.       "Programming Languages, An Interpreter-Based Approach"
  1404.       Addison-Wesley, Reading, Mass., 1990. ISBN 0-201-06824-9
  1405.            Includes sources to several interpreters for Lisp-like languages.
  1406.            The source for the interpreters in the book is available
  1407.            by anonymous FTP from 
  1408.               a.cs.uiuc.edu:/pub/kamin/kamin.distr/
  1409.           Tim Budd reimplemented the interpreters in C++, and has made
  1410.           them available by anonymous ftp from 
  1411.               cs.orst.edu:/pub/budd/kamin/
  1412.  
  1413.    3. Sharam Hekmatpour
  1414.       "Lisp: A Portable Implementation"
  1415.       Prentice Hall, 1985. ISBN 0-13-537490-X.
  1416.            Describes a portable implementation of a small dynamic
  1417.            Lisp interpreter (including C source code). 
  1418.  
  1419.    4. Peter Henderson
  1420.       "Functional Programming: Application and Implementation"
  1421.       Prentice-Hall (Englewood Cliffs, NJ), 1980. 355 pages.
  1422.  
  1423.    5. Peter M. Kogge
  1424.       "The Architecture of Symbolic Computers"
  1425.       McGraw-Hill, 1991. ISBN 0-07-035596-7.
  1426.            Includes sections on memory management, the SECD and
  1427.            Warren Abstract Machines, and overviews of the various
  1428.            Lisp Machine architectures.
  1429.    
  1430.    6. Daniel P. Friedman, Mitchell Wand, and Christopher T. Haynes
  1431.       "Essentials of Programming Languages"
  1432.       MIT Press, 1992, 536 pages. ISBN 0-262-06145-7.
  1433.            Teaches fundamental concepts of programming language
  1434.            design by using small interpreters as examples. Covers
  1435.            most of the features of Scheme. Includes a discussion
  1436.            of parameter passing techniques, object oriented languages,
  1437.            and techniques for transforming interpreters to allow
  1438.            their implementation in terms of any low-level language.
  1439.            Also discusses scanners, parsers, and the derivation of
  1440.            a compiler and virtual machine from an interpreter.
  1441.            Includes a few chapters on converting code into a
  1442.            continuation passing style.
  1443.            Source files available by anonymous ftp from 
  1444.               cs.indiana.edu:/pub/eopl/ [129.79.254.191].
  1445.  
  1446.    7. Peter Lee, editor, "Topics in Advanced Language Implementation",
  1447.       The MIT Press, Cambridge, Mass., 1991.
  1448.            Articles relevant to the implementation of functional
  1449.            programming languages.
  1450.  
  1451.    8. Also see the proceedings of the biannual ACM Lisp and Functional
  1452.       Programming conferences, the implementation notes for CMU Common Lisp,
  1453.       Norvig's book, and SICP (Abelson & Sussman).
  1454.  
  1455.    9. Christian Queinnec
  1456.       "Les Langages Lisp"
  1457.       InterEditions (in French), 1994. 500 pages.
  1458.       ISBN 2-7296-0549-5, 61-2448-1. (?)
  1459.  
  1460.       The book covers Lisp, Scheme and other related dialects,
  1461.       their interpretation, semantics and compilation.
  1462.  
  1463.       All of the programs described in the book are available by
  1464.       anonymous ftp from
  1465.          ftp.inria.fr:/INRIA/Projects/icsla/Books/LiSP94Sep05.tar.gz
  1466.       For more information, see the book's URL
  1467.          file://ftp.inria.fr/INRIA/Projects/icsla/WWW/LiSP.html
  1468.       or contact the author at Christian.Queinnec@inria.fr
  1469.  
  1470. ----------------------------------------------------------------
  1471. Subject: [1-5] What is the "minimal" set of primitives needed for a Lisp
  1472.                interpreter? 
  1473.  
  1474. Many Lisp functions can be defined in terms of other Lisp functions.
  1475. For example, CAAR can be defined in terms of CAR as
  1476.    (defun caar (list) (car (car list)))
  1477. It is then natural to ask whether there is a "minimal" or smallest set
  1478. of primitives necessary to implement the language. 
  1479.  
  1480. There is no single "best" minimal set of primitives; it all depends on
  1481. the implementation. For example, even something as basic as numbers
  1482. need not be primitive, and can be represented as lists. One possible
  1483. set of primitives might include CAR, CDR, and CONS for manipulation of
  1484. S-expressions, READ and PRINT for the input/output of S-expressions
  1485. and APPLY and EVAL for the guts of an interpreter.  But then you might
  1486. want to add LAMBDA for functions, EQ for equality, COND for
  1487. conditionals, SET for assignment, and DEFUN for definitions. QUOTE
  1488. might come in handy as well. If you add more specialized datatypes,
  1489. such as integers, floats, arrays, characters, and structures, you'll
  1490. need to add primitives to construct and access each.
  1491.  
  1492. AWKLisp is a Lisp interpreter written in awk, available by anonymous
  1493. ftp from ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/awk/. It has thirteen
  1494. built-in functions: CAR, CDR, CONS, EQ, ATOM, SET, EVAL, ERROR, QUOTE,
  1495. COND, AND, OR, LIST. 
  1496.  
  1497. A more practical notion of a "minimal" set of primitives might be to
  1498. look at the implementation of Scheme. While many Scheme functions can
  1499. be derived from others, the language is much smaller than Common Lisp.
  1500. See Dybvig's PhD thesis, 
  1501.    R. Kent Dybvig, "Three Implementation Models for Scheme", Department
  1502.    of Computer Science Technical Report #87-011, University of North
  1503.    Carolina at Chapel Hill, Chapel Hill, North Carolina, April 1987.
  1504. for a justification of a particularly practical minimal set of
  1505. primitives for Scheme.
  1506.  
  1507. In a language like Common Lisp, however, there are a lot of low-level
  1508. primitive functions that cannot be written in terms of the others,
  1509. such as GET-UNIVERSAL-TIME, READ-CHAR, WRITE-CHAR, OPEN, and CLOSE,
  1510. for starters.  Moreover, real Common Lisp implementations are often
  1511. built upon primitives that aren't part of the language, per se, and
  1512. certainly not intended to be user-accessible, such as SYS:%POINTER-REF.
  1513.  
  1514. Beside the references listed in [1-4], some other relevant references
  1515. include:  
  1516.  
  1517.     McCarthy, John, "Recursive Functions of Symbolic Expressions and
  1518.     their Computation by Machine, Part I", CACM 3(4):185-195, April 1960.
  1519.        [Defines five elementary functions on s-expressions.]
  1520.  
  1521.     McCarthy, John, "A Micro-Manual for Lisp -- not the whole Truth",
  1522.     ACM SIGPLAN Notices, 13(8):215-216, August 1978.
  1523.        [Defines the Lisp programming language in 10 rules and gives
  1524.         a small interpreter (eval) written in this Lisp.]
  1525.  
  1526.     McCarthy, John, et al., "LISP 1.5 Programmer's Manual", 2nd edition,
  1527.     MIT Press, 1965, ISBN 0-262-13011-4 (paperback).  
  1528.        [Gives five basic functions, CAR, CDR, CONS, EQ, and ATOM.
  1529.         Using composition, conditional expressions (COND), and
  1530.         recursion, LAMBDA, and QUOTE, these basic functions may be used
  1531.         to construct the entire class of computable functions of
  1532.         S-expressions. Gives the functions EVAL and APPLY in
  1533.         M-expression syntax.] 
  1534.  
  1535.     Abelson and Sussman's SICP, especially chapters 4 and 5 on the
  1536.     implementation of meta-circular and explicit-control evaluators.
  1537.  
  1538.     Steele and Gabriel's "The Evolution of LISP".
  1539.  
  1540. ----------------------------------------------------------------
  1541. Subject: [1-6]  What does CLOS, PCL, X3J13, CAR, CDR, ... mean? 
  1542.  
  1543. Glossary of acronyms:
  1544.    CAR             Originally meant "Contents of Address portion of Register",
  1545.                    which is what CAR actually did on the IBM 704.
  1546.    CDR             Originally meant "Contents of Decrement portion of 
  1547.                    Register", which is what CDR actually did
  1548.                    on the IBM 704. Pronounced "Cudder" /kUdd@r/ (as in "a cow
  1549.                    chews its cdr"). The first syllable is pronounced
  1550.                    like "could". 
  1551.    LISP            Originally from "LISt Processing"
  1552.    GUI             Graphical User Interface
  1553.    CLOS            Common Lisp Object System. The object oriented
  1554.                    programming standard for Common Lisp. Based on
  1555.                    Symbolics FLAVORS and Xerox LOOPS, among others.
  1556.                    Pronounced either as "See-Loss" or "Closs". See also PCL.
  1557.    PCL             Portable Common Loops. A portable CLOS implementation.
  1558.                    Available by anonymous ftp from parcftp.xerox.com:pcl/.
  1559.    LOOPS           Lisp Object Oriented Programming System. A predecessor
  1560.                    to CLOS on Xerox Lisp machines.
  1561.    X3J13           Subcommittee of the ANSI committee X3 which is
  1562.                    working on the ANSI Standardization of Common Lisp.
  1563.    ANSI            American National Standards Institute
  1564.    dpANS           draft proposed American National Standard (what an ANS
  1565.                    is called while it's in the public review stage of
  1566.                    standardization).
  1567.    CL              Common Lisp
  1568.    SC22/WG16       The full name is ISO/IEC JTC 1/SC 22/WG 16. It stands
  1569.                    for International Organization for Standardization/
  1570.                    International Electrotechnical Commission, Joint
  1571.                    Technical Committee 1 Subcommittee 22 (full name
  1572.                    "Information Technology -- Programming Languages
  1573.                    and their Environments"), Working Group 16.  This
  1574.                    long-winded name is the ISO working group working
  1575.                    on an international Lisp standard, (i.e., the ISO
  1576.                    analogue to X3J13). 
  1577.    CLtL1           First edition of Guy Steele's book, 
  1578.                    "Common Lisp the Language". 
  1579.    CLtL2           Second edition of Guy Steele's book,
  1580.                    "Common Lisp the Language". 
  1581.  
  1582. ----------------------------------------------------------------
  1583. Subject: [1-7] Lisp Job Postings
  1584.  
  1585. The LISP-JOBS mailing list exists to help programmers find Lisp
  1586. programming positions, and to help companies with Lisp programming
  1587. positions find capable Lisp programmers. (Lisp here means Lisp-like
  1588. languages, including Scheme.)
  1589.  
  1590. Material appropriate for the list includes Lisp job announcements and
  1591. should be sent to ai+lisp-jobs@cs.cmu.edu. Resumes should NOT be sent to
  1592. the list. 
  1593.  
  1594. [Note: The 'ai+' part of the mailing list name is used for directing
  1595. submissions to the appropriate mail-server. The list is NOT restricted
  1596. to AI-related Lisp jobs -- all Lisp job announcements are welcome.]
  1597.  
  1598. As a matter of policy, the contents of this mailing list is
  1599. considered confidential and will not be disclosed to anybody.
  1600.  
  1601. To subscribe, send a message to ai+query@cs.cmu.edu with
  1602.    subscribe lisp-jobs <First Name> <Last Name>, <Affiliation/Organization>
  1603. in the message body. 
  1604.  
  1605. (If your mailer objects to the "+", send subscription requests to
  1606. "ai+query"@cs.cmu.edu, job announcements to "ai+lisp-jobs"@cs.cmu.edu, etc.)  
  1607.  
  1608. For help on using the query server, send mail to ai+query@cs.cmu.edu with
  1609.    help
  1610. in the message body.
  1611.  
  1612. Job postings sent to the list are automatically archived in
  1613.    ftp.cs.cmu.edu:/user/ai/jobs/lisp/
  1614.  
  1615. If you have any other questions, please send them to ai+@cs.cmu.edu
  1616.  
  1617. ----------------------------------------------------------------
  1618.  
  1619. ;;; *EOF*
  1620. Archive-name: lisp-faq/part2
  1621. Last-Modified: Wed Mar  8 20:37:22 1995 by Mark Kantrowitz
  1622. Version: 1.53
  1623. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  1624. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  1625. Size: 49042 bytes, 988 lines
  1626.  
  1627. ;;; ****************************************************************
  1628. ;;; Answers to Frequently Asked Questions about Lisp ***************
  1629. ;;; ****************************************************************
  1630. ;;; Written by Mark Kantrowitz and Barry Margolin
  1631. ;;; lisp_2.faq 
  1632.  
  1633. This post contains Part 2 of the Lisp FAQ.
  1634.  
  1635. If you think of questions that are appropriate for this FAQ, or would
  1636. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  1637.  
  1638. Topics Covered (Part 2):
  1639.  
  1640.   [2-1]   Is there a GNU-Emacs interface to Lisp?
  1641.   [2-2]   When should I use a hash table instead of an association list?
  1642.   [2-3]   What is the equivalent of EXPLODE and IMPLODE in Common Lisp?
  1643.   [2-4]   Is Lisp inherently slower than more conventional languages such as C?
  1644.   [2-5]   Why does Common Lisp have "#'"?
  1645.   [2-6]   How do I call non-Lisp functions from Lisp?
  1646.   [2-7]   Can I call Lisp functions from other languages?
  1647.   [2-8]   I want to call a function in a package that might not exist at
  1648.           compile time. How do I do this?  
  1649.   [2-9]   What is CDR-coding?
  1650.   [2-10]  What is garbage collection?
  1651.   [2-11]  How do I save an executable image of my loaded Lisp system?
  1652.           How do I run a Unix command in my Lisp? How do I exit Lisp?
  1653.   [2-12]  I'm porting some code from a Symbolics Lisp machine to some
  1654.           other platform, and there are strange characters in the code.
  1655.           What do they mean?  
  1656.   [2-13]  History: Where did Lisp come from?
  1657.   [2-14]  How do I find the argument list of a function?
  1658.           How do I get the function name from a function object?
  1659.   [2-15]  How can I have two Lisp processes communicate via unix sockets?
  1660.   [2-16]  How can I create a stream that acts like UNIX's /dev/null
  1661.           (i.e., gobbles any output and immediately signals EOF on
  1662.           input operations)?
  1663.   [2-17]  Read-time conditionalization of code (#+ #- and *features*)   
  1664.   [2-18]  What reader macro characters are used in major Lisp systems?
  1665.   [2-19]  How do I determine if a file is a directory or not? 
  1666.           How do I get the current directory name from within a Lisp 
  1667.           program? Is there any way to create a directory?
  1668.   [2-20]  What is a "Lisp Machine" (LISPM)?
  1669.   [2-21]  How do I tell if a symbol names a function and not a macro?
  1670.  
  1671. Search for \[#\] to get to question number # quickly.
  1672.  
  1673. ----------------------------------------------------------------
  1674. Subject: [2-1] Is there a GNU-Emacs interface to Lisp?
  1675.  
  1676. ILISP is a powerful GNU-Emacs interface to many dialects of Lisp,
  1677. including Lucid, Allegro, {A}KCL, IBCL, and CMU.  Written by Chris
  1678. McConnell <ccm+@cs.cmu.edu> and now maintained by Marco Antoniotti
  1679. <marcoxa@cs.nyu.edu> and Rick Busdiecker <rfb@lehman.com>.  It is
  1680. available by anonymous ftp from
  1681.    h.gp.cs.cmu.edu:/usr/rfb/ilisp/ [128.2.254.156]
  1682. as the file ilisp-5.6.tar.gz.  It is also available in the CMU AI
  1683. Repository in
  1684.    ftp.cs.cmu.edu:/user/ai/lang/lisp/util/emacs/ilisp/
  1685. If you want to be on the ilisp mailing list, to hear about new
  1686. releases and patches, send mail to ilisp-request@lehman.com.  Please
  1687. send any comments, code, or bug reports to ilisp@lehman.com.
  1688.  
  1689. Franz Inc.'s GNU-Emacs/Lisp interface includes an online Common Lisp
  1690. manual. (The manual is available by license from Franz Inc. Contact
  1691. info@franz.com for more information.) The Emacs-Lisp interface
  1692. (without the online Common Lisp reference manual and some
  1693. Allegro-specific code) is available free from
  1694.    ftp.uu.net:/vendor/franz/emacs/eli-2.0.11.tar.gz
  1695. and takes advantage of GNU-Emacs 19.X's newest features, including
  1696. support for mouse input, pulldown menus, and multifont text. The
  1697. interface also supports Epoch 3.2 and 4.2, and LEmacs 19.6 and 19.8.
  1698. For discussion of the Franz lisp-emacs interface, join the
  1699. allegro-cl-request@cs.berkeley.edu mailing list.
  1700. (See also [1-2] for a hardcopy version of the Common Lisp reference manual.)
  1701.  
  1702. The cl-shell package provides a major mode (cl-shell-mode) for running
  1703. Common Lisp (CL) as an Emacs subprocess.  It provides a general
  1704. mechanism for communication between CL and Emacs which does not rely
  1705. on extra processes, and should therefore be easily portable to any
  1706. version of CL.  Features include direct (i.e., not through a temp file)
  1707. evaluation and in-package compilation of forms from lisp-mode buffers,
  1708. type-ahead and a history mechanism for the cl-shell buffer, and pop-up
  1709. help facilities for the CL functions documentation, macroexpand and
  1710. describe.  Extensions for Lucid Common Lisp provide pop-up arglists
  1711. and source file editing.  Other extensions are provided to allow
  1712. editing source files of CLOS or Flavors methods.  Cl-shell is
  1713. available on the Lucid tape (in the goodies directory) or via
  1714. anonymous ftp from whitechapel.media.mit.edu (18.85.0.125).
  1715.  
  1716. Lucid includes some other Emacs-Lisp interfaces in its goodies directory.
  1717.  
  1718. Harlequin's LispWorks includes an Emacs-Lisp interface.
  1719.  
  1720. Venue's Medley has an optional EMACS Interface.
  1721.  
  1722. GNU-Emacs itself is available by anonymous ftp from prep.ai.mit.edu.
  1723.  
  1724. Edebug, a debugger for Emacs Lisp, and some utilities for Common Lisp
  1725. debugging (Dave Gillespie's version of cl.el) are available by
  1726. anonymous ftp from 
  1727.    a.cs.uiuc.edu:/pub/edebug/
  1728. To join the Edebug mailing list edebug@cs.uiuc.edu send mail to 
  1729. edebug-request@cs.uiuc.edu. For more information, write to Daniel
  1730. LaLiberte <liberte@cs.uiuc.edu>. 
  1731.  
  1732. ----------------------------------------------------------------
  1733. Subject: [2-2] When should I use a hash table instead of an association list?
  1734.  
  1735. Both association lists (alists) and hash tables may be used to
  1736. represent tabular data. Hash tables have an O(1) running time and
  1737. alists an O(n) running time, so hash tables are ultimately more
  1738. efficient than alists. However, if the alists are small, they can be
  1739. more efficient than hash tables, which have a large initial overhead.
  1740.  
  1741. Alists can sometimes be more efficient if the keys are sorted
  1742. according to frequency, with the most heavily accessed keys appearing
  1743. at the front of the list. But one doesn't always know this kind of
  1744. information, and even then the frequency distribution may be flat.
  1745.  
  1746. In Allegro CL 4.1 [SPARC; R1], the rule of thumb is that for less than
  1747. 24 elements, linear search using alists beats hashing.  In Lucid CL
  1748. 4.0.1 HP 9000/700, the break-even point is at 10 elements. The
  1749. break-even points vary in other lisps from as low as 4 elements to as
  1750. high as 100 elements. So if you're using alists in your code, using 
  1751. hash tables instead may speed up your program. 
  1752.  
  1753. A potential problem may occur, however, when the keys of an EQ or EQL
  1754. hash table are Lisp objects such as conses or arrays (or other objects
  1755. that are identified by their addresses). In most implementations, such
  1756. tables must be re-hashed after garbage collection. If your application
  1757. causes frequent GCs, this can adversely affect the performance of hash
  1758. table lookup. Since EQL-hashing and =-hashing of fixnums generally
  1759. don't require rehashing after GC, one way of avoiding this problem is
  1760. to include a unique identifier in each key object and hash on that
  1761. instead. Another solution is to use an EQUAL hash table if the keys
  1762. are conses or an EQUALP hash table if the keys are arrays or other
  1763. (non-circular!) structures.
  1764.  
  1765. ----------------------------------------------------------------
  1766. Subject: [2-3] What is the equivalent of EXPLODE and IMPLODE in Common Lisp?
  1767.  
  1768. Hopefully, the only reason you need to do this is as part of trying to port
  1769. some old MacLisp code to Common Lisp.  These functions predated the
  1770. inclusion of strings as a first-class data type in Lisp; symbols were used
  1771. as strings, and they ere EXPLODEd to allow the individual characters to be
  1772. manipulated in a list.
  1773.  
  1774. Probably the best approximations of these are:
  1775.  
  1776.    (defun explode (object)
  1777.      (loop for char across (prin1-to-string object)
  1778.            collect (intern (string char))))
  1779.  
  1780.    (defun implode (list)
  1781.      (read-from-string (coerce (mapcar #'character list) 'string)))
  1782.  
  1783. An alternate definition of EXPLODE which uses MAP instead of LOOP is:
  1784.  
  1785.    (defun explode (object)
  1786.      (map 'list #'(lambda (char) 
  1787.                     (intern (string char)))
  1788.           (prin1-to-string object)))
  1789.  
  1790. The creation of N conses of garbage to process a string of N
  1791. characters is a hideously inefficient way of doing the job.  Rewrite
  1792. EXPLODE code with PRIN1-TO-STRING, or better STRING if the arguments
  1793. are symbols without funny characters.  For IMPLODE, try to make its
  1794. caller use strings and try to make the result usable as a string to
  1795. avoid having to call INTERN or READ-FROM-STRING.
  1796.  
  1797. ----------------------------------------------------------------
  1798. Subject: [2-4] Is Lisp inherently slower than more conventional languages
  1799.                such as C?
  1800.  
  1801. This is a tough question to answer, as you probably expected.  In many
  1802. cases, it appears to be.  Lisp does not require the programmer to specify
  1803. the data type of variables, so generic arithmetic operators may have to
  1804. perform type checking at runtime in order to determine how to proceed.
  1805. However, Lisp code can also be denser (i.e.  there is more expressed in a
  1806. single line) than many other languages: the Lisp expression (+ A B) is more
  1807. powerful than the C expression A+B (the Lisp version supports bignums,
  1808. rationals, and complex numbers, while the C version only supports
  1809. limited-size integers and floating point); therefore, one may claim that it
  1810. is reasonable that the Lisp version take longer than the C version (but
  1811. don't expect everyone to accept this rationalization).  Solutions to this
  1812. include hardware support (e.g. processors that support type tags in data,
  1813. such as SPARC and Symbolics Lisp Machines), declarations, and specialized
  1814. variants of functions (e.g. in MacLisp, + accepts and returns only fixnums,
  1815. +$ accepts and returns only flonums, and PLUS is generic).
  1816.  
  1817. At one time, the MIT PDP-10 MacLisp compiler was compared to DEC's
  1818. PDP-10 Fortran compiler.  When appropriate declarations were supplied
  1819. in the Lisp code, the performance of compiled Lisp arithmetic rivaled
  1820. that of the Fortran code.  It would hardly be fair to compare Lisp
  1821. without declarations to Fortran, since the Fortran compiler would have
  1822. more information upon which it could base its optimizations. A more
  1823. recent test found that numeric code compiled with optimizations using
  1824. CMU CL is within the same ballpark as highly optimized Fortran code.
  1825. For unoptimized Fortran code, CMU CL was about 4 times faster.
  1826. Even the speed of numeric code generated by other Lisp compilers
  1827. (AKCL, Allegro, Lucid) was well within an order of magnitude of good
  1828. Fortran and C compilers (although slower than CMU CL).  Inspection of
  1829. the emitted C code from AKCL doesn't reveal many obvious sources of
  1830. inefficiency. (Since AKCL compiles Lisp into C, there are many cases
  1831. where KCL code is as fast as hand-written C code.)
  1832.  
  1833. See the paper peoplesparc.berkeley.edu:/pub/papers/fastlisp.ps.Z
  1834. for a discussion of the speed of Lisp vis a vis Fortran or C.
  1835.  
  1836. Since Lisp is a good language for rapid prototyping, it is easy for a
  1837. mediocre programmer (or even a good programmer, who isn't being careful) to
  1838. generate a large amount of inefficient Lisp code. A good example is the use
  1839. of APPEND to link successive lists together, instead of keeping a pointer
  1840. to the tail of the list. Often a programmer can obtain significant
  1841. speed increases by using a time/space profiler to identify the
  1842. functions which waste time (often small functions which are called
  1843. frequently) and rewriting those functions.
  1844.      
  1845. ----------------------------------------------------------------
  1846. Subject: [2-5] Why does Common Lisp have "#'"?
  1847.  
  1848. #' is a macro-character which expands #'FOO to (FUNCTION FOO).  Symbols in
  1849. Lisp have two bindings, one for values and one for functions, allowing them
  1850. to represent both variables and functions, depending on context. #'FOO
  1851. accesses FOO's lexical function binding in a context where the value
  1852. interpretation would normally occur.  #' is also used to create lexical
  1853. closures for lambda expressions. A lexical closure is a function which when
  1854. invoked executes the body of the lambda-expression in the lexical
  1855. environment within which the closure was created.  See pp. 115-117 of CLtL2
  1856. for more details.
  1857.  
  1858. ----------------------------------------------------------------
  1859. Subject: [2-6] How do I call non-Lisp functions from Lisp?
  1860.  
  1861. Most Lisp implementations for systems where Lisp is not the most common
  1862. language provide a "foreign function" interface.  As of now there has been
  1863. no significant standardization effort in this area.  They tend to be
  1864. similar, but there are enough differences that it would be inappropriate to
  1865. try to describe them all here.  In general, one uses an
  1866. implementation-dependent macro that defines a Lisp function, but instead of
  1867. supplying a body for the function, one supplies the name of a function written
  1868. in another language; the argument list portion of the definition is
  1869. generally augmented with the data types the foreign function expects and
  1870. the data type of the foreign function's return value, and the Lisp
  1871. interface function arranges to do any necessary conversions.  There is also
  1872. generally a function to "load" an object file or library compiled in a
  1873. foreign language, which dynamically links the functions in the file being
  1874. loaded into the address space of the Lisp process, and connects the
  1875. interface functions to the corresponding foreign functions.
  1876.  
  1877. If you need to do this, see the manual for your language implementation for
  1878. full details.  In particular, be on the lookout for restrictions on the
  1879. data types that may be passed.  You may also need to know details about the
  1880. linkage conventions that are used on your system; for instance, many C
  1881. implementations prepend an underscore onto the names of C functions when
  1882. generating the assembler output (this allows them to use names without
  1883. initial underscores internally as labels without worrying about conflicts),
  1884. and the foreign function interface may require you to specify this form
  1885. explicitly.
  1886.  
  1887. Franz Allegro Common Lisp's "Foreign Function Call Facility" is
  1888. described in chapter 10 of the documentation. Calling Lisp Functions
  1889. from C is treated in section 10.8.2. The foreign function interface in
  1890. Macintosh Common Lisp is similar. The foreign function interface for
  1891. KCL is described in chapter 10 of the KCL Report. The foreign function
  1892. interfaces for Lucid on the Vax and Lucid on the Sun4 are
  1893. incompatible. Lucid's interface is described in chapter 5 of the
  1894. Advanced User's Guide.
  1895.  
  1896. ----------------------------------------------------------------
  1897. Subject: [2-7] Can I call Lisp functions from other languages?
  1898.  
  1899. In implementations that provide a foreign function interface as described
  1900. above, there is also usually a "callback" mechanism.  The programmer may
  1901. associate a foreign language function name with a Lisp function.  When a
  1902. foreign object file or library is loaded into the Lisp address space, it is
  1903. linked with these callback functions.  As with foreign functions, the
  1904. programmer must supply the argument and result data types so that Lisp may
  1905. perform conversions at the interface. Note that in such foreign function
  1906. interfaces Lisp is often left "in control" of things like memory
  1907. allocation, I/O channels, and startup code (this is a major nuisance
  1908. for lots of people).
  1909.      
  1910. ----------------------------------------------------------------
  1911.  
  1912. Subject: [2-8]  I want to call a function in a package that might not exist at
  1913.                 compile time. How do I do this?
  1914.  
  1915. Use (funcall (find-symbol "SYMBOL-NAME" :pkg-name) ...).
  1916.  
  1917. ----------------------------------------------------------------
  1918. Subject: [2-9]  What is CDR-coding?
  1919.  
  1920. CDR-coding is a space-saving way to store lists in memory.  It is normally
  1921. only used in Lisp implementations that run on processors that are
  1922. specialized for Lisp, as it is difficult to implement efficiently
  1923. in software.  In normal list structure, each element of the
  1924. list is represented as a CONS cell, which is basically two pointers (the
  1925. CAR and CDR); the CAR points to the element of the list, while the CDR
  1926. points to the next CONS cell in the list or NIL.  CDR-coding takes
  1927. advantage of the fact that most CDR cells point to another CONS, and
  1928. further that the entire list is often allocated at once (e.g. by a call to
  1929. LIST).  Instead of using two pointers to implement each CONS cell, the CAR
  1930. cell contains a pointer and a two-bit "CDR code".  The CDR code may contain
  1931. one of three values: CDR-NORMAL, CDR-NEXT, and CDR-NIL.  If the code is
  1932. CDR-NORMAL, this cell is the first half of an ordinary CONS cell pair, and
  1933. the next cell in memory contains the CDR pointer as described above.  If
  1934. the CDR code is CDR-NEXT, the next cell in memory contains the next CAR
  1935. cell; in other words, the CDR pointer is implicitly thisaddress+1, where
  1936. thisaddress is the memory address of the CAR cell.  If the CDR code is
  1937. CDR-NIL, then this cell is the last element of the list; the CDR pointer is
  1938. implicitly a reference to the object NIL.  When a list is constructed
  1939. incrementally using CONS, a chain of ordinary pairs is created; however,
  1940. when a list is constructed in one step using LIST or MAKE-LIST, a block of
  1941. memory can be allocated for all the CAR cells, and their CDR codes all set
  1942. to CDR-NEXT (except the last, which is CDR-NIL), and the list will only
  1943. take half as much storage (because all the CDR pointers are implicit).
  1944.  
  1945. If this were all there were to it, it would not be difficult to implement
  1946. in software on ordinary processors; it would add a small amount of overhead
  1947. to the CDR function, but the reduction in paging might make up for it.  The
  1948. problem arises when a program uses RPLACD on a CONS cell that has a CDR
  1949. code of CDR-NEXT or CDR-NIL.  Normally RPLACD simply stores into the CDR
  1950. cell of a CONS, but in this case there is no CDR cell -- its contents are
  1951. implicitly specified by the CDR code, and the word that would normally
  1952. contain the CDR pointer contains the next CONS cell (in the CDR-NEXT case)
  1953. to which other data structures may have pointers, or the first word of some
  1954. other object (in the CDR-NIL case).  When CDR-coding is used, the
  1955. implementation must also provide automatic "forwarding pointers"; an
  1956. ordinary CONS cell is allocated, the CAR of the original cell is copied
  1957. into its CAR, the value being RPLACD'ed is stored into its CDR, and the old
  1958. CAR cell is replaced with a forwarding pointer to the new CONS cell.
  1959. Whenever CAR or CDR is performed on a CONS, it must check whether the
  1960. location contains a forwarding pointer.  This overhead on both CAR and CDR,
  1961. coupled with the overhead on CDR to check for CDR codes, is generally
  1962. enough that using CDR codes on conventional hardware is infeasible.
  1963.  
  1964. There is some evidence that CDR-coding doesn't really save very much
  1965. memory, because most lists aren't constructed at once, or RPLACD is done on
  1966. them enough that they don't stay contiguous.  At best this technique can
  1967. save 50% of the space occupied by CONS cells. However, the savings probably
  1968. depends to some extent upon the amount of support the implementation
  1969. provides for creating CDR-coded lists.  For instance, many system functions
  1970. on Symbolics Lisp Machines that operate on lists have a :LOCALIZE option;
  1971. when :LOCALIZE T is specified, the list is first modified and then copied
  1972. to a new, CDR-coded block, with all the old cells replaced with forwarding
  1973. pointers.  The next time the garbage collector runs, all the forwarding
  1974. pointers will be spliced out.  Thus, at a cost of a temporary increase in
  1975. memory usage, overall memory usage is generally reduced because more lists
  1976. may be CDR-coded. There may also be some benefit in improved paging
  1977. performance due to increased locality as well (putting a list into
  1978. CDR-coded form makes all the "cells" contiguous). Nevertheless, modern
  1979. Lisps tend to use lists much less frequently, with a much heavier
  1980. reliance upon code, strings, and vectors (structures).
  1981.  
  1982. ----------------------------------------------------------------
  1983. Subject: [2-10] What is garbage collection?
  1984.  
  1985. Garbage Collection (GC) refers to the automatic storage allocation
  1986. mechanisms present in many Lisps. There are several kinds of storage
  1987. allocation algorithms, but most fall within two main classes:
  1988.  
  1989.    1. Stop and Copy. Systems which copy active objects from "old"
  1990.       storage to "new" storage and then recycle the old storage.
  1991.  
  1992.    2. Mark and Sweep. Systems which link together storage
  1993.       used by discarded objects. 
  1994.  
  1995. Generational scavenging garbage collection (aka emphemeral GC) is a
  1996. variation in which memory is allocated in layers, with tenured
  1997. (long-lived) objects in the older layers. Rather than doing a full GC
  1998. of all of memory every time more room is needed, only the last few
  1999. layers are GCed during an ephemeral GC, taking much less time.
  2000. Short-lived objects are quickly recycled, and full GCs are then much
  2001. less frequent. It is most often used to improve the performance of
  2002. stop and copy garbage collectors.  It is possible to implement
  2003. ephemeral GC in mark and sweep systems, just much more difficult.
  2004.  
  2005. Stop and copy garbage collection provides simpler storage allocation,
  2006. avoids fragmentation of memory (intermixing of free storage with used
  2007. storage). Copying, however, consumes more of the address space, since up to
  2008. half the space must be kept available for copying all the active objects.
  2009. This makes stop and copy GC impractical for systems with a small address
  2010. space or without virtual memory.  Also, copying an object requires that you
  2011. track down all the pointers to an object and update them to reflect the new
  2012. address, while in a non-copying system you need only keep one pointer to an
  2013. object, since its location will not change. It is also more difficult to
  2014. explicitly return storage to free space in a copying system.
  2015.  
  2016. Garbage collection is not part of the Common Lisp standard. Most Lisps
  2017. provide a function ROOM which provides human-readable information about the
  2018. state of storage usage. In many Lisps, (gc) invokes an ephemeral garbage
  2019. collection, and (gc t) a full garbage collection.
  2020.  
  2021. ----------------------------------------------------------------
  2022. Subject: [2-11] How do I save an executable image of my loaded Lisp system?
  2023.                 How do I run a Unix command in my Lisp? How do I exit Lisp?
  2024.  
  2025. There is no standard for dumping a Lisp image. Here are the
  2026. commands from some lisp implementations:
  2027.    Lucid:               DISKSAVE
  2028.    Symbolics:           Save World  [CP command]
  2029.    CMU CL:              SAVE-LISP
  2030.    Franz Allegro:       EXCL:DUMPLISP (documented) 
  2031.                         SAVE-IMAGE (undocumented)
  2032.    Medley:              IL:SYSOUT or IL:MAKESYS
  2033.    MCL:                 SAVE-APPLICATION <pathname>
  2034.                           &key :toplevel-function  :creator :excise-compiler
  2035.                           :size :resources :init-file :clear-clos-caches
  2036.    KCL:                 (si:save-system "saved_kcl")
  2037.    LispWorks:        LW:SAVE-IMAGE
  2038. Be sure to garbage collect before dumping the image. You may need to
  2039. experiment with the kind of garbage collection for large images, and
  2040. may find better results if you build the image in stages.
  2041.  
  2042. There is no standard for running a Unix shell command from Lisp,
  2043. especially since not all Lisps run on top of Unix. Here are the
  2044. commands from some Lisp implementations:
  2045.    Allegro:             EXCL:RUN-SHELL-COMMAND (command &key input output
  2046.                                   error-output wait if-input-does-not-exist
  2047.                                   if-output-exists if-error-output-exists)
  2048.    Lucid:               RUN-PROGRAM (name 
  2049.                                      &key input output
  2050.                                           error-output (wait t) arguments
  2051.                                           (if-input-does-not-exist :error)
  2052.                                           (if-output-exists :error)
  2053.                                           (if-error-output-exists :error))
  2054.    KCL:                 SYSTEM 
  2055.                         For example, (system "ls -l").
  2056.                         You can also try RUN-PROCESS and EXCLP, but they
  2057.                         don't work with all versions of KCL.
  2058.    CMU CL:              RUN-PROGRAM (program args
  2059.                &key (env *environment-list*) (wait t) pty input
  2060.                if-input-does-not-exist output
  2061.                (if-output-exists :error) (error :output) 
  2062.                (if-error-exists :error) status-hook before-execve)
  2063.    LispWorks:           FOREIGN:CALL-SYSTEM-SHOWING-OUTPUT
  2064.  
  2065. To toggle source file recording and cross-reference annotations, use
  2066.    Allegro:             excl:*record-source-file-info*
  2067.             excl:*load-source-file-info* 
  2068.             excl:*record-xref-info*
  2069.             excl:*load-xref-info*
  2070.    LispWorks:           (toggle-source-debugging nil)
  2071.  
  2072. Memory management:
  2073.    CMU CL:              (bytes-consed-between-gcs)  [this is setfable]
  2074.    Lucid:        (change-memory-management 
  2075.                      &key growth-limit expand expand-reserved)
  2076.    Allegro:        *tenured-bytes-limit*
  2077.    LispWorks:           LW:GET-GC-PARAMETERS
  2078.                         (use LW:SET-GC-PARAMETERS to change them)
  2079.  
  2080. Exiting/Quitting:
  2081.    CLISP:               EXIT
  2082.    Allegro:             EXIT (&optional excl::code &rest excl::args
  2083.                               &key excl::no-unwind excl::quiet)
  2084.    LispWorks:           BYE (&optional (arg 0))
  2085.    Lucid:               QUIT (&optional (lucid::status 0))
  2086.    CMU CL:              QUIT (&optional recklessly-p)
  2087.  
  2088. ----------------------------------------------------------------
  2089. Subject: [2-12] I'm porting some code from a Symbolics Lisp machine to some
  2090.                 other platform, and there are strange characters in the code.
  2091.                 What do they mean?
  2092.  
  2093. The Symbolics Zetalisp character set includes the following
  2094. characters not present in other Lisps (^ means control):
  2095.    ^]      >=      greater than or equal to
  2096.    ^\      <=      less than or equal to
  2097.    ^Z      !=      not equal to
  2098.    ^^      ==      equivalent to 
  2099.    ^E      not
  2100.    ^G      pi
  2101.    ^L      +/-     plus/minus
  2102.    ^H      lambda
  2103.    ^F      epsilon
  2104.    ^W      <-->    left/right arrow
  2105.    ^X      <--     left arrow
  2106.    ^Y      -->     right arrow
  2107.    ^A              down arrow
  2108.    ^K              up arrow
  2109.    ^D              up caret
  2110.    ^_              down caret
  2111.    ^T              forall
  2112.    ^U              there exists
  2113.    ^B              alpha
  2114.    ^C              beta
  2115.    ^I              gamma
  2116.    ^J              delta
  2117.    ^O              partial delta  
  2118.    ^N              infinity
  2119.    ^M              circle +
  2120.    ^V              circle x
  2121.  
  2122. Other special characters to look out for are the font-change characters,
  2123. which are represented as a ^F followed by a digit or asterisk. A digit
  2124. means to push font #N onto the stack; an asterisk means to pop the most
  2125. recent font from the stack. You can clean up the code by replacing "\^F."
  2126. with "". In format statements, ^P and ^Q are used to delimit text to
  2127. be printed in a particular character style.
  2128.      
  2129. ----------------------------------------------------------------
  2130. Subject: [2-13] History: Where did Lisp come from?
  2131.  
  2132. John McCarthy developed the basics behind Lisp during the 1956 Dartmouth
  2133. Summer Research Project on Artificial Intelligence.  He intended it as an
  2134. algebraic LISt Processing (hence the name) language for artificial
  2135. intelligence work. Early implementations included the IBM 704, the IBM
  2136. 7090, the DEC PDP-1, the DEC PDP-6 and the DEC PDP-10. The PDP-6 and
  2137. PDP-10 had 18-bit addresses and 36-bit words, allowing a CONS cell to
  2138. be stored in one word, with single instructions to extract the CAR and
  2139. CDR parts. The early PDP machines had a small address space, which
  2140. limited the size of Lisp programs. 
  2141.  
  2142. Milestones in the development of Lisp:
  2143.  
  2144.    1956            Dartmouth Summer Research Project on AI.
  2145.  
  2146.    1960-65         Lisp1.5 is the primary dialect of Lisp.
  2147.  
  2148.    1964-           Development of BBNLisp at BBN.
  2149.  
  2150.    late 60s        Lisp1.5 diverges into two main dialects:
  2151.                    Interlisp (originally BBNLisp) and MacLisp.
  2152.  
  2153.    early 70s       Development of special-purpose computers known as Lisp
  2154.                    Machines, designed specificly to run Lisp programs. 
  2155.                    Xerox D-series Lisp Machines run Interlisp-D. 
  2156.                    Early MIT Lisp Machines run Lisp Machine Lisp 
  2157.                    (an extension of MacLisp).
  2158.  
  2159.    1969            Anthony Hearn and Martin Griss define Standard Lisp to
  2160.                    port REDUCE, a symbolic algebra system, to a variety
  2161.                    of architectures.  
  2162.  
  2163.    late 70s        Macsyma group at MIT developed NIL (New Implementation
  2164.                    of Lisp), a Lisp for the VAX.
  2165.  
  2166.                    Stanford and Lawrence Livermore National Laboratory
  2167.                    develop S-1 Lisp for the Mark IIA supercomputer.
  2168.  
  2169.                    Franz Lisp (dialect of MacLisp) runs on stock-hardware
  2170.                    Unix machines.
  2171.  
  2172.                    Gerald J. Sussman and Guy L. Steele developed Scheme,
  2173.                    a simple dialect of Lisp with lexical scoping and
  2174.                    lexical closures, continuations as first-class objects,
  2175.                    and a simplified syntax (i.e., only one binding per symbol).
  2176.  
  2177.                    Advent of object-oriented programming concepts in Lisp.
  2178.                    Flavors was developed at MIT for the Lisp machine,
  2179.                    and LOOPS (Lisp Object Oriented Programming System) was
  2180.                    developed at Xerox. 
  2181.  
  2182.    early 80s       Development of SPICE-Lisp at CMU, a dialect of MacLisp
  2183.                    designed to run on the Scientific Personal Integrated
  2184.                    Computing Environment (SPICE) workstation.
  2185.  
  2186.    1980            First biannual ACM Lisp and Functional Programming Conf.
  2187.  
  2188.    1981            PSL (Portable Standard Lisp) runs on a variety of platforms.
  2189.  
  2190.    1981+           Lisp Machines from Xerox, LMI (Lisp Machines Inc) 
  2191.                    and Symbolics available commercially.
  2192.  
  2193.    April 1981      Grass roots definition of Common Lisp as a description
  2194.                    of the common aspects of the family of languages (Lisp
  2195.                    Machine Lisp, MacLisp, NIL, S-1 Lisp, Spice Lisp, Scheme). 
  2196.                    
  2197.  
  2198.    1984            Publication of CLtL1. Common Lisp becomes a de facto 
  2199.                    standard.
  2200.  
  2201.    1986            X3J13 forms to produce a draft for an ANSI Common Lisp
  2202.                    standard. 
  2203.  
  2204.    1987            Lisp Pointers commences publication.
  2205.  
  2206.    1990            Steele publishes CLtL2 which offers a snapshot of
  2207.                    work in progress by X3J13.  (Unlike CLtL1, CLtL2
  2208.                    was NOT an output of the standards process and was
  2209.                    not intended to become a de facto standard.  Read
  2210.                    the Second Edition Preface for further explanation
  2211.                    of this important issue.) Includes CLOS,
  2212.                    conditions, pretty printing and iteration facilities. 
  2213.  
  2214.    1992            X3J13 creates a draft proposed American National
  2215.                    Standard for Common Lisp. This document is the
  2216.                    first official successor to CLtL1. 
  2217.  
  2218. [Note: This summary is based primarily upon the History section of the
  2219. draft ANSI specification. More detail and references can be obtained from
  2220. that document. See [4-12] for information on obtaining a copy.]
  2221.  
  2222. Gabriel and Steele's "The Evolution of Lisp", which appeared in the
  2223. 1993 ACM History of Programming Languages conference, is available by
  2224. anonymous ftp from  
  2225.    ftp.cs.umbc.edu:/pub/Memoization/Misc/    [130.85.100.53]
  2226. as Evolution-of-Lisp.ps.Z. 
  2227.  
  2228. Brad Miller maintains a Lisp History web page at
  2229.    http://www.cs.rochester.edu/u/miller/Lisp-History.html
  2230.  
  2231. ----------------------------------------------------------------
  2232. Subject: [2-14]  How do I find the argument list of a function?
  2233.                  How do I get the function name from a function object?
  2234.  
  2235. There is no standard way to find the argument list of a function,
  2236. since implementations are not required to save this information.
  2237. However, many implementations do remember argument information, and
  2238. usually have a function that returns the lambda list. Here are the
  2239. commands from some Lisp implementations:
  2240.  
  2241.    Lucid:                               arglist
  2242.    Allegro:                             excl::arglist
  2243.    Symbolics:                           arglist
  2244.    LispWorks:                           lw:function-lambda-list
  2245.  
  2246. CMU Common Lisp, new compiler:
  2247.    #+(and :CMU :new-compiler)
  2248.    (defun arglist (name)
  2249.      (let* ((function (symbol-function name))
  2250.             (stype (system:%primitive get-vector-subtype function)))
  2251.        (when (eql stype system:%function-entry-subtype)
  2252.          (cadr (system:%primitive header-ref function
  2253.                                   system:%function-entry-type-slot)))))
  2254.  
  2255. The draft ANSI standard does include FUNCTION-LAMBDA-EXPRESSION and
  2256. FUNCTION-KEYWORDS, which can be used to create an ARGLIST function.
  2257.  
  2258. If you're interested in the number of required arguments you could use
  2259.  
  2260.    (defun required-arguments (name)
  2261.      (or (position-if #'(lambda (x) (member x lambda-list-keywords))
  2262.                       (arglist name))
  2263.          (length (arglist name))))
  2264.  
  2265. To extract the function name from the function object, as in
  2266.         (function-name #'car) ==> 'car
  2267. use the following vendor-dependent functions:
  2268.  
  2269.    Symbolics: (si::compiled-function-name <fn>)
  2270.     (unless (si:lexical-closure-p <fn>) ...)
  2271.    Lucid:     (sys::procedure-ref <fn> SYS:PROCEDURE-SYMBOL)
  2272.     (when (sys:procedurep <fn>) ..)
  2273.    Allegro:   (xref::object-to-function-name <fn>)
  2274.    CMU CL:    (kernel:%function-header-name <fn>)
  2275.    AKCL:      (system::compiled-function-name <fn>)
  2276.    MCL:       (ccl::function-name <fn>)
  2277.    LispWorks: (system::function-name <fn>)
  2278.  
  2279. If a vendor-dependent function does not exist, the following
  2280. (inefficient) code maps over all symbols looking for one whose
  2281. function-cell matches the function object.
  2282.  
  2283. (defun function-name (fobject)
  2284.    (do-all-symbols (fsymbol)
  2285.       (when (and (fboundp fsymbol)
  2286.                  (eq (symbol-function fsymbol) fobject))
  2287.         (return fsymbol))))
  2288.  
  2289. If a vendor supports FUNCTION-LAMBDA-EXPRESSION, the third value is
  2290. the name of the function, if available. 
  2291.  
  2292. ----------------------------------------------------------------
  2293. Subject: [2-15] How can I have two Lisp processes communicate via unix sockets?
  2294.  
  2295. CLX uses Unix sockets to communicate with the X window server. Look at
  2296. the following files from the CLX distribution for a good example of
  2297. using Unix sockets from Lisp:
  2298.         defsystem.lisp          Lucid, AKCL, IBCL, CMU.
  2299.         socket.c, sockcl.lisp   AKCL, IBCL
  2300.         excldep.lisp            Franz Allegro CL
  2301. You will need the "socket.o" files which come with Lucid and Allegro.
  2302. To obtain CLX, see the entry for CLX in the answer to question [7-1].
  2303.  
  2304. See the file sockets.tar.gz in the Lisp Utilities repository
  2305. described in the answer to question [6-1].
  2306.  
  2307. ----------------------------------------------------------------
  2308. Subject: [2-16]  How can I create a stream that acts like UNIX's /dev/null
  2309.                  (i.e., gobbles any output and immediately signals EOF on
  2310.                  input operations)?
  2311.  
  2312. (defparameter *dev-null*
  2313.   #-lispm
  2314.   (make-two-way-stream (make-concatenated-stream) (make-broadcast-stream))
  2315.   ;; Since Lisp Machines have a built-in /dev/null which handles
  2316.   ;; additional, non-standard operations, we'll use that instead.
  2317.   #+lispm #'system:null-stream)
  2318.  
  2319. ----------------------------------------------------------------
  2320. Subject: [2-17] Read-time conditionalization of code (#+ #- and *features*)
  2321.  
  2322. The #+ and #- syntax provides for the read-time conditionalization of
  2323. lisp code, depending on the presence or absence of keywords on the
  2324. *features* list. The nascent Common Lisp standard does not specify
  2325. what keywords an implementation must have on its features list.
  2326. Nevertheless, most implementations have features that allow one to
  2327. distinguish the implementation from other implementations. This allows
  2328. one to write implementation-dependent code that is run only in the
  2329. relevant implementations.
  2330.  
  2331. Here is a list of the features to use to specify a particular Common
  2332. Lisp implementation. Unfortunately, not every vendor has a
  2333. unique keyword that distinguishes their family of implementations from
  2334. those of other vendors, nor major and minor versions of the implementation.
  2335.  
  2336.    :lucid                       Lucid Common Lisp
  2337.    :lcl3.0                      Lucid Common Lisp v3.0 and above
  2338.    :lcl4.0                      Lucid Common Lisp v4.0 and above
  2339.    ----------------
  2340.    (and :allegro :franz-inc)    Franz Allegro Common Lisp
  2341.    :excl                        Franz Allegro Common Lisp 
  2342.    :aclpc                       Franz Allegro Common Lisp\PC.
  2343.    :allegro-v3.0                Franz Allegro Common Lisp v3.0 
  2344.    :allegro-v3.1                Franz Allegro Common Lisp v3.1 
  2345.    :allegro-v4.0                Franz Allegro Common Lisp v4.0 
  2346.    :allegro-v4.1                Franz Allegro Common Lisp v4.1 
  2347.    ----------------
  2348.    :cmu                         CMU Common Lisp
  2349.    (and :cmu :new-compiler)     CMU Common Lisp w/Python compiler
  2350.    (and :cmu :python)           CMU Common Lisp w/Python compiler
  2351.    :cmu17                       CMU Common Lisp v17 and above
  2352.    ----------------
  2353.    kcl                          Kyoto Common Lisp
  2354.    akcl                         Austin KCL
  2355.    :ibcl                        Ibuki Common Lisp 
  2356.    ----------------
  2357.    :mcl                         Macintosh Common Lisp
  2358.    :coral                       Coral Lisp; bought by Apple to become
  2359.                 MACL, then MCL
  2360.    :ccl                         Coral Common Lisp
  2361.     [Note: Harlequin LispWorks also uses :ccl]
  2362.    :ccl-1                       Coral Common Lisp v1
  2363.    :ccl-1.3                     Coral Common Lisp v1.3 and higher
  2364.    :ccl-2                       present in Macintosh Common Lisp 2.0 and higher
  2365.    ----------------
  2366.    :harlequin-common-lisp       Harlequin Common Lisp
  2367.    :harlequin-unix-lisp         Harlequin on Unix platforms
  2368.    :harlequin-PC-lisp           Harlequin on PC platforms
  2369.    :lispworks                   Harlequin LispWorks development environment
  2370.    :lispworks3                  major release of Harlequin LispWorks
  2371.    :lispworks3.1                major and minor release of Harlequin LispWorks
  2372.    :harlequin                   All Harlequin products. not always present?
  2373.    ----------------
  2374.    :clisp                       CLISP Common Lisp
  2375.    ----------------
  2376.    :symbolics                   Symbolics Genera
  2377.    :imach                       Symbolics Genera for Ivory architecture
  2378.    :cloe-runtime                Symbolics CLOE
  2379.    :cloe                        CLOE 3.1
  2380.    ----------------
  2381.    :procyon                     Procyon Common Lisp
  2382.    (and :procyon :macintosh)    Procyon Common Lisp, Macintosh version
  2383.    (and :procyon :os2)          Procyon Common Lisp, OS2 version
  2384.    ----------------
  2385.    :gclisp                      Golden Common Lisp
  2386.    ----------------
  2387.    (and dec vax common)         DEC VAXlisp
  2388.    ----------------
  2389.    :explorer                    TI Explorer Lisp Machine  | used
  2390.    :TI                          TI Explorer Lisp Machine  | interchangeably
  2391.    :elroy                       TI Explorer release 3 and successors
  2392.    ----------------
  2393.    :Xerox                       Medley (Venue's CL/InterLisp combo) to rel2.01
  2394.    :medley                      Medley releases 3.0 and up
  2395.       Use  (IL:UNIX-GETPARM "mach") and (IL:UNIX-GETPARM "arch") to
  2396.       distinguish platforms under Medley.
  2397.    ----------------
  2398.    :ecl                         ECoLisp
  2399.    ----------------
  2400.    :lispm                       Symbolics, TI, and LMI Lisp machines
  2401.  
  2402.    In the cases where a feature is not a keyword, it is almost always
  2403.    in the LISP package.
  2404.  
  2405. The draft ANSI standard defines some other useful features:
  2406.  
  2407.   :cltl1                Compatible with the 1st edition of Steele
  2408.   :cltl2                Compatible with the 2nd edition of Steele
  2409.   :IEEE-Floating-Point  IEEE floating point support
  2410.   :X3J13                conforms to some particular draft of the ANSI
  2411.                         CL specification 
  2412.   :draft-ANSI-CL        conforms to first full public review draft
  2413.   :ANSI-CL              conforms to ANSI CL after its adoption
  2414.   :common-lisp          language family "Common Lisp"
  2415.  
  2416. Other features used by some Lisps include:
  2417.  
  2418.   :clos                 Contains a native CLOS implementation.
  2419.   :pcl                  Contains the PCL implementation of CLOS.
  2420.   :flavors              Has an implementation of Symbolics Flavors
  2421.   :loop                 Contains the :cltl1 version of the Loop macro
  2422.   :ansi-loop            Contains the ANSI Loop macro
  2423.   :clx or :xlib         Contains CLX
  2424.   :clxr4 or :CLX-MIT-R4 Contains CLX for X11R4
  2425.   :clxr5 or :CLX-MIT-R5 Contains CLX for X11R5
  2426.   :compiler             Contains a compiler  
  2427.   :windows              MS Windows version
  2428.   :color                Color display
  2429.   :monochrome           Monochrome display
  2430.   :multiprocessing      Has multiprocessing capabilities.
  2431.   :profiler             Has a PC-monitoring based profiler.
  2432.  
  2433. Platform-specific features, CPU-dependent features, and
  2434. operating-system specific features are also important because they can
  2435. indicate changes between different implementations of the same lisp,
  2436. such as compiled file extensions (e.g., .sbin, .hbin, etc.).
  2437. Unfortunately, not every vendor includes such features, and the naming
  2438. conventions are inconsistent. Where there are several names for the
  2439. same feature, we've put the preferred name first. Hopefully the
  2440. vendors will begin to standardize their use of these features.
  2441. CPU-dependent features include :sparc (used in CMU CL, Lucid CL,
  2442. Harlequin, and Allegro CL), :mips (used in Allegro CL), :r2000 (used
  2443. in Allegro CL even on r4000 machines), :mc68000, and :pa (HP's
  2444. 9000/800 RISC cpu).  Platform-specific features include :sun (used in
  2445. Allegro CL and Lucid), :sun4 (used in CMU CL and Allegro CL), :sgi
  2446. (used in Allegro CL), :hp300, :hp400, :hp500, :sun3, :vax, :prime,
  2447. :dec, :dec3100, :macintosh (used in Procyon but not MCL), :ibm-pc,
  2448. :ibm-rt-pc.  OS-specific features include :unix (used in CMU CL, IBCL,
  2449. and Lucid CL), :vms, :sunos (used in CMU CL), :sun-os (used in Lucid),
  2450. :sunos4.0 and :sunos4 (used in various Allegro versions independent of
  2451. the actual version of SunOS), :mach (used in CMU CL), :hpux, :ultrix,
  2452. :os2, and :svr4.
  2453.  
  2454. Notes:
  2455.  
  2456.    :allegro alone doesn't suffice to distinguish Franz Allegro Common
  2457.    Lisp from Macintosh Allegro Common Lisp (an early version of
  2458.    Macintosh Common Lisp). :excl specifies that the EXCL package (a
  2459.    set of Allegro extensions to Common Lisp) is present, but this has
  2460.    since become synonymous with Franz Allegro Common Lisp.
  2461.  
  2462.    Thanks to Vincent Keunen for gathering the information in this list.
  2463.  
  2464. ----------------------------------------------------------------
  2465. Subject: [2-18]  What reader macro characters are used in major Lisp systems?
  2466.  
  2467. The draft ANSI standard for Common Lisp leaves many dispatching macro
  2468. characters unassigned. Of these, the following are explicitly reserved
  2469. for the user and hence will never be defined by Common Lisp:
  2470.    #!, #?, #[, #], #{, and #}. 
  2471. All other unassigned macro characters are not reserved for the user,
  2472. and hence the user has no guarantee that they won't be used by some
  2473. Lisp implementation. 
  2474.  
  2475. As a result, there is the potential of portability clashes between
  2476. systems that use the same macro characters. This question lists the
  2477. non-standard macro character usage of major Lisp systems, in an effort
  2478. to avoid such conflicts.
  2479.  
  2480.    #"        AKCL; pathnames
  2481.    #$        Macintosh Common Lisp; traps
  2482.    #%        Cyc; references to constants in the representation language
  2483.    #%        Harlequin LispWorks; ?
  2484.    #@        Macintosh Common Lisp; Points notation
  2485.    #@         Defsystem    
  2486.    #I        Portable Infix Package
  2487.    #L        Allegro Common Lisp; logical pathnames
  2488.    #M        Series
  2489.    #T         Allegro Common Lisp; ?
  2490.    #Y        CLISP; ?
  2491.    #Z        Series
  2492.    #_        Macintosh Common Lisp; traps
  2493.    #`        Harlequin LispWorks; ?
  2494.  
  2495. There is a proposal in the ANSI draft to have COMPILE-FILE and LOAD
  2496. bind *READTABLE*, which would allow one to locally redefine syntax
  2497. through private readtables. Unfortunately, this doesn't help with the
  2498. Infix Package, where one wants to globally extend syntax.
  2499.  
  2500. ----------------------------------------------------------------
  2501. Subject: [2-19] How do I determine if a file is a directory or not? 
  2502.                 How do I get the current directory name from within a Lisp 
  2503.                 program? Is there any way to create a directory?
  2504.  
  2505. There is no portable way in Common Lisp of determining whether a file
  2506. is a directory or not. Calling DIRECTORY on the pathname will not
  2507. always work, since the directory could be empty. For UNIX systems
  2508.    (defun DIRECTORY-P (pathname)
  2509.       (probe-file (concatenate 'string pathname "/.")))
  2510. seems to work fairly reliably. (If "foo" is a directory, then "foo/."
  2511. will be a valid filename; if not, it will return NIL.) This won't, of
  2512. course, work on the Macintosh, or on other operating systems (e.g.,
  2513. MVS, CMS, ITS). On the Macintosh, use DIRECTORYP.
  2514.  
  2515. Moreover, some operating systems may not support the concept of
  2516. directories, or even of a file system. For example, recent work on
  2517. object-oriented technology considers files to be collections of
  2518. objects. Each type of collection defines a set of methods for reading
  2519. and writing the objects "stored" in the collection. 
  2520.  
  2521.  
  2522. There's no standard function for finding the current directory from
  2523. within a Lisp program, since not all Lisp environments have the
  2524. concept of a current directory. Here are the commands from some Lisp
  2525. implementations:
  2526.    Lucid:               WORKING-DIRECTORY (which is also SETFable)
  2527.                         PWD and CD also work
  2528.    Allegro:             CURRENT-DIRECTORY (use excl:chdir to change it)
  2529.    CMU CL:              DEFAULT-DIRECTORY
  2530.    LispWorks:           LW:*CURRENT-WORKING-DIRECTORY* 
  2531.                         (use LW:CHANGE-DIRECTORY to change it)
  2532.  
  2533. Allegro also uses the variable *default-pathname-defaults* to resolve
  2534. relative pathnames, maintaining it as the current working directory.
  2535. So evaluating (truename "./") in Allegro (and on certain other
  2536. systems) will return a pathname for the current directory. Likewise,
  2537. in some VMS systems evaluating (truename "[]") will return a pathname
  2538. for the current directory.
  2539.  
  2540. There is no portable way of creating a new directory from within a
  2541. Lisp program. 
  2542.  
  2543. ----------------------------------------------------------------
  2544. Subject: [2-20] What is a "Lisp Machine" (LISPM)?
  2545.  
  2546. A Lisp machine (or LISPM) is a computer which has been optimized to run lisp
  2547. efficiently and provide a good environment for programming in it. The
  2548. original Lisp machines were implemented at MIT, with spinoffs as LMI (defunct)
  2549. and Symbolics (bankrupt). Xerox also had a series of Lisp machines
  2550. (Dandylion, Dandytiger), as did Texas Instruments (TI Explorer). The
  2551. TI and Symbolics Lisp machines are currently available as cards that
  2552. fit into Macintosh computers (the so-called "Lisp on a chip").
  2553.  
  2554. Optimizations typical of Lisp machines include:
  2555.  
  2556.    - Hardware Type Checking. Special type bits let the type be checked
  2557.      efficiently at run-time.
  2558.  
  2559.    - Hardware Garbage Collection. 
  2560.  
  2561.    - Fast Function Calls. 
  2562.  
  2563.    - Efficient Representation of Lists.
  2564.  
  2565.    - System Software and Integrated Programming Environments.
  2566.  
  2567. For further information, see:
  2568.  
  2569.    Paul Graham, "Anatomy of a Lisp Machine", AI Expert, December 1988.
  2570.  
  2571.    Pleszkun and Thazhuthaveetil, "The Architecture of Lisp Machines",
  2572.    IEEE Computer, March 1987.
  2573.  
  2574.    Ditzel, Schuler and Thomas, "A Lisp Machine Profile: Symbolics 3650",
  2575.    AI Expert, January 1987.
  2576.  
  2577.    Peter M. Kogge, "The Architecture of Symbolic Computers",
  2578.    McGraw-Hill 1991. ISBN 0-07-035596-7.
  2579.  
  2580. [Derived from a post by Arthur Pendragon <apendragon@delphi.com>.]
  2581.  
  2582. ----------------------------------------------------------------
  2583. Subject: [2-21] How do I tell if a symbol names a function and not a macro?
  2584.  
  2585. FBOUNDP tests whether the symbol is globally bound to an operator
  2586. (e.g., a function, macro, or special form). SYMBOL-FUNCTION returns
  2587. the contents of a symbol's "function slot" if the symbol names a
  2588. function. But if the symbol names a macro or special form, it is
  2589. completely unspecified what a call to SYMBOL-FUNCTION will return.
  2590. Instead, use code like the following to test whether a symbol names a
  2591. function: 
  2592.  
  2593.    (defun fbound-to-function-p (symbol)
  2594.      (and (fboundp symbol)
  2595.           (not (macro-function symbol))
  2596.           (not (special-operator-p symbol))))
  2597.  
  2598. ----------------------------------------------------------------
  2599. ;;; *EOF*
  2600. Archive-name: lisp-faq/part3
  2601. Last-Modified: Tue Nov 15 15:54:47 1994 by Mark Kantrowitz
  2602. Version: 1.51
  2603. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  2604. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  2605. Size: 36399 bytes, 797 lines
  2606.  
  2607. ;;; ****************************************************************
  2608. ;;; Answers to Frequently Asked Questions about Lisp ***************
  2609. ;;; ****************************************************************
  2610. ;;; Written by Mark Kantrowitz and Barry Margolin
  2611. ;;; lisp_3.faq
  2612.  
  2613. This post contains Part 3 of the Lisp FAQ.
  2614.  
  2615. If you think of questions that are appropriate for this FAQ, or would
  2616. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  2617.  
  2618. This section contains a list of common pitfalls. Pitfalls are aspects
  2619. of Common Lisp which are non-obvious to new programmers and often
  2620. seasoned programmers as well.
  2621.  
  2622. Common Pitfalls (Part 3):
  2623.  
  2624.   [3-0]  Why does (READ-FROM-STRING "foobar" :START 3) return FOOBAR
  2625.          instead of BAR?  
  2626.   [3-1]  Why can't it deduce from (READ-FROM-STRING "foobar" :START 3)
  2627.          that the intent is to specify the START keyword parameter
  2628.          rather than the EOF-ERROR-P and EOF-VALUE optional parameters?   
  2629.   [3-2]  Why can't I apply #'AND and #'OR?
  2630.   [3-3]  I used a destructive function (e.g. DELETE, SORT), but it
  2631.          didn't seem to work.  Why? 
  2632.   [3-4]  After I NREVERSE a list, it's only one element long.  After I
  2633.          SORT a list, it's missing things.  What happened? 
  2634.   [3-5]  Why does (READ-LINE) return "" immediately instead of waiting
  2635.          for me to type a line?  
  2636.   [3-6]  I typed a form to the read-eval-print loop, but nothing happened. Why?
  2637.   [3-7]  DEFMACRO doesn't seem to work.
  2638.          When I compile my file, LISP warns me that my macros are undefined
  2639.          functions, or complains "Attempt to call <function> which is 
  2640.          defined as a macro.
  2641.   [3-8]  Name conflict errors are driving me crazy! (EXPORT, packages)
  2642.   [3-9]  Closures don't seem to work properly when referring to the
  2643.          iteration variable in DOLIST, DOTIMES, DO and LOOP.
  2644.   [3-10] What is the difference between FUNCALL and APPLY?
  2645.   [3-11] Miscellaneous things to consider when debugging code.
  2646.   [3-12] When is it right to use EVAL?
  2647.   [3-13] Why does my program's behavior change each time I use it?
  2648.   [3-14] When producing formatted output in Lisp, where should you put the
  2649.          newlines (e.g., before or after the line, FRESH-LINE vs TERPRI,
  2650.          ~& vs ~% in FORMAT)?
  2651.   [3-15] I'm using DO to do some iteration, but it doesn't terminate. 
  2652.   [3-16] My program works when interpreted but not when compiled!
  2653.  
  2654. Search for \[#\] to get to question number # quickly.
  2655.  
  2656. ----------------------------------------------------------------
  2657. Subject: [3-0] Why does (READ-FROM-STRING "foobar" :START 3) return FOOBAR 
  2658.                instead of BAR?
  2659.  
  2660. READ-FROM-STRING is one of the rare functions that takes both &OPTIONAL and
  2661. &KEY arguments:
  2662.  
  2663.        READ-FROM-STRING string &OPTIONAL eof-error-p eof-value 
  2664.                                &KEY :start :end :preserve-whitespace
  2665.  
  2666. When a function takes both types of arguments, all the optional
  2667. arguments must be specified explicitly before any of the keyword
  2668. arguments may be specified.  In the example above, :START becomes the
  2669. value of the optional EOF-ERROR-P parameter and 3 is the value of the
  2670. optional EOF-VALUE parameter.
  2671.      
  2672. To get the desired result, you should use
  2673.    (READ-FROM-STRING "foobar" t nil :START 3)
  2674. If you need to understand and use the optional arguments, please refer
  2675. to CLTL2 under READ-FROM-STRING, otherwise, this will behave as
  2676. desired for most purposes.
  2677.  
  2678. ----------------------------------------------------------------
  2679. Subject: [3-1] Why can't it deduce from (READ-FROM-STRING "foobar" :START 3) 
  2680.       that the intent is to specify the START keyword parameter rather than
  2681.       the EOF-ERROR-P and EOF-VALUE optional parameters?
  2682.  
  2683. In Common Lisp, keyword symbols are first-class data objects.  Therefore,
  2684. they are perfectly valid values for optional parameters to functions.
  2685. There are only four functions in Common Lisp that have both optional and
  2686. keyword parameters (they are PARSE-NAMESTRING, READ-FROM-STRING,
  2687. WRITE-LINE, and WRITE-STRING), so it's probably not worth adding a
  2688. nonorthogonal kludge to the language just to make these functions slightly
  2689. less confusing; unfortunately, it's also not worth an incompatible change
  2690. to the language to redefine those functions to use only keyword arguments.
  2691.      
  2692. ----------------------------------------------------------------
  2693. Subject: [3-2] Why can't I apply #'AND and #'OR?
  2694.  
  2695. Here's the simple, but not necessarily satisfying, answer: AND and OR are
  2696. macros, not functions; APPLY and FUNCALL can only be used to invoke
  2697. functions, not macros and special operators.
  2698.  
  2699. OK, so what's the *real* reason?  The reason that AND and OR are macros
  2700. rather than functions is because they implement control structure in
  2701. addition to computing a boolean value.  They evaluate their subforms
  2702. sequentially from left/top to right/bottom, and stop evaluating subforms as
  2703. soon as the result can be determined (in the case of AND, as soon as a
  2704. subform returns NIL; in the case of OR, as soon as one returns non-NIL);
  2705. this is referred to as "short circuiting" in computer language parlance.
  2706. APPLY and FUNCALL, however, are ordinary functions; therefore, their
  2707. arguments are evaluated automatically, before they are called.  Thus, were
  2708. APPLY able to be used with #'AND, the short-circuiting would be defeated.
  2709.  
  2710. Perhaps you don't really care about the short-circuiting, and simply want
  2711. the functional, boolean interpretation.  While this may be a reasonable
  2712. interpretation of trying to apply AND or OR, it doesn't generalize to other
  2713. macros well, so there's no obvious way to have the Lisp system "do the
  2714. right thing" when trying to apply macros.  The only function associated
  2715. with a macro is its expander function; this function accepts and returns
  2716. and form, so it cannot be used to compute the value.
  2717.  
  2718. The Common Lisp functions EVERY and SOME can be used to get the
  2719. functionality you intend when trying to apply #'AND and #'OR.  For
  2720. instance, the erroneous form:
  2721.  
  2722.    (apply #'and *list*)
  2723.  
  2724. can be translated to the correct form:
  2725.  
  2726.    (every #'identity *list*)
  2727.  
  2728. ----------------------------------------------------------------
  2729. Subject: [3-3] I used a destructive function (e.g. DELETE, SORT), but 
  2730.                it didn't seem to work.  Why?
  2731.  
  2732. I assume you mean that it didn't seem to modify the original list.  There
  2733. are several possible reasons for this.  First, many destructive functions
  2734. are not *required* to modify their input argument, merely *allowed* to; in
  2735. some cases, the implementation may determine that it is more efficient to
  2736. construct a new result than to modify the original (this may happen in Lisp
  2737. systems that use "CDR coding", where RPLACD may have to turn a CDR-NEXT or
  2738. CDR-NIL cell into a CDR-NORMAL cell), or the implementor may simply not
  2739. have gotten around to implementing the destructive version in a truly
  2740. destructive manner.  Another possibility is that the nature of the change
  2741. that was made involves removing elements from the front of a list; in this
  2742. case, the function can simply return the appropriate tail of the list,
  2743. without actually modifying the list. And example of this is:
  2744.      
  2745.    (setq *a* (list 3 2 1))
  2746.    (delete 3 *a*) => (2 1)
  2747.    *a* => (3 2 1)
  2748.  
  2749. Similarly, when one sorts a list, SORT may destructively rearrange the
  2750. pointers (cons cells) that make up the list. SORT then returns the cons
  2751. cell that now heads the list; the original cons cell could be anywhere in
  2752. the list. The value of any variable that contained the original head of the
  2753. list hasn't changed, but the contents of that cons cell have changed
  2754. because SORT is a destructive function:
  2755.  
  2756.    (setq *a* (list 2 1 3))
  2757.    (sort *a* #'<) => (1 2 3)
  2758.    *a* => (2 3)     
  2759.  
  2760. In both cases, the remedy is the same: store the result of the
  2761. function back into the place whence the original value came, e.g.
  2762.  
  2763.    (setq *a* (delete 3 *a*))
  2764.    *a* => (2 1)
  2765.  
  2766. Why don't the destructive functions do this automatically?  Recall
  2767. that they are just ordinary functions, and all Lisp functions are
  2768. called by value. They see the value of the argument, not the argument
  2769. itself. Therefore, these functions do not know where the lists they
  2770. are given came from; they are simply passed the cons cell that
  2771. represents the head of the list. Their only obligation is to return
  2772. the new cons cell that represents the head of the list. Thus
  2773. "destructive" just means that the function may munge the list by
  2774. modifying the pointers in the cars and cdrs of the list's cons cells.
  2775. This can be more efficient, if one doesn't care whether the original
  2776. list gets trashed or not.
  2777.  
  2778. One thing to be careful about when doing this (storing the result back
  2779. into the original location) is that the original list might be
  2780. referenced from multiple places, and all of these places may need to
  2781. be updated.  For instance:
  2782.  
  2783.    (setq *a* (list 3 2 1))
  2784.    (setq *b* *a*)
  2785.    (setq *a* (delete 3 *a*))
  2786.    *a* => (2 1)
  2787.    *b* => (3 2 1) ; *B* doesn't "see" the change
  2788.    (setq *a* (delete 1 *a*))
  2789.    *a* => (2)
  2790.    *b* => (3 2) ; *B* sees the change this time, though
  2791.  
  2792. One may argue that destructive functions could do what you expect by
  2793. rearranging the CARs of the list, shifting things up if the first element
  2794. is being deleted, as they are likely to do if the argument is a vector
  2795. rather than a list.  In many cases they could do this, although it would
  2796. clearly be slower.  However, there is one case where this is not possible:
  2797. when the argument or value is NIL, and the value or argument, respectively,
  2798. is not.  It's not possible to transform the object referenced from the
  2799. original cell from one data type to another, so the result must be stored
  2800. back.  Here are some examples:
  2801.  
  2802.    (setq *a* (list 3 2 1))
  2803.    (delete-if #'numberp *a) => NIL
  2804.    *a* => (3 2 1)
  2805.    (setq *a* nil *b* '(1 2 3))
  2806.    (nconc *a* *b*) => (1 2 3)
  2807.    *a* => NIL
  2808.  
  2809. The names of most destructive functions (except for sort, delete,
  2810. rplaca, rplacd, and setf of accessor functions) have the prefix N.
  2811.  
  2812. In summary, the two common problems to watch out for when using
  2813. destructive functions are:
  2814.  
  2815.    1. Forgetting to store the result back. Even though the list
  2816.       is modified in place, it is still necessary to store the
  2817.       result of the function back into the original location, e.g.,
  2818.            (setq foo (delete 'x foo))
  2819.  
  2820.       If the original list was stored in multiple places, you may
  2821.       need to store it back in all of them, e.g.
  2822.            (setq bar foo)
  2823.            ...
  2824.            (setq foo (delete 'x foo))
  2825.            (setq bar foo)
  2826.  
  2827.    2. Sharing structure that gets modified. If it is important
  2828.       to preserve the shared structure, then you should either
  2829.       use a nondestructive operation or copy the structure first
  2830.       using COPY-LIST or COPY-TREE.
  2831.            (setq bar (cdr foo))
  2832.            ...
  2833.            (setq foo (sort foo #'<))
  2834.            ;;; now it's not safe to use BAR
  2835.  
  2836. Note that even nondestructive functions, such as REMOVE, and UNION,
  2837. can return a result which shares structure with an argument. 
  2838. Nondestructive functions don't necessarily copy their arguments; they
  2839. just don't modify them.
  2840.      
  2841. ----------------------------------------------------------------
  2842. Subject: [3-4] After I NREVERSE a list, it's only one element long.  
  2843.                After I SORT a list, it's missing things.  What happened?
  2844.  
  2845. These are particular cases of the previous question.  Many NREVERSE and
  2846. SORT implementations operate by rechaining all the CDR links in the list's
  2847. backbone, rather than by replacing the CARs.  In the case of NREVERSE, this
  2848. means that the cons cell that was originally first in the list becomes the
  2849. last one.  As in the last question, the solution is to store the result
  2850. back into the original location.
  2851.      
  2852. ----------------------------------------------------------------
  2853. Subject: [3-5] Why does (READ-LINE) return "" immediately instead of 
  2854.                waiting for me to type a line?
  2855.  
  2856. Many Lisp implementations on line-buffered systems do not discard the
  2857. newline that the user must type after the last right parenthesis in order
  2858. for the line to be transmitted from the OS to Lisp.  Lisp's READ function
  2859. returns immediately after seeing the matching ")" in the stream.  When
  2860. READLINE is called, it sees the next character in the stream, which is a
  2861. newline, so it returns an empty line.  If you were to type "(read-line)This
  2862. is a test" the result would be "This is a test".
  2863.  
  2864. The simplest solution is to use (PROGN (CLEAR-INPUT) (READ-LINE)).  This
  2865. discards the buffered newline before reading the input.  However, it would
  2866. also discard any other buffered input, as in the "This is a test" example
  2867. above; some implementation also flush the OS's input buffers, so typeahead
  2868. might be thrown away.
  2869.  
  2870. ----------------------------------------------------------------
  2871. Subject: [3-6] I typed a form to the read-eval-print loop, but 
  2872.                nothing happened. Why?
  2873.  
  2874. There's not much to go on here, but a common reason is that you haven't
  2875. actually typed a complete form.  You may have typed a doublequote, vertical
  2876. bar, "#|" comment beginning, or left parenthesis that you never matched
  2877. with another doublequote, vertical bar, "|#", or right parenthesis,
  2878. respectively.  Try typing a few right parentheses followed by Return.
  2879.  
  2880. ----------------------------------------------------------------
  2881. Subject: [3-7]  DEFMACRO doesn't seem to work. 
  2882.                 When I compile my file, LISP warns me that my macros
  2883.                 are undefined functions, or complains 
  2884.                   "Attempt to call <function> which is defined as a macro."
  2885.  
  2886. When you evaluate a DEFMACRO form or proclaim a function INLINE, it
  2887. doesn't go back and update code that was compiled under the old
  2888. definition. When redefining a macro, be sure to recompile any
  2889. functions that use the macro. Also be sure that the macros used in a
  2890. file are defined before any forms in the same file that use them.
  2891.  
  2892. Certain forms, including LOAD, SET-MACRO-CHARACTER, and
  2893. REQUIRE, are not normally evaluated at compile time. Common Lisp
  2894. requires that macros defined in a file be used when compiling later
  2895. forms in the file. If a Lisp doesn't follow the standard, it may be
  2896. necessary to wrap an EVAL-WHEN form around the macro definition.
  2897.  
  2898. Most often the "macro was previously called as a function" problem
  2899. occurs when files were compiled/loaded in the wrong order. For
  2900. example, developers may add the definition to one file, but use it in
  2901. a file which is compiled/loaded before the definition. To work around
  2902. this problem, one can either fix the modularization of the system, or
  2903. manually recompile the files containing the forward references to macros.
  2904.  
  2905. Also, if your macro calls functions at macroexpand time, those functions
  2906. may need to be in an EVAL-WHEN. For example,
  2907.  
  2908.     (defun some-function (x)
  2909.       x)
  2910.  
  2911.     (defmacro some-macro (y)
  2912.       (let ((z (some-function y)))
  2913.         `(print ',z)))
  2914.  
  2915. If the macros are defined in a file you require, make sure your
  2916. require or load statement is in an appropriate EVAL-WHEN. Many people
  2917. avoid all this nonsense by making sure to load all their files before
  2918. compiling them, or use a system facility (or just a script file) that
  2919. loads each file before compiling the next file in the system.
  2920.  
  2921. ----------------------------------------------------------------
  2922. Subject: [3-8]  Name conflict errors are driving me crazy! (EXPORT, packages)
  2923.  
  2924. If a package tries to export a symbol that's already defined, it will
  2925. report an error. You probably tried to use a function only to discover
  2926. that you'd forgotten to load its file. The failed attempt at using the
  2927. function caused its symbol to be interned. So now, when you try to
  2928. load the file, you get a conflict. Unfortunately, understanding and
  2929. correcting the code which caused the export problem doesn't make those
  2930. nasty error messages go away. That symbol is still interned where it
  2931. shouldn't be. Use unintern to remove the symbol from a package before
  2932. reloading the file. Also, when giving arguments to REQUIRE or package
  2933. functions, use strings or keywords, not symbols: (find-package "FOO"),
  2934. (find-package :foo). 
  2935.  
  2936. A sometimes useful technique is to rename (or delete) a package
  2937. that is "too messed up".  Then you can reload the relevant files
  2938. into a "clean" package.
  2939.  
  2940. ----------------------------------------------------------------
  2941. Subject: [3-9]  Closures don't seem to work properly when referring to the
  2942.                 iteration variable in DOLIST, DOTIMES, DO and LOOP.
  2943.  
  2944. DOTIMES, DOLIST, DO and LOOP all use assignment instead of binding to
  2945. update the value of the iteration variables. So something like
  2946.    
  2947.    (let ((l nil))
  2948.      (dotimes (n 10)
  2949.        (push #'(lambda () n)
  2950.          l)))
  2951.  
  2952. will produce 10 closures over the same value of the variable N. To
  2953. avoid this problem, you'll need to create a new binding after each
  2954. assignment: 
  2955.  
  2956.    (let ((l nil))
  2957.      (dotimes (n 10)
  2958.     (let ((n n))
  2959.       (push #'(lambda () n)
  2960.         l))))
  2961.  
  2962. Then each closure will be over a new binding of n.
  2963.  
  2964. This is one reason why programmers who use closures prefer MAPC and
  2965. MAPCAR to DOLIST.
  2966.  
  2967. ----------------------------------------------------------------
  2968. Subject: [3-10] What is the difference between FUNCALL and APPLY?
  2969.  
  2970. FUNCALL is useful when the programmer knows the length of the argument
  2971. list, but the function to call is either computed or provided as a
  2972. parameter.  For instance, a simple implementation of MEMBER-IF (with
  2973. none of the fancy options) could be written as:
  2974.  
  2975. (defun member-if (predicate list)
  2976.   (do ((tail list (cdr tail)))
  2977.       ((null tail))
  2978.    (when (funcall predicate (car tail))
  2979.      (return-from member-if tail))))
  2980.  
  2981. The programmer is invoking a caller-supplied function with a known
  2982. argument list.
  2983.  
  2984. APPLY is needed when the argument list itself is supplied or computed.
  2985. Its last argument must be a list, and the elements of this list become
  2986. individual arguments to the function.  This frequently occurs when a
  2987. function takes keyword options that will be passed on to some other
  2988. function, perhaps with application-specific defaults inserted.  For
  2989. instance:
  2990.  
  2991. (defun open-for-output (pathname &rest open-options)
  2992.   (apply #'open pathname :direction :output open-options))
  2993.  
  2994. FUNCALL could actually have been defined using APPLY:
  2995.  
  2996. (defun funcall (function &rest arguments)
  2997.   (apply function arguments))
  2998.  
  2999. ----------------------------------------------------------------
  3000. Subject: [3-11] Miscellaneous things to consider when debugging code.
  3001.  
  3002. This question lists a variety of problems to watch out for when
  3003. debugging code. This is sort of a catch-all question for problems too
  3004. small to merit a question of their own. See also question [1-3] for
  3005. some other common problems.
  3006.  
  3007. Functions:
  3008.  
  3009.   * (flet ((f ...)) (eq #'f #'f)) can return false.
  3010.  
  3011.   * The function LIST-LENGTH is not a faster, list-specific version
  3012.     of the sequence function LENGTH.  It is list-specific, but it's
  3013.     slower than LENGTH because it can handle circular lists.
  3014.  
  3015.   * Don't confuse the use of LISTP and CONSP. CONSP tests for the
  3016.     presence of a cons cell, but will return NIL when called on NIL.
  3017.     LISTP could be defined as (defun listp (x) (or (null x) (consp x))).
  3018.  
  3019.   * Use the right test for equality: 
  3020.         EQ      tests if the objects are identical -- numbers with the
  3021.                 same value need not be EQ, nor are two similar lists
  3022.                 necessarily EQ. Similarly for characters and strings.
  3023.                 For instance, (let ((x 1)) (eq x x)) is not guaranteed
  3024.                 to return T.
  3025.         EQL     Like EQ, but is also true if the arguments are numbers
  3026.                 of the same type with the same value or character objects
  3027.                 representing the same character. (eql -0.0 0.0) is not
  3028.                 guaranteed to return T.
  3029.         EQUAL   Tests if the arguments are structurally isomorphic, using
  3030.                 EQUAL to compare components that are conses, bit-vectors, 
  3031.                 strings or pathnames, and EQ for all other data objects
  3032.                 (except for numbers and characters, which are compared
  3033.                 using EQL). Except for strings and bit-vectors, arrays
  3034.                 are EQUAL only if they are EQ.
  3035.         EQUALP  Like EQUAL, but ignores type differences when comparing 
  3036.                 numbers and case differences when comparing characters.
  3037.         =       Compares the values of two numbers even if they are of
  3038.                 different types.
  3039.         CHAR=   Case-sensitive comparison of characters.
  3040.         CHAR-EQUAL      Case-insensitive comparison of characters.
  3041.         STRING= Compares two strings, checking if they are identical.
  3042.                 It is case sensitive.
  3043.         STRING-EQUAL  Like STRING=, but case-insensitive.
  3044.  
  3045.   * Some destructive functions that you think would modify CDRs might
  3046.     modify CARs instead.  (E.g., NREVERSE.)
  3047.  
  3048.   * READ-FROM-STRING has some optional arguments before the
  3049.     keyword parameters.  If you want to supply some keyword
  3050.     arguments, you have to give all of the optional ones too.
  3051.  
  3052.   * If you use the function READ-FROM-STRING, you should probably bind
  3053.     *READ-EVAL* to NIL. Otherwise an unscrupulous user could cause a
  3054.     lot of damage by entering 
  3055.         #.(shell "cd; rm -R *")
  3056.     at a prompt.
  3057.  
  3058.   * Only functional objects can be funcalled in CLtL2, so a lambda
  3059.     expression '(lambda (..) ..) is no longer suitable. Use
  3060.     #'(lambda (..) ..) instead. If you must use '(lambda (..) ..),
  3061.     coerce it to type FUNCTION first using COERCE.
  3062.  
  3063. Methods:
  3064.  
  3065.   * PRINT-OBJECT methods can make good code look buggy. If there is a
  3066.     problem with the PRINT-OBJECT methods for one of your classes, it
  3067.     could make it seem as though there were a problem with the object.
  3068.     It can be very annoying to go chasing through your code looking for
  3069.     the cause of the wrong value, when the culprit is just a bad
  3070.     PRINT-OBJECT method.
  3071.  
  3072. Initialization:
  3073.  
  3074.   * Don't count on array elements being initialized to NIL, if you don't
  3075.     specify an :initial-element argument to MAKE-ARRAY. For example,
  3076.          (make-array 10) => #(0 0 0 0 0 0 0 0 0 0)
  3077.  
  3078. Iteration vs closures:
  3079.  
  3080.   * DO and DO* update the iteration variables by assignment; DOLIST and
  3081.     DOTIMES are allowed to use assignment (rather than a new binding).
  3082.     (All CLtL1 says of DOLIST and DOTIMES is that the variable "is
  3083.     bound" which has been taken as _not_ implying that there will be
  3084.     separate bindings for each iteration.) 
  3085.  
  3086.     Consequently, if you make closures over an iteration variable
  3087.     in separate iterations they may nonetheless be closures over
  3088.     the same variable and hence will all refer to the same value
  3089.     -- whatever value the variable was given last.  For example,
  3090.         (let ((fns '()))
  3091.           (do ((x '(1 2) (cdr x)))
  3092.               ((null x))
  3093.             (push #'(lambda () x)
  3094.                   fns))
  3095.           (mapcar #'funcall (reverse fns)))
  3096.     returns (nil nil), not (1 2), not even (2 2). Thus 
  3097.          (let ((l nil)) 
  3098.            (dolist (a '(1 2 3) l) 
  3099.              (push #'(lambda () a)
  3100.                    l)))
  3101.     returns a list of three closures closed over the same bindings, whereas
  3102.          (mapcar #'(lambda (a) #'(lambda () a)) '(1 2 3))
  3103.     returns a list of closures over distinct bindings.
  3104.  
  3105. Defining Variables and Constants:
  3106.  
  3107.   * (defvar var init) assigns to the variable only if it does not
  3108.     already have a value.  So if you edit a DEFVAR in a file and
  3109.     reload the file only to find that the value has not changed,
  3110.     this is the reason.  (Use DEFPARAMETER if you want the value
  3111.     to change upon reloading.) DEFVAR is used to declare a variable
  3112.     that is changed by the program; DEFPARAMETER is used to declare
  3113.     a variable that is normally constant, but which can be changed
  3114.     to change the functioning of a program.
  3115.  
  3116.   * DEFCONSTANT has several potentially unexpected properties:
  3117.  
  3118.      - Once a name has been declared constant, it cannot be used a
  3119.        the name of a local variable (lexical or special) or function
  3120.        parameter.  Really.  See page 87 of CLtL2.
  3121.  
  3122.      - A DEFCONSTANT cannot be re-evaluated (eg, by reloading the
  3123.        file in which it appears) unless the new value is EQL to the
  3124.        old one.  Strictly speaking, even that may not be allowed.
  3125.        (DEFCONSTANT is "like DEFPARAMETER" and hence does an
  3126.        assignment, which is not allowed if the name has already
  3127.        been declared constant by DEFCONSTANT.)
  3128.  
  3129.        Note that this makes it difficult to use anything other
  3130.        than numbers, symbols, and characters as constants.       
  3131.  
  3132.      - When compiling (DEFCONSTANT name form) in a file, the form
  3133.        may be evaluated at compile-time, load-time, or both.  
  3134.  
  3135.        (You might think it would be evaluated at compile-time and
  3136.        the _value_ used to obtain the object at load-time, but it
  3137.        doesn't have to work that way.)
  3138.  
  3139. Declarations:
  3140.  
  3141.   * You often have to declare the result type to get the most
  3142.     efficient arithmetic.  Eg, 
  3143.  
  3144.        (the fixnum (+ (the fixnum e1) (the fixnum e2)))
  3145.  
  3146.      rather than
  3147.  
  3148.        (+ (the fixnum e1) (the fixnum e2))
  3149.  
  3150.   * Declaring the iteration variable of a DOTIMES to have type FIXNUM
  3151.     does not guarantee that fixnum arithmetic will be used.  That is,
  3152.     implementations that use fixnum-specific arithmetic in the presence
  3153.     of appropriate declaration may not think _this_ declaration is
  3154.     sufficient.  It may help to declare that the limit is also a
  3155.     fixnum, or you may have to write out the loop as a DO and add
  3156.     appropriate declarations for each operation involved.
  3157.  
  3158. FORMAT related errors:
  3159.  
  3160.   * When printing messages about files, filenames like foo~ (a GNU-Emacs
  3161.     backup file) may cause problems with poorly coded FORMAT control
  3162.     strings.
  3163.  
  3164.   * Beware of using an ordinary string as the format string,
  3165.     i.e., (format t string), rather than (format t "~A" string).
  3166.  
  3167.   * FORMAT returns NIL, so if you added a format statement at the end
  3168.     of a function for debugging purposes, and that function normally
  3169.     returns a value to the caller, you may have changed the behavior
  3170.     of your program.
  3171.  
  3172. Miscellaneous:
  3173.  
  3174.   * Be careful of circular lists and shared list structure. 
  3175.  
  3176.   * Watch out for macro redefinitions.
  3177.  
  3178.   * A NOTINLINE may be needed if you want SETF of SYMBOL-FUNCTION to
  3179.     affect calls within a file.  (See CLtL2, page 686.)
  3180.  
  3181.   * When dividing two numbers, beware of creating a rational number where
  3182.     you intended to get an integer or floating point number. Use TRUNCATE
  3183.     or ROUND to get an integer and FLOAT to ensure a floating point
  3184.     number. This is a major source of errors when porting ZetaLisp or C
  3185.     code to Common Lisp.
  3186.  
  3187.   * If your code doesn't work because all the symbols are mysteriously
  3188.     in the keyword package, one of your comments has a colon (:) in
  3189.     it instead of a semicolon (;).
  3190.  
  3191.   * If you redefine a function while in the debugger, the redefinition
  3192.     may not take effect immediately. This will happen, for example,
  3193.     when the execution stack is halted near the invocation of the function.
  3194.     The function pointer on the stack will still be pointing to the
  3195.     old definition. Go up the stack a few levels before restarting to
  3196.     avoid reusing the old definition.
  3197.  
  3198. ----------------------------------------------------------------
  3199. Subject: [3-12] When is it right to use EVAL?
  3200.  
  3201. Hardly ever.  Any time you think you need to use EVAL, think hard about it.
  3202. EVAL is useful when implementing a facility that provides an external
  3203. interface to the Lisp interpreter.  For instance, many Lisp-based editors
  3204. provide a command that prompts for a form and displays its value.
  3205. Inexperienced macro writers often assume that they must explicitly EVAL the
  3206. subforms that are supposed to be evaluated, but this is not so; the correct
  3207. way to write such a macro is to have it expand into another form that has
  3208. these subforms in places that will be evaluated by the normal evaluation
  3209. rules.  Explicit use of EVAL in a macro is likely to result in one of two
  3210. problems: the dreaded "double evaluation" problem, which may not show up
  3211. during testing if the values of the expressions are self-evaluating
  3212. constants (such as numbers); or evaluation at compile time rather than
  3213. runtime.  For instance, if Lisp didn't have IF and one desired to write it,
  3214. the following would be wrong:
  3215.  
  3216.    (defmacro if (test then-form &optional else-form)
  3217.      ;; this evaluates all the subforms at compile time, and at runtime
  3218.      ;; evaluates the results again.
  3219.      `(cond (,(eval test) ,(eval then-form))
  3220.             (t ,(eval else-form))))
  3221.  
  3222.    (defmacro if (test then-form &optional else-form)
  3223.      ;; this double-evaluates at run time
  3224.      `(cond ((eval ,test) (eval ,then-form))
  3225.             (t (eval ,else-form)))
  3226.  
  3227. This is correct:
  3228.  
  3229.    (defmacro if (test then-form &optional else-form)
  3230.      `(cond (,test ,then-form)
  3231.             (t ,else-form)))
  3232.  
  3233. The following question (taken from an actual post) is typical of the
  3234. kind of question asked by a programmer who is misusing EVAL:
  3235.  
  3236.    I would like to be able to quote all the atoms except the first in a
  3237.    list of atoms.  The purpose is to allow a function to be read in and
  3238.    evaluated as if its arguments had been quoted.
  3239.  
  3240. This is the wrong approach to solving the problem. Instead, he should
  3241. APPLY the CAR of the form to the CDR of the form. Then quoting the
  3242. rest of the form is unnecessary. But one wonders why he's trying to
  3243. solve this problem in the first place, since the toplevel REP loop
  3244. already involves a call to EVAL. One gets the feeling that if we knew
  3245. more about what he's trying to accomplish, we'd be able to point out a
  3246. more appropriate solution that uses neither EVAL nor APPLY.
  3247.  
  3248. On the other hand, EVAL can sometimes be necessary when the only portable
  3249. interface to an operation is a macro. 
  3250.  
  3251. ----------------------------------------------------------------
  3252. Subject: [3-13] Why does my program's behavior change each time I use it?
  3253.  
  3254. Most likely your program is altering itself, and the most common way this
  3255. may happen is by performing destructive operations on embedded constant
  3256. data structures.  For instance, consider the following:
  3257.  
  3258.    (defun one-to-ten-except (n)
  3259.      (delete n '(1 2 3 4 5 6 7 8 9 10)))
  3260.    (one-to-ten-except 3) => (1 2 4 5 6 7 8 9 10)
  3261.    (one-to-ten-except 5) => (1 2 4 6 7 8 9 10) ; 3 is missing
  3262.  
  3263. The basic problem is that QUOTE returns its argument, *not* a copy of
  3264. it. The list is actually a part of the lambda expression that is in
  3265. ONE-TO-TEN-EXCEPT's function cell, and any modifications to it (e.g., by
  3266. DELETE) are modifications to the actual object in the function definition.
  3267. The next time that the function is called, this modified list is used.
  3268.  
  3269. In some implementations calling ONE-TO-TEN-EXCEPT may even result in
  3270. the signalling of an error or the complete aborting of the Lisp process.  Some
  3271. Lisp implementations put self-evaluating and quoted constants onto memory
  3272. pages that are marked read-only, in order to catch bugs such as this.
  3273. Details of this behavior may vary even within an implementation,
  3274. depending on whether the code is interpreted or compiled (perhaps due to
  3275. inlined DEFCONSTANT objects or constant folding optimizations).
  3276.  
  3277. All of these behaviors are allowed by the draft ANSI Common Lisp
  3278. specification, which specifically states that the consequences of modifying
  3279. a constant are undefined (X3J13 vote CONSTANT-MODIFICATION:DISALLOW).
  3280.  
  3281. To avoid these problems, use LIST to introduce a list, not QUOTE. QUOTE
  3282. should be used only when the list is intended to be a constant which
  3283. will not be modified.  If QUOTE is used to introduce a list which will
  3284. later be modified, use COPY-LIST to provide a fresh copy.
  3285.  
  3286. For example, the following should all work correctly:
  3287.  
  3288.    o  (remove 4 (list 1 2 3 4 1 3 4 5))
  3289.    o  (remove 4 '(1 2 3 4 1 3 4 5))   ;; Remove is non-destructive.
  3290.    o  (delete 4 (list 1 2 3 4 1 3 4 5))
  3291.    o  (let ((x (list 1 2 4 1 3 4 5)))
  3292.         (delete 4 x))
  3293.    o  (defvar *foo* '(1 2 3 4 1 3 4 5))
  3294.       (delete 4 (copy-list *foo*))
  3295.       (remove 4 *foo*)
  3296.       (let ((x (copy-list *foo*)))
  3297.          (delete 4 x))
  3298.  
  3299. The following, however, may not work as expected:
  3300.  
  3301.    o  (delete 4 '(1 2 3 4 1 3 4 5))
  3302.  
  3303. Note that similar issues may also apply to hard-coded strings. If you
  3304. want to modify elements of a string, create the string with MAKE-STRING.
  3305.  
  3306. ----------------------------------------------------------------
  3307. Subject: [3-14]  When producing formatted output in Lisp, where should you 
  3308.         put the newlines (e.g., before or after the line, FRESH-LINE vs TERPRI,
  3309.         ~& vs ~% in FORMAT)?
  3310.  
  3311.  
  3312. Where possible, it is desirable to write functions that produce output
  3313. as building blocks. In contrast with other languages, which either
  3314. conservatively force a newline at various times or require the program
  3315. to keep track of whether it needs to force a newline, the Lisp I/O
  3316. system keeps track of whether the most recently printed character was
  3317. a newline or not. The function FRESH-LINE outputs a newline only if
  3318. the stream is not already at the beginning of a line.  TERPRI forces a
  3319. newline irrespective of the current state of the stream. These
  3320. correspond to the ~& and ~% FORMAT directives, respectively. (If the
  3321. Lisp I/O system can't determine whether it's physically at the
  3322. beginning of a line, it assumes that a newline is needed, just in case.)
  3323.  
  3324. Thus, if you want formatted output to be on a line of its own, start
  3325. it with ~& and end it with ~%. (Some people will use a ~& also at the
  3326. end, but this isn't necessary, since we know a priori that we're not
  3327. at the beginning of a line. The only exception is when ~& follows a
  3328. ~A, to prevent a double newline when the argument to the ~A is a
  3329. formatted string with a newline at the end.) For example, the
  3330. following routine prints the elements of a list, N elements per line,
  3331. and then prints the total number of elements on a new line:
  3332.  
  3333.    (defun print-list (list &optional (elements-per-line 10))
  3334.      (fresh-line)
  3335.      (loop for i upfrom 1
  3336.            for element in list do
  3337.        (format t "~A ~:[~;~%~]" element (zerop (mod i elements-per-line))))
  3338.      (format t "~&~D~%" (length list)))
  3339.  
  3340. ----------------------------------------------------------------
  3341. Subject: [3-15] I'm using DO to do some iteration, but it doesn't terminate. 
  3342.  
  3343. Your code probably looks something like
  3344.    (do ((sublist list (cdr list))
  3345.         ..)
  3346.        ((endp sublist)
  3347.         ..)
  3348.      ..)
  3349. or maybe
  3350.    (do ((index start (+ start 2))
  3351.         ..)
  3352.        ((= index end)
  3353.         ..)
  3354.      ..)
  3355.  
  3356. The problem is caused by the (cdr list) and the (+ start 2) in the
  3357. first line. You're using the original list and start index instead of
  3358. the working sublist or index. Change them to (cdr sublist) and 
  3359. (+ index 2) and your code should start working.
  3360.  
  3361. ----------------------------------------------------------------
  3362. Subject: [3-16] My program works when interpreted but not when compiled!
  3363.  
  3364. Look for problems with your macro definitions, such as a macro that is
  3365. missing a quote. When compiled, this definition essentially becomes a
  3366. constant. But when interpreted, the body of the macro is executed each
  3367. time the macro is called.
  3368.  
  3369. For example, in Allegro CL the following code will behave differently
  3370. when interpreted and compiled:
  3371.   (defvar x 10)
  3372.   (defmacro foo () (incf x))
  3373.   (defun bar () (+ (foo) (foo)))
  3374. Putting a quote before the (incf x) in the definition of foo fixes the
  3375. problem. 
  3376.  
  3377. If you use (SETF (SYMBOL-FUNCTION 'foo) ...) to change the definition
  3378. of a built-in Lisp function named FOO, be aware that this may not work
  3379. correctly (i.e., as desired) in compiled code in all Lisps. In some
  3380. Lisps, the compiler treats certain symbols in the LISP package
  3381. specially, ignoring the function definition. If you want to redefine a
  3382. standard function try proclaiming/declaring it NOTINLINE prior to
  3383. compiling any use that should go through the function cell. (Note that
  3384. this is not guarranteed to work, since X3J13 has stated that it is not
  3385. permitted to redefine any of the standard functions).
  3386.  
  3387. ----------------------------------------------------------------
  3388. ;;; *EOF*
  3389. Archive-name: lisp-faq/part4
  3390. Last-Modified: Fri Mar 10 17:09:24 1995 by Mark Kantrowitz
  3391. Version: 1.53
  3392. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  3393. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  3394. Size: 66663 bytes, 1264 lines
  3395.  
  3396. ;;; ****************************************************************
  3397. ;;; Answers to Frequently Asked Questions about Lisp ***************
  3398. ;;; ****************************************************************
  3399. ;;; lisp_4.faq
  3400.  
  3401. This post contains Part 4 of the Lisp FAQ. 
  3402.  
  3403. If you think of questions that are appropriate for this FAQ, or would
  3404. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  3405.  
  3406. Lisp/Scheme Implementations and Mailing Lists (Part 4):
  3407.  
  3408.   [4-0]   Free Common Lisp implementations.
  3409.   [4-1]   Commercial Common Lisp implementations.
  3410.   [4-1a]  Lisp to C translators
  3411.   [4-2]   Scheme Implementations
  3412.   [4-4]   Free Implementations of Other Lisp Dialects
  3413.   [4-5]   Commercial Implementations of Other Lisp Dialects
  3414.   [4-6]   What is Dylan?
  3415.   [4-7]   What is Pearl Common Lisp?
  3416.   [4-9]   What Lisp-related discussion groups and mailing lists exist?
  3417.   [4-10]  ANSI Common Lisp -- Where can I get a copy of the draft standard?
  3418.  
  3419. Search for \[#\] to get to question number # quickly.
  3420.  
  3421. ----------------------------------------------------------------
  3422. Subject: [4-0]   Free Common Lisp implementations.
  3423.  
  3424. Repositories of Lisp source code are described in the answer to
  3425. question [6-1]. 
  3426.  
  3427. Remember, when ftping compressed or compacted files (.Z, .arc, .fit,
  3428. etc.) to use binary mode for retrieving the files.
  3429.  
  3430.    CLiCC (Common Lisp to C Compiler) generates C-executables from Common
  3431.    Lisp application programs. CLiCC is not a Common Lisp system, and
  3432.    hence does not include any program development or debugging support.
  3433.    CLiCC is intended to be used as an add-on to existing Common Lisp
  3434.    systems for generating portable applications. (CLiCC has been tested
  3435.    in Allegro CL, Lucid CL, CMU CL, CLISP, and AKCL. It should run in any
  3436.    CLtL1 lisp with CLOS.)  CLiCC supports CL_0, a subset of Common Lisp +
  3437.    CLOS, which excludes EVAL and related functions. At present CL_0 is
  3438.    based on CLtL1, but is headed towards CLtL2 and ANSI-CL. The generated
  3439.    C code (ANSI-C or K&R-C compatible) may be compiled using a
  3440.    conventional C compiler on the target machine, and must be linked with
  3441.    the CLiCC runtime library in order to generate executables. CLiCC has
  3442.    a foreign function interface.  CLiCC is available by anonymous ftp from
  3443.       ftp.informatik.uni-kiel.de:/pub/kiel/apply/clicc-0.6.4.tar.gz
  3444.       [134.245.15.114].   
  3445.    CLiCC was developed by Wolfgang Goerigk <wg@informatik.uni-kiel.de>,
  3446.    Ulrich Hoffman <uho@informatik.uni-kiel.de>, and Heinz Knutzen
  3447.    <hk@informatik.uni-kiel.de> of Christian-Albrechts-Universitaet zu
  3448.    Kiel, Institut fuer Informatik und Praktische Mathematik,
  3449.    Preusserstr.  1-9, D-24105 Kiel, Germany. The authors welcome
  3450.    suggestions and improvements and would appreciate receiving email
  3451.    even if you just used CLiCC successfully. For more information,
  3452.    send mail to clicc@informatik.uni-kiel.de. 
  3453.  
  3454.    CLISP is a Common Lisp (CLtL1 + parts of CLtL2) implementation by
  3455.    Bruno Haible of Karlsruhe University and Michael Stoll of Munich
  3456.    University, both in Germany.  It runs on microcomputers (DOS, OS/2,
  3457.    Atari ST, Amiga 500-4000) as well as on Unix workstations (Linux, Sun4,
  3458.    Sun386, HP9000/800, SGI, Sun3 and others) and needs only 1.5 MB of RAM.
  3459.    It is free software and may be distributed under the terms of GNU GPL.
  3460.    German and English versions are available, French coming soon.  CLISP
  3461.    includes an interpreter, a compiler, a subset of CLOS (e.g., no MOP)
  3462.    and, for some machines, a screen editor. Packages running in CLISP 
  3463.    include PCL and, on Unix machines, CLX and Garnet.  Available by anonymous 
  3464.    ftp from
  3465.       ma2s2.mathematik.uni-karlsruhe.de:/pub/lisp/clisp/ [129.13.115.2]
  3466.    For more information, contact haible@ma2s2.mathematik.uni-karlsruhe.de.
  3467.    There is a mailing list for users of CLISP. It is the proper forum for
  3468.    questions about CLISP, installation problems, bug reports, application
  3469.    packages etc. For information about the list and how to subscribe,
  3470.    send mail to listserv@ma2s2.mathematik.uni-karlsruhe.de, with the two lines
  3471.           help
  3472.           information clisp-list
  3473.    in the message body.
  3474.    A Sybase SQL interface interface for CLIPS is available
  3475.    by anonymous ftp from wuarchive.wustl.edu:packages/clips2sybase/. For
  3476.    more information, write to Sherry Steib <sherry@informatics.wustl.edu>.
  3477.  
  3478.    CMU Common Lisp (CMU CL) is free, and runs on HPs, Sparcs (Mach,
  3479.    SunOs, and Solaris), DecStation 3100 (Mach), SGI MIPS (Iris), DEC
  3480.    Alpha/OSF1, IBM RT (Mach) and requires 16mb RAM, 25mb disk. It
  3481.    includes an incremental compiler, Hemlock emacs-style editor,
  3482.    source-code level debugger, code profiler and is mostly X3J13
  3483.    compatible, including the new loop macro.  It is available by
  3484.    anonymous ftp from 
  3485.       ftp.cs.cmu.edu:/afs/cs.cmu.edu/project/clisp/release [128.2.206.173]
  3486.    Login with username "anonymous" and "userid@host" (your email
  3487.    address) as password. Due to security restrictions on anonymous ftps
  3488.    (some of the superior directories on the path are protected against
  3489.    outside access), it is important to "cd" to the source directory with
  3490.    a single command.  Don't forget to put the ftp into binary mode before
  3491.    using "get" to obtain the compressed/tarred files. The binary releases
  3492.    are contained in files of the form
  3493.                 <version>-<machine>_<os>.tar.Z
  3494.    Other files in this directory of possible interest are
  3495.    17f-source.tar.gz, which contains all the ".lisp" source files
  3496.    used to build version 17f. A listing of the current contents of the
  3497.    release area is in the file FILES. You may also use "dir" or "ls" to 
  3498.    see what is available. Bug reports should be sent to cmucl-bugs@cs.cmu.edu.
  3499.  
  3500.    ECoLisp is a Common Lisp implementation which compiles Lisp functions
  3501.    into C functions that use the C stack and standard procedure call
  3502.    conventions. This lets Lisp and C code be easily mixed. It can be used
  3503.    as a C library from any C application.  It is available by anonymous
  3504.    ftp from 
  3505.       ftp.di.unipi.it:/pub/lang/lisp/     [131.114.4.36]
  3506.       ftp.icsi.berkeley.edu:/pub/ai/ecl/  [128.32.201.7]
  3507.    as the file ecl-??.tar.gz where ?? is the version number. This is an alpha
  3508.    release. So far it has been tested on Sun workstations (SunOS 4.x),
  3509.    SGI (IRIX 4.x), and IBM PC (DOS/go32). For more information, please contact
  3510.    Giuseppe Attardi <attardi@di.unipi.it> or <attardi@icsi.berkeley.edu>.
  3511.  
  3512.    GNU Common Lisp (GCL) is a free implementation of Common Lisp (CLtL1)
  3513.    based originally on Austin Kyoto Common Lisp (AKCL). Versions 1.0
  3514.    and above of GCL (aka versions 1-625 and above of AKCL) are
  3515.    available under the GNU General Public Library License v2.0, and no
  3516.    longer require the kcl.tar file to build the system. For
  3517.    information on previous versions of AKCL, see the KCL entry. GCL
  3518.    generates C code which it compiles with the local optimizing C
  3519.    compiler (e.g., GCC).  It is intended to eventually support the
  3520.    ANSI standard for Common Lisp. GCL runs on Sparc, IBM RT, RS/6000,
  3521.    DecStation 3100, hp300, hp800, Macintosh II (under AUX), mp386, 
  3522.    IBM PS2, IBM RT_AIX, Silicon Graphics 4d, Sun3, Sun4, Sequent
  3523.    Symmetry, IBM 370, NeXT, Vax, and IBM PC 386/486 (linux, bsd).
  3524.    GCL version 1.0 and above are available by anonymous ftp from  
  3525.       ftp.cli.com:/pub/gcl/        [192.31.85.129]
  3526.       math.utexas.edu:/pub/gcl/        [128.83.133.215]
  3527.    as the file gcl-X.X.tgz (e.g., gcl-1.0.tgz), where X.X should be 
  3528.    replaced with the version number; you'll generally want the largest
  3529.    version number. The bandwidth to math.utexas.edu is higher than cli. 
  3530.    The file pcl-gcl-1.0.tgz contains a port of PCL (CLOS) to GCL.
  3531.    The file xgcl-2.tgz contains an interface to X Windows for GCL,
  3532.    including a low-level interface to Xlib, and in addition to being
  3533.    available from the above sites, is also available from
  3534.       ftp.cs.utexas.edu:/pub/novak/xgcl/
  3535.       http://www.cs.utexas.edu/users/novak/
  3536.    For more information, write to William Schelter <wfs@math.utexas.edu> 
  3537.    (or <wfs@cli.com>, <wfs@rascal.ics.utexas.edu>). GCL is under
  3538.    continuing development, and folks interested in helping should send
  3539.    him email. Andy Wang <awang@plains.nodak.edu> has compiled GCL 1.0
  3540.    for Linux 1.1.50 (using gcc 2.5.8 and libc 4.5.26) and made the
  3541.    resulting binaries available by anonymous ftp from
  3542.       sunsite.unc.edu:/pub/Linux/Incoming/gcl-1.0.bin.tgz
  3543.  
  3544.    Kyoto Common Lisp (KCL) is free, but requires a license. Conforms to CLtL1.
  3545.    KCL was written by T. Yuasa <yuasa@tutics.tut.ac.jp> and M. Hagiya
  3546.    <hagiya@is.s.u-tokyo.ac.jp> at Kyoto University in 1984. Austin
  3547.    Kyoto Common Lisp (AKCL) is a collection of ports, bug fixes and
  3548.    improvements to KCL by Bill Schelter (<wfs@cli.com> or
  3549.    <wfs@rascal.ics.utexas.edu>). Since 1994, AKCL versions 1-625 and
  3550.    higher are covered by the GNU GPL, so generally one will generally
  3551.    not need KCL (see GCL above for details). {A}KCL generates C code
  3552.    which it compiles with the local C compiler. Both are available by
  3553.    anonymous ftp from   
  3554.       rascal.ics.utexas.edu:/pub/ [128.83.138.20]
  3555.       ftp.cli.com:/pub/ [192.31.85.1]
  3556.       utsun.s.u-tokyo.ac.JP:/pub/ [133.11.11.11]
  3557.    KCL is in the file kcl.tar, and AKCL is in the file akcl-xxx.tar.Z
  3558.    (take the highest value of xxx).  To obtain KCL, one must first sign
  3559.    and mail a copy of the license agreement to: Special Interest Group in
  3560.    LISP, c/o Taiichi Yuasa, Department of Computer Science, Toyohashi
  3561.    University of Technology, Toyohashi 441, JAPAN. Runs on Sparc, IBM RT,
  3562.    RS/6000, DecStation 3100, hp300, hp800, Macintosh II (under AUX),
  3563.    mp386, IBM PS2, Silicon Graphics 4d, Sun3, Sun4, Sequent Symmetry, IBM
  3564.    370, NeXT and Vax. For the beta test version of the DOS port, see
  3565.    the files akclexe.zip and go32sexe.zip in
  3566.       math.utexas.edu:/pub/msdos/akcl-beta/
  3567.    Commercial versions of {A}KCL are available from Austin Code Works,
  3568.    11100 Leafwood Lane, Austin, TX 78750-3409, Tel. 512-258-0785, Fax
  3569.    512-258-1342, E-mail guthery@acw.com, including a CLOS for AKCL.
  3570.    See also Ibuki, below. 
  3571.  
  3572.    PowerLisp is a Common Lisp development environment for the Macintosh.
  3573.    It consists of a Common Lisp interpreter, native-code 680x0 compiler,
  3574.    680x0 macro assembler, disassembler, incremental linker and
  3575.    multi-window text editor. It requires a Macintosh with at least a
  3576.    68020 processor (any Mac except a Plus, SE or Classic) and system 7.0
  3577.    or later. About 2 megabytes of RAM are required to run it, and to do
  3578.    much with it you need more like 5 or 6 megabytes. Like any Common Lisp
  3579.    system, the more memory the better.  PowerLisp has the ability to run
  3580.    in the background. While executing a Common Lisp program, the user may
  3581.    switch to another application as it continues to run. You can also
  3582.    edit programs while a Common Lisp program is running. PowerLisp is
  3583.    targeted to be compatible with CTLTL2 without CLOS (for now) but some
  3584.    Common Lisp functions are not yet implemented. Upcoming versions
  3585.    should include the remaining language features. The current released
  3586.    version is 1.10. PowerLisp is available from America Online and Genie as a
  3587.    shareware program ($50). It is also available from the Lisp
  3588.    Repository, as
  3589.       ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/powerlsp/v1_10/powerlsp.hqx
  3590.    Written by Roger Corman. For more information, send mail to
  3591.    PowerLisp@aol.com, roger@island.com or rogerc34@aol.com (RogerC34
  3592.    on America Online). 
  3593.  
  3594.    RefLisp is a small Lisp interpreter. Versions exist for MS-DOS and
  3595.    UNIX (AIX). The MS-DOS version supports CGA/EGA/VGA graphics and the
  3596.    Microsoft Mouse. The interpreter is a shallow-binding (i.e.,
  3597.    everything has dynamic scope), reference counting design making it
  3598.    suitable for experimenting with real-time and graphic user interface
  3599.    programming. Common Lisp compatibility macros are provided, and most
  3600.    of the examples in "Lisp" by Winston & Horn have been run on RefLisp.
  3601.    RefLisp makes no distinction between symbol-values and
  3602.    function-values, so a symbol can be either but not both.  RefLisp
  3603.    comes with an ASCII manual and many demonstration programs, including
  3604.    an analogue clock which never stops for garbage collection.  It is
  3605.    written in ANSI C and is in the public domain. Source and binaries are
  3606.    available in the Lisp Utilities repository by anonymous ftp from
  3607.       ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/reflisp/
  3608.    For further information, send email to the author Bill Birch
  3609.    <bill@zikzak.apana.org.au>. 
  3610.  
  3611.    WCL is an implementation of Common Lisp for Sparc based workstations.
  3612.    It is available free by anonymous ftp from 
  3613.       cdr.stanford.edu:/pub/wcl/  [36.93.0.31]
  3614.    as the files wcl2.2-solaris-src.tar.gz, wcl2.2-solaris-bins.tar.gz,
  3615.    wcl2.2-sunos4-src.tar.gz, wcl2.2-sunos4-bins.tar.gz, and
  3616.    wgdb4.2-sunos4.tar.gz. It includes a native solaris version (but with
  3617.    no dynamic .o loading or wgdb yet...), can use any version of GCC 2.X
  3618.    (GCC 2.1 is no longer required), and includes separate binary and
  3619.    source distribution so that recompilation is no longer needed to
  3620.    install WCL and WGDB. The wcl2.2-*.tar.gz files contain the WCL
  3621.    distribution, including CLX and PCL; wgdb4.2-sunos4.tar.gz contains a
  3622.    version of the GDB debugger which has been modified to grok WCL's
  3623.    Lisp.  WCL provides a large subset of Common Lisp as a Unix shared
  3624.    library that can be linked with Lisp and C code to produce efficient
  3625.    and small applications. For example, the executable for a Lisp version
  3626.    of the canonical ``Hello World!''  program requires only 40k bytes
  3627.    under SunOS 4.1 for SPARC. WCL provides CLX R5 as a shared library,
  3628.    and comes with PCL and a few other utilities.  For further information
  3629.    on WCL, see the paper published in the proceedings of the 1992 Lisp
  3630.    and Functional Programming Conference, a copy of which appears in the
  3631.    wcl directory as lfp-paper.ps, or look in the documentation directory
  3632.    of the WCL distribution. Written by Wade Hennessey
  3633.    <wade@sunrise.stanford.edu>.  Please direct any questions to
  3634.    wcl@sunrise.stanford.edu. If you would like to be added to a mailing
  3635.    list for information about new releases, send email to
  3636.    wcl-request@sunrise.stanford.edu.
  3637.  
  3638.    XLISP is free, and runs on the IBM PC (MSDOS), Amiga (AmigaDOS), 
  3639.    Atari ST (TOS), Apple Macintosh, and Unix. It should run on anything 
  3640.    with a C compiler.  It was written by David Michael Betz, 
  3641.    167 Villa Avenue #11, Los Gatos, CA 95032, 408-354-9303 (H),
  3642.    408-862-6325 (W), dbetz@apple.com. The reference manual was written by
  3643.    Tim Mikkelsen. Version 2.0 is available by anonymous ftp from
  3644.       cs.orst.edu:/pub/xlisp/ [128.193.32.1] or
  3645.       sumex-aim.stanford.edu:/info-mac/lang/
  3646.    Version 2.1g* is the same as XLISP 2.0, but modified by Tom Almy 
  3647.    <toma@sail.labs.tek.com> to bring it closer to Common Lisp, in
  3648.    addition to fixing several bugs. The latest version of XLISP can be
  3649.    obtained by anonymous ftp from 
  3650.       ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/xlisp/ [128.2.206.173]
  3651.    It may also be available (in possible older versions) from
  3652.       ftp.biostr.washington.edu:/pub/xlisp      [128.95.10.115]
  3653.       wasp.eng.ufl.edu:/pub                     [128.227.116.1]
  3654.    A Macintosh port of version 2.1e (and the C source code to its
  3655.    interface) is also available, from Macintosh ftp sites such as
  3656.       sumex.stanford.edu:/info-mac/dev/xlisp-21e2.hqx
  3657.       mac.archive.umich.edu:/mac/development/languages/xlisp2.1e2.sit.hqx
  3658.    The Macintosh version was written by Brian Kendig, <bskendig@netcom.com>.
  3659.    To obtain a copy through US mail, send email to Tom Almy,
  3660.    toma@sail.labs.tek.com. A Windows version of the statistical
  3661.    version of xlisp is available by anonymous ftp from
  3662.       ftp.cica.indiana.edu:/util/wxlslib.zip
  3663.    A version of XLISP-PLUS 2.1g that includes an experimental byte code 
  3664.    compiler is available by anonymous ftp from
  3665.       umnstat.stat.umn.edu:/pub/xlispstat/xlisponly/ [128.101.51.1]
  3666.    as the file xlisp21gbc.tar.gz. Write to Luke Tierney <luke@stat.umn.edu>
  3667.    for more information.
  3668.  
  3669. ----------------------------------------------------------------
  3670. Subject: [4-1]   Commercial Common Lisp implementations.
  3671.  
  3672. Allegro Common Lisp:
  3673.  
  3674.    Allegro Common Lisp 4.2 runs on a variety of platforms, including
  3675.    Sparcs, RS6000, HP700, Silicon Graphics, DecStation (prices start at
  3676.    $4,500) and NeXT ($2,000). It requires 12mb RAM for the 680x0 and 16mb
  3677.    for RISC. It includes native CLOS, X-windows support, Unix interface,
  3678.    incremental compilation, generational garbage collection, and a
  3679.    foreign function interface.  Options include Allegro Composer
  3680.    (development environment, including debugger, inspector, object
  3681.    browser, time/space code profiler, and a graphical user interface,
  3682.    $1,500), Common LISP Interface Manager (CLIM 2.0 is a portable
  3683.    high-level user interface management system.  CLIM 2.0 for Allegro
  3684.    CL supports both Motif and Openlook, $1,000) and Allegro CLIP
  3685.    (a parallel version of Lisp for the Sequent).  Franz also markets
  3686.    Allegro CL\PC 2.0 for Windows 3.1 for $995 (discount prices of $449 are
  3687.    sometimes advertised in various AI magazines). Allegro CL\PC provides 32-bit
  3688.    compilation, complete CLOS, an integrated development environment, 
  3689.    interface to the Windows API, DLL support, and free runtime delivery.
  3690.    Write to: Franz Inc., 1995 University Avenue, Berkeley, CA 94704 or
  3691.    call 1-800-333-7260, 510-548-3600, fax 510-548-8253, telex 340179
  3692.    WUPUBTLXSFO. Bug reports can be mailed to bugs@franz.com.  Questions
  3693.    about Franz Inc. products (e.g., current and special pricing) can be
  3694.    sent to info@franz.com. To receive Franz Flash, Franz's electronic
  3695.    newsletter, send mail to flash@franz.com. The Franz Forum bboard is
  3696.    accessible by telnet to franzforum.franz.com. Files related to the
  3697.    bboard (e.g., patches, Franz's GNU-Emacs/Lisp interface, the Allegro FAQ)
  3698.    are available by anonymous ftp from
  3699.       ftp.uu.net:/vendor/franz/ [192.48.96.9]
  3700.  
  3701. CLOE:
  3702.  
  3703.    CLOE (Common Lisp Operating Environment) is a cross-development
  3704.    environment for IBM PCs (MSDOS) and Symbolics Genera. It includes
  3705.    CLOS, condition error system, generational garbage collection,
  3706.    incremental compilation, code time/space profiling, and a stack-frame
  3707.    debugger. It costs from $625 to $4000 and requires 4-8mn RAM and a 386
  3708.    processor.  Write to: Symbolics, 6 New England Tech Center, 
  3709.    521 Virginia Road, Concord, MA 01742, call 1-800-394-5522 or 
  3710.    508-287-1000 or fax 508-287-1099. 
  3711.  
  3712. Golden Common Lisp:
  3713.  
  3714.    Golden Common Lisp (GCLisp 4.4) runs on IBM PCs under DOS, Windows,
  3715.    OS/2, and Windows NT, costing $2,000 ($250 extra for Gold Hill
  3716.    Windows), and includes an incremental compiler, foreign function
  3717.    interface, interactive debugger, SQL interface, and emacs-like editor.
  3718.    It supports DDE and other Windows stuff, and is CLtL1 compatible.
  3719.    Supports PCL/CLOS. It requires 4mb RAM, and 12mb disk. See a review in
  3720.    PC-WEEK 4/1/91 comparing GCLisp with an older version of MCL.  Write
  3721.    to: Gold Hill Computers, 26 Landsdowne Street, Cambridge, MA 02139,
  3722.    call 617-621-3300, or fax 617-621-0656.
  3723.  
  3724. Harlequin LispWorks: 
  3725.  
  3726.    LispWorks (R) from Harlequin runs on a variety of Unix platforms, 
  3727.    including Sun Sparc and clones (SunOS and Solaris), IBM RS/6000 (AIX), 
  3728.    DEC MIPS (Ultrix), DEC Alpha (OSF/1), HP PA (HP-UX), and SGI (IRIX).  
  3729.    LispWorks uses menus and graphics to provide convenient, user friendly
  3730.    access to its wide array of powerful tools.  A C/C++ interface, an SQL
  3731.    interface, and a fully integrated Prolog compiler are a standard part 
  3732.    of LispWorks.  CLIM 2.0 is also available.
  3733.  
  3734.      +  COMMON LISP: CLtL2 compatible, native CLOS/MOP, generational GC, 
  3735.         C/C++ interface.
  3736.  
  3737.      +  ENVIRONMENT: Prolog, Emacs-like editor/listener/shell, defadvice,
  3738.         defsystem, cross-referencing, lightweight processes,
  3739.         debugger, mail reader, extensible hypertext online doc, LALR
  3740.         parser generator.
  3741.  
  3742.      +  BROWSERS/GRAPHERS: files, objects, classes, generic functions,
  3743.         source code systems, specials, compilation warnings.
  3744.  
  3745.      +  GRAPHICS: CLX, CLUE, Toolkit, CAPI, Open Look, Motif,
  3746.         interface builder.
  3747.  
  3748.      +  INTEGRATED PRODUCTS: CLIM 2.0, KnowledgeWorks (RETE engine).
  3749.  
  3750.    For further information, contact by e-mail worldwide:
  3751.       lispworks-request@harlequin.com (OR @harlequin.co.uk)
  3752.    or in the US:   
  3753.       FAX:   617-252-6505
  3754.       Voice: 800-WORKS-4-YOU (800-967-5749) or 617-374-2400 or 617-252-0052
  3755.       Mail:  Harlequin Inc., One Cambridge Center, Cambridge, MA 02142
  3756.    or in Europe:
  3757.       FAX:   0223-872-519 (OR 44-1223-872-519 from outside UK)
  3758.       Voice: 0223-873-800 OR -872-522 (OR 44-1223-873-800 from outside UK)
  3759.       Telex: 818440 harlqn g
  3760.       Mail:  Harlequin Ltd., Barrington Hall, Barrington, Cambridge, CB2 5RG
  3761.  
  3762.  
  3763. Harlequin FreeLisp:
  3764.  
  3765.    Harlequin Inc. is shipping FreeLisp (TM), which has been developed 
  3766.    specifically to meet the Lisp teaching requirements of the academic
  3767.    community in terms of both functionality and price.  FreeLisp
  3768.    is a reduced implementation of Harlequin's premier Common Lisp
  3769.    development environment, LispWorks (R).  FreeLisp runs under on PC's
  3770.    under Windows, and has many of the environmental features as 
  3771.    LispWorks but does not include a compiler. For prices and information
  3772.    about FreeLisp, contact by e-mail worldwide
  3773.       lispworks-request@harlequin.com (OR @harlequin.co.uk)
  3774.    or in the US:
  3775.       fax:    617-252-6505
  3776.       voice:  800-WORKS-4-YOU (800-967-5749) or 617-374-2400 or 617-252-0052
  3777.       mail:   Harlequin Inc., One Cambridge Center, Cambridge, MA 02142
  3778.    or in Europe:
  3779.       fax:    0223-872-519 (OR 44-1223-872-519 from outside UK)
  3780.       voice:  0223-873-800 OR -872-522 (OR 44-1223-873-800 from outside UK)
  3781.       Telex:  818440 harlqn g
  3782.       mail:   Harlequin Ltd., Barrington Hall, Barrington, Cambridge, CB2 5RG
  3783.  
  3784. Ibuki Common Lisp:
  3785.  
  3786.    Ibuki Common Lisp (IBCL) v02/01 is a commercialized and improved
  3787.    version of Kyoto Common Lisp. It runs on over 30 platforms, including
  3788.    Sun3, Sparc, Dec (Ultrix), Apollo, HP 9000, IBM RS/6000, Silicon
  3789.    Graphics and IBM PCs (under AIX).  It includes an incremental compiler,
  3790.    interpreter, and C/Fortran foreign function interface. It generates C
  3791.    code from the Lisp and compiles it using the local C compiler.  Image
  3792.    size is about 3mb. Cost is $2800 (workstations), $3500 (servers), $700
  3793.    (IBM PCs).  Supports CLOS and CLX ($200 extra).  Source code is
  3794.    available at twice the cost. Ibuki now also has a product called CONS
  3795.    which compiles Lisp functions into linkable Unix libraries.  Write to:
  3796.    Ibuki Inc., PO Box 1627, Los Altos, CA 94022, or call 415-961-4996,
  3797.    fax 415-961-8016, or send email to Richard Weyhrauch, rww@ibuki.com or
  3798.    support@ibuki.com.
  3799.  
  3800. LinkLisp:
  3801.  
  3802.    LinkLisp is a Lisp implementation for Windows that supports a large
  3803.    subset of Common Lisp. It is DLL and VBX callable from C/C++ and
  3804.    Visual Basic. It costs $249. For more information, write to Conscious
  3805.    Computing, 3100 Connecticut Avenue NW, Suite 202, Washington, DC
  3806.    20008, call 202-483-6350, or fax 202-462-9110.
  3807.  
  3808. Lucid Common Lisp:
  3809.  
  3810.    Lucid Common Lisp runs on a variety of platforms, including PCs (AIX),
  3811.    Apollo, HP, Sun-3, Sparc, IBM RT, IBM RS/6000, Decstation 3100,
  3812.    Silicon Graphics, and Vax. Lucid includes native CLOS, a foreign
  3813.    function interface, and generational garbage collection.  CLIM is
  3814.    available for Lucid as a separate product. See also the comments in
  3815.    question [1-2] on the wizards.doc file that comes with the release.
  3816.  
  3817.    [Note: Lucid encountered financial difficulties because of forays
  3818.     into C-related products; the Lisp end of the company remained strong.
  3819.     Harlequin announced on 23-NOV-94 that they have acquired the
  3820.     rights to the Lisp-related technology of Lucid, Inc., that they
  3821.     will market and support Lucid Common Lisp alongside their
  3822.     LispWorks products, and that they have hired several former Lucid
  3823.     employees for this purpose.] 
  3824.  
  3825.    For further information, contact by e-mail worldwide:
  3826.       lispworks-request@harlequin.com (OR @harlequin.co.uk)
  3827.    or in the US:   
  3828.       FAX:   617-252-6505
  3829.       Voice: 800-WORKS-4-YOU (800-967-5749) or 617-374-2400 or 617-252-0052
  3830.       Mail:  Harlequin Inc., One Cambridge Center, Cambridge, MA 02142
  3831.    or in Europe:
  3832.       FAX:   0223-872-519 (OR 44-1223-872-519 from outside UK)
  3833.       Voice: 0223-873-800 OR -872-522 (OR 44-1223-873-800 from outside UK)
  3834.       Telex: 818440 harlqn g
  3835.       Mail:  Harlequin Ltd., Barrington Hall, Barrington, Cambridge, CB2 5RG
  3836.  
  3837.  
  3838. Macintosh Common Lisp:
  3839.  
  3840.    Macintosh Common Lisp (MCL 2.0) runs on the Apple Macintosh (Mac+ or
  3841.    higher with 4mb RAM and system software 6.0.4 or later or AUX 3.0) and
  3842.    is available from APDA for $495. It includes a native CLOS Macintosh
  3843.    Toolbox/interface toolkit, ephemeral garbage collection, incremental
  3844.    compiler, window-based debugger, source-code stepper, object
  3845.    inspector, emacs-style editor, and a foreign function interface.
  3846.    Bug reports should be sent to bug-mcl@cambridge.apple.com. With
  3847.    MCL version 2.0, Apple has started distributing a CD-ROM which
  3848.    contains, among other things, a large collection of Lisp code,
  3849.    complete MCL manuals in an online-browser format, the CLIM 1.0 manual
  3850.    in TeX and postscript, and copies of Gambit 1.8 Scheme, SIOD 2.8
  3851.    Scheme, Pixie Scheme, and a demo version of MacScheme. For more
  3852.    information, write to: APDA, Apple Computer Inc., 20525 Mariani
  3853.    Avenue, MS 33-G, Cupertino, CA 95014-6299 or call toll free
  3854.    1-800-282-2732 (US), 1-800-637-0029 (Canada), 1-716-871-6555. Their
  3855.    fax number is 1-716-871-6511 and their telex is 171-576. Email may
  3856.    also be sent to APDA@applelink.apple.com or 76666.2405@compuserve.com.
  3857.    CLIM for MCL is available for $495 as a separate product from
  3858.    Lucid, Inc., 707 Laurel Street, Menlo Park, CA 94025 U.S.A.,
  3859.    415-329-8400, fax: 415-329-8480, <sales@lucid.com>.
  3860.    [Note: A November 10, 1994 press release announced that Apple has
  3861.     licensed MCL to Digitool, Inc. for the purpose of future
  3862.     development of MCL. Digitool will introduce a Power Macintosh
  3863.     version next year that generates native PowerPC code. For more
  3864.     information write to Digitool, Inc., 675 Massachusetts Avenue,
  3865.     Cambridge, MA 02139, call 617-441-5000, fax 617-576-7680, or send
  3866.     email to <hsayed@digitool.com>.] 
  3867.  
  3868. Medley:
  3869.    
  3870.    Medley 2.0 is a Common Lisp development environment that includes a
  3871.    native CLOS w/MOP, window toolkit, window-based debugger, incremental
  3872.    compiler, structure editor, inspectors, stepper, cross-referencer
  3873.    (Masterscope), code analysis tools, and browsers. It is the successor
  3874.    to InterLisp-D.  It runs on a variety of platforms, including Suns,
  3875.    DecStations, 386/486s, IBM RS/6000, MIPS, HP, DEC Alpha, and Xerox
  3876.    1186. The price for Unix machines is $3,195 for the developer version
  3877.    and $1,250 for the runtime version.  Medley also runs under DOS 4.0 or
  3878.    higher ($795 developer version, $300 runtime version, and $250 student
  3879.    version). Instructional licenses are also available at $250/copy for DOS
  3880.    (to a max of $1,250) and $1,000/copy for Unix (to a max of $5,000). 
  3881.    For more information, write to Venue, 1624 Franklin Street, Suite 1212,
  3882.    Oakland, CA 94612, call 800-228-5325 or 510-835-8856, fax
  3883.    510-835-8251, or send email to aisupport.mv@envos.xerox.com.
  3884.    
  3885. muLISP-90:
  3886.  
  3887.    muLISP-90 v7.1 is a small Lisp which runs on IBM PCs (or the HP 95LX
  3888.    palmtop), MS-DOS version 2.1 or later. It isn't Common Lisp, although
  3889.    there is a Common Lisp compatibility package which augments muLISP-90
  3890.    with over 450 Common Lisp special forms, macros, functions and control
  3891.    variables. Includes a screen-oriented editor and debugger, a window
  3892.    manager, an interpreter and a compiler. Among the example programs is
  3893.    DOCTOR, an Eliza-like program. The runtime system allows one to create
  3894.    small EXE or COM executables. Uses a compact internal representation
  3895.    of code to minimize space requirements and speed up execution. The
  3896.    kernel takes up only 50k of space. Costs $150. muLISP-XM is a version
  3897.    of muLISP-90 that can take advantage of up to 4 gigabytes of extended
  3898.    memory and costs $300.  Write to Soft Warehouse, Inc., 3660 Waialae
  3899.    Avenue, Suite 304, Honolulu, HI 96816-3236, call 808-734-5801, or fax
  3900.    808-735-1105.
  3901.  
  3902. NanoLISP:
  3903.  
  3904.    NanoLISP 2.0 is a Lisp interpreter for DOS systems that supports a
  3905.    large subset of the Common Lisp (CLtL2) standard, including lexical and
  3906.    dynamic scoping, four lambda-list keywords, closures, local functions,
  3907.    macros, output formatting, generic sequence functions, transcendental
  3908.    functions, 2-d arrays, bit-arrays, sequences, streams, characters
  3909.    double-floats, hash-tables and structures. Runs in DOS 2.1 or higher,
  3910.    requiring only 384k of RAM. Cost is $100. Write to: Microcomputer Systems
  3911.    Consultants, PO Box 6646, Santa Barbara, CA 93160 or call 805-967-2270.
  3912.  
  3913. Poplog Common Lisp:
  3914.  
  3915.    Poplog Common Lisp is an incremental compiler and X-based development
  3916.    environment for Common Lisp. Poplog Common Lisp provides a compact and
  3917.    memory-efficient implementation which has recently been upgraded to
  3918.    include support for CLtL2, including a native CLOS implementation.
  3919.  
  3920.    The Poplog environment also includes efficient incremental compilers
  3921.    for Prolog, Standard ML and Pop-11, a language-sensitive editor and
  3922.    supports easy dynamic linking to C, Fortran etc. Poplog has over 400
  3923.    customers in 36 countries.
  3924.  
  3925.    Poplog runs on a variety of platforms including Sun SPARC (SunOS 4.1,
  3926.    Solaris 2.x), HP-RISC (HP-UX), Silicon Graphics (IRIX), PC UNIX (SCO,
  3927.    Linux), DECstation (Ultrix) and under VMS on both VAX and Alpha.
  3928.  
  3929.    For more information, contact:
  3930.        Integral Solutions Ltd, 3 Campbell Court,
  3931.        Bramley, Basingstoke, Hants. RG26 5EG, UK.
  3932.        Call +44 (0)1256 882028, fax +44 (0)1256 882182
  3933.        Email isl@isl.co.uk
  3934.  
  3935.    In North America, contact:
  3936.        Computable Functions, Inc., 35 South Orchard Drive,
  3937.        Amherst, MA 01002.
  3938.        Call 413-253-7637, fax 413-545-1249.
  3939.  
  3940. Procyon Common Lisp:
  3941.  
  3942.    Procyon Common Lisp runs on either the Apple Macintosh or IBM PC (386/486
  3943.    or OS/2 native mode), costing 450 pounds sterling ($675) educational,
  3944.    1500 pounds ($2250) commercial. It requires 2.5mb RAM on the Macintosh
  3945.    and 4mb RAM on PCs (4mb and more than 4mb recommended respectively).  It
  3946.    is a full graphical environment, and includes a native CLOS with
  3947.    meta-object protocol, incremental compilation, foreign function
  3948.    interface, object inspector, text and structure editors, and debugger.
  3949.    Write to: Scientia Ltd., St. John's Innovation Centre, Cowley Road,
  3950.    Cambridge, CB4 4WS, UK, with phone +44-223-421221, fax +44-223-421218.
  3951.    E-mail: 100142.341@compuserve.com.
  3952.    [NOTE: The rights to the MS Windows version of Procyon were sold to
  3953.     Franz who are marketing and developing it as Allegro CL\PC. See
  3954.     Allegro's entry for more information. The MS Windows version of
  3955.     Procyon is no longer available from Scientia. Expertelligence no
  3956.     longer distributes any version of Procyon.]
  3957.  
  3958. Software Engineer:
  3959.  
  3960.    Software Engineer 2.1 is a Lisp for Windows that creates small
  3961.    stand-alone executables (no royalties or run-time libraries required).
  3962.    It is a subset of Common Lisp, but includes CLOS. Supports DDE and
  3963.    Windows API calls. It requires 2mb RAM, but can use up to 16mb of
  3964.    memory, generating 286/386 specific code. It costs $350.  Write to:
  3965.    Raindrop Software, 833 Arapaho Road, Suite 104, Richardson, TX 75081,
  3966.    call 214-234-2611, fax 214-234-2674, or send email to
  3967.    70632.3126@compuserve.com.
  3968.  
  3969. Star Sapphire Common LISP:
  3970.  
  3971.    Star Sapphire Common LISP 3.4 provides a subset of Common Lisp and
  3972.    includes an emacs-like editor, compiler, debugger, DOS graphics and
  3973.    CLOS. It runs on IBM PCs (MSDOS or Windows), requires 640k RAM, a hard
  3974.    disk, and costs $100.  Write to: Sapiens Software Corporation, 
  3975.    PO Box 3365, Santa Cruz, CA 95063-3365, call 408-458-1990, 
  3976.    fax 408-425-0905/9220.  Copies may also be ordered from the Programmers'
  3977.    Shop at 800-421-8006.  Sapiens Software also has a Lisp-to-C
  3978.    translator in beta-test.
  3979.  
  3980. Top Level Common Lisp:
  3981.  
  3982.    Top Level Common Lisp includes futures, a debugger, tracer, stepper,
  3983.    foreign function interface and object inspector.  It runs on Unix
  3984.    platforms, requiring 8mb RAM, and costs $687.  Write to: Top Level,
  3985.    100 University Drive, Amherst, MA 01002, call (413) 549-4455, or fax
  3986.    (413) 549-4910.
  3987.  
  3988. Lisps which run on special-purpose hardware (Lisp Machines) include
  3989.  
  3990.    o  Symbolics           1-800-394-5522 (508-287-1000)   fax 508-287-1092
  3991.       6 Concord Farms, 555 Virginia Road, Concord, MA 01742.
  3992.       In Germany: Symbolics Systemhaus GmbH, Mergenthalerallee 77,
  3993.          65760 Eschborn, (49) 6196-47220, fax (49) 6196-481116.
  3994.       Symbolics Open Genera runs on DEC 3000 Workstations (models 600
  3995.       and 800 APX with the OSF/1 operating system), at a price of $18,500.
  3996.  
  3997.    o  TI Explorers 
  3998.          Texas Instruments Incorporated, Data Systems Group, 
  3999.          P.O. Box 181153 DSG-230, Austin, Texas 78718
  4000.  
  4001.    o  Xerox Interlisp.    See Medley above.
  4002.  
  4003. ----------------------------------------------------------------
  4004. Subject: [4-1a] Lisp to C translators
  4005.  
  4006. Lisp-to-C Translator translates Common Lisp into human-readable ANSI
  4007. C.  Release 3.2 supports such features as CLOS, the condition system,
  4008. Lisp type declaration heeding, and Mac, Windows, and Alpha
  4009. compatibility.  (Release 3.0, introduced in 1992, eliminated the old
  4010. requirement that the garbage collector had to be called explicitly).
  4011. Works with Lucid, Symbolics, Allegro, Harlequin and MCL.  It costs
  4012. $11,995.  Write to: Chestnut Software, Inc., 2 Park Plaza, Suite 205,
  4013. Boston, MA, 02116, call 617-542-9222, fax 617-542-9220, or e-mail Mr.
  4014. Kenneth J. Koocher <ken@chestnut.com>.
  4015.  
  4016. Some Lisp compilers (AKCL, Ibuki) and Scheme compilers (Bigloo,
  4017. Hobbit/SCM, Scheme->C) compile into C.
  4018.  
  4019. ----------------------------------------------------------------
  4020. Subject: [4-2] Scheme Implementations
  4021.  
  4022. Scheme implementations are listed in the Scheme FAQ posting,
  4023.  
  4024. Free Scheme implementations include PC-Scheme, PCS/Geneva, MIT Scheme (aka
  4025. C-Scheme), SCM, Hobbit, Gambit, T, Oaklisp, Elk, Scheme->C, SIOD
  4026. (Scheme in One Defun), XScheme, Fools' Lisp, Scheme48, UMB Scheme,
  4027. VSCM, Pixie Scheme, HELP (a lazy Scheme), Similix, FDU Scheme,
  4028. PseudoScheme, Scheme84 and Scheme88.
  4029.  
  4030. Commercial Scheme implementations include Chez Scheme, MacScheme, and EdScheme.
  4031.  
  4032. Of the free Scheme implementations, the following are implemented in Lisp:  
  4033.  
  4034.    Peter Norvig's book "Paradigms of AI Programming" has a chapters about
  4035.    Scheme interpreters and compilers, both written in Common Lisp. The
  4036.    software from the book is available by anonymous ftp from
  4037.    unix.sri.com:/pub/norvig/ and on disk in Macintosh or DOS format from
  4038.    the publisher, Morgan Kaufmann.  For more information, contact: Morgan
  4039.    Kaufmann, Dept. P1, 2929 Campus Drive, Suite 260, San Mateo CA 94403,
  4040.    or call Toll free tel: (800) 745-7323; FAX: (415) 578-0672
  4041.  
  4042.    PseudoScheme is available free by anonymous ftp from
  4043.       swiss-ftp.ai.mit.edu:/archive/pseudo/pseudo-2-8.tar.Z [18.43.0.152]
  4044.    It is Scheme implemented on top of Common Lisp, and runs in Lucid,
  4045.    Symbolics CL, VAX Lisp under VMS, and Explorer CL. It should be easy
  4046.    to port to other Lisps. It was written by Jonathan Rees
  4047.    (jar@altdorf.ai.mit.edu, jar@cs.cornell.edu). Send mail to
  4048.    info-clscheme-request@mc.lcs.mit.edu to be put on a mailing list for
  4049.    announcements. Conforms to R3RS except for lacking a correct
  4050.    implementation of call/cc. It works by running the Scheme code through
  4051.    a preprocessor, which generates Common Lisp code.
  4052.  
  4053.    Scheme84 is in the public domain, and available by mail from Indiana
  4054.    University. It runs on the VAX in Franz Lisp under either VMS or BSD Unix.
  4055.    To receive a copy, send a tape and return postage to: Scheme84
  4056.    Distribution, Nancy Garrett, c/o Dan Friedman, Department of Computer
  4057.    Science, Indiana University, Bloomington, Indiana. Call 1-812-335-9770
  4058.    or send mail to nlg@indiana.edu for more information. It will also
  4059.    run in Jeff Dalton's port of Franz Lisp to Net/Free/386BSD on 386-like
  4060.    machines.  (See the Lisp FAQ for information on Franz Lisp.)
  4061.  
  4062.    Scheme88 is a re-implementation of Scheme84 to run in Common Lisp. It
  4063.    available by anonymous ftp from
  4064.       rice.edu:/public/scheme88.sh
  4065.    and also from the Scheme Repository.
  4066.  
  4067. ----------------------------------------------------------------
  4068. Subject: [4-4]   Free Implementations of Other Lisp Dialects
  4069.  
  4070. Franz Lisp:
  4071.  
  4072.    [Franz Lisp is a dialect of Lisp that predates Common Lisp. It is
  4073.    very similar to MacLisp. It lacks full lexical scoping.]
  4074.  
  4075.    The official archive site for Franz List Opus 38.92 and 38.93b (the
  4076.    last public domain releases) is
  4077.        ftp.cs.cmu.edu:/user/ai/lang/others/franzlsp/
  4078.    It includes the official version from the ucbvax ftp site before
  4079.    its demise, Barry Schein's port of 38.92, the UC Davis port of 38.92,
  4080.    and Jeff Dalton's port of 38.92 (see below). For more information, 
  4081.    contact ai+franzlsp@cs.cmu.edu.
  4082.  
  4083.    An implementation of (Berkeley) Franz Lisp Opus 38.92 for 386/486
  4084.    machines running NetBSD 0.9 (and possibly also 386BSD and FreeBSD)
  4085.    is available by anonymous ftp from 
  4086.       macbeth.cogsci.ed.ac.uk:/pub/franz-for-NetBSD/
  4087.    The implementation generates C code and hence is quite portable. It
  4088.    has been tested on 68K Suns, VAX 750s, and ICL Perqs running PNX.
  4089.    A reference manual is included in the distribution. For more
  4090.    information, write to Jeff Dalton <J.Dalton@ed.ac.uk>, or see the URL
  4091.       http://www.aiai.ed.ac.uk/~jeff/franz-for-386.html
  4092.  
  4093.    PC LISP is a Lisp interpreter for IBM PCs (MSDOS) available from any
  4094.    site that archives the group comp.binaries.ibm.pc, such as
  4095.       wuarchive.wustl.edu:/mirrors/msdos/lisp/pclisp30.zip 
  4096.    PC-LISP is a Franz LISP dialect and is by no means Common LISP
  4097.    compatible. It is also available directly from the author by sending
  4098.    2 blank UNFORMATTED 360K 48TPI IBM PC diskettes, a mailer and
  4099.    postage to: Peter Ashwood-Smith, 8 Du Muguet, Hull, Quebec, CANADA,
  4100.    J9A-2L8; phone 819-595-9032 (home). Source code is available from the
  4101.    author for $15.
  4102.  
  4103. EuLisp:
  4104.  
  4105.    Feel (Free and Eventually Eulisp) is an initial implementation of the
  4106.    EuLisp language. It can be retrieved by anonymous FTP from
  4107.       ftp.bath.ac.uk:/pub/eulisp/ 
  4108.    as the file feel-0.75.tar.Z. feel-0.75.sun4.Z is the Sparc executable.
  4109.    The EuLisp language definition is in the same directory.  Feel is also
  4110.    available from
  4111.       ftp.gmd.de:/languages/lisp/eulisp/ [129.26.8.84] 
  4112.    It includes an integrated object system, a module system, condition
  4113.    system, and support for parallelism (threads). EuLisp (European
  4114.    Lisp) is sort of like an extended Scheme.  The program is a C-based
  4115.    interpreter, and a bytecode interpreter/compiler will be available
  4116.    sometime soon.  The distribution includes an interface to the PVM
  4117.    library, support for TCP/IP sockets, and libraries for futures, Linda,
  4118.    and CSP.  Feel is known to run on Sun3, Sun4, Stardent Titan, Alliant
  4119.    Concentrix 2800, Orion clippers, DEC VAX, DECstation 3000, Gould
  4120.    UTX/32, and Inmos T800 transputer (using CS-Tools). (All bar the last
  4121.    four have a threads mechanism.) It can run in multi-process mode on
  4122.    the first three machines, and hopefully any other SysV-like machine
  4123.    with shared memory primitives. Porting Feel to new machines is
  4124.    reasonably straightforward. It now also runs on MS-DOS machines.
  4125.    Written by Pete Broadbery <pab@maths.bath.ac.uk>.
  4126.  
  4127.    Apply/Eu2C is an EuLisp->C compiler available from ISST.  Eu2C runs on
  4128.    top of Franz Allegro CL 4.1 and compiles EuLisp-Modules into C source
  4129.    code which then must be compiled by an ANSI C-compiler (currently only
  4130.    GCC is supported).  The Eu2C implementation provides EuLisp 0.99
  4131.    level-0, with the exception of concurrency. Future versions of Eu2C
  4132.    will include a C interface and straight module compilation.  The
  4133.    development of Apply/Eu2C was supported by the German Federal Ministry
  4134.    for Research and Technology (BMFT) within the joint project APPLY. The
  4135.    partners of this project are the Christian Albrechts University Kiel,
  4136.    the Fraunhofer Institute for Software Engineering and Systems
  4137.    Engineering (ISST), the German National Research Center for Computer
  4138.    Science(GMD), and VW-Gedas.  The main goal of APPLY project is to
  4139.    develop a Lisp system which consistently supports the efficient
  4140.    execution of applications and simplifies their integration into
  4141.    current software environments.  Towards that end, ISST is
  4142.    investigating strategies for the compilation of EuLisp-Modules into
  4143.    efficient stand-alone C-Programs. The Eu2C compiler is the first step
  4144.    along this path. Eu2C is available by anonymous ftp from
  4145.    ftp.isst.fhg.de:/APPLY/Distribution/.  Please send bug reports and
  4146.    comments to ulrich.kriegel@isst.fhg.de or ingo.mohr@isst.fhg.de. If
  4147.    you're using Eu2C, please send them a message with "Apply/Eu2C" in the
  4148.    subject line to be added to the mailing list of users.
  4149.  
  4150.    More information about EuLisp may be found in 
  4151.       Lisp and Symbolic Computation 6(1-2), August 1993
  4152.    which was devoted to EuLisp.
  4153.  
  4154. JLISP:
  4155.    jlisp is a lisp interpreter designed to be used as an embedded
  4156.    interpreter and is easily interfaced with C/C++.  jlisp is easily
  4157.    extended. It is available by anonymous ftp from
  4158.       ftp.ee.rochester.edu:/pub/weisberg/jlisp-1.03.tar.gz
  4159.    For more information, write to Jeff Weisberg <weisberg@ee.rochester.edu>
  4160.  
  4161. ----------------------------------------------------------------
  4162. Subject: [4-5]   Commercial Implementations of Other Lisp Dialects
  4163.  
  4164.    Franz Lisp 2.0 runs on the Apple Macintosh, requiring 1mb RAM for the
  4165.    interpreter ($99) and 2.5mb RAM for the compiler ($199).  Student prices
  4166.    are $60 for the interpreter and $110 for the interpreter and compiler.
  4167.    Includes editor and language reference manual. Complete sources are
  4168.    available for $649. The ALJABR symbolic mathematics system costs $249.
  4169.    Write to:  Fort Pond Research, 15 Fort Pond Road, Acton, MA 01720,
  4170.    call 1-508-263-9692, or send mail to order@fpr.com.
  4171.  
  4172.    Le-Lisp includes a compiler, color and graphic output, a debugger, a
  4173.    pretty printer, performance analysis tools, tracing, and incremental
  4174.    execution. Le-Lisp currently runs on Unix, VMS, and Windows 3.1.  Note
  4175.    that Le-Lisp is neither Common Lisp nor Scheme.  Le-Lisp was
  4176.    originally developed in 1980 at Inria, the French national computer
  4177.    science laboratory, by a team led by Jerome Chailloux for work on VLSI
  4178.    design. It was based on several earlier Lisps in the MacLisp family,
  4179.    but was not directly derived from MacLisp.  Le-Lisp enjoyed a large
  4180.    success in the French academic world because it was small, fast, and
  4181.    portable, being based on a abstract machine language called LLM3.  In
  4182.    1983, for example, Le-Lisp ran on Z-80 machines running CP/M. In 1987,
  4183.    Ilog was formed as an offshoot of Inria to commercialize and improve
  4184.    Le-Lisp and several products which had been developed with it,
  4185.    including a portable graphic interface system and an expert system
  4186.    shell.  Since then, Ilog has continued to grow and expand the use of
  4187.    Le-Lisp into industrial markets around the world.  Ilog is the largest
  4188.    European Lisp vendor, and continues to develop new products and
  4189.    markets for Lisp.  In 1992, Ilog released the next major version of
  4190.    Le-Lisp, Le-Lisp version 16.  This version modernizes Le-Lisp for use
  4191.    in the industrial world, adding lexical closures and
  4192.    special-form-based semantics for static analysis, a new object system
  4193.    based on the EuLisp object system (TELOS), an enhanced module system
  4194.    for application production, a conservative GC for integration with C
  4195.    and C++, and compilation to C for portability and efficiency on a wide
  4196.    range of processors.  For pricing and other information, write to
  4197.    ILOG, 2 Avenue Gallieni, BP 85, 94253 Gentilly Cedex, France, call
  4198.    33-1-46-63-66-66, fax 33-1-46-63-15-82, or send email to Jerome
  4199.    Chailloux (chaillou@ilog.fr).
  4200.  
  4201.    CLISP v6.89 is a library of functions which extends the C programming
  4202.    language to include some of the functionality of Lisp. Requires
  4203.    ANSI C. Costs $349 with no run-time fee.
  4204.    Write to Drasch Computer Software, 187 Slade Road, Ashford, CT 06278, 
  4205.    or call or fax 203-429-3817.
  4206.  
  4207.    Two references in Dr. Dobb's journal on Lisp-style libraries for C
  4208.    are: Douglas Chubb, "An Improved Lisp-Style Library for C", Dr. Dobb's
  4209.    Jounral #192, September 1992, and Daniel Ozick, "A Lisp-Style Library
  4210.    for C", Dr. Dobb's Journal #179:36-48, August 1991. Source is available by
  4211.    ftp from various archives, including wuarchive.wustl.edu (MSDOSDDJMAG),
  4212.    or ftp.mv.com:/pub/ddj, or the DDJ Forum on Compuserve.
  4213.  
  4214.    Lily (LIsp LibrarY) is a C++ class library that lets C++ programmers
  4215.    write LISP-style code. Includes some example programs from Winston's
  4216.    Lisp book recoded in Lily. Most or all of chapters 17 (Symbolic
  4217.    Pattern Matching), 18 (Expert Problem Solving), and 23 (Lisp in Lisp)
  4218.    are implemented in the examples. Lily works with GNU G++ (2.4.5) and
  4219.    Turbo C++ for Windows. Lily is available by anonymous ftp from
  4220.      sunsite.unc.edu:/pub/packages/development/libraries/ [152.2.22.81]
  4221.    as lily-0.1.tar.gz. This site is fairly slow; a copy is available from
  4222.    the Lisp Utilities collection. For more information, contact 
  4223.    Roger Sheldon <sheldon@kong.gsfc.nasa.gov>.
  4224.  
  4225.  
  4226. Other Lisps for PCs include: 
  4227.  
  4228.    o  UO-LISP from Calcode Systems, e-mail:calcode!marti@rand.org
  4229.       It comes complete with compiler and interpreter, and is optimised for
  4230.       large programs.  It is Standard LISP, not Common LISP. They are based
  4231.       in Amoroso Place in Venice, CA. 
  4232.  
  4233.    o  LISP/88 v1.0. Gotten from Norell Data Systems, 3400 Wilshire Blvd,
  4234.       Los Angeles, CA 90010, in 1983. They may or may not still exist. 
  4235.  
  4236.    o  IQLisp. Not a Common Lisp but still very good for PCs - you can
  4237.       actually get a lot done in 640K.  The lisp itself runs in less than
  4238.       128K and every cons cell takes only 6 bytes.  Unfortunately that
  4239.       makes the 640K (maybe a little more, but certainly no more than 1M)
  4240.       limit really hard. It has a byte code compiler which costs extra. 
  4241.       This has support for all sorts of PC specific things.
  4242.       It costs $175 w/o compiler, $275 with. 
  4243.       Write to: Integral Quality, Box 31970, Seattle, WA 98103,
  4244.       call Bob Rorschach, (206) 527-2918 or email rfr@franz.com. 
  4245.  
  4246. ----------------------------------------------------------------
  4247. Subject: [4-6] What is Dylan?
  4248.  
  4249. Dylan is a new Object-Oriented Dynamic Language (OODL), based on
  4250. Scheme, CLOS, and Smalltalk.  The purpose of the language is to retain
  4251. the benefits of OODLs and also allow efficient application delivery.
  4252. The design stressed keeping Dylan small and consistent, while allowing
  4253. a high degree of expressiveness. Dylan is consistently object-oriented;
  4254. it is not a procedural language with an object-oriented extension. A
  4255. manual/specification for the language is available from Apple Computer.
  4256. Send email to dylan-manual-request@cambridge.apple.com or write to
  4257. Apple Computer, 1 Main Street, Cambridge, MA 02142.  Include your
  4258. complete address and also a phone number (the phone number is
  4259. especially important for anyone outside the US). Comments on Dylan can
  4260. be sent to the internet mail address dylan-comments@cambridge.apple.com.
  4261.  
  4262. The mailing list info-dylan@cambridge.apple.com is for any and all
  4263. discussions of Dylan, including language design issues, implementation
  4264. issues, marketing issues, syntax issues, etc. The mailing list
  4265. announce-dylan@cambridge.apple.com is for major announcements about
  4266. Dylan, such as the availability of new implementations, new versions
  4267. of the manual, etc.  This mailing list should be *much* lower volume
  4268. than info-dylan.  Everything sent to this list is also sent to
  4269. info-dylan.  The newsgroup comp.lang.dylan is gatewayed to the
  4270. info-dylan mailing list.  
  4271.  
  4272. Send mail to the -request version of the list to be added to it.
  4273. You can also send an email message to majordomo@cambridge.apple.com
  4274. with "subscribe info-dylan" or "unsubscribe info-dylan" in the body,
  4275. and likewise for the other lists, mutatis mutandis.
  4276.  
  4277. Apple hasn't announced plans to release Dylan as a product.  
  4278.  
  4279. The directory cambridge.apple.com:pub/dylan contains some documents
  4280. pertaining to Dylan, including a FAQ list.
  4281.  
  4282. ======== THOMAS ========
  4283.  
  4284. Thomas is a compiler for a language that is compatible with the
  4285. language described in the book "Dylan(TM) an object-oriented dynamic
  4286. language" by Apple Computer Eastern Research and Technology, April
  4287. 1992. Thomas was written at Digital Equipment Corporation's Cambridge
  4288. Research Laboratory. Thomas is NOT Dylan(TM) and was built with no
  4289. direct input, aid, assistance or discussion with Apple.
  4290.  
  4291. Thomas is available to the public by anonymous ftp at
  4292.        crl.dec.com:/pub/DEC/Thomas
  4293.        gatekeeper.pa.dec.com:/pub/DEC/Thomas
  4294.        swiss-ftp.ai.mit.edu:/archive/Thomas
  4295.  
  4296. The Thomas system is written in Scheme and runs under MIT's CScheme,
  4297. DEC's Scheme->C, and Marc Feeley's Gambit.  It can run on a wide range
  4298. of machines including the Macintosh, PC compatibles, Vax, MIPS, Alpha,
  4299. and 680x0.  Thomas generates IEEE compatible Scheme code.
  4300.  
  4301. A ready-made version of Thomas 1.1 interpreter built upon MacGambit
  4302. 2.0 as a double-clickable Macintosh application is available by
  4303. anonymous ftp from cambridge.apple.com:/pub/dylan/gambit/ as
  4304. the file thomas-1.1-interp.hqx.
  4305.  
  4306. For discussion of Thomas, send a note to
  4307.    info-thomas-request@crl.dec.com 
  4308. to be added to the mailing list. 
  4309.  
  4310. DEC CRL's goals in building Thomas were to learn about Dylan by
  4311. building an implementation, and to build a system they could use to
  4312. write small Dylan programs. As such, Thomas has no optimizations of
  4313. any kind and does not perform well. 
  4314.  
  4315. The original development team consisted of:
  4316.           Matt Birkholz (Birkholz@crl.dec.com)
  4317.           Jim Miller (JMiller@crl.dec.com)
  4318.           Ron Weiss (RWeiss@crl.dec.com)
  4319. In addition, Joel Bartlett (Bartlett@wrl.dec.com), Marc Feeley
  4320. (Feeley@iro.umontreal.ca), Guillermo Rozas (Jinx@zurich.ai.mit.edu)
  4321. and Ralph Swick (Swick@crl.dec.com) contributed time and energy to the
  4322. initial release.
  4323.  
  4324. ======== Marlais ========
  4325.  
  4326. Marlais is a simple interpreter for a language strongly resembling
  4327. Dylan. It is available by anonymous ftp from
  4328.    ftp.cis.ufl.edu:/pub/Marlais
  4329.    cambridge.apple.com:/pub/dylan/Marlais
  4330.    travis.csd.harris.com:/pub/ 
  4331. Currently runs on i386 and i486 (OS/2 or Linux), IBM PC/RT, IBM
  4332. RS/6000, HP9000/300, HP9000/700, DECstations (Ultrix), SGI (IRIX),
  4333. Sony News, Apple Macintosh (A/UX), Sun3, Sun4, Vax (4.3bsd and
  4334. ultrix), m88k (Harris Nighthawk running CX/UX), MIPS M/120, Sequent
  4335. Symmetry, Encore Multimax.  Contact Joe Wilson <jnw@cis.ufl.edu> or
  4336. Brent Benson <brent@ssd.csd.harris.com> for more information.
  4337.  
  4338. ================
  4339.  
  4340. The Gwydion Project at CMU is developing an innovative new software
  4341. development environment based on the Dylan language (and, in the
  4342. process, will make available a very high-quality implementation of
  4343. Dylan). This project includes many of the same people responsible for
  4344. CMU Common Lisp. (In Welsh mythology, Gwydion is the uncle of Dylan
  4345. and nephew of Math.) A Mosaic page describing the project goals, how
  4346. they fit in with the Dylan language, and copies of the Dylan language
  4347. manual and latest approved design notes is available as
  4348.    http://legend.gwydion.cs.cmu.edu:8001/gwydion/
  4349. For more information, write to gwydion-group@cs.cmu.edu.
  4350.  
  4351. Mindy (Mindy Is Not Dylan Yet) is a Dylan-like language from the
  4352. Gwydion Project. Mindy is intended for use as a development tool while
  4353. work on the "real" high-performance Dylan implementation progresses.
  4354. Mindy is available by anonymouse ftp from legend.gwydion.cs.cmu.edu as
  4355. the file /afs/cs.cmu.edu/project/gwydion/release/mindy.tar.gz.
  4356. Send bug reports to gwydion-bugs@cs.cmu.edu; support will be minimal.
  4357.  
  4358. ----------------------------------------------------------------
  4359. Subject: [4-7] What is Pearl Common Lisp?
  4360.  
  4361. When Apple Computer acquired Coral Software in January 1989, they
  4362. re-released Coral's Allegro Common Lisp and its optional modules as
  4363. Macintosh Allegro Common Lisp (now just Macintosh Common Lisp).
  4364. Coral's other product, Pearl Lisp, was discontinued at that time.
  4365. Pearl Lisp provides a subset of the functionality of MACL 1.3 and is
  4366. not even fully CLtL1-compatible (e.g., the implementation of defstruct is
  4367. different).
  4368.  
  4369. Despite rumors to the contrary, Pearl Lisp is not and never was public
  4370. domain. Nevertheless, Pearl Lisp and its documentation were placed in
  4371. the "Moof:Goodies:Pearl Lisp" folder on the first pressing of "Phil
  4372. and Dave's Excellent CD", the precursor to the current Apple
  4373. Developer's CD-ROM series.  Apple removed Pearl from later versions of
  4374. the developer CD-ROM distribution because of complaints from other
  4375. Lisp vendors. If you own a copy of Pearl Lisp or a copy of this
  4376. CD-ROM, you can make it runnable under System 7 with some slight
  4377. modifications using ResEdit.  To repeat, Pearl Lisp is NOT public
  4378. domain, so you must own a copy to use it.
  4379.  
  4380. To make it runnable, one needs to use ResEdit to make changes to the
  4381. BNDL and FREF resources so that it will connect to its icons properly.
  4382. This will make it respond to double-clicks in the normal manner and
  4383. make it be properly linked to its files. Detailed instructions for
  4384. modifying Pearl Lisp using ResEdit may be obtained from the Lisp
  4385. Utilities Repository by anonymous ftp from 
  4386.    ftp.cs.cmu.edu:/user/ai/lang/lisp/impl/pearl/ 
  4387. as the file pearl.txt.
  4388.  
  4389. After you've made the changes, it will run under System 7 on 68000s
  4390. and 68030s if you turn off 32-bit addressing. It seems to bomb on a
  4391. Quadra.
  4392.  
  4393. If you need a more powerful Lisp or one that is compatible with the
  4394. standard for Common Lisp, consider purchasing Macintosh Common Lisp.
  4395.  
  4396. ----------------------------------------------------------------
  4397. Subject: [4-9] What Lisp-related discussion groups and mailing lists exist?
  4398.      
  4399. Before posting to any discussion group, please read the rest
  4400. of this FAQ, to make sure your question isn't already answered. 
  4401.  
  4402. Scheme-related mailing lists and newsgroups are listed in the Scheme
  4403. FAQ, and AI-related mailing lists and newsgroups are listed in the AI FAQ.
  4404.      
  4405. First of all, there are several Lisp-related newsgroups:
  4406.    comp.lang.lisp          General Lisp-related discussions.
  4407.                            See below for archive information.
  4408.  
  4409.    comp.lang.clos          Discussion related to CLOS, PCL, and
  4410.                            object-oriented programming in Lisp.
  4411.                            Gatewayed to commonloops@cis.ohio-state.edu.
  4412.                            (or equivalently, comp.lang.clos@cis.ohio-state.edu)
  4413.                            See below for info on the newsgroup's archives.
  4414.  
  4415.    comp.org.lisp-users     Discussions related to Association of Lisp Users.
  4416.                            Gatewayed to the ALU mailing list. This is an
  4417.                            organizational mailing list/newsgroup, not a 
  4418.                            technical forum.
  4419.  
  4420.    comp.std.lisp           For discussion of emerging standards for
  4421.                            the Lisp language, including "de facto" standards.
  4422.                Moderated by Brad Miller <miller@cs.rochester.edu>.
  4423.                            Submissions should be sent to 
  4424.                              lisp-standards@cs.rochester.edu
  4425.                            Archived on
  4426.                              ftp.cs.rochester.edu:/pub/archives/lisp-standards/
  4427.                            Gatewayed to a mailing list (send mail to
  4428.                            lisp-standards-request@cs.rochester.edu to join).
  4429.  
  4430.    comp.lang.lisp.mcl      Discussions related to Macintosh
  4431.                            Common Lisp. This newsgroup is gatewayed
  4432.                            to the info-mcl@cambridge.apple.com
  4433.                            mailing list and archived on cambridge.apple.com.
  4434.  
  4435.    comp.lang.lisp.franz    Discussion of Franz Lisp, a dialect of Lisp.
  4436.                            (Note: *not* Franz Inc's Allegro.)
  4437.  
  4438.    comp.lang.lisp.x        Discussion of XLISP, a dialect of Lisp, and XScheme.
  4439.  
  4440.    comp.sys.xerox          Discussions related to using Medley (name exists
  4441.                            for historical reasons, and is likely to change
  4442.                            soon). Gatewayed to the info-1100 mailing list.
  4443.  
  4444.    comp.sys.ti.explorer       TI Explorers Lisp machines.
  4445.  
  4446.    comp.windows.garnet     Garnet, a Lisp-based GUI.
  4447.  
  4448.    comp.ai and subgroups   General AI-related dicusssion.
  4449.  
  4450.  
  4451. The newsgroup comp.lang.lisp is archived on 
  4452.    ftp.gmd.de:/usenet/comp.lang.lisp/ [129.26.8.84]
  4453. by month, from 1989 onward. Individual files are in rnews
  4454. format. (They contain articles prefixed by a header line "#! rnews
  4455. <nchars> archive" where <nchars> is the number of characters in the
  4456. article following the header. That format is convenient for various
  4457. news processing programs (e.g.  relaynews) and is rather easy to
  4458. process from a lisp program too.)  A copy of the GMD archives for
  4459. comp.lang.lisp is available on cambridge.apple.com:/pub/comp.lang.lisp/.
  4460.  
  4461.  
  4462. We list several mailing lists below. In general, to be added to
  4463. a mailing list, send mail to the "-request" version of the address.
  4464. This avoids flooding the mailing list with annoying and trivial
  4465. administrative requests. [To subscribe to info-mcl, info-dylan, or
  4466. other mailing lists based at cambridge.apple.com, send a message to
  4467. majordomo@cambridge.apple.com with "subscribe <list_name>" in the
  4468. message body. Likewise use "unsubscribe <list_name>" to cancel your
  4469. subscription and "help" to get help.]
  4470.  
  4471. General Lisp Mailing Lists:
  4472.  
  4473.    common-lisp@ai.sri.com          Technical discussion of Common Lisp.
  4474.    lisp-utilities@cs.cmu.edu       Low volume moderated mailing list
  4475.                    associated with the Lisp Utilities 
  4476.                    Repository at CMU. (Also known as
  4477.                                    cl-utilities@cs.cmu.edu)
  4478.    lisp-faq@think.com              A mailing list concerning the contents
  4479.                                    of this FAQ posting only.
  4480.  
  4481.    alu@freud.arc.nasa.gov       Forum for use by members (current
  4482.                                    and prospective) of the Association
  4483.                                    of Lisp Users. It is bidirectionally
  4484.                                    gatewayed into the newsgroup
  4485.                                    comp.org.lisp-users. This is an
  4486.                                    organizational mailing list, 
  4487.                                    not a technical forum.
  4488.  
  4489. Particular Flavors of Lisp:
  4490.  
  4491.    info-mcl@cambridge.apple.com    Macintosh Common Lisp. Gatewayed
  4492.                                    to the comp.lang.lisp.mcl newsgroup.
  4493.    info-mcl-digest@cambridge.apple.com  Automatically generated digest format
  4494.                        version of the info-mcl mailing list.
  4495.  
  4496.    cmucl-bugs@cs.cmu.edu           CMU Common Lisp bug reports
  4497.  
  4498.    slug@ai.sri.com                 Symbolics Lisp Users Group
  4499.                    Archived on warbucks.ai.sri.com and 
  4500.                                    ftp.ai.sri.com:/pub/slug.
  4501.  
  4502.    allegro-cl@cs.berkeley.edu      Franz Allegro Common Lisp
  4503.  
  4504.    amiga-lisp@contessa.phone.net   Lisp on the Amiga
  4505.  
  4506.    kcl@cli.com                     Kyoto Common Lisp 
  4507.                                    Archived in ftp.cli.com:/pub/kcl/kcl-mail-archive
  4508.    kcl@rascal.ics.utexas.edu       Forwards to kcl@cli.com.
  4509.  
  4510.    lispworks@harlqn.co.uk          LispWorks
  4511.  
  4512.    clisp-list@ma2s2.mathematik.uni-karlsruhe.de   CLISP
  4513.     To subscribe, send mail to listserv@ma2s2.mathematik.uni-karlsruhe.de
  4514.     with "subscribe clisp-list <your full name>" in the message body.
  4515.         Use "help" to get a help message back and "unsubscribe clisp-list"
  4516.         to remove yourself from the list.
  4517.  
  4518.    info-ti-explorer@sumex-aim.stanford.edu  TI Explorer Lisp Machine
  4519.    bug-ti-explorer@sumex-aim.stanford.edu  TI Explorer Lisp Machine
  4520.  
  4521.    info-1100@cis.ohio-state.edu    Xerox/Envos Lisp machine environment,
  4522.                                    InterLisp-D, and Medley. Gatewayed to
  4523.                                    the newsgroup comp.sys.xerox. Will be
  4524.                                    moving to info-1100@anzus.com.
  4525.  
  4526.    franz-friends@cs.berkeley.edu   The Franz Lisp Language.
  4527.    franz-composers@cs.berkeley.edu Maintainers of Franz Lisp.
  4528.  
  4529. Lisp Windowing Systems:
  4530.  
  4531.    cl-windows@ai.sri.com           Common Lisp Window System Discussions.
  4532.    bug-clx@expo.lcs.mit.edu        CLX (Common Lisp X Windows)
  4533.    clim@bbn.com                    Common Lisp Interface Manager
  4534.    clue-review@dsg.csc.ti.com      Common Lisp User-Interface Environment
  4535.    express-windows@cs.cmu.edu      Express Windows
  4536.    garnet-users@cs.cmu.edu         Garnet (send mail to garnet@cs.cmu.edu
  4537.                                    or garnet-request@cs.cmu.edu to be added)
  4538.    gina-users@gmd.de               GINA and CLM
  4539.    lispworks@harlequin.co.uk       LispWorks 
  4540.    winterp@netcom.com           WINTERP (OSF/Motif Widget INTERPreter)
  4541.    yyonx@csrl.aoyama.ac.jp         YYonX
  4542.  
  4543. Lisp Object-Oriented Programming:
  4544.    
  4545.    CommonLoops@cis.ohio-state.edu  (same as comp.lang.clos@cis.ohio-state.edu)
  4546.       Discussion related to CLOS, PCL, and object-oriented programming
  4547.       in Lisp.  The name is in honor of the first freely-available
  4548.       implementation of CLOS, Xerox PARC's Portable Common Loops, and
  4549.       was originally the mailing list for discussing that
  4550.       implementation.  Now gatewayed to the comp.lang.clos newsgroup.
  4551.       The mailing list is archived on nervous.cis.ohio-state.edu in
  4552.       the directory pub/lispusers/commonloops.  
  4553.       The CLOS code repository is in pub/lispusers/clos.
  4554.  
  4555. Miscellaneous:
  4556.  
  4557.    stat-lisp-news-request@umnstat.stat.umn.edu     
  4558.            Use of Lisp and Lisp-based systems in statistics. 
  4559.    Lisp-Jobs@cis.ohio-state.edu
  4560.     Job offers requiring a knowledge of Lisp. See [1-7].
  4561.  
  4562. Electronic Journals:
  4563.  
  4564.   Electronic Journal of Functional and Logic Programming (EJFLP)
  4565.  
  4566.      EJFLP is a refereed journal that will be distributed for free via e-mail.
  4567.      The aim of EJFLP is to create a new medium for research investigating the
  4568.      integration of the functional, logic and constraint programming paradigms.
  4569.  
  4570.      For instructions on submitting a paper, send an empty mail message with 
  4571.     Subject: Help
  4572.      to
  4573.         submissions@ls5.informatik.uni-dortmund.de. 
  4574.      You will receive an acknowledgment of your submission within a few hours.
  4575.  
  4576.      To subscribe to the journal, send an empty mail message to 
  4577.          subscriptions@ls5.informatik.uni-dortmund.de
  4578.      You will receive an acknowledgment of your subscription within
  4579.      a few days. 
  4580.  
  4581.      If there are any problems with the mail-server, send mail to
  4582.      ejflp.op@ls5.informatik.uni-dortmund.de. 
  4583.  
  4584.      The editorial board is: Rita Loogen (RWTH Aachen), Herbert Kuchen (RWTH
  4585.      Aachen), Michael Hanus (MPI-Saarbruecken), Manuel MT Chakravarty (TU
  4586.      Berlin), Martin Koehler (Imperial College London), Yike Guo (Imperial
  4587.      College London), Mario Rodriguez-Artalejo (Univ. Madrid), Andy Krall
  4588.      (TU Wien), Andy Mueck (LMU Muenchen), Tetsuo Ida (Univ. Tsukuba,
  4589.      Japan), Hendrik C.R. Lock (IBM Heidelberg), Andreas Hallmann (Univ.
  4590.      Dortmund), Peter Padawitz (Univ. Dortmund), Christoph Brzoska (Univ.
  4591.      Karlsruhe).
  4592.  
  4593.      
  4594. ----------------------------------------------------------------
  4595. Subject: [4-10] Where can I get a copy of the ANSI Common Lisp standard?
  4596.                 What is ISO Lisp?
  4597.  
  4598. As of December 8, 1994, Common Lisp is now an official ANSI Standard:
  4599. ANSI X3.226:1994 American National Standard for Programming Language
  4600. Common LISP (X3J13).
  4601.  
  4602. The standard will be available from ANSI sometime after June 1995.
  4603. Until then, hard copies of the draft standard may be purchased from
  4604. Global Engineering Documents, Inc., 2805 McGaw Avenue, Irvine, CA
  4605. 92714, 1-800-854-7179, 714-261-1455 for a single copy price of $80
  4606. ($104 international).
  4607.  
  4608. Copies of the TeX sources and Unix-compressed DVI files for the draft
  4609. standard may be obtained by anonymous FTP from 
  4610.    parcftp.xerox.com:/pub/cl/ [13.1.64.94]
  4611. The files corresponding to the second Public Review of Common Lisp are
  4612. in the directory /pub/cl/dpANS2/*. These files correspond to draft
  4613. 14.10, also known as document X3J13/93-102, which was forwarded by
  4614. X3J13 to X3 in October, 1993. (The files from the first draft are in
  4615. the directory /pub/cl/document/*.) The draft is about 1500 pages long.
  4616. The file Reviewer-Notes.text should be read before ftping the other files.
  4617.  
  4618. For more information, write to X3 Secretariat, Attn: Lynn Barra, 1250
  4619. Eye Street NW, Suite 200, Washington, DC 20005-3922, call
  4620. 202-626-5738, fax 202-638-4922, or send email to x3sec@itic.nw.dc.us.
  4621.  
  4622.  
  4623. The international working group on Lisp is ISO/IEC JTC1/SC22/WG16.
  4624. Christian Queinnec (Christian.Queinnec@inria.fr) is the WG16 Convenor.
  4625. Kent Pitman (kmp@harlequin.com) is the International Representative of 
  4626. X3J13 to WG16 and is also Project Editor for WG16. WG16 is working on
  4627. the design of a dialect of Lisp called ISLISP (which is neither a 
  4628. subset nor a superset of Common Lisp).  A Committee Draft (CD) of
  4629. the ISLISP specification has been registered by WG16 as ``CD13816: 
  4630. Information Technology - Programming languages, their environments and
  4631. system software interfaces - Programming language ISLISP.''  The CD, 
  4632. which WG16 internally refers to as version 11.4, is available by 
  4633. anonymous FTP from 
  4634.    ma2s2.mathematik.uni-karlsruhe.de:/pub/lisp/islisp/  [129.13.115.2]
  4635. as the file islisp-114.ps or islisp-114.ps.Z. 
  4636. A WG16 letter ballot is presently in progress to determine whether this
  4637. Committee Draft will become a Draft International Standard (DIS); the 
  4638. ballot closes 30-Nov-94.
  4639.  
  4640. ----------------------------------------------------------------
  4641.  
  4642. ;;; *EOF*
  4643.  
  4644.  
  4645. Archive-name: lisp-faq/part5
  4646. Last-Modified: Wed Mar  8 16:59:51 1995 by Mark Kantrowitz
  4647. Version: 1.52
  4648. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  4649. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  4650. Size: 28360 bytes, 593 lines
  4651.  
  4652. ;;; ****************************************************************
  4653. ;;; Answers to Frequently Asked Questions about Lisp ***************
  4654. ;;; ****************************************************************
  4655. ;;; Written by Mark Kantrowitz and Barry Margolin
  4656. ;;; lisp_5.faq
  4657.  
  4658. This post contains Part 5 of the Lisp FAQ. It is cross-posted to the
  4659. newsgroup comp.lang.clos because it contains material of interest to
  4660. people concerned with CLOS, PCL and object-oriented programming in
  4661. Lisp. The other parts of the Lisp FAQ are posted only to the
  4662. newsgroups comp.lang.lisp and news.answers.
  4663.  
  4664. If you think of questions that are appropriate for this FAQ, or would
  4665. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  4666.  
  4667. CLOS/PCL Questions (Part 5):
  4668.  
  4669.   [5-0]   What is CLOS (PCL) and where can I get it?
  4670.           How do you pronounce CLOS? What is the Meta-Object Protocol (MOP)?
  4671.   [5-1]   What documentation is available about object-oriented
  4672.           programming in Lisp?  
  4673.   [5-2]   How do I write a function that can access defstruct slots by
  4674.           name?  I would like to write something like 
  4675.           (STRUCTURE-SLOT <object> '<slot-name>).   
  4676.   [5-3]   How can I list all the CLOS instances in a class?
  4677.   [5-4]   How can I store data and CLOS instances (with possibly circular
  4678.           references) on disk so that they may be retrieved at some later
  4679.           time? (Persistent Object Storage)
  4680.   [5-5]   Given the name of a class, how can I get the names of its slots?
  4681.   [5-6]   Free CLOS software.
  4682.   [5-7]   Common CLOS Blunders
  4683.  
  4684. Search for \[#\] to get to question number # quickly.
  4685.  
  4686. In general, questions about object oriented programming in Lisp,
  4687. especially questions about using CLOS or compiling PCL, should be
  4688. directed to the newsgroup comp.lang.clos.
  4689.  
  4690. ----------------------------------------------------------------
  4691. Subject: [5-0]  What is CLOS (PCL) and where can I get it?
  4692.                 How do you pronounce CLOS?
  4693.  
  4694. CLOS (Common Lisp Object System) is the object-oriented programming
  4695. standard for Common Lisp. It is the successor to Symbolics FLAVORS and
  4696. Xerox LOOPS (Lisp Object Oriented Programming System). The acronym
  4697. CLOS is pronouned either as "See-Loss" or "Closs", depending on taste.
  4698. PCL (Portable Common Loops) is a portable CLOS implementation, and is
  4699. available by anonymous ftp from 
  4700.    parcftp.xerox.com:/pub/pcl/ [13.1.64.94]
  4701. Also in the same directory are sources for CLX R5 and an inspecter.
  4702.  
  4703. Most Common Lisp implementations now include their own CLOS
  4704. implementations. Common Lisp implementations with native CLOS include:
  4705. MCL, {A}KCL, Allegro CL (including Allegro CL\PC), Ibuki, Lucid,
  4706. Medley, Symbolics Genera, CLOE, and Harlequin LispWorks. CMU CL uses a
  4707. customized version of PCL as their CLOS. However, not all native CLOS
  4708. implementations have as detailed a meta-object protocol as PCL. For
  4709. example, MCL 2.0 users sometimes use the july-1d version of PCL
  4710. instead of the native CLOS for precisely this reason.
  4711.  
  4712. The book ``The Art of the Metaobject Protocol'' (see below) includes
  4713. the CLOS Metaobject Protocol specification as chapters 5 and 6.  The
  4714. sources for the MOP spec itself are available from 
  4715.    parcftp.xerox.com:/pub/pcl/mop/ [13.1.64.94]
  4716. as the file spec.tar.Z, but this is no substitute for buying the
  4717. book, since the book contains a lot of useful explanatory material
  4718. beyond the spec. The Closette files related to the book are also
  4719. available from parcftp as the file closette.lisp.
  4720.  
  4721. The CLOS code repository is available by anonymous ftp to
  4722.    nervous.cis.ohio-state.edu:/pub/lispusers/clos/ [128.146.61.200] 
  4723. If you've got code you'd like to add to the repository, send mail to
  4724. Arun Welch, commonloops-request@cis.ohio-state.edu. 
  4725.  
  4726. ----------------------------------------------------------------
  4727. Subject: [5-1] What documentation is available about object-oriented
  4728.                programming in Lisp? 
  4729.  
  4730. Books about object-oriented programming in Lisp include:
  4731.  
  4732.    1. dpANS CL describes the entire Common Lisp language, which includes the
  4733.       CLOS standard.  Informally, CLtL2 can also be used to learn about CLOS, 
  4734.       but please remember that CLtL2 is not an official X3J13 committee
  4735.       document. (The presentation of CLtL2 differs from that of the draft
  4736.       proposed standard, and some matters of fact have changed in the proposed
  4737.       standard since the publication of CLtL2.)
  4738.  
  4739.    2. Sonya E. Keene
  4740.       "Object-Oriented Programming in Common Lisp: 
  4741.        A Programmer's Guide to CLOS"
  4742.       Addison-Wesley (Reading, MA), 1989. 266 pages. ISBN 0-201-17589-4.
  4743.            Tutorial introduction to CLOS with many examples and
  4744.            a lot of good advice for designing large programs using CLOS.
  4745.  
  4746.    3. Jo A. Lawless and Molly M. Miller.
  4747.       "Understanding CLOS: the Common Lisp Object System"
  4748.       Digital Press, 1991. 192 pages.
  4749.  
  4750.    4. Gregor Kiczales, Jim des Rivieres, and Daniel G. Bobrow.
  4751.       "The Art of the Metaobject Protocol"
  4752.       MIT Press, 1991. 335 pages. ISBN 0-262-61074-4, $34.95.
  4753.            The first part of the book presents a model CLOS implementation,
  4754.            introduces the basic principles of metaobject protocols, and 
  4755.            works through the key elements of the CLOS Metaobject Protocol.
  4756.            The second half is the detailed specification of the CLOS
  4757.            Metaobject Protocol. A simple working interpreter suitable
  4758.            for experimentation is contained in an appendix.
  4759.  
  4760.    5. Robert R. Kessler and Amy R. Petajan.
  4761.       "LISP, Objects, and Symbolic Programming"
  4762.       Scott, Foresman and Company (Glenview, IL), 1988. 644 pages.
  4763.            Includes a small Lisp compiler.
  4764.  
  4765.    6. A short introduction to CLOS written by Jeff Dalton of the
  4766.       University of Edinburgh <J.Dalton@ed.ac.uk> is available by
  4767.       anonymous ftp from  
  4768.          aiai.ed.ac.uk:/lisp/random [192.41.104.6]
  4769.       as the file clos-guide.
  4770.  
  4771.    7. Andreas Paepcke, editor.
  4772.       "Object-Oriented Programming: The CLOS Perspective"
  4773.       MIT Press, 1993. 400 pages, ISBN 0-262-16136-2 ($40).
  4774.          This book is a collection of essays on the following topics:
  4775.            -  Description of CLOS and its design philosophy.
  4776.            -  The Metaobject Protocol and its use.
  4777.            -  Comparison of CLOS with Smalltalk, Eiffel, Sather, and C++.
  4778.            -  CLOS Uses and Methodology. Descriptions of two large CLOS
  4779.               applications (Sun's LispView and a hybrid knowledge
  4780.               representation tool) and an approach to documenting
  4781.               object-oriented protocols (similar to that of AMOP).
  4782.            -  Implementation details. Descriptions of TI CLOS for the
  4783.               Explorer and PCL's method dispatch mechanism.
  4784.  
  4785. ----------------------------------------------------------------
  4786. Subject: [5-2] How can I write a function that can access defstruct slots 
  4787.                by name?  I would like to write something like 
  4788.                (STRUCTURE-SLOT <object> '<slot-name>).
  4789.  
  4790. There is currently no portable, built-in way to access structure slots
  4791. given only the name.  If your Common Lisp includes an implementation
  4792. of CLOS that supports the meta-object protocol specified in the
  4793. original X3J13 draft spec (document X3J13/88-003), then it probably will
  4794. allow (SLOT-VALUE <object> '<slot-name>); however, not all
  4795. implementations of CLOS currently provide this.  Lacking this, some
  4796. implementations may provide implementation-dependent functions that
  4797. allow access to structure slots by name; note that this may cause
  4798. saved images to be larger, as some implementations normally open-code
  4799. structure accessors and discard slot name information.
  4800.  
  4801. While it is not possible to write a fully general STRUCTURE-SLOT function,
  4802. it is not very difficult to write version that handles specific structure
  4803. types.  For instance, after defining:
  4804.  
  4805.    (defstruct spaceship name captain position velocity)
  4806.  
  4807. one may then define:
  4808.  
  4809.    (defun spaceship-slot (spaceship slot-name)
  4810.      (ecase slot-name
  4811.        (name (spaceship-name spaceship))
  4812.        (captain (spaceship-captain spaceship))
  4813.        (position (spaceship-position spaceship))
  4814.        (velocity (spaceship-velocity spaceship))))
  4815.  
  4816. or using CLOS (generic functions):
  4817.  
  4818. (defgeneric spaceship-slot (spaceship slot-name)
  4819.   (:method ((x spaceship) (slot (eql :name)))
  4820.     (spaceship-name x))
  4821.   (:method ((x spaceship) (slot (eql :captain)))
  4822.     (spaceship-captain x))
  4823.   (:method ((x spaceship) (slot (eql :position)))
  4824.     (spaceship-position x))
  4825.   (:method ((x spaceship) (slot (eql :velocity)))
  4826.     (spaceship-velocity x)))
  4827.  
  4828. Another popular way to define this is:
  4829.  
  4830.    (defun spaceship-slot (spaceship slot-name)
  4831.      (funcall (symbol-function
  4832.                 (find-symbol (format nil "SPACESHIP-~A" slot-name)
  4833.                              #.(package-name *package*)))
  4834.               spaceship))
  4835.  
  4836. I personally recommend the first version.  It is likely to be much faster
  4837. and more memory efficient than the second version.  It's also easy to get
  4838. the second one wrong; many people forget to specify the package argument to
  4839. FIND-SYMBOL, which can cause incorrect results when the package at run time
  4840. is different from the one at compile time.  Even my version assumes that
  4841. SPACESHIP-SLOT is being defined in a file that is in the same package as
  4842. the one containing the structure definition; if this isn't the case,
  4843. #.(PACKAGE-NAME *PACKAGE*) should be replaced by a string naming the
  4844. correct package.
  4845.  
  4846. Another workaround is to define a MY-DEFSTRUCT macro that parses the
  4847. defstruct arguments and expands into a call to DEFSTRUCT along with a
  4848. definition of the runtime slot-accessor function.
  4849.  
  4850. Some non-portable techniques include the use of SYSTEM:STRUCTURE-REF
  4851. in Lucid (LCL:STRUCTURE-REF in earlier versions of Lucid) and 
  4852. EXCL:STRUCTURE-REF in Allegro. 
  4853. ----------------------------------------------------------------
  4854. Subject: [5-3] How can I list all the CLOS instances in a class?
  4855.  
  4856. There is no built-in way to enumerate the instances of a class.  If you are
  4857. only interested in listing the instances of classes that you have defined,
  4858. it is not very difficult to implement it as part of your class definition.
  4859. Add a shared slot, e.g. ALL-INSTANCES, with an initial value of NIL, to the
  4860. class definition.  Then write an after-method on INITIALIZE-INSTANCE for
  4861. this class, which pushes the instance being initialized onto ALL-INSTANCES.
  4862. Note that this must be done separately for each class that wants to maintain
  4863. such a list; it can't be encapsulated in a mixin class, because all its
  4864. dependent classes would share the same ALL-INSTANCES slot.  A compromise
  4865. would be to use a mixin to define the INITIALIZE-INSTANCE after-method (and
  4866. any other general-purpose methods that use the slot), but not the shared
  4867. slot; it would be up to the descendant classes to define the slot at the
  4868. level of the class hierarchy that is appropriate. You could also try
  4869. defining the classes that need instance-recording as instances of a
  4870. metaclass that holds the instance registry on the class object. The
  4871. recording behavior could then be built-in to an after method on
  4872. initialize-instance for the root class of the metaclass, or even
  4873. allocate-instance. To allow for garbage collection of old instances,
  4874. you will also need to define a generic function to remove the recorded
  4875. instances from the list of instances.
  4876. ----------------------------------------------------------------
  4877. Subject: [5-4]  How can I store data and CLOS instances (with possibly 
  4878.                 circular references) on disk so that they may be
  4879.                 retrieved at some later time? (Persistent Object Storage)
  4880.  
  4881. There are two approaches to CLOS object persistence. The first uses
  4882. regular CLOS facilities in concert with a standard file system. The
  4883. second uses a more sophisticated storage facility, such as a database.
  4884. The first solution provides just the persistence, and usually cannot
  4885. retrieve only some of the objects from disc. The second goes beyond this
  4886. by providing some or all of the facilities typically associated with
  4887. databases: transaction management, concurrency control, queries,
  4888. selective object materialization, etc. Below, the two solutions are
  4889. addressed in turn.
  4890.  
  4891. There are two main techniques for the file system solution. The first
  4892. involves using #. to compile the data into a file.  The second
  4893. produces an ASCII representation which, when evaluated, will reproduce
  4894. an equivalent set of data.
  4895.  
  4896. If the data you wish to save is stored in the variable *hash-table*,
  4897. create a file containing just the lines
  4898.         (in-package "YOUR-PACKAGE")
  4899.         (setq *hash-table* '#.*hash-table*)
  4900. and compile it. The #. macro performs read-time evaluation of the
  4901. expression following the dot, and so this compiles the data into the
  4902. file. You may then load the file to restore the data. However, the
  4903. resulting binary file is not portable between Lisp implementations,
  4904. and sometimes not even for the same Lisp on different platforms. Also,
  4905. some Lisps will treat the data as constant, and place it on pages in
  4906. memory that are marked read-only (after it is loaded). If one tries to
  4907. later modify the data, these Lisps will signal an error. Lucid CL only
  4908. puts such constants in a read-only area when they appear inside
  4909. functions, so this should be safe. Allegro CL doesn't seem to complain
  4910. about modification if the data is a cons. DEC's VAXLisp, however, has
  4911. problems with #. circular structures in .fas files. MCL seems to work
  4912. well with using #. to save data (and even functions) to a file.
  4913.  
  4914. The other technique is to produce an ASCII representation of the Lisp
  4915. objects which may then be saved to a file. To reproduce the data, one
  4916. can load (or compile and load) the file. This technique is portable
  4917. between different Lisps and platforms. Unfortunately, the resulting
  4918. data is not necessarily EQ to the original. Kerry Koitzsch's
  4919. save-object.lisp package is included in the Lisp Utilities Repository,
  4920.    ftp.cs.cmu.edu:/user/ai/lang/lisp/code/ext/save_obj/
  4921. The Lisp Utilities Repository is described in detail in the answer to
  4922. question [6-1]. 
  4923.  
  4924. See also the discussion of MAKE-LOAD-FORM and MAKE-LOAD-FORM-SAVING-SLOTS 
  4925. in CLtL2.
  4926.  
  4927. Here are some solutions to object persistence that use databases instead
  4928. of file systems.
  4929.  
  4930. Free Persistent Object Storage systems include: 
  4931.  
  4932.    WOOD (William's Object Oriented Database) is a simple persistent
  4933.    object store for MCL 2.0, written by Bill St. Clair
  4934.    <bill@cambridge.apple.com>.  Its goal is to provide a way to
  4935.    save/restore Lisp objects to/from disk.  It is available by anonymous
  4936.    ftp from the MCL repository on cambridge.apple.com:/pub/MCL2/CONTRIB/.
  4937.    Send bug reports to bug-wood@cambridge.apple.com. To be added to the
  4938.    mailing list, send mail to info-wood-request@cambridge.apple.com.
  4939.  
  4940.    PCLOS is a persistent object store for CLOS that was implemented using
  4941.    CLOS's metaobject protocol. It allowed multiple different storage
  4942.    facilities to be used. The benefit of this approach is it lets you use
  4943.    different storage facilities depending on your needs, ranging from a
  4944.    full-blown database with concurrency control and recovery to a very
  4945.    fast store that trades speed for functionality. For example, an
  4946.    in-memory store that saves its state to disk periodically can be much
  4947.    faster than traditional databases, but risks loss of data due to
  4948.    crashes. Unfortunately, PCLOS was built on a very old version of CLOS,
  4949.    so it is unusable in its current form, and there are no plans to
  4950.    update it. The introductory MOP chapter in the book "Object-Oriented
  4951.    Programming: The CLOS Perspective" (see [5-1] above) explains how to
  4952.    do the rewrite in principle and shows how the CLOS MOP was used for
  4953.    object persistence in PCLOS. See also 
  4954.       1. Andreas Paepcke, "PCLOS: A Flexible Implementation of CLOS 
  4955.          Persistence", in Proceedings of ECOOP-88, S. Gjessing and K.
  4956.          Nygaard, editors, Lecture Notes in Computer Science, Springer
  4957.          Verlag, pages 374-389, 1988.  [Explains the PCLOS architecture.]
  4958.       2. Andreas Paepcke, "PCLOS: A Critical Review", in OOPSLA-89, 1989. 
  4959.          [Uses PCLOS as a roadmap through the issues of object persistence.]
  4960.       3. Andreas Paepcke, "PCLOS Reference Manual", Hewlett-Packard
  4961.          Laboratories, December, 1991.
  4962.    For more information about PCLOS, write to Andreas Paepcke
  4963.    <paepcke@parc.xerox.com>. 
  4964.  
  4965.    GBB (see [6-3]) is a blackboard architecture with persistence of a
  4966.    sort. Every object in GBB is held in RAM, and there are dump and
  4967.    restore functions. It handles distributed object delivery and
  4968.    function-call triggering of receiving processes.
  4969.  
  4970. Commercial Persistent Object Storage systems include: 
  4971.  
  4972.    AllegroStore is a high-performance object-oriented database management
  4973.    system from Franz. It offers Allegro CL users persistent object
  4974.    storage with very fast retrieval and update of object data.  It
  4975.    provides query processing and transaction-based operation. Built on a
  4976.    multi-client, multi-server architecture, it permits concurrent access
  4977.    over a network to objects by multiple independent processes.  It uses
  4978.    the ObjectStore ODBMS from Object Design Inc, and thus has both Lisp
  4979.    and C interfaces and is also very fast.  The CLOS interface is based
  4980.    on MOP, with dynamic class/schema modification and redefinition.
  4981.    AllegroStore can handle large-scale applications with minimal impact
  4982.    on performance. It uses page-faulting and page-locking mechanisms
  4983.    instead of object locking, providing high throughput and low overhead
  4984.    for concurrent access by multiple users.  Standard database features
  4985.    include deadlock detection, referential integrity, and inverse
  4986.    functions.  Exception handling is integrated into the Lisp condition
  4987.    system. AllegroStore runs on Sparc, SGI, HP, RS/6000, and
  4988.    MS-Windows/NT systems.  For more information, send email to
  4989.    info@franz.com, write to Franz Inc., 1995 University Avenue, Berkeley,
  4990.    CA 94704, call 1-800-333-7260, 510-548-3600, fax 510-548-8253, or
  4991.    telex 340179 WUPUBTLXSFO.
  4992.  
  4993.    ITASCA ODBMS V2.2 is a distributed active object database management
  4994.    system. ITASCA allows clients to transparently access data that is
  4995.    distributed among multiple servers.  ITASCA supports full dynamic
  4996.    schema modification that can be performed during any phase of the
  4997.    software lifecycle.  Applications written in dissimilar and
  4998.    incompatible languages, such as C/C++ and CLOS, can share objects through
  4999.    ITASCA. ITASCA stores methods inside the database, promoting
  5000.    reusability and maintainability.  ITASCA is based on work at MCC's
  5001.    Object-Oriented and Distributed Systems Lab on the ORION system. For
  5002.    more information, write to Itasca Systems, Inc., 7850 Metro Parkway,
  5003.    Minneapolis, MN 55425, sales@itasca.com, 612-851-3155, fax 612-851-3157.
  5004.    [Clint Hyde has written a MOP CLOS interface to Itasca, which has some
  5005.    features not present in their interface. For a free copy of his source
  5006.    code, send him mail to chyde@bbn.com.]
  5007.  
  5008.    LispWorks (from Harlequin), in addition to providing a traditional
  5009.    SQL-based interface to relational databases, also provides a CLOS/SQL
  5010.    interface, which is an object-oriented access layer that enables SQL
  5011.    data to be manipulated as objects within Lisp, even though those objects
  5012.    are not manifest in the database.  This can be especially useful when
  5013.    importing data from and exporting data to a database provided by another
  5014.    (usually non-Lisp-based) application that already uses a relational
  5015.    database to achieve data persistence.
  5016.  
  5017.    Statice is a commercial product from Symbolics, that provides a
  5018.    powerful persistent ODBMS. It runs on Symbolics Lisp Machines. 
  5019.  
  5020. ----------------------------------------------------------------
  5021. Subject: [5-5] Given the name of a class, how can I get the names
  5022.                of its slots?     
  5023.  
  5024. (defun class-slot-names (class-name)
  5025.   "Given a CLASS-NAME, returns a list of the slots in the class."
  5026.   (mapcar #'clos:slot-definition-name
  5027.           (clos:class-slots (find-class class-name))))
  5028.  
  5029. (defmethod class-slot-names ((instance standard-object))
  5030.   "Given an INSTANCE, returns a list of the slots in the instance's class."
  5031.   (mapcar #'clos:slot-definition-name
  5032.           (clos:class-slots (class-of instance))))
  5033.  
  5034. You can use CLASS-DIRECT-SLOTS instead of CLASS-SLOTS if you don't
  5035. want inherited slots. Note that these functions are from the
  5036. meta-object protocol specified in the original X3J13 draft spec
  5037. (document X3J13/88-003), and may not be supported by all Lisps.
  5038.  
  5039. ----------------------------------------------------------------
  5040. Subject: [5-6] Free CLOS software.
  5041.  
  5042. Software Repositories:
  5043.  
  5044.    The CLOS code repository is available by anonymous ftp to
  5045.    nervous.cis.ohio-state.edu:/pub/lispusers/clos/ [128.146.61.200]
  5046.    If you've got code you'd like to add to the repository, send
  5047.    mail to Arun Welch, commonloops-request@cis.ohio-state.edu.
  5048.    The CLOS code repository includes dag.lisp.Z and 3DGeometry.lisp.
  5049.  
  5050. ----------------------------------------------------------------
  5051. Subject: [5-7] Common CLOS Blunders
  5052.  
  5053. This question is based on a document written by Marty Hall
  5054. <hall@aplcenmp.apl.jhu.edu>. The full text of Marty's
  5055. "Introduction to CLOS" handout is available by anonymous ftp from
  5056.    ftp.cs.cmu.edu:/user/ai/lang/lisp/doc/intro/closintr.tgz
  5057.  
  5058. This question lists a variety of common errors that occur when writing
  5059. CLOS code. It is extremely useful to glance through this list when
  5060. debugging CLOS code.
  5061.  
  5062. [A] Omitting a set of parentheses around the arglist in DEFMETHOD.
  5063.  
  5064.     For example, writing 
  5065.        (defmethod Area (Sq Square) ...)
  5066.     instead of
  5067.        (defmethod Area ((Sq Square)) ...)
  5068.  
  5069.     Lisp will accept the former, and think that you have two
  5070.     unspecialized arguments instead of one argument specialized as a
  5071.     Square. 
  5072.  
  5073. [B] Missing parentheses around the slot definition list in DEFCLASS.
  5074.  
  5075.     For example, writing
  5076.        (defclass Rectangle (Polygon)
  5077.      (Width ...)
  5078.      (Height ...)) 
  5079.     instead of
  5080.        (defclass Rectangle (Polygon)
  5081.      ((Width ...)
  5082.       (Height ...)))
  5083.  
  5084.     Lisp will not accept the former, but the error message doesn't
  5085.     always clearly identify the problem.
  5086.  
  5087. [C] Forgetting to include an empty slot definition list if you don't
  5088.     define local slots in DEFCLASS.
  5089.  
  5090.     For example, writing 
  5091.        (defclass Square (Rectangle)) 
  5092.     instead of
  5093.        (defclass Square (Rectangle) ())
  5094.     Lisp will not accept the former.
  5095.  
  5096. [D] Referring to the class name instead of the instance variable in
  5097.     DEFMETHOD. 
  5098.  
  5099.     For example, writing 
  5100.        (defmethod Area ((Sq Square)) 
  5101.      (* (Width Square) (Width Square))) 
  5102.     instead of
  5103.        (defmethod Area ((Sq Square)) 
  5104.      (* (Width Sq) (Width Sq)))
  5105.  
  5106.     Lisp may give you a warning about an unknown free variable, but
  5107.     probably won't even do that if you type the defmethod directly into
  5108.     the Lisp Listener (Lucid doesn't). So you might not encounter a
  5109.     problem until run-time.
  5110.  
  5111. [E] Forgetting that accessors are functions and thus could conflict
  5112.     with built-in function names.
  5113.  
  5114.     For example, writing
  5115.        (defclass Graphical-Object ()
  5116.      ((Position :accessor Position)))
  5117.     will signal an error, since you cannot redefine the built-in
  5118.     POSITION function.  
  5119.  
  5120. [F] Putting the new value last instead of first in the definition of a 
  5121.     SETF method. 
  5122.  
  5123.     For example, writing 
  5124.        (defmethod (setf Area) ((Sq Square) (New-Area number))
  5125.      (setf (Width Sq) (sqrt New-Area))) 
  5126.     instead of
  5127.        (defmethod (setf Area) ((New-Area number) (Sq Square))
  5128.      (setf (Width Sq) (sqrt New-Area)))
  5129.  
  5130.    Lisp will accept the former, causing users to be later puzzled as
  5131.    to why (setf (Area Square-1) 10) doesn't work.
  5132.  
  5133. [G] Putting the new value last instead of first in a call to a :writer
  5134.     method.  
  5135.  
  5136.     For example, given
  5137.        (defclass Circle () 
  5138.      ((Radius :reader Radius :writer Set-Radius :initform 5)))
  5139.        (setq Circle-1 (make-instance 'Circle))
  5140.     and writing
  5141.        (Set-Radius Circle-1 10)
  5142.     instead of
  5143.        (Set-Radius 10 Circle-1)
  5144.  
  5145. [H] Confusion about documentation strings in DEFMETHOD. 
  5146.  
  5147.     People often write code like
  5148.        (defmethod Area ((Rect Rectangle))
  5149.      "WIDTH times HEIGHT of the rectangle"
  5150.      (* (Width Rect) (Height Rect)))
  5151.     without clearly thinking about what this might mean.  Some people
  5152.     think it will make a documentation string on the generic function that
  5153.     can be retrieved by calling (DOCUMENTATION 'Area 'function) or the
  5154.     equivalent emacs keystrokes. Others vaguely expect it to make a doc
  5155.     string on each separate method, and that the call to DOCUMENTATION
  5156.     will somehow be able to automagically figure out which method it
  5157.     applies to.
  5158.  
  5159.     In fact, Lisp won't complain about this code, with the result that the
  5160.     documentation is added to the method *object*, which beginners
  5161.     probably know nothing about. 
  5162.  
  5163.     Use the :documentation entry in defgeneric to add a documentation
  5164.     string to the generic function.
  5165.  
  5166. [I] Invalid :initargs are accepted by MAKE-INSTANCE.
  5167.  
  5168.     Many Lisp implementations will accept unknown keyword initargs without
  5169.     complaint, even at the highest safety settings. 
  5170.  
  5171.     So the following code, which includes a typo of :SLOT1 instead of
  5172.     :SLOT-1 in the call to make-instance
  5173.        (defclass Foo ()
  5174.     ((Slot-1 :accessor Slot-1 :initarg :Slot-1 :initform 5)))
  5175.  
  5176.        (setq Test (make-instance 'Foo :Slot1 10)) 
  5177.     will not produce an error message, with the result that
  5178.     (Slot-1 Test) returns 5, not 10.
  5179.  
  5180.     This is a bug in the implementation; all implementations are
  5181.     supposed to flag this as an error. 
  5182.  
  5183. [J] Forgetting the class must exist before any method can specialize upon it. 
  5184.  
  5185.     Lisp programmers are used to being able to define functions in any
  5186.     order, where even if FOO calls BAR, FOO can be defined first. But doing
  5187.        (defmethod Area ((Rect Rectangle)) ...)
  5188.        (defclass Rectangle (Polygon) ...)
  5189.     is illegal. You have to define the class first.
  5190.  
  5191.     If while trying to debug the problem, you define the class by
  5192.     evaluating the definition without reordering the code to put the
  5193.     class first, you'll only run into problems later the next time you
  5194.     try to recompile the code from scratch.
  5195.  
  5196.     Many experienced programmers put each class definition in its own
  5197.     file at the top of the file, with methods for that class after it
  5198.     in the file. Others opt to put all the class definitions for a
  5199.     program in a single file that is loaded first, with methods in files
  5200.     that are loaded later.
  5201.  
  5202. [K] Changing a method to apply to a more general class does not
  5203.     supersede previous method. 
  5204.  
  5205.     For example, suppose a user writes
  5206.        (defmethod Half-Area ((Rect Filled-Rectangle))
  5207.      (/ (Area Rect) 2))
  5208.     and then notices that this functionality could apply to all
  5209.     Rectangles, not just Filled-Rectangles. They might then change the
  5210.     class referenced in this method, under the specious intuition that by
  5211.     changing the old defintion, they are replacing it. In fact, they are
  5212.     actually adding a new, less-specific method.
  5213.  
  5214.     Now suppose that later on, they change this new method (in this
  5215.     example, by adding a call to FLOAT to avoid returning a ratio),
  5216.        (defmethod Half-Area ((Rect Rectangle))
  5217.      (float (/ (Area Rect) 2)))
  5218.     If they test it on an instance of Filled-Rectangle, they will be
  5219.     puzzled as to why their new definition appears to have not taken
  5220.     effect. But because the old definition specialized to Filled-Rectangle 
  5221.     still exists, they're actually getting the old, more-specific definition.
  5222.  
  5223.     Moreover, the next time they restart a fresh Lisp and recompile
  5224.     the code, the problem will magicly disappear, since the old
  5225.     definition is no longer in the code. 
  5226.  
  5227. ----------------------------------------------------------------
  5228. ;;; *EOF*
  5229.  
  5230. Archive-name: lisp-faq/part6
  5231. Last-Modified: Tue Jan 31 15:41:50 1995 by Mark Kantrowitz
  5232. Version: 1.52
  5233. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  5234. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  5235. Size: 74887 bytes, 1429 lines
  5236.  
  5237. ;;; ****************************************************************
  5238. ;;; FTP Archives and Other Resources *******************************
  5239. ;;; ****************************************************************
  5240. ;;; Written by Mark Kantrowitz and Barry Margolin
  5241. ;;; lisp_6.faq
  5242.  
  5243. This post contains Part 6 of the Lisp FAQ.
  5244.  
  5245. If you think of questions that are appropriate for this FAQ, or would
  5246. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  5247.  
  5248. Topics Covered (Part 6):
  5249.   [6-0] General information about FTP Resources for Lisp
  5250.   [6-1] Repositories of Lisp Software
  5251.   [6-3] Publicly Redistributable Lisp Software
  5252.   [6-6] Formatting code in LaTeX (WEB and other literate programming tools)
  5253.   [6-7] Where can I get an implementation of Prolog in Lisp?
  5254.   [6-8] World-Wide Web (WWW) Resources
  5255.  
  5256. Search for \[#\] to get to question number # quickly.
  5257.  
  5258. ----------------------------------------------------------------
  5259. Subject: [6-0] General information about FTP Resources for Lisp
  5260.  
  5261. Remember, when ftping compressed or compacted files (.Z, .z, .arc, .fit,
  5262. etc.) to use binary mode for retrieving the files.
  5263.  
  5264. Files that end with a .z suffix were compressed with the patent-free
  5265. gzip (no relation to zip). Source for gzip is available from:
  5266.    prep.ai.mit.edu:/pub/gnu/
  5267. as the files gzip-1.2.3.shar, gzip-1.2.3.tar,or gzip-1.2.3.msdos.exe.
  5268.  
  5269. FTP sites for Lisp and Scheme interpreters and compilers are discussed
  5270. in the answer to questions [4-0] and [4-2] and in the Scheme FAQ. See
  5271. the entry on Macintosh Common Lisp in question [4-1] for information
  5272. on the CD-ROM of Lisp code that Apple distributes with MCL 2.0.
  5273.  
  5274. ----------------------------------------------------------------
  5275. Subject: [6-1] Repositories of Lisp Software
  5276.  
  5277. There are several repositories of publicly redistributable and
  5278. public domain Lisp code. 
  5279.  
  5280. Common Lisp Repository:
  5281.  
  5282.    The Common Lisp Repository is accessible by anonymous ftp to
  5283.       ftp.cs.cmu.edu:/user/ai/lang/lisp/ [128.2.206.173]
  5284.    through the AFS directory
  5285.       /afs/cs.cmu.edu/project/ai-repository/ai/lang/lisp/
  5286.    or by WWW from the URL   
  5287.       http://www.cs.cmu.edu:8001/Web/Groups/AI/html/repository.html
  5288.    and includes more than 250 megabytes of sources, including all
  5289.    freely distributable implementations and many programs. This
  5290.    repository supersedes the Lisp Utilities collection, and is now
  5291.    part of the CMU Artificial Intelligence Repository.
  5292.  
  5293.    Programs in the repository include XREF (portable cross referencing
  5294.    tool for Lisp, similar to the Symbolics Who-Calls and the Xerox
  5295.    MasterScope programs), Brad Miller's initializations package for
  5296.    Allegro CL 4.0, DEFSYSTEM (portable system definition facility, a
  5297.    "Make" for Lisp), a portable implementation of the X3J13 June 1989
  5298.    specification for logical pathnames, METERING (a portable code
  5299.    time/space profiling tool), SOURCE-COMPARE (a portable "diff" utility
  5300.    for Lisp), USER-MANUAL (a program which helps with documenting Lisp
  5301.    code), PSGRAPH (Joe Bates' PostScript DAG grapher), several matchers
  5302.    for Lisp, NREGEX (a regular expressions matcher), a date formatter, an
  5303.    infix reader macro for Lisp, SAVE-OBJECT (Kerry Koitzsch's package to
  5304.    save ASCII representations of Lisp objects to a file), Stephen
  5305.    Nicoud's semi-portable CLtL2 version of defpackage, LALR (Mark
  5306.    Johnson's lisp YACC parser generator), various implementations of the
  5307.    Loop Macro, William Schelter's sloop macro, Frank Ritter and Jim
  5308.    Panagos' implementation of the Yale yloop macro (described in
  5309.    McDermont, Charniak and Riesbeck's AI programming book), all free Lisp
  5310.    GUIs, including Express Windows, the iterate macro, Waters' Series
  5311.    Macro package, Waters' XP Lisp Pretty Printer, Bruno Haible's
  5312.    implementation of the Simplex algorithm, MAPFORMS (Moon's code
  5313.    walker), Brad Miller's resources package, and much much more.
  5314.  
  5315.    The repository has standardized on using 'tar' for producing
  5316.    archives of files and 'gzip' for compression.
  5317.  
  5318.    To search the keyword index by mail, send a message to:
  5319.       ai+query@cs.cmu.edu
  5320.    with one or more lines containing calls to the keys command, such as:
  5321.       keys lisp iteration
  5322.    in the message body.  Keywords may be regular expressions and are
  5323.    compared with the index in a case-insensitive conjunctive fashion.
  5324.    You'll get a response by return mail. Do not include anything else 
  5325.    in the Subject line of the message or in the message body.  For help on
  5326.    the query mail server, include: 
  5327.       help
  5328.    instead. 
  5329.  
  5330.    A Mosaic interface to the keyword searching program is in the
  5331.    works.  We also plan to make the source code (including indexes) to
  5332.    this program available, as soon as it is stable.
  5333.  
  5334.    Most of the Common Lisp Repository appears on Prime Time Freeware
  5335.    for AI, Issue 1-1, a mixed-media book/CD-ROM publication. It
  5336.    includes two ISO-9660 CD-ROMs bound into a 224 page book and sells
  5337.    (list) for US$60 plus applicable sales tax and shipping and handling
  5338.    charges. Payable through Visa, Mastercard, postal money orders in US
  5339.    funds, and checks in US funds drawn on a US bank. For more
  5340.    information write to Prime Time Freeware, 370 Altair Way, Suite 150,
  5341.    Sunnyvale, CA  94086  USA, call 408-433-9662, 408-433-0727 (fax),
  5342.    or send email to ptf@cfcl.com.
  5343.  
  5344.    Contributions of software and other materials are always welcome but
  5345.    must be accompanied by an unambiguous copyright statement that grants
  5346.    permission for free use, copying, and distribution -- either a
  5347.    declaration by the author that the materials are in the public domain,
  5348.    that the materials are subject to the GNU General Public License (cite
  5349.    version), or that the materials are subject to copyright, but the
  5350.    copyright holder grants permission for free use, copying, and
  5351.    distribution. (We will tell you if the copying permissions are too
  5352.    restrictive for us to include the materials in the repository.)
  5353.    Inclusion of materials in the repository does not modify their
  5354.    copyright status in any way. Materials may be placed in:
  5355.       ftp.cs.cmu.edu:/user/ai/new/
  5356.    When you put anything in this directory, please send mail to
  5357.       ai+contrib@cs.cmu.edu
  5358.    giving us permission to distribute the files, and state whether
  5359.    this permission is just for the AI Repository, or also includes
  5360.    publication on the CD-ROM version (Prime Time Freeware for AI).
  5361.    We would also appreciate if you would include a 0.doc file for your
  5362.    package; see /user/ai/new/package.doc for a template. (If you don't
  5363.    have the time to write your own, we can write it for you based on
  5364.    the information in your package.)
  5365.  
  5366.    The Common Lisp Repository is maintained by Mark Kantrowitz,
  5367.    lisp-utilities-request@cs.cmu.edu.
  5368.  
  5369.    Known mirrors:
  5370.       ftp.sunet.se:/pub/lang/lisp/
  5371.  
  5372. CLOS:
  5373.    The CLOS code repository is available by anonymous ftp to
  5374.       nervous.cis.ohio-state.edu:/pub/lispusers/clos/ [128.146.61.200] 
  5375.    If you've got code you'd like to add to the repository, send mail to
  5376.    Arun Welch, commonloops-request@cis.ohio-state.edu.  The CLOS code
  5377.    repository includes dag.lisp.Z and 3DGeometry.lisp.  [The AI
  5378.    Repository's Lisp Section includes a directory of CLOS code as well,
  5379.    in ftp.cs.cmu.edu:/user/ai/lang/lisp/oop/clos-code/.]
  5380.  
  5381. MCL:
  5382.    The Macintosh Common Lisp repository contains Lisp code for
  5383.    MCL contributed by MCL users. It is available by anonymous ftp from
  5384.       cambridge.apple.com:/pub/MCL2/contrib/       [134.149.2.3]
  5385.       http://www.cambridge.apple.com
  5386.    and also contains the Info-MCL mailing list archives. The
  5387.    repository contains, among other things, AV_Parser.hqx and Zebu
  5388.    (general parser toolkits), babylon-2.2.sit.hqx (expert system shell
  5389.    from GMD in Germany), btree.sit.hqx (binary trees), LGL.lisp (Lisp
  5390.    Graphics Library for MCL), quicktime code, mmlisp.sit.hqx
  5391.    (midi-manager interface), tips on optimizing MCL code, PARKA.sit.hqx
  5392.    (a knowledge representation system), starsim.sit.hqx (*Lisp for MCL),
  5393.    IP/TCP examples, and support for hypercard XCMDs and XFCNs.  See the
  5394.    file README for a quick overview of the contents of the MCL
  5395.    repository.
  5396.  
  5397. CLIM:
  5398.    The CLIM Library (a library of user contributed code for the CLIM
  5399.    environment) is available by anonymous ftp on
  5400.       cambridge.apple.com:/pub/clim [134.149.2.3]
  5401.    For information on CLIM, see the entry in [6-5] below.  For more
  5402.    information on the CLIM Library, contact Vincent Keunen, keunen@nrb.be.
  5403.  
  5404. MIT AI Lab:
  5405.    ftp.ai.mit.edu:/pub/
  5406.       loop-macro.tar               [LOOP from CLtL1]
  5407.       series/                      [SERIES from CLtL2; older version]
  5408.       Iterate/                     [Alternative to series and loop.]
  5409.       clmath.tar                   [Numeric math 1984]
  5410.       ontic/                       [ONTIC Knowledge Rep. for Mathematics]
  5411.    clmath is a Lisp library of mathematical functions that calculate
  5412.    hyperbolic and inverse hyperbolic functions, Bessel functions,
  5413.    elliptic integrals, the gamma and beta functions, and the incomplete
  5414.    gamma and beta functions.  There are probability density functions,
  5415.    cumulative distributions, and random number generators for the normal,
  5416.    Poisson, chi-square, Student's T, and Snedecor's F functions. Discrete
  5417.    Fourier Transforms. Multiple linear regression, Fletcher-Powell
  5418.    unconstrained minimization, numerical integration, root finding,
  5419.    and convergence. Code to factor numbers and to do the
  5420.    Solovay-Strassen probabilistic prime test is included. 
  5421.    A technical report describing CLMath is available as MIT AI Lab
  5422.    Memo 774, Gerald Roylance, "Some Scientific Subroutines in LISP",
  5423.    September 1984. Iterate is Jonathan Amsterdam's alternative to
  5424.    series and the Loop macro. For more information, contact jba@ai.mit.edu.
  5425.  
  5426. LispUsers Archives:
  5427.    The LispUsers Archives, a collection of programs for Medley, can be
  5428.    found on 
  5429.       nervous.cis.ohio-state.edu:/pub/lispusers/medley/
  5430.    The files include a plotting module, addressbook, chat program, clock,
  5431.    call-grapher, grep implementation, Tower of Hanoi, Life, lisp dialect
  5432.    translator, and fonts. Also on nervous.cis.ohio-state.edu is GTT, an
  5433.    implementation of Chandrasekaran's Generic Tasks Toolset, in directory
  5434.    pub/lispusers/toolset.
  5435.  
  5436. Amiga LISP implementations:
  5437.    There's a repository of Amiga LISP implementations (and other Lisp-like
  5438.    language implementations) on gatekeeper.pa.dec.com:/pub/micro/amiga/lisp/.
  5439.  
  5440. Inside Computer Understanding:
  5441.    Common Lisp versions of the mini programs from "Inside Computer
  5442.    Understanding" by Schank and Riesbeck, 1981, are available by
  5443.    anonymous ftp from 
  5444.       cs.umd.edu:/pub/schank/icu/
  5445.    This includes the SAM and ELI miniatures. It will eventually include copies
  5446.    of the miniature versions of PAM, POLITICS, and Tale-Spin. The FOR
  5447.    macro is also available in this directory, as are a set of functions
  5448.    for manipulating and matching lisp representations of Conceptual
  5449.    Dependency formulas.  Contact Bill Andersen <waander@cs.umd.edu> for
  5450.    more information. 
  5451.  
  5452. Norvig:
  5453.  
  5454.    The software from Peter Norvig's book "Paradigms of AI Programming" is
  5455.    available by anonymous ftp from unix.sri.com:/pub/norvig/ and on disk in
  5456.    Macintosh or DOS format from the publisher, Morgan Kaufmann.
  5457.  
  5458.    Software includes Common Lisp implementations of:
  5459.       Eliza and pattern matchers, Emycin, Othello, Parsers,
  5460.       Scheme interpreters and compilers, Unification and a prolog
  5461.       interpreter and compiler, Waltz line-labelling,
  5462.       implementation of GPS, macsyma, and random number generators.
  5463.  
  5464.    For more information, contact:
  5465.       Morgan Kaufmann, Dept. P1, 2929 Campus Drive, Suite 260
  5466.       San Mateo CA 94403, (800) 745-7323; FAX: (415) 578-0672
  5467.     Mac          ISBN 1-55860-227-5
  5468.     DOS 3.5"     ISBN 1-55860-228-3
  5469.     DOS 5.25"    ISBN 1-55860-229-1
  5470.  
  5471. NL Software Registry:
  5472.    A catalog of free and commercial natural language software is
  5473.    available from the Natural Language Software Registry, by anonymous
  5474.    ftp from 
  5475.       ftp.dfki.uni-sb.de:/registry/
  5476.    or by email to registry@dfki.uni-sb.de.
  5477.  
  5478. TI Explorer Lisp Code:
  5479.  
  5480.    sumex-aim.stanford.edu:/pub/exp/
  5481.  
  5482.    The Knowledge Systems Lab's set of Explorer patches and tools. It
  5483.    includes in the jwz subdirectory a set of tools written and collected
  5484.    by Jamie Zawinski. Send questions to acuff@sumex-aim.stanford.edu.
  5485.  
  5486. Waters' Programs:
  5487.  
  5488.    Dick Waters' XP Lisp Pretty Printer is available by anonymous ftp
  5489.    from 
  5490.       merl.com:/pub/xp/
  5491.    as the files xp-code.lisp, xp-doc.txt, and xp-test.lisp.
  5492.  
  5493.    The Series Macro is available from
  5494.       merl.com:/pub/series/
  5495.    as the files s-code.lisp, s-test.lisp, and s-doc.txt. The
  5496.    Series macro package is described fully in Waters, R.C., "Automatic
  5497.    Transformation of Series Expressions into Loops", ACM Transactions on
  5498.    Programming Languages and Systems, 13(1):52--98, January 1991,
  5499.    MIT/AIM-1082 and MIT/AIM-1083.
  5500.  
  5501.    Both programs are also available from the Common Lisp Repository
  5502.    described above.
  5503.  
  5504.    For further information, contact Dick Waters, <dick@merl.com> or
  5505.    <dick@ai.mit.edu>. An improved version of Series is in the works.
  5506.  
  5507. ----------------------------------------------------------------
  5508. Subject: [6-3] Publicly Redistributable Lisp Software
  5509.  
  5510. AI Algorithms and Tools:
  5511.  
  5512.    PAIL (Portable AI Lab) is a computing environment containing a
  5513.    collection of state-of-the-art AI tools, examples, and documentation.
  5514.    It is aimed at those involved in teaching AI courses at university
  5515.    level or equivalent. The system has enough built-in functionality to
  5516.    enable its users to get practical experience with a broad range of AI
  5517.    problems without having to build all the supporting tools from
  5518.    scratch. It is implemented in Common Lisp and uses CLOS and Allegro
  5519.    Common Windows (i.e., in Allegro CL 4.1). It is available by anonymous
  5520.    ftp from 
  5521.       pobox.cscs.ch:/pub/ai/ [148.187.10.13]
  5522.    Written by Mike Rosner and Dean Allemang {dean,mike}@idsia.ch.
  5523.  
  5524.    AI_ATTIC is an anonymous ftp collection of classic AI programs and
  5525.    other information maintained by the University of Texas at Austin.  It
  5526.    includes Parry, Adventure, Shrdlu, Doctor, Eliza, Animals, Trek, Zork,
  5527.    Babbler, Jive, and some AI-related programming languages.  This
  5528.    archive is available by anonymous ftp from 
  5529.       ftp.cc.utexas.edu:/pub/AI_ATTIC/  [128.83.186.13]
  5530.    (AKA bongo.cc.utexas.edu). For more information, contact
  5531.    atticmaster@bongo.cc.utexas.edu. 
  5532.  
  5533. Analogical Reasoning:
  5534.  
  5535.    SME is the Structure-Mapping Engine, as described in Falkenhainer,
  5536.    Forbus, and Gentner's 1987 AIJ article.  Available from
  5537.    multivac.ils.nwu.edu:/pub/SME For further information, contact Brian
  5538.    Falkenhainer <falkenhainer@parc.xerox.com> or Ken Forbus
  5539.    <forbus@ils.nwu.edu>.
  5540.  
  5541. Benchmarks:
  5542.  
  5543.    Gabriel Lisp Benchmarks are available by anonymous ftp as
  5544.    ai.toronto.edu:/pub/gabriel-lisp-benchmarks.tar.Z.
  5545.    The benchmarks are described in the book "Performance Evaluation of
  5546.    Lisp Systems", by Richard Gabriel. 
  5547.  
  5548.    Lucid CL contains a set of benchmarks in its goodies/ directory,
  5549.    including Bob Boyer's logic programming benchmark, a benchmark to
  5550.    create and browse through an AI-like database of units, a CLOS speed
  5551.    test, a compilation speed test, TAKR (the 100 function version of TAK
  5552.    that tries to defeat cache memory effects), CTAK (A version of the
  5553.    TAKeuchi function that uses the CATCH/THROW facility), STAK (A version
  5554.    of the TAKeuchi function with special variables instead of parameter
  5555.    passing), DERIV and DDERIV (Symbolic derivative benchmarks written by
  5556.    Vaughn Pratt), DESTRU (a destructive operation benchmark), DIV2 (a
  5557.    benchmark which divides by 2 using lists of n ()'s), the FFT benchmark
  5558.    written by Harry Barrow, FPRINT (a benchmark to print to a file),
  5559.    FRPOLY (a Franz Lisp benchmark by Fateman based on polynomial
  5560.    arithmentic), Forest Baskett's PUZZLE benchmark (originally written in
  5561.    Pascal), the TPRINT benchmark to read and print to the terminal, a
  5562.    benchmark that creates and traverses a tree structure, and TRIANG
  5563.    (board game benchmark). Some of the benchmarks may work only in Lucid.
  5564.  
  5565. Blackboard Architectures:
  5566.  
  5567.    The UMass GBB system (V1.2) is available by anonymous ftp from
  5568.    ftp.cs.umass.edu:/gbb. The commercial GBB product is not.
  5569.    Work on the UMass GBB project (and funding) ended over 2 years ago.
  5570.    Many researchers using it have opted for the commercial
  5571.    release.  The UMass research system remains available, but the
  5572.    two should not be confused as the commercial system is
  5573.    substantially improved and extended. The commercial system is available
  5574.    from Blackboard Technology Group, 401 Main Street,
  5575.    Amherst, Massachusetts 01002, 413-256-8990, fax 413-256-3179.
  5576.  
  5577.    For a tutorial on how to build a blackboard system, see the paper
  5578.       P. R. Kersten and Avi C. Kak, "A Tutorial on LISP Object-Oriented
  5579.       Programming for Blackboard Computation (Solving the Radar Tracking
  5580.       Problem)", International Journal of Intelligent Systems 8:617-669, 1993
  5581.    Although samples of the code are given in the paper, the full source
  5582.    code is available in a separate technical report from the School of
  5583.    Electrical Engineering at Purdue University.  If you are interested in
  5584.    getting a copy of the technical report, send mail to Avi Kak
  5585.    <kak@ecn.purdue.edu>. (The circumstances under which the software was
  5586.    developed prevent them from making the source code available by
  5587.    anonymous FTP. However, the full source code is printed in the
  5588.    technical report.)
  5589.  
  5590. Case-based Reasoning:
  5591.  
  5592.    CL-Protos is a Common Lisp implementation of the case-based
  5593.    reasoning system developed by E. Ray Bareiss and Bruce W.
  5594.    Porter of the University of Texas/Austin AI Lab. It runs
  5595.    on Sun3, TI Explorer, HP 9000, and Symbolics, and gobbles a
  5596.    huge amount of memory. Common Lisp implementation by
  5597.    Rita Duran, Dan Dvorak, Jim Kroger, Hilel Swerdlin, and Ben Tso.
  5598.    For more information, bug reports, or comments, contact
  5599.    either Dan Dvorak <dvorak@cs.utexas.edu> or Ray Bareiss
  5600.    <bareiss@ils.nwu.edu> or Erik Eilerts <eilerts@cs.utexas.edu>
  5601.    Available by anonymous ftp from cs.utexas.edu:/pub/porter
  5602.  
  5603.    The complete code for "Inside Case-Based Reasoning" by Riesbeck and
  5604.    Schank, 1989, is available by anonymous ftp from 
  5605.       cs.umd.edu:/pub/schank/icbr/
  5606.    This includes code for an instructional version of CHEF by Kristian
  5607.    Hammond and MICRO-xxx. Contact Bill Andersen <waander@cs.umd.edu>
  5608.    for more information.  
  5609.  
  5610. CLOS Software:
  5611.    See question [5-6].
  5612.  
  5613. Constraint Programming and Non-determinism:
  5614.  
  5615.    SCREAMER:
  5616.  
  5617.    Screamer is an extension of Common Lisp that adds support for
  5618.    nondeterministic programming.  Screamer consists of two levels.  The
  5619.    basic nondeterministic level adds support for backtracking and
  5620.    undoable side effects.  On top of this nondeterministic substrate,
  5621.    Screamer provides a comprehensive constraint programming language in
  5622.    which one can formulate and solve mixed systems of numeric and
  5623.    symbolic constraints.  Together, these two levels augment Common Lisp
  5624.    with practically all of the functionality of both Prolog and
  5625.    constraint logic programming languages such as CHiP and CLP(R).
  5626.    Furthermore, Screamer is fully integrated with Common Lisp. Screamer
  5627.    programs can coexist and interoperate with other extensions to Common
  5628.    Lisp such as CLOS, CLIM and Iterate.
  5629.  
  5630.    In several ways Screamer is more efficient than other implementations
  5631.    of backtracking languages.  First, Screamer code is transformed into
  5632.    Common Lisp which can be compiled by the underlying Common Lisp
  5633.    system.  Many competing implementations of nondeterministic Lisp are
  5634.    interpreters and thus are far less efficient than Screamer.  Second,
  5635.    the backtracking primitives require fairly low overhead in Screamer.
  5636.    Finally, this overhead to support backtracking is only paid for those
  5637.    portions of the program which use the backtracking primitives.
  5638.    Deterministic portions of user programs pass through the Screamer to
  5639.    Common Lisp transformation unchanged.  Since in practise, only small
  5640.    portions of typical programs utilize the backtracking primitives,
  5641.    Screamer can produce more efficient code than compilers for languages
  5642.    in which backtracking is more pervasive.
  5643.  
  5644.    Screamer is fairly portable across most Common Lisp implementations.
  5645.    It currently runs under Genera 8.1.1 and 8.3 on both Symbolics 36xx
  5646.    and Ivory machines, under Lucid 4.0.2 and 4.1 on Sun SPARC machines,
  5647.    under MCL 2.0 and 2.0p2 on Apple Macintosh machines, and under Poplog
  5648.    Common Lisp on Sun SPARC machines.  It should run under any
  5649.    implementation of Common Lisp which is compliant with CLtL2 and with
  5650.    minor revision could be made to run under implementations compliant
  5651.    with CLtL1 or dpANS.
  5652.  
  5653.    Screamer is available by anonymous FTP from 
  5654.       ftp.ai.mit.edu:/pub/screamer.tar.Z
  5655.    Contact Jeffrey Mark Siskind <qobi@ai.mit.edu> for further
  5656.    information. Screamer is also available from the Common Lisp Repository.
  5657.  
  5658.    The Screamer Tool Repository, a collection of user-contributed
  5659.    Screamer code, is available by anonymous ftp from
  5660.       ftp.cis.upenn.edu:/pub/screamer-tools/
  5661.    or by WWW from
  5662.       http://www.cis.upenn.edu/~screamer-tools/home.html
  5663.    Please direct all inquires about the repository to
  5664.    screamer-repository@cis.upenn.edu. 
  5665.  
  5666. Defeasible Reasoning:
  5667.  
  5668.    An implementation of J. Paris and A. Vencovska's model of belief is
  5669.    available by anonymous ftp from
  5670.       ftp.cs.cmu.edu:/user/ai/areas/reasonng/defeasbl/belief/
  5671.    Paris and Vencovska's paper (Artificial Intelligence, 64(2), December
  5672.    1993) provides a mathematical model of an agent's belief in an event
  5673.    by identifying it with his ability to imagine the event within the
  5674.    context of his previous experience.  This approach leads to beliefs
  5675.    having properties different from those normally ascribed to it. The
  5676.    implementation was written by Ian Pratt <ipratt@cs.man.ac.uk> and Jens
  5677.    Doerpmund <dorpmunj@cs.man.ac.uk> and runs in Common Lisp.
  5678.  
  5679. Eliza and Similar Programs:
  5680.  
  5681.    See Peter Norvig's book and AI_ATTIC (question [6-1] above).
  5682.  
  5683.    The doctor.el is an implementation of Eliza for
  5684.    GNU-Emacs emacs-lisp. Invoke it with "Meta-X doctor"
  5685.  
  5686.    muLISP-87 (a MSDOS Lisp sold by Soft Warehouse) includes
  5687.    a Lisp implementation of Eliza.
  5688.  
  5689.    Implementations of ELIZA for other languages are mentioned in the AI FAQ.
  5690.  
  5691.    The original Parry (in MLISP for a PDP-10) is available in
  5692.    labrea.stanford.edu:/pub/parry.tar.Z.
  5693.  
  5694.    Other programs, such as RACTER, are listed in part 4 of the AI FAQ.
  5695.  
  5696. Expert Systems:
  5697.  
  5698.    FOCL is an expert system shell and machine learning program written in
  5699.    Common Lisp. The machine learning program extends Quinlan's FOIL
  5700.    program by containing a compatible explanation-based learning
  5701.    component.  FOCL learns Horn Clause programs from examples and
  5702.    (optionally) background knowledge. The expert system includes a
  5703.    backward-chaining rule interpreter and a graphical interface to the
  5704.    rule and fact base. For details on FOCL, see: Pazzani, M. and Kibler,
  5705.    D., "The role of prior knowledge in inductive learning", Machine
  5706.    Learning 9:54-97, 1992. It is available by anonymous ftp from
  5707.       ics.uci.edu:/pub/machine-learning-programs/
  5708.    as the files README.FOCL-1-2-3, FOCL-1-2-3.cpt.hqx (a binhexed,
  5709.    compacted Macintosh application), FOCL-1-2-3.tar.Z (Common Lisp
  5710.    source code), and FOCL-1-2-3-manual.hqx (binhexed manual).  If you
  5711.    use a copy of FOCL, or have any comments or questions, send mail to
  5712.    pazzani@ics.uci.edu.
  5713.  
  5714.    BABYLON is a development environment for expert systems. It
  5715.    includes frames, constraints, a prolog-like logic formalism, and a
  5716.    description language for diagnostic applications. It is implemented in
  5717.    Common Lisp and has been ported to a wide range of hardware platforms.
  5718.    Available by anonymous ftp from 
  5719.       ftp.gmd.de:/gmd/ai-research/Software/Babylon/ [129.26.8.84]
  5720.    as a BinHexed stuffit archive, on the Web via the URL
  5721.       http://www.gmd.de/
  5722.    on the Apple CD-ROM, or with the book "The AI Workbench BABYLON",
  5723.    which contains *full source code* of BABYLON and the stand-alone
  5724.    version for the Mac. The book describes the use of BABYLON in detail.
  5725.  
  5726.    OPS5 is a public domain Common Lisp implementation of the OPS5
  5727.    production system interpreter written by Charles Forgy. It is
  5728.    available from the CMU AI Repository in
  5729.       ftp.cs.cmu.edu:/user/ai/areas/expert/ops5/
  5730.    and includes the original port by George Wood and Jim Kowalski
  5731.    (ops5orig.tar.gz), and a later port by Mark Kantrowitz (ops5.tar.gz).
  5732.    The latter has been tested under Allegro, Lucid, CMU CL, Ibuki CL and
  5733.    MCL.
  5734.  
  5735. Frame Languages:
  5736.  
  5737.    FrameWork is a portable generic frame system available from the CMU
  5738.    AI Repository, in 
  5739.       ftp.cs.cmu.edu:/user/ai/areas/kr/frames/framework/
  5740.  
  5741.    THEO (learning frame system) is available free from CMU, after
  5742.    signing a license agreement. Send mail to Tom.Mitchell@cs.cmu.edu.
  5743.  
  5744.    FrameKit is available free from CMU, after signing a
  5745.    license agreement. Send mail to Eric.Nyberg@cs.cmu.edu
  5746.  
  5747.    KR. Send mail to Brad.Myers@cs.cmu.edu for more info.
  5748.  
  5749.    PARKA. Frames for the CM. Contact spector@cs.umd.edu.
  5750.                        
  5751.    PARMENIDES (Frulekit) is available free, after signing
  5752.    a license agreement. Send mail to peter.shell@cs.cmu.edu 
  5753.  
  5754.    FROBS is available free by anonymous ftp from
  5755.    cs.utah.edu:/pub/frobs.tar.Z
  5756.    Contact Robert Kessler <kessler@cs.utah.edu> for more info.
  5757.  
  5758.    PFC is a simple frame system written by Tim Finin
  5759.    available free by anonymous ftp from linc.cis.upenn.edu.
  5760.  
  5761.    YAK is a hybrid knowledge-representation system of the
  5762.    KL-ONE family. Includes an optional graphical interface
  5763.    depending on the Lisp. Available free after signing a license 
  5764.    agreement. Contact Enrico Franconi <franconi@irst.it>.
  5765.  
  5766. Genetic Algorithms:
  5767.  
  5768.    GECO (Genetic Evolution through Combination of Objects) is a
  5769.    genetic algorithm shell written by George Williams,
  5770.    <george@hsvaic.boeing.com>. It is available by anonymous ftp 
  5771.    from cambridge.apple.com:/pub/mcl2/contrib/ as the following
  5772.    files:
  5773.       GECO-v1.0.cpt.hqx       binhex'd Compact Pro archive
  5774.       GECO-v1.0.tar.Z         compressed tar file for Unix machines (no MCL
  5775.                               fonts)
  5776.       GECO.abstract           a brief description
  5777.    It runs in MCL 2.0, but should be portable among CLtL2 compliant
  5778.    Common Lisps.
  5779.  
  5780.    GAL is a genetic algorithm suite written by Bill Spears of NRL. The
  5781.    MCL2.0 port was done by Howard Oakley <howard@quercus.demon.co.uk> and
  5782.    is available from cambridge.apple.com:/pub/MCL2/contrib as
  5783.    GAL.sea.hqx.  Improvements and adaptations should be sent to Bill
  5784.    Spears, but questions on the MCL port should be directed to Howard Oakley.
  5785.  
  5786.    Other genetic algorithms code is available  
  5787.       ftp.aic.nrl.navy.mil:/pub/galist
  5788.    including Genesis (source-code/ga-source/genesis.tar.Z) and the archives
  5789.    of the GA-List mailing list. A survey of free and commercial
  5790.    genetic algorithms implementations is available in
  5791.    information/ga-software-survey.txt. 
  5792.  
  5793. Knowledge Representation:
  5794.  
  5795.    KNOWBEL is an implementation of Telos (a sorted/temporal logic
  5796.    system) by Bryan M. Kramer, <kramer@ai.toronto.edu>. It is
  5797.    available by anonymous ftp from ai.toronto.edu:/pub/kr/ as the
  5798.    files knowbel.tar.Z and manual.txt.tar.Z 
  5799.    Runs in Allegro CL on Sparcstations and Silicon Graphics 4d
  5800.    and in MCL on Apple Macintoshes. 
  5801.    
  5802.    SNePS (Semantic Network Processing System) is the implementation of a
  5803.    fully intensional theory of propositional knowledge representation and
  5804.    reasoning. SNePS includes a module for creating and accessing
  5805.    propositional semantic networks, path-based inference, node-based
  5806.    inference based on SWM (a relevance logic with quantification) that
  5807.    uses natural deduction and can deal with recursive rules, forward,
  5808.    backward and bi-directional inference, nonstandard logical connectives
  5809.    and quantifiers, an assumption based TMS for belief revision, a
  5810.    morphological analyzer and a generalized ATN (GATN) parser for parsing
  5811.    and generating natural language, SNePSLOG, a predicate-logic-style
  5812.    interface to SNePS, XGinseng, an X-based graphics interface for
  5813.    displaying, creating and editing SNePS networks, SNACTor, a
  5814.    preliminary version of the SNePS Acting component, and SNIP 2.2, a new
  5815.    implementation of the SNePS Inference Package that uses rule shadowing
  5816.    and knowledge migration to speed up inference.  SNeRE (the SNePS
  5817.    Rational Engine), which is part of Deepak Kumar's dissertation about
  5818.    the integration of inference and acting, will replace the current
  5819.    implementation of SNACTor.  SNePS is written in Common Lisp, and has
  5820.    been tested in Allegro CL 4.1, Lucid CL 4.0, TI Common Lisp, CLISP
  5821.    May-93, and CMU CL 17b. It should also run in Symbolics CL, AKCL 1.600
  5822.    and higher, VAX Common Lisp, and MCL. The XGinseng interface is built
  5823.    on top of Garnet.  SNePS 2.1 is free according to the GNU General
  5824.    Public License version 2. The SNePS distribution is available by
  5825.    anonymous ftp from 
  5826.       ftp.cs.buffalo.edu:/pub/sneps/  [128.205.32.9] 
  5827.    as the file rel-x-yyy.tar.Z, where 'x-yyy' is the version. The other
  5828.    files in the directory are included in the distribution; they are
  5829.    duplicated to let you get them without unpacking the full distribution
  5830.    if you just want the bibliography or manual. If you use SNePS, please
  5831.    send a short message to shapiro@cs.buffalo.edu and
  5832.    snwiz@cs.buffalo.edu. Please also let them know whether you'd like to
  5833.    be added to the SNUG (SNePS Users Group) mailing list. 
  5834.  
  5835.    COLAB (COmpilation LABoratory) is a hybrid knowledge representation
  5836.    system emphasizing the horizontal and vertical compilation of
  5837.    knowledge bases. It is comprised of cooperating subsystems -- CONTAX,
  5838.    FORWARD, RELFUN and TAXON -- which deal with different knowledge
  5839.    representation and reasoning formalisms. Each subsystem can also be
  5840.    used as stand-alone system. CONTAX deals with constraint nets and
  5841.    constraint-propagation techniques. Relational knowledge in the form of
  5842.    Horn rules is processed by forward (FORWARD) and backward (RELFUN)
  5843.    chaining. Taxonomic knowledge is represented by intensional concept
  5844.    definitions which are automatically arranged in a subsumption
  5845.    hierarchy (TAXON).  The COLAB software was developed at DFKI and the
  5846.    University of Kaiserslautern and runs in Common Lisp. (The subsystems
  5847.    have been tested in AKCL and Lucid CL, and possibly also Allegro CL
  5848.    and Symbolics CL.) All the subsystems are available free of charge for
  5849.    research purposes.
  5850.    o  RELFUN is a logic-programming language with call-by-value (eager),
  5851.       non-deterministic, non-ground functions, and higher-order operations.
  5852.       It accepts freely interchangeable LISP-style and PROLOG-style syntaxes.
  5853.       For sources to RELFUN and copies of relevant papers, contact
  5854.       Dr. Harold Boley, DFKI, Postfach 2080, W-6750 Kaiserslautern, Germany,
  5855.       call +49-631-205-3459, fax +49-631-205-3210, or send email to
  5856.       boley@informatik.uni-kl.de.
  5857.    o  TAXON is a terminological knowledge representation system extended by
  5858.       concrete domains.  For sources to TAXON and copies of relevant papers,
  5859.       contact Philipp Hanschke, DFKI, Postfach 2080, W-6750 Kaiserslautern,
  5860.       Germany, call +49-631-205-3460, fax +49-631-205-3210, or send email to
  5861.       hanschke@dfki.uni-kl.de.
  5862.    o  CONTAX is a constraint system for weighted constraints over
  5863.       hierarchically structured finite domains. CONTAX uses CLOS in addition
  5864.       to Common Lisp.  For sources to CONTAX and copies of relevant papers,
  5865.       contact Manfred Meyer, DFKI, Postfach 2080, W-6750 Kaiserslautern,
  5866.       Germany, call +49-631-205-3468, fax +49-631-205-3210, or send email to
  5867.       meyer@dfki.uni-kl.de.
  5868.    o  FORWARD is a logic programming language with bottom-up and top-down
  5869.       evaluation of Horn clauses. For sources to FORWARD and copies of
  5870.       relevant papers, contact Knut Hinkelmann, DFKI, Postfach 2080, W-6750
  5871.       Kaiserslautern, Germany, call +49-631-205-3467, fax +49-631-205-3210,
  5872.       or send email to hinkelma@dfki.uni-kl.de.
  5873.  
  5874.    URANUS is a logic-based knowledge representation language. Uranus is
  5875.    an extension of Prolog written in Common Lisp and using the syntax of
  5876.    Lisp. Uranus extends Prolog with a multiple world mechanism for
  5877.    knowledge representation and term descriptions to provide
  5878.    functional programming within the framework of logic programming.
  5879.    It is available free by anonymous ftp from 
  5880.       etlport.etl.go.jp:/pub/uranus/ftp/ [192.31.197.99]
  5881.    for research purposes only.  For more information contact the author, 
  5882.    Hideyuki Nakashima <nakashim@etl.go.jp>.
  5883.  
  5884. Languages and Alternate Syntaxes:
  5885.  
  5886.    Generalized Lisp (or Glisp for short) is a coordinated set of high
  5887.    level syntaxes for Common Lisp.  Initially GLisp consists of three
  5888.    dialects: Mlisp, Plisp and ordinary Lisp, together with an extensible
  5889.    framework for adding others.  Mlisp (Meta-Lisp) is an Algol-like
  5890.    syntax for people who don't like writing parentheses. For example,
  5891.    one can write print("abc", stream) instead of (print "abc" stream).
  5892.    Plisp (Pattern Lisp) is a pattern matching rewrite-rule language.
  5893.    Plisp is a compiler-compiler; its rules are optimized for writing
  5894.    language translators.  All dialects may be freely intermixed in a
  5895.    file. The translators for all dialects are written in Plisp, as is
  5896.    the Glisp translator framework itself. Support routines for the
  5897.    translators are written in Mlisp and/or Lisp. All dialects are
  5898.    translated to Common Lisp and execute in the standard Common Lisp
  5899.    environment. Glisp is available by anonymous ftp from apple.com or 
  5900.       ftp.apple.com:/dts/mac/lisp/glisp.tar.Z
  5901.    GLISP runs in MCL and has to be modified for other Common Lisp
  5902.    implementations. 
  5903.  
  5904.    CGOL is algol-like language that is translated into Lisp before
  5905.    execution. It was developed originally by Vaughn Pratt. A Common Lisp
  5906.    implementation of CGOL is available by anonymous ftp from
  5907.       peoplesparc.berkeley.edu:/pub/cgol.1.tar.Z  [128.32.131.14]
  5908.    (The number "1" may increase if newer versions are posted.)  It was 
  5909.    written by a UC Berkeley graduate student, Tom Phelps, as a term
  5910.    project, so there may still be some rough edges. There is a lot of
  5911.    documentation in the distribution, including the "original" CGOL memo
  5912.    (pratt.memo). For more information, contact Richard Fateman
  5913.    <fateman@peoplesparc.berkeley.edu>.
  5914.  
  5915.    StarLisp Simulator. The StarLisp Simulator simulates *Lisp, one of
  5916.    the programming langauges used to program the Connection Machine.
  5917.    StarLisp runs under Symbolics, Lucid, Allegro, and Franz, and is
  5918.    available by anonymous ftp from
  5919.       think.com:/cm/starlisp/starsim-f19-sharfile
  5920.    The "CM5 *Lisp Tutorial" is available by anonymous ftp from
  5921.       arp.anu.edu.au:/ARP/papers/starlisp/  [150.203.20.2]
  5922.    in Andrew "ez" and postscript formats.  Write to Zdzislaw Meglicki
  5923.    <Zdzislaw.Meglicki@cisr.anu.edu.au> for more information about the tutorial.
  5924.  
  5925.    InterLisp->Common-Lisp Translator -- ftp.ai.sri.com:/pub/pkarp/lisp/ilisp/
  5926.    Other InterLisp to Common Lisp translators may be found in the LispUsers
  5927.    archive listed above.
  5928.  
  5929.    The Yale Haskell system runs in CMU Common Lisp, Lucid CL, and AKCL.
  5930.    It is available by anonymous ftp from 
  5931.         Chalmers animal.cs.chalmers.se:/pub/haskell/yale/ [129.16.225.66]
  5932.         Glasgow  ftp.dcs.glasgow.ac.uk:/pub/haskell/yale/ [130.209.240.50]
  5933.         Yale     nebula.cs.yale.edu:/pub/haskell/yale/    [128.36.13.1]
  5934.    as the files
  5935.         haskell-beta-2-source.tar.Z   -- full sources
  5936.         haskell-beta-2-sparc.tar.Z    -- sparc executable
  5937.  
  5938. Lisp Tools:
  5939.  
  5940.    See the Common Lisp Repository in [6-2].
  5941.  
  5942.    The Automatic Memoization Facility adds a practical memoization
  5943.    facility to Common Lisp. Automatic memoization is a technique by which
  5944.    an existing function can be transformed into one that "remembers"
  5945.    previous arguments and their associated results, yielding large
  5946.    performance gains for certain types of applications.  This facility
  5947.    extends the ideas from Norvig's book into what is needed for a
  5948.    practical tool for us in large programs. It adds facilities for
  5949.    bookkeeping and timing, and lets you evaluate of the timing advantages
  5950.    of memoization, and save hash tables to disk for automatic reuse in
  5951.    later sessions. The code is available by anonymous ftp from
  5952.    archive.cs.umbc.edu:/pub/Memoization [130.85.100.53]. Contact Marty Hall
  5953.    <hall@aplcenmp.apl.jhu.edu> for more information. The code includes an
  5954.    overview of memoization and its applications.
  5955.  
  5956.    PLisp - A Common Lisp front end to Postscript. This translates many
  5957.    Common Lisp functions to postscript as well as manage the environment
  5958.    and many lispisms (&optional and &rest arguments, multiple values,
  5959.    macros, ...).  Available via anonymous ftp
  5960.          nebula.cs.yale.edu:/pub/plisp/plisp.tar.Z [128.36.13.1]
  5961.    Written by John Peterson <peterson-john@cs.yale.edu>.
  5962.  
  5963.    RegExp is an extension to Allegro Common Lisp which adds
  5964.    regular expression string matching, using the foreign
  5965.    function interface. Available by anonymous ftp from
  5966.    ftp.ai.sri.com:/pub/pkarp/regexp/. Contact pkarp@ai.sri.com
  5967.    for more information.
  5968.  
  5969.    ifi.informatik.uni-stuttgart.de:/pub/xit/cl-utilities/ contains
  5970.    three small utilities:
  5971.         completion.lisp         A simple filename completion program.
  5972.         cl-utilities.lisp       Some macros for dealing with points,
  5973.                                 regions, and some miscellaneous macros.
  5974.         copy-objects.lisp       Code for copying instances.
  5975.  
  5976.    think.com:/think/lisp contains some useful lisp code (most of it
  5977.    Symbolics dependent) including:
  5978.         lisp-lint.lisp          A set of compiler style checkers that
  5979.                                 warn when a function call does not
  5980.                                 conform to Common Lisp. 
  5981.  
  5982.    MEASURES is a system to handle engineering numbers and measures in
  5983.    Common Lisp. It runs in Allegro CL, LispWorks, MCL, and Symbolics CL.
  5984.    Written by Roman Cunis.  Some documentation can be found in the file
  5985.    measures.doc and examples in measures-example.lisp.  It is available
  5986.    from the Common Lisp Repository
  5987.       ftp.cs.cmu.edu:/user/ai/lang/lisp/lisp/syntax/
  5988.    in the file measures-2.0.tar.gz.  For further information, contact Ralf
  5989.    Moeller, University of Hamburg, Bodenstedtstr 16, 2000 Hamburg 50,
  5990.    Germany, call 40-4123-6134, fax 40-4123-6530, or send email to
  5991.    moeller@informatik.uni-hamburg.de.
  5992.  
  5993.    DEFTABLE provides a macro that unifies the interface to Common
  5994.    Lisp's table-like data structures (e.g., association lists, property
  5995.    lists, and hash tables). Written by Peter Norvig
  5996.    <norvig@harlequin.com>.  It is available by anonymous ftp from
  5997.    ftp.ai.mit.edu:/pub/lptrs/deftable.lisp [128.52.32.6] and also the
  5998.    Lisp Utilities Repository. An article describing deftable was
  5999.    published in ACM Lisp Pointers 5(4):32-38, December 1992.
  6000.  
  6001.    SEQUEL (SEQUEnt processing Language) is designed both as a general
  6002.    purpose AI language for generating type-secure and efficient Lisp
  6003.    programs and as a very high level specification language for
  6004.    implementing logics on the computer. Designed at the University of
  6005.    Leeds, SEQUEL compiles sequent-calculus specifications of arbitrary
  6006.    logics to working proof assistants.  The sequent calculus
  6007.    specifications are compiled into Horn clauses and from Horn clauses
  6008.    into virtual machine instructions of an abstract machine SLAM (SequeL
  6009.    Abstract Machine) which then translates these instructions into
  6010.    efficient Lisp code using WAM-style compilation techniques.  Although
  6011.    a functional programming language, SEQUEL includes facilities for
  6012.    backtracking usually associated with logic programming, and supports a
  6013.    pattern-matching method of building functions based on Prolog
  6014.    notation.  The Lisp code generated from SEQUEL functions is completely
  6015.    portable and runs in most Common Lisp implementations. It is
  6016.    comparable in efficiency with hand-written code.  SEQUEL also supports
  6017.    optional static type-checking in the manner of SML and similar
  6018.    languages.  With type-checking enabled, all inputs and loaded files
  6019.    are type-checked and the resulting Lisp programs are type-secure.  The
  6020.    SEQUEL compiler uses the information gleaned from type-checking to add
  6021.    compiler directives within the generated Lisp functions to produce
  6022.    optimized Lisp programs.  SEQUEL includes a UNIX-style top level with
  6023.    its own trace package and type-checking debugger. SEQUEL is also of
  6024.    interest to automated reasoning researchers. It provides a very
  6025.    powerful means of generating proof assistants and theorem provers that
  6026.    have a very fast performance using WAM-derived compilation techniques.
  6027.    The theorem provers are automatically verified. It includes a facility
  6028.    for Datalog and an efficient occurs-check Horn-clause-to-Lisp
  6029.    compiler, a mouse driven graphical interface for all proof assistants
  6030.    and theorem provers built under SEQUEL (currently available only under
  6031.    Lucid).  Several demonstration theorem provers for different logics,
  6032.    including FOL, Clarke's logic of space, partial evaluation, set
  6033.    theory, and constructive type theory are available.  SEQUEL runs under
  6034.    Kyoto CL, Lucid CL, and CMU Common Lisp.  SEQUEL is available free for
  6035.    non-commercial purposes by anonymous ftp from
  6036.       agora.leeds.ac.uk:/scs/logic/  [129.11.144.130]
  6037.    and includes LaTeX documentation in the distribution. For more
  6038.    information, contact Mark Tarver <mark@scs.leeds.ac.uk> or 
  6039.    <csc6mt@gps.leeds.ac.uk>. 
  6040.  
  6041.    ILU (Xerox PARC Inter-Language Unification) is a system for promoting
  6042.    language interoperability via interfaces between units of program
  6043.    structure called "modules". ILU currently supports Common Lisp, ANSI
  6044.    C, C++, and Modula-3. The Common Lisp support provides CLOS `network
  6045.    objects' that communicate via RPC between Lisp processes, as well
  6046.    between Lisp and other languages.  ILU is available by anonymous ftp
  6047.    from
  6048.       parcftp.parc.xerox.com:/pub/ilu/1.6.4/ilu-1.6.4.tar.gz
  6049.    Write to Bill Janssen <janssen@parc.xerox.com> for more information.
  6050.  
  6051. Machine Learning:
  6052.  
  6053.    ID3: A Lisp implementation of ID3 and other machine learning
  6054.    algorithms are available by anonymous ftp from the machine learning
  6055.    group at the University of Texas as cs.utexas.edu:/pub/mooney
  6056.  
  6057.    COBWEB/3 is a concept formation system available free after
  6058.    signing a license agreement. Contact cobweb@ptolemy.arc.nasa.gov
  6059.    for more information.
  6060.  
  6061.    RWM (Refinement With Macros) is a Common Lisp program for learning
  6062.    problem solving strategies. RWM takes a high level description of a
  6063.    problem as input and successively refines it into a sequence of
  6064.    "easier" subproblems, which collectively constitute a strategy for
  6065.    solving the given problem. RWM also learns macro moves which are
  6066.    useful for efficiently solving the problem. A short documentation and
  6067.    some example problems/strategies are included. To get a copy of this
  6068.    description, send mail to the Bilkent University Archieve Server
  6069.    bilserv@trbilun.bitnet with "send RWM.tar.Z" in the body of the
  6070.    message. For further information, contact H. Altay Guvenir
  6071.    <guvenir@trbilun.bitnet>.
  6072.   
  6073. Mathematics:
  6074.  
  6075.    MockMma -- peoplesparc.berkeley.edu:/pub/mma.tar.Z       [128.32.131.14]
  6076.    A Mathematica-style parser written in Common Lisp. Written by Richard
  6077.    Fateman; fateman@renoir.Berkeley.EDU. Runs in any valid Common Lisp.
  6078.    Tested in Allegro, KCL and Lucid.
  6079.  
  6080.    rascal.ics.utexas.edu:/pub/             128.83.138.20
  6081.       Maxima for Common Lisp (License required from National
  6082.       Energy Software Center at Argonne.) Ported by Bill Schelter.
  6083.  
  6084.    QUAIL (Quantitative Analysis in Lisp) extends Common Lisp to better
  6085.    support quantitative analysis. It includes an object-oriented
  6086.    quantitative analysis programming environment based on CLOS.  Quail
  6087.    was developed by the Statistical Computing Laboratory of the
  6088.    Department of Statistics and Actuarial Science of the University of
  6089.    Waterloo.  It includes a variety of mathematical and statistical
  6090.    capabilities, such as symbolic and numerical differentiation,
  6091.    numerical integration, probability calculations (e.g., pseudo-random
  6092.    number generation), and statistical response models.  The
  6093.    object-oriented graphics display facilities include building blocks
  6094.    for arbitrary graphics, a collection of stock statistical graphics,
  6095.    function plotting, 3d-rotating function and surface plots, and
  6096.    graphical browsers. Quail currently runs in MCL, but a Franz and CLX
  6097.    based version is forthcoming. It is available by anonymous ftp from
  6098.       setosa.uwaterloo.ca:/pub/Quail/ [129.97.141.101]
  6099.    You must read the file README-I-MEAN-IT and return a signed copy of
  6100.    the license agreement ($10 annual license fee) before using the
  6101.    software. For further information, contact Dr. R. W. Oldford,
  6102.    <rwoldford@watstat.waterloo.edu> or <rwoldford@watstat.uwaterloo.ca>.
  6103.  
  6104. Medical Reasoning:
  6105.  
  6106.    TMYCIN -- sumex-aim.stanford.edu:/tmycin  The TMYCIN rule based system.
  6107.  
  6108. Music:
  6109.  
  6110.    Common Music is a music composition language written in Common Lisp
  6111.    and CLOS that outputs music (directly or through scorefiles) to a
  6112.    variety of synthesis packages, such as the Music Kit, Common Lisp
  6113.    Music, MIDI, and CSound.  Common Music runs under MCL 2.0, Allegro CL
  6114.    3.1.2 (NeXT), AKCL 1.615 (NeXT), Allegro CL 4.1 beta (SGI Iris), and
  6115.    AKCL 6.15 (Sun4). It is available by anonymous ftp from
  6116.       ccrma-ftp.stanford.edu:/pub/Lisp/cm.tar.Z [36.49.0.93]
  6117.       ftp.zkm.de:/pub/cm.tar.Z             [192.101.28.17] 
  6118.    To be added to the mailing list, send mail to
  6119.    cmdist-request@ccrma.stanford.edu. For further information, contact
  6120.    Rick Taube, <hkt@zkm.de> or <hkt@ccrma.stanford.edu>.
  6121.    [Note: In the Common Music sources, there is a generic portable Lisp
  6122.    Listener style interpreter that supports command dispatching in
  6123.    addition to Lisp evaluation. It is the file ./utils/tl.lisp.] 
  6124.  
  6125.    Common Lisp Music (CLM) is a software synthesis and signal
  6126.    processing package (CL-MUSIC) and a package that makes it relatively
  6127.    easy to take advantage of the Motorola DSP 56000 (CL-MUSIC-56).  It is
  6128.    available by anonymous ftp from 
  6129.       ccrma-ftp.stanford.edu:/pub/Lisp/clm.tar.Z [36.49.0.93] 
  6130.    Basic documentation is in clm.wn (or clm.rtf) and
  6131.    ins.lisp.  CLM runs on NeXT under Allegro CL or KCL and on SGI Indigo
  6132.    under Allegro CL. The non-56000 version should run on any machine with
  6133.    C and Common Lisp. Send bug reports or suggestions to
  6134.    Bil Schottstaedt <bil@ccrma.stanford.edu>.
  6135.  
  6136.    Common Music Notation (CMN) is a western music notation package based on
  6137.    Common Lisp, CLOS (pcl), PostScript, and the Adobe Sonata font. It is
  6138.    available by anonymous ftp from 
  6139.       ccrma-ftp.stanford.edu:/pub/Lisp/cmn.tar.Z [36.49.0.93] 
  6140.    To be added to the mailing list (same list as for Common Music), 
  6141.    send mail to cmdist-request@ccrma.stanford.edu.  Please send bug
  6142.    reports and suggestions to Bil Schottstaedt <bil@ccrma.stanford.edu>. 
  6143.  
  6144. Natural Language Processing:
  6145.  
  6146.    The Xerox part-of-speech tagger is available by anonymous ftp from
  6147.    parcftp.xerox.com:/pub/tagger/tagger-1-0.tar.Z. It is implemented in
  6148.    Common Lisp and has been tested in Allegro CL 4.1, CMU CL 17e, and
  6149.    Macintosh CL 2.0p2. For more information, contact the authors, Jan Pedersen
  6150.    <pedersen@parc.xerox.com> and Doug Cutting <cutting@apple.com>. 
  6151.  
  6152. Natural Language Generation:
  6153.  
  6154.    FUF is a natural language generation system based on Functional
  6155.    Unification Grammars implemented in Common Lisp. It includes a
  6156.    unifier, a large grammar of English (surge), a user manual and many
  6157.    examples. FUF is available by anonymous ftp from
  6158.       cs.columbia.edu:/pub/fuf/
  6159.       black.bgu.ac.il:/pub/fuf/
  6160.    as the files fuf5.2.tar.Z and surge.tar.Z. For further information,
  6161.    contact the author, Michael Elhadad <elhadad@bengus.bgu.ac.il>.
  6162.    [A WAM-based C compiler for FUF is in the works.]
  6163.  
  6164. Neural Networks:
  6165.  
  6166.    ANSIL  -- nervous.cis.ohio-state.edu:/pub/lispusers/ansil/ 
  6167.              "Advanced Network Simulator in Lisp"
  6168.              email: ansil@cis.ohio-state.edu
  6169.  
  6170. Object-Oriented Programming:
  6171.  
  6172.    PCL -- parcftp.xerox.com:/pcl/ [13.1.64.94]
  6173.    Portable Common Loops (PCL) is a portable implementation of
  6174.    the Common Lisp Object System (CLOS). A miniature CLOS
  6175.    implementation called Closette is available pcl/mop/closette.lisp.
  6176.  
  6177.    CLOS-on-KEE -- zaphod.lanl.gov:/pub/
  6178.    A subset of CLOS that is implemented on top of KEE. Contact
  6179.    egdorf%zaphod@LANL.GOV (Skip Egdorf) for more info.
  6180.  
  6181.    MCS (Meta Class System) -- ftp.gmd.de:/lang/lisp/mcs/ [129.26.8.84]
  6182.    Portable object-oriented extension to Common Lisp. Integrates the
  6183.    functionality of CLOS (the Common Lisp Object System), and TELOS, (the
  6184.    object system of LeLisp Version 16 and EuLisp).  MCS provides a metaobject
  6185.    protocol which the user can specialize. Runs in any valid Common Lisp.
  6186.    Contact: Harry Bretthauer and Juergen Kopp, German National Research
  6187.    Center for Computer Science (GMD), AI Research Division,
  6188.    P.O. Box 1316, D-5205 Sankt Augustin 1, FRG, email: juergen.kopp@gmd.de
  6189.  
  6190.    CommonORBIT (also called CORBIT) is an object-oriented extension of
  6191.    Common Lisp.  It uses a prototype (classless) model of OOP, is easy to
  6192.    use and yet has many sophisticated features found also in KL-ONE type
  6193.    languages.  CommonORBIT is a Common Lisp reimplementation of ORBIT,
  6194.    which was originally conceived by Luc Steels around 1981-1983.
  6195.    Because of its delegation-based rather than class-based inheritance,
  6196.    CommonORBIT offers extreme flexibility to define and change
  6197.    practically anything at run-time.  Because of the generic functions,
  6198.    it fits well into regular Lisp code.  It can co-exist with CLOS but
  6199.    remains completely separate. The source code of CommonORBIT is in the
  6200.    public domain and available by anonymous ftp from the Lisp
  6201.    Utilities Repository,
  6202.       ftp.cs.cmu.edu:/user/ai/lang/lisp/
  6203.    in the oop/non-clos/corbit/ subdirectory as the file corbit.tar.gz. 
  6204.    Documentation is available as the files corbit.msword.hqx, corbit.ps
  6205.    or corbit.text. A stripped-down version of CORBIT, known as BOOPS
  6206.    (Beginner's Object-Oriented Programming System), is also available
  6207.    from the repository as boops.tar.Z. For further information,
  6208.    contact the author, Koenraad de Smedt <desmedt@ruls40.LeidenUniv.nl>.
  6209.  
  6210.  
  6211. Parser Generators:
  6212.  
  6213.    Mark Johnson <mj@cs.brown.edu> has written a LALR parser generator
  6214.    for Common Lisp. It is fairly small (about 500 lines of code) and
  6215.    can be found in the Common Lisp Repository above.
  6216.  
  6217.    IPG (Incremental Parser Generator) is available by email from 
  6218.    Jan Rekers <rekers@cwi.nl>.  It is an appendix to his thesis. It is
  6219.    written in LeLisp, but should be portable to other Lisp dialects.
  6220.  
  6221.    Zebu 2.8.5 is a parser generator for Common Lisp by Joachim H. Laubsch
  6222.    <laubsch@hplabs.hpl.hp.com>.  It is an extention written in Common
  6223.    Lisp of the Scheme version.  It generates a LALR(1) parsing table.  To
  6224.    parse a string with a grammar, only this table and a driver need to be
  6225.    loaded. The present version of Zebu contains the ability to define
  6226.    several grammars and parsers simultaneously, a declarative framework
  6227.    for specifying the semantics, as well as efficiency related
  6228.    improvements.  The current version compiles a grammar with 300
  6229.    productions (including dumping of the tables to disk) in approx 2
  6230.    minutes and 30 seconds on a HP 9000/370.  This implimentation has been
  6231.    tested in Lucid CL, Allegro CL, and MCL 2.0b. The current version
  6232.    can also produce a generator in addition to a parser. A copy may be
  6233.    found on cambridge.apple.com:/pub/mcl2/contrib/zebu-2.2.tar.Z.
  6234.  
  6235.  
  6236. Probabilistic Reasoning and Statistics:
  6237.  
  6238.    BELIEF is a Common Lisp implementation of the Dempster and Kong fusion
  6239.    and propagation algorithm for Graphical Belief Function Models and the
  6240.    Lauritzen and Spiegelhalter algorithm for Graphical Probabilistic
  6241.    Models. It includes code for manipulating graphical belief models such
  6242.    as Bayes Nets and Relevance Diagrams (a subset of Influence Diagrams)
  6243.    using both belief functions and probabilities as basic representations
  6244.    of uncertainty. It is available by anonymous ftp from
  6245.       ftp.stat.washington.edu [128.95.17.34]
  6246.    and by email from the author, Russell Almond <almond@stat.washington.edu>.
  6247.    Contact the author at almond@statsci.com for information about a
  6248.    commercial version GRAPHICAL-BELIEF currently in the prototype stages.
  6249.  
  6250.    XLISP-STAT is an extensible statistics package which runs in XLISP.
  6251.    It has recently been ported to Common Lisp, and is available as
  6252.       umnstat.stat.umn.edu:/pub/xlispstat/CL/CLS1.0A1.tar.Z [128.101.51.1]
  6253.    The CL port does not yet include the lisp-stat dynamic graphics 
  6254.    package, only the numerics. The XLisp version is available from
  6255.    the above site and several mirror sites, such as mac.archive.umich.edu, 
  6256.    and runs on the Apple Macintosh, Unix systems running X11
  6257.    (Vax, PMAX, Sun3, Encore Multimax, and Cray XMP), Sun workstations
  6258.    running SunView, and the Commodore Amiga. An experimental version
  6259.    for DOS computers running Microsoft Windows 3.0 is also available.
  6260.    Documentation is available online, in the tutorial introduction
  6261.    pub/xlispstat/xlispstat.doc.tar.Z and also in the book
  6262.       Luke Tierney, "Lisp-Stat: An Object Oriented Environment for Statistical
  6263.       Computing and Dynamic Graphics", Wiley, 1990, 397 pages.
  6264.       ISBN 0-471-50916-7. 
  6265.    For more information, write to Lisp-Stat Information, School of
  6266.    Statistics, 270 Vincent Hall, University of Minnesota, Minneapolis, MN
  6267.    55455, or send e-mail to lispstat-info@umnstat.stat.umn.edu.
  6268.  
  6269.    CLASP (Common Lisp Analytical Statistics Package) provides the basic
  6270.    functionality of a statistics package. It is implemented on top of
  6271.    CLOS and CLIM on a variety of platforms, and uses BBN's SciGraph
  6272.    package for plotting. The CLIM interface includes a "notebook" that is
  6273.    both a "desktop" for icons and a Lisp interactor pane.  The Common
  6274.    Lisp Instrumentation Package (CLIP) is available along with CLASP.
  6275.    CLIP is designed to allow AI system developers andevaluators a
  6276.    portable way to define and manage "alligator clips" for instrumenting
  6277.    their programs.  CLIP produces data about program behavior in CLASP
  6278.    format, as well as other commonly used data formats.  It currently has
  6279.    facilities to support experiment design, such as scenario scripting
  6280.    and factorial combination of independent variables, and can collect
  6281.    data in summary form (at the end of each trial) or based upon the
  6282.    occurrence of specific events (both periodic and non-periodic).  CLASP
  6283.    is available by anonymous ftp from
  6284.       ftp.cs.umass.edu:/pub/eksl/clasp/
  6285.    and CLIP is in the directory 
  6286.       ftp.cs.umass.edu:/pub/eksl/clip/
  6287.    A tutorial on CLASP can be found in 
  6288.       ftp.cs.umass.edu:/pub/eksl/clasp-tutorial/
  6289.    Bugs should be reported to clasp-support@cs.umass.edu. For more
  6290.    information, contact Dave Hart <dhart@cs.umass.edu>.
  6291.  
  6292.    IDEAL is a LISP system developed for building and evaluating influence
  6293.    diagrams and Bayesian networks.  It is accompanied with a graphical
  6294.    user interface (CLIM-based) for constructing, editing, and solving
  6295.    belief networks and influence diagrams. For more information, write
  6296.    to srinivas@rpal.rockwell.com.
  6297.  
  6298. Planning:
  6299.  
  6300.    NONLIN -- cs.umd.edu:/pub/nonlin (128.8.128.8)
  6301.    Common Lisp implementation of the NONLIN planning system originally
  6302.    designed and implemented by Austin Tate. Bugs can be reported to
  6303.    nonlin-bugs@cs.umd.edu. User's group is nonlin-users@cs.umd.edu.
  6304.    The authors request that anybody ftping the code send a message to
  6305.    nonlin-users-request@cs.umd.edu, letting them know you have a copy
  6306.    and also letting them know if you wish to subscribe to the users group.
  6307.    More information can also be obtained from Jim Hendler, hendler@cs.umd.edu.
  6308.  
  6309.    ABTWEAK is a complete hierarchical, non-linear planner that extends
  6310.    David Chapman's (MIT 1986) TWEAK planner as described by 
  6311.    Yang (Waterloo) and Tenenberg (Rochester) in 1989.  This implementation
  6312.    includes a complete search strategy suited to abstraction hierarchies
  6313.    known as LEFT-WEDGE (Woods 1991). This planner and related work 
  6314.    predates that of SNLP. ABTWEAK is available by anonymous ftp from
  6315.       logos.uwaterloo.ca:/pub/abtweak/Abtweak.tar.Z
  6316.    For more information, send mail to Qiang Yang <qyang@logos.uwaterloo.ca>.
  6317.    Also, source, all related papers, and manuals are available via WWW
  6318.    at the home page of Steve Woods <sgwoods@logos.uwaterloo.ca>,
  6319.    on URL http://logos.uwaterloo.ca/students/sgwoods/sgwoods.html, or via the
  6320.    Logic Programming and Artificial Intelligence Group (LPAIG) page
  6321.    on URL http://logos.uwaterloo.ca/.
  6322.  
  6323.    RHETORICAL is a planning and knowledge tool available by
  6324.    anonymous ftp from ftp.cs.rochester.edu:/pub/packages/knowledge-tools
  6325.    in the files rhet-19-40.tar.Z and cl-lib-3-11.tar.Z. The files
  6326.    tempos-3-6.tar.Z and timelogic-5-0.tar.Z add James Allen's
  6327.    interval logic to Rhet. It runs on Symbolics Genera and
  6328.    Allegro Common Lisp. Written by Brad Miller <miller@cs.rochester.edu>.
  6329.  
  6330.    PRODIGY is an integrated planning and learning system,
  6331.    available free after signing a license agreement. Contact
  6332.    prodigy@cs.cmu.edu for more information.
  6333.  
  6334.    SOAR is an integrated intelligent agent architecture currently
  6335.    being developed at Carnegie Mellon University, the University of
  6336.    Michigan, and the Information Sciences Institute of the University of
  6337.    Southern California. SOAR, and its companion systems, CParaOPS5 and
  6338.    TAQL, have been placed in the public domain. The system may be
  6339.    retrieved by anonymous ftp to ftp.cs.cmu.edu (or any other CMU CS
  6340.    machine) in the directory /afs/cs.cmu.edu/project/soar/5.2/2/public/.
  6341.    [Note: You must cd to this directory in one atomic operation, as
  6342.    superior directories may be protected during an anonymous ftp.]  For
  6343.    more information, send email to soar-request@cs.cmu.edu or write to
  6344.    The Soar Group, School of Computer Science, Carnegie Mellon
  6345.    University, Pittsburgh, PA 15213.  Finally, though the software is in
  6346.    the public domain, the manual remains under copyright. To obtain one
  6347.    (at no charge) send a request (including your physical mail address)
  6348.    to soar-doc@cs.cmu.edu or to the physical address above. 
  6349.  
  6350.    A simple route planning agent implemented in Soar6 is available by
  6351.    anonymous ftp from 
  6352.       earth.med.ohio-state.edu:/pub/IEEE-Soar-code/route-planning.soar6.
  6353.    This is the complete code for the agent described in the IEEE Expert
  6354.    article: Smith, J. W. and Johnson, T. R., "A stratified approach to
  6355.    specifying, designing, and building knowledge systems", IEEE Expert,
  6356.    8(3):15-25, 1993.
  6357.  
  6358.    SNLP is a domain independent systematic nonlinear planner,
  6359.    available by anonymous ftp from cs.washington.edu:/pub/snlp.tar.Z
  6360.    Contact weld@cs.washington.edu for more information. 
  6361.  
  6362.    IDM is a Common Lisp implementation of both a classical and extended
  6363.    version of the STRIPS planner. It is available by anonymous ftp from 
  6364.    sauquoit.gsfc.nasa.gov (128.183.101.29). Questions, comments and bug
  6365.    reports may be sent to idm-users@chelmsford.gsfc.nasa.gov.             
  6366.  
  6367. Planning Testbeds:
  6368.  
  6369.    TILEWORLD is a planning testbed/simulator developed at SRI
  6370.    International by Martha Pollack, Michael Frank and Marc
  6371.    Ringuette. TILEWORLD originally ran under Lucid CL, but was
  6372.    later extended and ported to Allegro CL by Badr H. Al-Badr
  6373.    and Steve Hanks. The new tileworld is available by anonymous
  6374.    ftp from cs.washington.edu as the file new-tileworld.tar.Z
  6375.    It includes an X interface. Contact pollack@cs.pitt.edu for more
  6376.    information. 
  6377.  
  6378.    TRUCKWORLD is a simulated world intended to provide a 
  6379.    testbed for AI planning programs, where the planning agent
  6380.    is a truck with arms that roams around the simulated world. It is
  6381.    available by anonymous ftp from 
  6382.       cs.washington.edu:/pub/ai/truckworld.tar.Z
  6383.    It includes an X interface. Contact Steve Hanks <hanks@cs.washington.edu>
  6384.    for more information. Send mail to
  6385.       truckworld-users-request@cs.washington.edu 
  6386.    to be added to the mailing list.
  6387.  
  6388.    ARS MAGNA is a simulated world intended for use as a testbed for
  6389.    planning and mapping programs.  The simulated agent is a robot in an
  6390.    indoors environment.  High-level sensing and action are provided,
  6391.    realistically modelled on current vision and robotics research.  It is
  6392.    written in Nisp, a macro package running on top of Common Lisp.  It is
  6393.    available by anonymous ftp from 
  6394.       dept.cs.yale.edu:/pub/nisp/
  6395.    as file ars-magna.tar.Z.  It includes an X display.  Contact Sean Engelson
  6396.    <engelson@cs.yale.edu> for more information.
  6397.  
  6398. Qualitative Reasoning:
  6399.  
  6400.    QSIM is a qualitative reasoning system implemented in Common
  6401.    Lisp. It is available by anonymous ftp from cs.utexas.edu:/pub/qsim
  6402.    Contact Ben Kuipers <kuipers@cs.utexas.edu> for more information.
  6403.  
  6404.    QPE is the Qualitative Process Engine, an envisioner for QP theory.
  6405.    QPE is publically available from multivac.ils.nwu.edu:/pub/QPE
  6406.    Maintained by Ken Forbus <forbus@ils.nwu.edu>.
  6407.  
  6408. Theorem Proving:
  6409.  
  6410.    MVL (Multi-Valued Logic) is a theorem proving system written in Common
  6411.    Lisp. MVL is a bilattice-based reasoning system.  By changing the
  6412.    bilattice, you can use MVL to do truth maintenance, nonmonotonic
  6413.    reasoning, first-order reasoning, and a variety of other reasoning
  6414.    strategies.  MVL is available by anonymous ftp from 
  6415.       t.uoregon.edu:/mvl/mvl.tar.Z [128.223.56.46]
  6416.    as mvl.tar.Z. A user's manual may be found in the file manual.tex. For
  6417.    more information, contact Matthew L. Ginsberg, <ginsberg@t.stanford.edu>
  6418.    or <ginsberg@cs.stanford.edu>. Matthew asks that you send him an email
  6419.    message if you retrieve the system by anonymous ftp.
  6420.  
  6421.    Boyer-Moore
  6422.    ftp.cli.com:/pub/nqthm/nqthm.tar.Z   Contact: kaufman@cli.com
  6423.    rascal.ics.utexas.edu:/pub/             128.83.138.20
  6424.       nqthm/               Boyer and Moore's theorem prover.
  6425.                            Also available from ftp.cli.com:/pub/nqthm.
  6426.       proof-checker/       Matt Kaufmann's proof checking
  6427.                            enhancements to nqthm.
  6428.    The mailing list nqthm-users-request@cli.com is for users of the
  6429.    Boyer-Moore theorem-prover, NQTHM.
  6430.  
  6431.    DTP is a general first-order theorem prover incorporating domain-independent
  6432.    control of inference (including intelligent backtracking and subgoal
  6433.    caching).  Implemented in CLtL2 Common Lisp, it runs in Franz Allegro,
  6434.    Lucid, and Macintosh (MCL) Common Lisp.  DTP is available on the Web at
  6435.       http://meta.stanford.edu/dtp/
  6436.    or by anonymous ftp from
  6437.       meta.stanford.edu:/pub/dtp/ [36.8.0.54]
  6438.    Contact Don Geddis <Geddis@CS.Stanford.EDU> for more information.
  6439.  
  6440.    RRL (Rewrite Rule Laboratory) -- herky.cs.uiowa.edu:/public/rrl
  6441.    [128.255.28.100]
  6442.  
  6443.    FRAPPS (Framework for Resolution-based Automated Proof Procedures) is
  6444.    a portable resolution theorem-prover written in Common Lisp. It is
  6445.    available via anonymous ftp from a.cs.uiuc.edu:/pub/frapps [128.174.252.1].
  6446.    If you take a copy of FRAPPS, please send a short note to Prof.
  6447.    Alan M. Frisch <frisch@cs.uiuc.edu>.
  6448.  
  6449. Truth Maintenance:
  6450.  
  6451.    The truth maintenance system and problem solver implementations
  6452.    described in the book "Building Problem Solvers" by Ken Forbus and
  6453.    Johan de Kleer are available by anonymous ftp from
  6454.    parcftp.xerox.com:/pub/bps/. Includes a constraint propagation
  6455.    system similar to Steele's Constraints system, among other things.
  6456.    For more information send mail to Johan de Kleer <deKleer@parc.xerox.com>.
  6457.  
  6458. Virtual Reality:
  6459.  
  6460.    VEOS (Virtual Environment Operating Shell) is an extendible environment
  6461.    for prototyping distributed applications for Unix. The programmer's
  6462.    interface uses XLISP 2.1. Although intended for distributed
  6463.    Virtual Reality applications at The Human Interface Technology Lab
  6464.    in Seattle, it should be appropriate for other applications.  VEOS
  6465.    uses heavyweight sequential processes, corresponding roughly to
  6466.    unix processes. VEOS runs on DEC/5000, Sun4, and Silicon Graphics
  6467.    VGX and Indigo. VEOS is available by anonymous ftp from
  6468.       milton.u.washington.edu:/public/veos/ [128.95.136.1]
  6469.    as veos.tar.Z. If you use the software, the authors ask that you send
  6470.    them mail to veos-support@hitl.washington.edu.
  6471.  
  6472. Vision:
  6473.  
  6474.    OBVIUS -- white.stanford.edu:/obvius/ [36.121.0.16]
  6475.              whitechapel.media.mit.edu:/obvius/ [18.85.0.125]
  6476.    Object-Based Vision and Image Understanding System (OBVIUS), is a Common
  6477.    Lisp image processing package. Provides a library of image processing
  6478.    routines (e.g., convolutions, fourier transforms, statistical
  6479.    computations, etc.) on gray or binary images and image-sequences (no
  6480.    color support yet), an X windows display interface, postscript printer
  6481.    output, etc.  It uses a homebrew interface to X11 (i.e., it does not use
  6482.    clx or clue). However, they eventually hope to port Obvius to a clx/clue
  6483.    platform. Written by David Heeger <heeger@white.stanford.edu> and Eero
  6484.    Simoncelli <eero@central.cis.upenn.edu>. Runs in Lucid-4.0. Includes
  6485.    LaTeX documentation and User's Guide.
  6486.  
  6487. Miscellaneous:
  6488.  
  6489.    ftp.csrl.aoyama.ac.jp:/YY/       YY window toolkit sources
  6490.    ftp.csrl.aoyama.ac.jp:/lispsrc/  Common Lisp programs, including MIT's FRL.
  6491.  
  6492. ----------------------------------------------------------------
  6493. Subject: [6-6] Formatting code in LaTeX (WEB and other literate
  6494.                programming tools) 
  6495.  
  6496. SLaTeX is a R4RS-compliant Scheme program that allows you to write
  6497. program code "as is" in your LaTeX or TeX source.  It is particularly
  6498. geared to the programming languages Scheme and Common Lisp, and has
  6499. been tested in Chez Scheme, Common Lisp, MIT C Scheme, Elk, Scheme->C,
  6500. SCM and UMB Scheme on Unix; and MIT C Scheme and SCM on MSDOS.  The
  6501. formatting of the code includes assigning appropriate fonts to the
  6502. various tokens in the code (keywords, variables, constants, data), at
  6503. the same time retaining the proper indentation when going to the
  6504. non-monospace (non-typewriter) provided by TeX.  SLaTeX comes with two
  6505. databases that recognize the standard keywords/variables/constants of
  6506. Scheme and Common Lisp respectively.  These can be modified by the
  6507. user using easy TeX commands.  In addition, the user can inform SLaTeX
  6508. to typeset arbitrary identifiers as specially suited TeX expressions
  6509. (i.e., beyond just fonting them).  The code-typesetting program SLaTeX
  6510. is available by anonymous ftp from 
  6511.    cs.rice.edu:/public/dorai/slatex23.tar.gz
  6512. Send bug reports to dorai@cs.rice.edu.
  6513.  
  6514. SchemeWEB provides simple support for literate programming in Lisp.
  6515. SchemeWEB version 2.0 is a Unix filter that allows you to generate
  6516. both Lisp and LaTeX code from one source file.  The generated LaTeX
  6517. code formats Lisp programs in typewriter font obeying the spacing in
  6518. the source file.  Comments can include arbitrary LaTeX commands.
  6519. SchemeWEB was originally developed for the Scheme dialect of Lisp, but
  6520. it can easily be used with most other dialects.  Version 2.0 is
  6521. available in the Scheme Repository as
  6522.    cs.indiana.edu:/pub/scheme-repository/new/schemeweb.sh
  6523. or in the Comprehensive TeX Archive Network (CTAN) in the directory
  6524.    ftp.shsu.edu:/tex-archive/web/schemeweb 
  6525.  
  6526. LiSP2TeX is a system that allows easy insertions of Scheme, or Lisp,
  6527. code towards TeX files. The originality of LiSP2TeX is that it
  6528. extracts Scheme definitions from the files where they appear and wraps
  6529. them appropriately within TeX macros for insertion into the
  6530. documentation file. LiSP2TeX decorrelates writing documentation from
  6531. programming: it is therefore possible to separately develop programs
  6532. and documentations and to merge them at the end to produce up to date
  6533. final documents. LiSP2TeX also has some pretty-printing capabilities
  6534. to produce denotations full of greek letters. It is available by
  6535. anonymous ftp from ftp.inria.fr:/INRIA/Projects/icsla/.
  6536.  
  6537. See also ftp.cs.cmu.edu:/user/ai/lang/lisp/code/tools/user_man/.
  6538.  
  6539. The Literate Programming FAQ lists a number of alternatives, both
  6540. language-independent and Lisp-specific. The Literate Programming FAQ
  6541. is posted once a quarter to the comp.literate.programming newsgroup
  6542. and is available by anonymous ftp from rtfm.mit.edu. A copy may also be
  6543. requested by sending an email message to fileserv@shsu.edu
  6544.    sendme litprog.faq
  6545. in the body of the message.
  6546.  
  6547. ----------------------------------------------------------------
  6548. Subject: [6-7] Where can I get an implementation of Prolog in Lisp?
  6549.  
  6550. Implementations of Prolog in Lisp:
  6551.  
  6552.    The Frolic package from the University of Utah is written in Common Lisp
  6553.    and available by anonymous ftp from cs.utah.edu:/pub/frolic.tar.Z
  6554.      
  6555.    LM-PROLOG by Ken Kahn and Mats Carlsson is written in ZetaLisp and not
  6556.    easily portable to Common Lisp. It is available by anonymous ftp from
  6557.    sics.se:/archive/lm-prolog.tar.Z.
  6558.      
  6559.    Peter Norvig's book "Paradigms of AI Programming" includes Common Lisp
  6560.    implementations of a prolog interpreter and compiler. The software is
  6561.    available by anonymous ftp from unix.sri.com:/pub/norvig/ and on disk in
  6562.    Macintosh or DOS format from the publisher, Morgan Kaufmann.  For more
  6563.    information, contact: Morgan Kaufmann, Dept. P1, 2929 Campus Drive, Suite
  6564.    260, San Mateo CA 94403, (800) 745-7323; FAX: (415) 578-0672
  6565.  
  6566.    Harlequin's LispWorks comes with Common Prolog -- a fast
  6567.    Edinburgh-compatible Prolog integrated with Common Lisp.  Write to:
  6568.    Harlequin Limited, Barrington Hall, Barrington, Cambridge, CB2 5RG, call
  6569.    0223 872522 (or 44223 872522 outside UK), telex 818440 harlqn g, fax 0223
  6570.    872519, or send email to ai@uk.co.harlqn (or ai@harlqn.co.uk for US people).
  6571.  
  6572.    eLP (Ergo Lambda Prolog) is an interpreter written by Conal Elliott,
  6573.    Frank Pfenning and Dale Miller in Common Lisp and implements the core
  6574.    of lambda Prolog (higher-order hereditary Harrop formulas). It is
  6575.    embedded in a larger development environment called ESS (the Ergo
  6576.    Support System).  eLP implements all core language feature and offers
  6577.    a module system, I/O, some facilities for tracing, error handling,
  6578.    arithmetic, recursive top-levels, on-line documentation and a number
  6579.    of extended examples, including many programs from Amy Felty's and
  6580.    John Hannan's thesis.  It should run in Allegro Common Lisp, Lucid
  6581.    Common Lisp, Kyoto Common Lisp, CMU Common Lisp and Ibuki Common Lisp.
  6582.    The eLP implementation of lambda Prolog is no longer developed or
  6583.    maintained, but it is still available via anonymous ftp from
  6584.    ftp.cs.cmu.edu:/afs/cs.cmu.edu/project/ergo/export/ess/. The file
  6585.    ergolisp.tar.Z contains the Ergo project's extensions to Common Lisp,
  6586.    including some facilities for attributes and dealing with abstract
  6587.    syntax trees. The file sb.tar.Z contains the Ergo
  6588.    Parser/Unparser/Formatter generator and ab.tar.Z contains the Ergo
  6589.    Attribute Grammar facility. The file elp.tar.Z contains the Ergo
  6590.    implementation of lambda Prolog.  To customize grammars you need the
  6591.    sb.tar.Z file.  When you retrieve the system, please print, fill out,
  6592.    and send in a copy of the non-restrictive license you will find in the
  6593.    file LICENSE. To subscribe to the elp@cs.cmu.edu mailing list, send
  6594.    mail to elp-request@cs.cmu.edu. Bugs should be sent to
  6595.    elp-bugs@cs.cmu.edu.
  6596.  
  6597.    The book "On Lisp" by Paul Graham includes an implementation of
  6598.    Prolog in Common Lisp. The code is available by anonymous ftp from
  6599.       endor.harvard.edu:/pub/onlisp
  6600.    and also in the CMU AI Repository as 
  6601.       ftp.cs.cmu.edu:/user/ai/lang/lisp/bookcode/graham/
  6602.  
  6603. See the Scheme FAQ for information on implementations of Prolog in Scheme.
  6604.  
  6605. ----------------------------------------------------------------
  6606. Subject: [6-8] World-Wide Web (WWW) Resources
  6607.  
  6608. The World Wide Web (WWW) is a hypermedia document that spans the
  6609. Internet.  It uses the http (HyperText Transfer Protocol) for the
  6610. light-weight exchange of files over the Internet.  NCSA Mosaic is a
  6611. World Wide Web browser developed at the National Center for
  6612. Supercomputing Applications (NCSA). 
  6613.  
  6614. Mosaic's popularity derives, in part, from its ability to communicate
  6615. using more traditional Internet protocols like FTP, Gopher, WAIS, and
  6616. NNTP, in addition to http. Mosaic can display text, hypertext links,
  6617. and inlined graphics directly. When Mosaic encounters a file type it
  6618. can't handle internally, such as Postscript documents, mpeg movies,
  6619. sound files, and JPEG images, it uses an external viewer (or player)
  6620. like Ghostscript to handle the file. Mosaic also includes facilities
  6621. for exploring the Internet. In other words, Mosaic is an multimedia
  6622. interface to the Internet.
  6623.  
  6624. The hypertext documents viewed with Mosaic are written in HTML
  6625. (HyperText Markup Language), which is a subset of SGML (Standard
  6626. Generalized Markup Language).  All that is needed is just a few more
  6627. improvements, such as the ability to format tables and mathematics,
  6628. and a WYSIWYG editor, for HTML to greatly facilitate electronic
  6629. journals and other publications.
  6630.  
  6631. NCSA Mosaic for the X Window System is available by anonymous ftp from  
  6632.    ftp.ncsa.uiuc.edu:/Mosaic/
  6633. as source code and binaries for Sun, SGI, IBM RS/6000, DEC Alpha OSF/1, DEC
  6634. Ultrix, and HP-UX. Questions about NCSA Mosaic should be directed to 
  6635. mosaic-x@ncsa.uiuc.edu (X-Windows version), mosaic-mac@ncsa.uiuc.edu
  6636. (Macintosh), and mosaic-win@ncsa.uiuc.edu (Microsoft Windows).
  6637.  
  6638. A simple HTML version of the Lisp FAQ (this FAQ) is available as
  6639.    http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  6640.  
  6641. Association of Lisp Users:
  6642.    http://www.cs.rochester.edu/u/miller/alu.html
  6643.    [Contains links to a lot of Lisp resources, including a history of
  6644.    Lisp, bibliographies of Lisp books, the Lisp Repository at CMU, and
  6645.    even some Lisp humor. Very nicely done.]
  6646.    Contact: Brad Miller <miller@cs.rochester.edu>
  6647.  
  6648. ----------------------------------------------------------------
  6649. ;;; *EOF*
  6650.  
  6651. Archive-name: lisp-faq/part7
  6652. Last-Modified: Fri Mar 10 17:09:15 1995 by Mark Kantrowitz
  6653. Version: 1.51
  6654. Maintainer: Mark Kantrowitz and Barry Margolin <ai+lisp-faq@cs.cmu.edu>
  6655. URL: http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/lisp/top.html
  6656. Size: 16790 bytes, 295 lines
  6657.  
  6658. ;;; ****************************************************************
  6659. ;;; Lisp Window Systems and GUIs ***********************************
  6660. ;;; ****************************************************************
  6661. ;;; Written by Mark Kantrowitz and Barry Margolin
  6662. ;;; lisp_7.faq 
  6663.  
  6664. This post contains Part 7 of the Lisp FAQ.
  6665.  
  6666. If you think of questions that are appropriate for this FAQ, or would
  6667. like to improve an answer, please send email to us at ai+lisp-faq@cs.cmu.edu.
  6668.  
  6669. Topics Covered (Part 7):
  6670.  
  6671.   [7-1] How can I use the X Window System or other GUIs from Lisp?
  6672.   [7-2] What Graphers/Browsers are available?
  6673.  
  6674. Search for \[#\] to get to question number # quickly.
  6675.  
  6676. ----------------------------------------------------------------
  6677. Subject: [7-1] How can I use the X Window System or other GUIs from Lisp?
  6678.  
  6679. There are several GUI's and Lisp interfaces to the X Window System. Mailing
  6680. lists for these systems are listed in the answer to question [4-7].
  6681. Various vendors also offer their own interface-building packages.
  6682.  
  6683.    CLX provides basic Common Lisp/X functionality. It is a de facto standard
  6684.    low-level interface to X, providing equivalent functionality to XLib, but
  6685.    in Lisp. It is also a good source for comparing the foreign function calls
  6686.    in various Lisps. Does *not* depend on CLOS.  Available free as part of the
  6687.    X release in the contrib directory.  Also available by anonymous ftp from
  6688.    ftp.x.org:/contrib/ as the files CLX.Manual.tar.Z and CLX.R5.02.tar.Z. 
  6689.    [Note: The new version of CLX for X11R6 can be found (untarred) in
  6690.    ftp.x.org:/pub/R6untarred/contrib/lib/CLX/ and includes some slight
  6691.    modifications for CLtL2 compatability. You can get it in tarred form
  6692.    from the CMU AI Repository, Lisp section.]
  6693.    Primary Interface Author: Robert W. Scheifler <rws@zermatt.lcs.mit.edu>
  6694.    Send bug reports to bug-clx@expo.lcs.mit.edu. 
  6695.    The 232 page manual is available in /pub/R5untarred/mit/hardcopy/CLX 
  6696.    (PostScript format) and /pub/R5untarred/mit/doc/CLX (Interleaf source).
  6697.  
  6698.    CLIM (Common Lisp Interface Manager) is a portable, graphical user
  6699.    interface toolkit originally developed by International Lisp
  6700.    Associates, Symbolics, and Xerox PARC, and now under joint development
  6701.    by several Lisp vendors, including Symbolics, Franz, Lucid, Illudium,
  6702.    and Harlequin.  It is intended to be a portable successor of Symbolics
  6703.    UIMS (Dynamic Windows, Presentations Types).  CLIM 2.0 also supports
  6704.    more traditional toolkit-style programming.  It runs on Symbolics Lisp
  6705.    Machines; Allegro, Lucid, and Harlequin on several Unix platforms;
  6706.    Symbolics CLOE on 386/486 IBM PCs running Windows; and MCL on Apple
  6707.    Macintoshes.  It is *not* free, and with the exception of
  6708.    Macintoshes, if it is available it can be purchased from the vendor
  6709.    of the Lisp system you are using.  For the Macintosh version write
  6710.    to Illudium: 
  6711.      Contact: Dennis Doughty - Doughty@ileaf.com
  6712.      or contact: Bill York - york@parc.xerox.com
  6713.    Illidium has signed a distribution agreement for MCL CLIM with
  6714.    Lucid. [Contact Harlequin for information about Lucid.]
  6715.    CLIM includes a general purpose grapher. The CLIM 2.0 SPECIFICATION
  6716.    is available by anonymous ftp from ftp.uu.net:/vendor/franz/clim/clim.ps.Z.
  6717.    To be added to the mailing list send mail to clim-request@bbn.com.
  6718.  
  6719.    CLUE (Common Lisp User-Interface Environment) is from TI, and extends CLX
  6720.    to provide a simple, object-oriented toolkit (like Xt) library that uses
  6721.    CLOS. Provides basic window classes, some stream I/O facilities, and a few
  6722.    other utilities. Still pretty low level (it's a toolkit, not widget
  6723.    library).  Available free by anonymous ftp from csc.ti.com:/pub/clue.tar.Z
  6724.    Written by Kerry Kimbrough. Send bug reports to clue-bugs@dsg.csc.ti.com.
  6725.  
  6726.    CLIO (Common Lisp Interactive Objects) is a GUI from the people who created
  6727.    CLUE. It provides a set of CLOS classes that represent the standard
  6728.    components of an object-oriented user interface -- such as text, menus,
  6729.    buttons, scroller, and dialogs.  It is included as part of the CLUE
  6730.    distribution, along with some packages that use it, both sample and real.
  6731.  
  6732.    Allegro Common Windows provides a front end to CLX. Uses CLOS.
  6733.    It is *not* free. Contact info@franz.com for more information.
  6734.    [Intellicorp's KEE4.0 comes with Common Windows also. They've
  6735.     implemented the CW spec to run on Lucid 4.0 on Sparcs, HP300/400s,
  6736.     HP700/800s, and IBM RS6000s. Contact tait@intellicorp.com for more
  6737.     information.]
  6738.  
  6739.    The LispWorks Toolkit is an extensible CLOS-based widget set that uses
  6740.    CLX and CLUE. The LispWorks programming environment has been written
  6741.    using the toolkit and includes: an Emacs-like editor, listener,
  6742.    debugger, profiler, and operating system shell; browsers/graphers for
  6743.    classes, generic functions, processes, windows, files, compilation
  6744.    errors, source code systems, and setting LispWorks parameters; and an
  6745.    interactive interface builder and complete online hypertext
  6746.    documentation. Contact: lispworks-request@harlqn.co.uk
  6747.  
  6748.    CLM (Common Lisp Motif) and GINA (Generic Interactive Application) and
  6749.    IB (Interface Builder). CLM runs Motif widgets in a separate C
  6750.    process, with minimal work on the Lisp side and communicates between C
  6751.    and Lisp using TCP sockets. Runs in Allegro CL, Sun CL, CMU CL, Lucid
  6752.    CL, and Symbolics Genera. GINA uses CLOS.  Available free in the X
  6753.    contrib directory or by anonymous ftp from either
  6754.       ftp.x.org:/contrib (formerly export.lcs.mit.edu) or
  6755.       ftp.gmd.de:/gmd/gina [129.26.8.84] 
  6756.    as the files CLM+GINA.README, CLM2.2.tar.Z and GINA2.2.tar.Z.  CLM was
  6757.    written by Andreas Baecker <baecker@gmd.de>, GINA by Mike Spenke
  6758.    <spenke@gmd.de>, and IB by Thomas Berlage <berlage@gmd.de>.  
  6759.    Contact Mike Spenke for more info. To be added to the mailing list,
  6760.    send a message to gina-users-request@gmd.de.
  6761.  
  6762.    EW (Express Windows) is intended to mimic Symbolics' Dynamic Windows user
  6763.    and programmer interfaces. It is available free in the Common Lisp
  6764.    Repository as
  6765.       ftp.cs.cmu.edu:/user/ai/lang/lisp/gui/ew/
  6766.    It is no longer under active development. Runs on Sun/Lucid, Franz
  6767.    Allegro, and Symbolics. Should port easily to other Lisps with CLX. 
  6768.    Written by Andrew L. Ressler <aressler@oiscola.columbia.ncr.com>.
  6769.  
  6770.    Garnet is a large and flexible GUI. Lots of high-level features.  Does
  6771.    *not* depend on CLOS, but does depend on CLX. Garnet (version 2.0 and
  6772.    after) is now in the public domain, and has no licensing restrictions,
  6773.    so it is available to all foreign sites and for commercial uses.
  6774.    Detailed instructions for obtaining it by anonymous ftp are available
  6775.    by anonymous ftp as
  6776.       a.gp.cs.cmu.edu:/usr/garnet/garnet/README [128.2.242.7] 
  6777.    Garnet includes the Lapidiary interactive design tool, C32 constraint
  6778.    editor, spreadsheet object, Gilt Interface Builder, automatic display
  6779.    management, two widget sets (Motif look-and-feel and Garnet
  6780.    look-and-feel), support for gesture recognition, and automatic
  6781.    constraint maintenance, application data layout and PostScript
  6782.    generation. Runs in virtually any Common Lisp environment, including
  6783.    Allegro, Lucid, CMU, and Harlequin Common Lisps on Sun, DEC, HP,
  6784.    Apollo, IBM 6000, and many other machines.  Garnet helps implement
  6785.    highly-interactive, graphical, direct manipulation programs for X/11
  6786.    in Common Lisp.  Typical applications include: drawing programs
  6787.    similar to Macintosh MacDraw, user interfaces for expert systems and
  6788.    other AI applications, box and arrow diagram editors, graphical
  6789.    programming languages, game user interfaces, simulation and process
  6790.    monitoring programs, user interface construction tools, CAD/CAM
  6791.    programs, etc. Contact Brad Myers (bam@a.gp.cs.cmu.edu) for more
  6792.    information. Bug reports should be sent to garnet-bugs@cs.cmu.edu.
  6793.    Administrative questions should be sent to garnet@cs.cmu.edu or
  6794.    garnet-request@cs.cmu.edu. Garnet is discussed on the newsgroup
  6795.    comp.windows.garnet (which is gatewayed to garnet-users@cs.cmu.edu for
  6796.    those without access to netnews).
  6797.  
  6798.    LISP2WISH is a very simple demonstration of how to connect and
  6799.    communicate SYNCHRONOUSLY between a lisp process and a C process
  6800.    running a Tcl/Tk executable.  The demo uses the vanilla 'wish'
  6801.    executable that is included with the Tcl/Tk distribution.  Tcl/Tk is a
  6802.    very flexible system for building Graphical User Interfaces (GUIs),
  6803.    with the look-and-feel of Motif.  One writes scripts in a high-level,
  6804.    C-like language, and an interpreter evaluates the commands and passes
  6805.    execution either to a built-in function (and there are many), or to
  6806.    your own C routines.  Tcl/Tk is becoming increasingly popular because
  6807.    of its ease of use, and because it is freely distributable (even
  6808.    commercially, I believe).  For more information on Tcl/Tk, look on the
  6809.    USENET newsgroup comp.lang.tcl, or get the distribution from the
  6810.    archive (listed below) or ftp.cs.berkeley.edu.  The Tcl/Tk archive
  6811.    also has many user-contributed extensions which make Tcl/Tk even more
  6812.    desirable.  Tcl/Tk was originally written by Dr. John Ousterhout, at
  6813.    Berkeley.  LISP2WISH lets you make a window/menu/drawing interface for
  6814.    your lisp routines, where you can take advantage of all the stuff
  6815.    written for Tcl/Tk (and build your own!).
  6816.    LISP2WISH has only been tested under X-Windows and Lucid Common Lisp
  6817.    4.0 and 4.1, but should work on other platforms that support Lucid
  6818.    (or Allegro) and Tcl/Tk.  LISP2WISH is available at the Tcl/Tk archive
  6819.       harbor.ecn.purdue.edu:/pub/tcl/lisp2wish6.tar.gz,
  6820.    from the author through the WWW at the URL
  6821.       http://www.cis.upenn.edu/~kaye/home.html
  6822.    by anonymous ftp from 
  6823.       ftp.cis.upenn.edu:/pub/kaye/lisp2wish6.tar.Z
  6824.    or in the GUI section of the Lisp Repository as
  6825.       ftp.cs.cmu.edu:/user/ai/lang/lisp/gui/lsp2wish/lsp2wish.tgz
  6826.    For more information, contact Jonathan Kaye <kaye@linc.cis.upenn.edu>.
  6827.  
  6828.    LispView is a GUI written at Sun that does not use CLX.  Instead it
  6829.    converts Xlib.h directly into Lucid foreign function calls. It is intended
  6830.    to be fast and tight. Uses CLOS.  Available for anonymous ftp from
  6831.       ftp.x.org:/contrib/lispview1.1 (formerly export.lcs.mit.edu) and
  6832.       xview.ucdavis.edu:/pub/XView/LispView1.1 
  6833.    Includes a general-purpose 2D grapher library.
  6834.    Written by Hans Muller (hmuller@sun.com). Runs in Sun CL and Lucid CL.
  6835.    Direct questions about the source provision to lispview@Eng.Sun.Com.
  6836.    
  6837.    WINTERP (Widget INTERPreter) is an application development environment
  6838.    developed at HP. It enables the rapid prototyping of graphical
  6839.    user-interfaces through direct manipulation of user interface objects
  6840.    and their attached actions.  WINTERP provides an interface to the X11
  6841.    toolkit (Xt) and the OSF/Motif widget set and a built-in RPC mechanism
  6842.    for inter-application communication.  It includes an object-oriented
  6843.    2.5D graphics and animation widget based on the Xtango path transition
  6844.    animation system, the XmGraph graph browser (with graph nodes as
  6845.    arbitrary WINTERP widgets), and GIF image support.  The interpreter is
  6846.    based on David Betz's XLISP interpreter, which implements a small
  6847.    subset of Common Lisp and runs on PCs, IBM RS/6000, Decstation 3100s, 
  6848.    HP9000s, Sun3, Sparcs, SGI, and NeXT.  XLISP provides a simple 
  6849.    Smalltalk-like object system, with OSF/Motif widgets as real XLISP
  6850.    objects -- they can be specialized via subclassing, methods added
  6851.    or altered, etc. WINTERP includes an interface to GNU-Emacs which
  6852.    allows code to be developed and tested without leaving the editor.
  6853.    WINTERP is a free-standing Lisp-based tool for setting up window
  6854.    applications. WINTERP is available free in X contrib directory, or
  6855.    by anonymous ftp from
  6856.       ftp.x.org:/contrib/devel_tools/
  6857.    as winterp-???.tar.gz (formerly export.lcs.mit.edu) where ??? is the
  6858.    version number. The current version is 2.03 (X11r6 support).  If you
  6859.    do not have Internet access you may request the source code to be
  6860.    mailed to you by sending a message to winterp-source@netcom.com.
  6861.    The WWW home page for WINTERP is accessible via the URL
  6862.        http://www.eit.com/software/winterp/winterp.html
  6863.    or mirrored on
  6864.        file://ftp.x.org/contrib/devel_tools/winterp.html
  6865.    Contact Niels Mayer <mayer@netcom.com> for more information. To be
  6866.    added to the mailing list, send mail to winterp-request@netcom.com.
  6867.  
  6868.    Xgcl provides an interface to X Windows for GCL (GNU Common Lisp),
  6869.    formerly Austin Kyoto Common Lisp (AKCL). It includes a low-level
  6870.    interface to the Xlib routines, and an interface that provides
  6871.    graphics, menus, and mouse interaction via functions that are called
  6872.    from Lisp. Xgcl is built on top of GCL, and it is somewhat larger
  6873.    (e.g. 6.7 MB for Xgcl vs. 4.9 MB for GCL) because it incorporates
  6874.    Xlib.  To make Xgcl, you must first obtain and make GCL.  The code
  6875.    was written by Gordon Novak, Hiep Nguyen, and William Schelter. Xgcl
  6876.    is available by anonymous FTP from
  6877.        math.utexas.edu:/pub/gcl/
  6878.        ftp.cli.com:/pub/gcl/
  6879.        ftp.cs.utexas.edu:/pub/novak/xgcl/
  6880.    and on the Web from
  6881.        http://www.cs.utexas.edu/users/novak
  6882.    as the file xgcl-2.tgz. To use, put the xgcl-2.tgz file in the same
  6883.    directory as gcl-1.1.tgz and uncompress it with
  6884.        gzip -dc xgcl-2.tgz | tar xvf -
  6885.    Then see the README in the directory xgcl-2. For more information,
  6886.    write to Gordon Shaw Novak, Jr. <novak@cs.utexas.edu>.
  6887.  
  6888.    YYonX is a port of the YY system to X windows. Runs in Lucid CL, Allegro
  6889.    CL, and Symbolics Genera. Supports kanjii.  Developed at Aoyama Gakuin
  6890.    University. Available free by anonymous ftp from 
  6891.       ftp.csrl.aoyama.ac.jp:/YY/
  6892.    Written by Masayuki Ida <ida@cc.aoyama.ac.jp>
  6893.  
  6894.    Picasso is a CLOS based GUI, and is available from
  6895.       postgres.berkeley.edu:/pub/Picasso-2.0 
  6896.       toe.cs.berkeley.edu:/pub/picasso/ 
  6897.    It runs on DecStation 3100s, Sun3 (SunOs), Sun4 (Sparc), and Sequent
  6898.    Symmetry in Allegro CL. The file pub/xcl.tar.Z contains X-Common Lisp
  6899.    interface routines. Send mail to picasso@postgres.berkeley.edu for
  6900.    more information. [Picasso is no longer an actively supported system.]
  6901.  
  6902.    XIT (X User Interface Toolkit) is an object-oriented user interface
  6903.    development environment for the X Window System based on Common Lisp,
  6904.    CLOS, CLX, and CLUE.  It has been developed by the Research Group
  6905.    DRUID at the Department of Computer Science of the University of
  6906.    Stuttgart (druid@informatik.uni-stuttgart.de) as a framework for
  6907.    Common Lisp/CLOS applications with graphical user interfaces for the X
  6908.    Window System.  XIT contains user interface toolkits, including
  6909.    general building blocks and mechanisms for building arbitrary user
  6910.    interface elements and a set of predefined common elements (widgets),
  6911.    as well as high-level interactive tools for constructing, inspecting,
  6912.    and modifying user interfaces by means of direct manipulation.
  6913.    Although the system kernel is quite stable, XIT is still under active
  6914.    development.  XIT can be obtained free by anonymous ftp from
  6915.    ftp.informatik.uni-stuttgart.de:/pub/xit/ [129.69.211.2]
  6916.  
  6917. ----------------------------------------------------------------
  6918. Subject: [7-2] What Graphers/Browsers are available?
  6919.  
  6920. Most of the graphics toolkits listed above include graphers. In
  6921. particular, CLIM, LispWorks, Garnet, and Lispview all include
  6922. graphers. The ISI grapher used to be in fairly widely used, but the
  6923. CLIM grapher seems to be overtaking it in popularity.
  6924.  
  6925. A simple grapher like the one described in "Lisp Lore" by Bromeley and
  6926. Lamson is available by anonymous ftp from
  6927.    ftp.csrl.aoyama.ac.jp:/graphers/ 
  6928. as the file graphers.tar.Z.uu. It includes versions for CLX, Express
  6929. Windows, NCW, CLUE, CLM/GINA, Common Windows, LispView, Winterp, CLIM
  6930. and YY. Several implementations have a mouse sensitivity feature and
  6931. others have implementation-specific features.  A copy has been made
  6932. available from the Lisp Utilities Repository. For further information,
  6933. contact Masayuki Ida <ida@csrl.aoyama.ac.jp>.
  6934.  
  6935. ----------------------------------------------------------------
  6936. ;;; *EOF*
  6937.  
  6938.