Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cl(1) — NEXTSTEP 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CL(1)  —  UNIX Programmer’s Manual

NAME

cl − Allegro CL™, an extended implementation of Common Lisp

SYNOPSIS

cl [ −q | −qq ] [ −batch ] args ... 

DESCRIPTION

When run, cl invokes an interactive Common Lisp programming environment.  It reads expressions from stdin, which it then evaluates, and prints the results to stdout.  This process of reading, evaluate, and printing is embodied in a program called the top level . 

Note that as delivered, your NeXT machine does not contain an executable Lisp image.  Before you use Lisp the first time, you must build such an image.  See the entry about-building-lisp in the directory /NextLibrary/Documentation/CommonLisp/CLUserMan/abouts/ in the Digital Librarian for complete information about building a Lisp image.  The release notes, found in the file /NextLibrary/Documentation/NeXT/RelNotes/LispNotes.wn, also discuss building an image.  (You may chose a name different than ‘cl’ for the image during the build process.  If you do, use that name (with arguments as specified above) to start Lisp.) 

The arguments −q , −qq , and −batch control how Lisp is started up.  If neither −q or −qq is specified, Lisp will read files named .clinit.cl in the current directory and in your home directory (if the files exist) and evaluate the forms in those files.  If −q is specified, only the .clinit.cl file in the home directory will be read.  Such a file in the current directory, if it is different from the home directory, will be ignored.  If −qq is specified, no .clinit.cl files will be read. 

The −batch option specifies that Lisp will run in batch mode.  It will take input from stdin and exit when it encounters an EOF.  In batch mode, Lisp will also exit when it encounters an error. 

You may specify as many additional arguments as you wish.  These extra arguments will be available to the running Lisp via the functions sys:command-line-argument, sys:command-line-arguments, and sys:command-line-argument-count.  With those functions, you can arrange for specific arguments to have specific effects.  By default, however, any extra arguments simply affect the functions named. 

The specification for Common Lisp is found in Common Lisp: the Language by Guy Steele Jr.  Allegro CL is a complete implementation of Common Lisp as specified in Common Lisp: the Language.  Along with all the standard Common Lisp special forms, functions, variables and macros, Allegro CL provides a number of useful extensions to Common Lisp, including an interface to C and Objective C, and an interface to the Application Kit. 

Lisp is an interpretive language, which means that when you start up Lisp, you see a Lisp prompt to which you type input, typically a form which the system must evaluate.  The system returns the result of the evaluation and then prompts you for the next input.  In order to exit Lisp, enter the command :exit or the form (exit). 

You may run Lisp directly from the shell or as a subprocess of the GNU Emacs editor.  We recommend that you use GNU Emacs if possible since it provides editing capabilities which make Allegro CL easier to use.  An Emacs/Lisp interface is provided to assist you in running Lisp as a subprocess of Emacs, and is already installed in /usr/lib/emacs/lisp/fi/. 

Online documentation for Allegro CL is found in the /NextLibrary/Documentation/CommonLisp/CLUserMan directory.  The documentation is organized by symbol names (symbols identify functions and variables in Lisp).  Each symbol name has a complete page describing its use and including a template for use, a description, examples, and references to related symbols.  The pages are categorized by package (in Lisp, symbols live in specific packages), with a directory for each package.  There is an additional directory called ‘abouts’.  It contains pages titled ‘about-<something>’, which are essays providing an overview of some concept important to Allegro CL.  about-initialization describes how to start up Lisp, for example, while about-objective-c describes the interface between Lisp and Objective C. 

Note that there is no online documentation for standard Common Lisp functions and symbols (except for a few cases where implementation specific details are provided - load and inspect for example).  The book Common Lisp: the Reference by the technical staff at Franz Inc.  (1988, Addison-Wesley, Reading MA) provides a description of Common Lisp symbols arranged in a dictionary format.  We recommend that you have that book (or some other providing the same information) handy when you use Allegro CL.  You may also wish to have a copy of the Allegro CL User Guide available from Franz Inc. (1995 University Ave, Berkeley CA 94704).  All the information in the User Guide is available in the online documentation but it is organized differently and you may prefer to have a hard copy handy.  It is not necessary to have the User Guide to use Allegro CL on the NeXT, however. 

The online documentation and Common Lisp: the Reference assume some knowledge of Lisp.  If you are a beginner, we suggest that you learn Lisp from one of the many standard texts available.  One very good introductory text is Lisp by Patrick Winston and Berthold Horn (2nd Edition, 1984, Addison Wesley, Reading MA - be sure to use the second edition). 

4th Berkeley Distribution  —  August 21, 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026