Frequently Asked Questions about KCL and AKCL News: Novak's X interface. 1. What is KCL? KCL, Kyoto Common Lisp, is an implementation of Lisp, conforming to the first edition of the book `Common Lisp: The Language,' G. Steele, et al., Digital Press, 1984. KCL was written by T. Yuasa and M. Hagiya at the Research Institute for Mathematical Sciences, Kyoto University. Current email addresses for the authors are yuasa@tutics.tut.ac.jp and hagiya@is.s.u-tokyo.ac.jp. KCL is written in the language C. KCL is very C-oriented; for example, the compilation of Lisp functions in KCL involves a subsidiary C compilation. 2. What is AKCL? AKCL is a collection of ports, bug fixes, and performance improvements to KCL written almost entirely by Bill Schelter, Mathematics Department, University of Texas at Austin, wfs@cli.com or wfs@rascal.ics.utexas.edu. To build AKCL, one must also have in place the sources for KCL. At the time one builds AKCL, one automatically merges AKCL changes with the KCL sources, which are left unmodified, in accordance with the KCL license. 3. On what machines and under what operating systems does AKCL currently run? Currently, AKCL (version 1-615) runs on: * dec3100: Decstation 3100,5000, OS=Ultrix V3.1C-0 (Rev. 42) [akcl 505] ULTRIX V4.2 (Rev. 96)[akcl 602] (VOL= ) * hp300-bsd: Hp 350, 370 [motorola 68K] under 4.3 BSD (mt xinu) * hp300: Hp 350, 370 under HPUX. * hp800: Hp 720,730 under HPUX (version 8). Possibly hp 800 also * mac2: Macintosh under AUX (unix) * mp386: intel 386 under System V 3 (eg microport,interactive) * ncr: intel 386 under System V 4 (loader sfasl not done). * ps2_aix: ibm ps2 under aix * rios: Ibm risc 6000 under aix3. * rt_aix: ibm rt under aix release 2. * sgi4d: 4d silicon graphics (IRIX System V Release 3.3.1)[akcl 600] * sgi: silicon graphics 3d versions * sun3-os4: sun3 under os 4.03, 4.1, 4.1.1 * sun3: Sun 3 (motorola 68K) Sun OS 3.5 * sun4: Sun 4,(sparc) sparctations, sun os 4.03, 4.1, or 4.1.1 * symmetry: sequent symmetry (386 chips) DYNIX-3.0.12+ * u370: IBM 370 (3090's) under AIX * vax: Vax under 4.3 bsd., also ultrix The current version of this list of machines is, in general, to be found in the file ./MACHINES in the AKCL distribution. 4. How can one obtain KCL or AKCL? Both KCL and AKCL may be obtained by anonymous ftp from Internet sites ftp.cli.com (192.31.85.129), rascal.ics.utexas.edu (128.83.138.20), and 133.11.11.11 (a machine in Japan). The bandwidth within North America is usually higher to rascal. A number of other sites pick up this distribution, but usually with some delay. On ftp.cli.com, start with the file /pub/akcl/AKCL.README. 5. What are the licensing, copyright, public domain, and ownership characteristics of KCL and AKCL? KCL is copyrighted, and changes to the sources are forbidden. Before obtaining KCL by anonymous ftp, one must fill out and mail (by physical mail, not email) the KCL license agreement, which may be found in the file /pub/kcl/kcl.license on ftp.cli.com. There is no fee for KCL. There are no additional legal requirements for obtaining AKCL. But, to repeat, to build AKCL one must first get KCL, which includes signing and sending in the license. Note that there has been a change of address for the licenses. The first release of KCL required that licenses be sent to Kyoto. The correct address to which to send licenses changed in 1992 to `Special Interest Group in LISP, c/o Taiichi Yuasa, Department of Computer Science, Toyohashi University of Technology, Toyohashi 441, JAPAN'. 6. How does one build AKCL? Read the file AKCL.README, available by anonymous ftp. 7. How are KCL/AKCL bugs fixed? Bugs may be reported to the (unmoderated) Internet mailing list kcl@cli.com, which is read by many folks, including Yuasa and Schelter. Based upon the history of the last five years, one can say that so far those two seem to fix bugs practically by return mail. To subscribe to the kcl@cli.com mailing list, send a request to kcl-request@cli.com. Other knowledgeable readers of kcl@cli.com also sometimes contribute bug fixes. The archive of this mailing list is the file /pub/kcl/kcl-mail-archive on ftp.cli.com. Please do not send requests for addition to or deletion from this list to kcl@cli.com but instead send them to kcl-request@cli.com. Messages sent to kcl@cli.com automatically go out to probably hundreds of readers. 8. Is there publicly available a port of KCL to IBM PC (MS DOS), Macintosh (native os), or Next? To the best of my (RSB) current knowledge, the answers are `BETA' for IBM-PC/MS-DOS, `NO WAY' for the native MAC os, and `PARTIAL' for the Next. About the current state of the DOS version, Schelter (wfs@cli.com) remarks `There is a beta version of AKCL for DOS on math.utexas.edu:pub/beta2.zip. See the readme.dos in that distribution. Building from the source under DOS is not yet fully automated due to the lack of a standard make and standard shell under DOS. The 615 sources contain most patches required. The beta version has successfully compiled and run maxima, nqthm, and axiom (an 800 + file algebra system from ibm).' Apropos Next, we have the following information from yone@vcdew25.lsi.tmg.nec.co.jp: `AKCL 1-615 for NeXT is now available from rascal.ics.utexas.edu (128.83.138.20) as pub/NeXT-akcl-1-615.tar.Z. It contains NeXT-specific files to get AKCL 1-615 to run on NeXT under OS 2.X. (I don't know if it will work on OS 3.0.) Besides NeXT-akcl-1-615.tar.Z, you need akcl-1-615.tar.Z and kcl.tar.Z to make the whole system.' Several people have looked at the idea of getting KCL to compile under the native Mac OS (as opposed to the Unix-like A/UX OS, for which a port has been written), but they have declared it too hard to do. 9. How fast is AKCL/KCL? One can engender hot disputes by making claims about Lisp implementation performance or quality. Perhaps no one will object to my assertion that some researchers who write and use Lisp systems for a living voluntarily use AKCL exclusively even though they could afford to be using any other Lisp. Factors which influence this decision include (a) one has the sources available and (b) on some benchmarks, KCL/AKCL seems (to the runners of those benchmarks) to be fastest. BUT on the other hand, some knowledgeable users (it could be the vast majority for all I know) have compared AKCL and decided to use other Lisps instead, based not only on performance reasons but on factors such as access to windows and existence of commercial support/maintenance. If you are interested in doing some of your own benchmarking of AKCL and other Lisps, you may be interested in the file gabriel.tar.Z, which contains versions of the Gabriel benchmarks. To obtain maximum speeds with AKCL, there are two important things to do that might not be necessary with other Lisps. (a) To the extent possible, use PROCLAIM to assert that any function takes a fixed number of arguments and returns a single value. Such proclamations generally insure that a call of such a function will cost no more than a C function call, plus one extra memory reference, because the function might be traced. (b) To the extent possible, declare that arithmetic operations and array operations are FIXNUM operations on SIMPLE-VECTORs. This will generally insure that such operations translate into their simplest C counterparts, plus one extra memory reference in the case of array operations, because arrays are located in a different space than their headers. An arithemtic operation or array operation that is not suitably declared can take perhaps 80 times longer, not even counting garbage collection overhead caused by unnecessary `boxing' of numbers. One technique to use to check see whether enough declarations have been added is to use DISASSEMBLE to inspect the C code that will be compiled for critical functions. 10. Is there AKCL support for X-windows? Gordon Novak (novak@cs.utexas.edu) has produced a powerful and highly efficient AKCL interface to X windows. It includes (1) the Xakcl interface, written by Hiep Huu Nguyen, which allows the Xlib library functions in C to be called from AKCL and (2) the dwindow interface, written by Gordon S. Novak Jr., which is an "easy-to-use" interface built on the Xakcl interface. It includes drawing functions, menus, and dynamic mouse interaction. The packages are contained in the file xakcl-1.tar.Z . After ftp'ing this file from rascal.ics.utexas.edu:pub/ or ftp.cli.com:pub/akcl/, do: uncompress xakcl-1.tar.Z tar -xf xakcl-1.tar Then see the README file for further details. These packages have been tested on HP 9000/370, Sun-4, and Sparcstation-1. On Internet site parcftp.xerox.com is the file /pub/pcl/March-92-systems.tar.Z, which is an AKCL system that includes, among other things, CLX (another interface to X), PCL, and a Common Lisp Condition System. Start with the files README and instructions-for-building-akcl. This system is the work of Richard Harris, rharris@rdrc.rpi.edu. 11. Is there a Lisp-machine-like environment for using KCL/AKCL? I find using AKCL under shell mode within Gnu Emacs delightful. The ilisp system (anonymous ftp from katmandu.mt.cs.cmu.edu) adds many Lispm-like features to Gnu Emacs. 12. What is the documentation for KCL/AKCL? Mainly one uses Steele's book `Common Lisp the Language', and this is as it should be. An inconsistency between that book and KCL/AKCL should be reported to kcl@cli.com, and one can expect, based upon five years of experience, that the inconsistency will be soon removed. For the implementation specific details (e.g., how to get garbage collection information, how to exit from Lisp), see the files ./doc/kcl-report.tex and ./doc/DOC. Worthy of special note is that Schelter has added an ephemeral, or stratified, garbage collection algorithm, for certain architectures with user settable memory protection bits, such as Sparcs. This feature may be turned on with the command (si::sgc-on t). 13. Can one still install KCL and not bother with AKCL? The last time I heard, a Sun OS upgrade made it impossible any longer to bring up KCL on a Sun-3 as one once could by following the 1987 instructions in the file kcl.broadcast, which announced the availability of KCL by anonymous ftp. Presumably this is a minor and easy to fix problem. But because AKCL includes some bug fixes to KCL and deals with many operating system issues encountered since 1987, I recommend the use of AKCL rather than the 1987 version of KCL alone. 14. What is Ibuki? Richard Weyhrauch, rww@ibuki.com, runs a company called Ibuki that sells and ports a version of KCL. They have ported it to *many* machines. 15. What about the second edition of `Common Lisp the Language', 1990, and the emerging ANSI Common Lisp standard? To the best of my (RSB) knowledge, there is *currently* no effort anywhere underway to produce a KCL/AKCL that conforms to the emerging new Common Lisp, ANSI standard. But in view of the fact that a new standard has not yet been promulgated, this may be just as well. As Steele remarks in the preface to the second edition, `in no way does this book constitute a definitive description of the forthcoming ANSI standard.' 16. How big is AKCL? To build AKCL, I recommend having about about 30 megabytes of free space before starting to get the sources. However, a complete, executable, stripped, Sun-3 AKCL is only 2.2 megabytes. A Sparc AKCL is only 2.5 megabytes. 17. What if one cannot get KCL or AKCL by ftp? I suggest that you ask one of the following for help: Yuasa, Hagiya, or Schelter, at the email addresses given above. Please don't ask me. 18. How can one write native C code and interface it with KCL/AKCL? This is perhaps the most frequently asked technical question about KCL, and perhaps the least well answered. There is some information on this topic in the KCL file doc/kcl-report.tex. Interfacing to C is a nontrivial thing to do because it involves knowledge of Lisp data structure layout and Lisp garbage collection, both of which are hairy subjects whose details change as AKCL evolves. A few quite experienced programmers seem to be able to obtain any effects in this vicinity that they want, but in general this seems to be an art this is crying to be illuminated with a good how-to-do-it manual. Schelter remarks `Look in the DOC file under DEFENTRY. Additionally look at examples in misc/rusage.lsp [defines a defstruct matching a C struct] and lsp/littleXlsp.lsp [interfaces with C library for X windows]. See also DEFCFUN.' 19. What can I do if I run out of space in AKCL? Like any Lisp, AKCL does automatic storage allocation and deallocation. However, it is useful to know about the following remedies for some situations in which you run up against implementation limits. (a) To increase the size of the AKCL stack, (setq si::*multiply-stacks* 4) and EXIT TO THE AKCL TOP LEVEL. (b) To increase the number of pages of space available for data structures, rebuild AKCL after redefining MAXPAGE in the AKCL source file h/bsd.h to be twice as big as before. The value (16384*2), for example, will let AKCL generate 10,000,000 conses. (c) To compile large files on a RISC machine, such as a Sparc, you may need to arrange for the *.c files to automatically `split' into smaller files. I suggest (setq compiler::*split-files* 200000). (d) To perform certain big bignum computations, you may need to increase the size of the bignum stack by calling the function si::multiply-bignum-stack, e.g., (si::multiply-bignum-stack 4). 20. Who are you? Robert S. Boyer's (boyer@cli.com) involvement with KCL/AKCL is essentially that of a mere Lisp user. I was involved in no way with the creation of KCL. I am not involved with the licensing of KCL. I have had only the most superficial and tangential involvement with bug fixing and porting of KCL/AKCL. I rarely help to maintain the kcl@cli.com mailing list. I have no financial involvement with KCL/AKCL or Ibuki. All opinions expressed above are mine but not necessarily those of anyone else, including the University of Texas at Austin, Computational Logic, or the creators of KCL or AKCL. The source file for this FAQ is /pub/kcl/kcl.faq, visible for anonymous ftp from Internet host ftp.cli.com. Last update: December 28, 1993