[ba4d9e]: clisp.html Maximize Restore History

Download this file

clisp.html    477 lines (388 with data), 16.0 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<HEAD>
<TITLE> CLISP manual page </TITLE>
</HEAD>
<BODY>
<H1>CLISP manual page</H1>
<UL>
<LI> <A HREF="#Name">Name</A>
<LI> <A HREF="#Synopsis">Synopsis</A>
<LI> <A HREF="#Description">Description</A>
<LI> <A HREF="#Options">Options</A>
<LI> <A HREF="#Reference">Reference</A>
<LI> <A HREF="#Use">Use</A>
<LI> <A HREF="#Files">Files</A>
<LI> <A HREF="#Environment">Environment</A>
<LI> <A HREF="#See also">See also</A>
<LI> <A HREF="#Bugs">Bugs</A>
<LI> <A HREF="#Projects">Projects</A>
<LI> <A HREF="#Authors">Authors</A>
</UL>
<P>
<HR>
<A NAME="Name">
<H2>Name</H2>
</A>
<CODE>clisp</CODE> - Common Lisp language interpreter and compiler
<A NAME="Synopsis">
<H2>Synopsis</H2>
</A>
<CODE>clisp</CODE>
[ <A HREF="#Option -h"><CODE>-h</CODE></A> | <A HREF="#Option -h"><CODE>--help</CODE></A> ]
[ <A HREF="#Option --version"><CODE>--version</CODE></A> ]
[ <A HREF="#Option --license"><CODE>--license</CODE></A> ]
[ <A HREF="#Option -B"><CODE>-B</CODE> <EM>lisplibdir</EM></A> ]
[ <A HREF="#Option -K"><CODE>-K</CODE> <EM>linking-set</EM></A> ]
[ <A HREF="#Option -M"><CODE>-M</CODE> <EM>memfile</EM></A> ]
[ <A HREF="#Option -m"><CODE>-m</CODE> <EM>memsize</EM></A> ]
[ <A HREF="#Option -L"><CODE>-L</CODE> <EM>language</EM></A> ]
[ <A HREF="#Option -N"><CODE>-N</CODE> <EM>localedir</EM></A> ]
[ <A HREF="#Option -E"><CODE>-E</CODE><EM>domain</EM> <EM>encoding</EM></A> ]
[ <A HREF="#Option -q"><CODE>-q</CODE></A> | <A HREF="#Option -q"><CODE>--quiet</CODE></A> | <A HREF="#Option -q"><CODE>--silent</CODE></A> ]
[ <A HREF="#Option -w"><CODE>-w</CODE></A> ]
[ <A HREF="#Option -I"><CODE>-I</CODE></A> ]
[ <A HREF="#Option -a"><CODE>-a</CODE></A> ]
[ <A HREF="#Option -p"><CODE>-p</CODE> <EM>packagename</EM></A> ]
[ <A HREF="#Option -C"><CODE>-C</CODE></A> ]
[ <A HREF="#Option -norc"><CODE>-norc</CODE></A> ]
[ <A HREF="#Option -i"><CODE>-i</CODE> <EM>initfile</EM> ...</A> ]
[ <A HREF="#Option -c"><CODE>-c</CODE> [ <CODE>-l</CODE> ] <EM>lispfile</EM> [ <CODE>-o</CODE> <EM>outputfile</EM> ] ...</A> ]
[ <A HREF="#Option -x"><CODE>-x</CODE> <EM>expression</EM></A> ]
[ <A HREF="#Option exec"><EM>lispfile</EM></A>
[ <A HREF="#Option exec"><EM>argument</EM> ...</A> ] ]
<A NAME="Description">
<H2>Description</H2>
</A>
Invokes the common lisp interpreter and compiler. Invoked without
arguments, executes a read-eval-print loop, in which expressions are in
turn read from standard input, evaluated by the lisp interpreter, and
their results output to standard output. Invoked with <A HREF="#Option -c"><CODE>-c</CODE></A>,
the specified lisp files are compiled to a bytecode that can be executed
more efficiently.
<A NAME="Options">
<H2>Options</H2>
</A>
<DL>
<DT> <A NAME="Option -h"> <B><CODE>-h</CODE></B>, <B><CODE>--help</CODE></B> </A>
<DD> Displays a help message on how to use <CODE>clisp</CODE>.
<P>
<DT> <A NAME="Option --version"> <B><CODE>--version</CODE></B> </A>
<DD> Displays the <CODE>clisp</CODE> version number, as given by the function
call <CODE>(<A HREF="http://www.harlequin.com/education/books/HyperSpec/Body/fun_lisp-impl_tion-version.html">lisp-implementation-version</A>)</CODE>.
<P>
<DT> <A NAME="Option --license"> <B><CODE>--license</CODE></B> </A>
<DD> Displays a summary of the licensing information, the GNU GPL.
<P>
<DT> <A NAME="Option -B"> <B><CODE>-B</CODE> <EM>lisplibdir</EM></B> </A>
<DD> Specifies the installation directory. This is the directory containing
the linking sets and other data files.
This option is normally not necessary, because the installation directory
is already built-in in the <CODE>clisp</CODE> executable.
<P>
<DT> <A NAME="Option -K"> <B><CODE>-K</CODE> <EM>linking-set</EM></B> </A>
<DD> Specifies the linking set to be run. This is a directory containing
at least a main executable and an initial memory image. Possible values are
<CODE>base</CODE>, <CODE>full</CODE>. The default is <CODE>base</CODE>.
<P>
<DT> <A NAME="Option -M"> <B><CODE>-M</CODE> <EM>memfile</EM></B> </A>
<DD> Specifies the initial memory image.
This must be a memory dump produced by the
<CODE><A HREF="impnotes.html#image">saveinitmem</A></CODE> function.
It may have been compressed using GNU gzip.
<P>
<DT> <A NAME="Option -m"> <B><CODE>-m</CODE> <EM>memsize</EM></B> </A>
<DD> Sets the amount of memory <CODE>clisp</CODE> tries to grab
on startup. The amount may be given as <EM>nnnnnnn</EM> (measured in bytes),
<EM>nnnn</EM> <CODE>K</CODE> or <EM>nnnn</EM> <CODE>KB</CODE> (measured in kilobytes) or
<EM>n</EM> <CODE>M</CODE> or <EM>n</EM> <CODE>MB</CODE> (measured in megabytes).
Default is 2 megabytes.
The argument is constrained above 100 KB.
-- This version of <CODE>clisp</CODE>
is not likely to actually use the entire <EM>memsize</EM>
since garbage collection will periodically reduce the amount of used memory.
It is therefore common to specify 10 MB even if only 2 MB are going to be used.
<P>
<DT> <A NAME="Option -L"> <B><CODE>-L</CODE> <EM>language</EM></B> </A>
<DD> Specifies the language <CODE>clisp</CODE>
uses to communicate with the user. This may be
<CODE>english</CODE>, <CODE>deutsch</CODE>, <CODE>francais</CODE>,
<CODE>espanol</CODE>.
Other languages may be specified through the environment variable
<CODE>LANG</CODE>,
provided the corresponding message catalog is installed.
<P>
<DT> <A NAME="Option -N"> <B><CODE>-N</CODE> <EM>localedir</EM></B> </A>
<DD> Specifies the base directory of locale files. <CODE>clisp</CODE>
will search its message catalogs in
<EM>localedir</EM><CODE>/</CODE><EM>language</EM><CODE>/LC_MESSAGES/clisp.mo</CODE>.
<P>
<DT> <A NAME="Option -E"> <B><CODE>-E</CODE><EM>domain</EM> <EM>encoding</EM></B> </A>
<DD> Specifies the encoding used for a given domain, overriding the default
which depends on the environment variables <CODE>LC_ALL</CODE>,
<CODE>LC_CTYPE</CODE>, <CODE>LANG</CODE>. <EM>domain</EM> can be
<CODE>file</CODE>, affecting <CODE>*default-file-encoding*</CODE>, or
<CODE>pathname</CODE>, affecting <CODE>*pathname-encoding*</CODE>, or
<CODE>terminal</CODE>, affecting <CODE>*terminal-encoding*</CODE>, or
<CODE>foreign</CODE>, affecting <CODE>*foreign-encoding*</CODE>, or
<CODE>misc</CODE>, affecting <CODE>*misc-encoding*</CODE>.
<P>
<DT> <A NAME="Option -q"> <B><CODE>-q</CODE></B>, <B><CODE>--quiet</CODE></B>, <B><CODE>--silent</CODE></B> </A>
<DD> Quiet: <CODE>clisp</CODE>
displays no banner at startup and no good-bye message when quitting.
<P>
<DT> <A NAME="Option -w"> <B><CODE>-w</CODE></B> </A>
<DD> Wait for keypress after program termination.
<P>
<DT> <A NAME="Option -I"> <B><CODE>-I</CODE></B> </A>
<DD> Be ILISP friendly. ILISP is an alternative Emacs interface to Common Lisp
systems. With this option,
<CODE>clisp</CODE>
interacts in a way that ILISP can deal with.
Currently the only effect of this is that unnecessary prompts are not
suppressed.
Furthermore, the GNU readline library treats Tab as a normal self-inserting
character.
<P>
<DT> <A NAME="Option -a"> <B><CODE>-a</CODE></B> </A>
<DD> ANSI CL compliant: Comply with the ANSI CL specification even on
those issues where ANSI CL is broken. This option is provided for maximum
portability of Lisp programs, and is not useful for actual everyday work.
It sets the variable <CODE>*package*</CODE> to
<A HREF="impnotes.html#imppack"><CODE>COMMON-LISP-USER</CODE></A>
and the symbol macro <CODE>*ansi*</CODE> to <CODE>t</CODE>.
See <A HREF="impnotes.html#ansi">impnotes.html,
section "Maximum ANSI CL compliance"</A>, for details.
<P>
<DT> <A NAME="Option -p"> <B><CODE>-p</CODE> <EM>packagename</EM></B> </A>
<DD> At startup the value of the variable <CODE>*package*</CODE> will
be set to the package named <EM>packagename</EM>. The default is the package
which was active when the image was <A HREF="impnotes.html#image">saved</A>,
normally <A HREF="impnotes.html#imppack"><CODE>USER</CODE></A>, or
<A HREF="impnotes.html#imppack"><CODE>COMMON-LISP-USER</CODE></A> if the option
<A HREF="#Option -a"><CODE>-a</CODE></A> was specified.
<P>
<DT> <A NAME="Option -C"> <B><CODE>-C</CODE></B> </A>
<DD> Compile when load: At startup the value of the variable
<CODE><A HREF="impnotes.html#loadfile">*load-compiling*</A></CODE>
will be set to <A HREF="http://www.harlequin.com/education/books/HyperSpec/Body/convar_t.html"><CODE>t</CODE></A>.
Code being <CODE>load</CODE>ed will then be compiled on the fly. This results
in slower loading, but faster execution.
<P>
<DT> <A NAME="Option -norc"> <B><CODE>-norc</CODE></B> </A>
<DD> Normally <CODE>clisp</CODE> loads a user run control (RC) file on
startup (this happens after the <A HREF="#Option -C"><CODE>-C</CODE></A>
option is processed). The file loaded is
<CODE>${HOME}/.clisprc.lsp</CODE> or <CODE>${HOME}/.clisprc.fas</CODE>,
whichever is newest. This option, <CODE>-norc</CODE>, prevents loading of
the RC file.
<P>
<DT> <A NAME="Option -i"> <B><CODE>-i</CODE> <EM>initfile</EM> ...</B> </A>
<DD> Specifies initialization files to be <CODE>load</CODE>ed
at startup. These should be lisp files (source or compiled). Several
<CODE>-i</CODE> options can be given; all the specified files will be loaded
in order.
<P>
<DT> <A NAME="Option -c"> <B><CODE>-c</CODE> <EM>lispfile</EM> ...</B> </A>
<DD> Compiles the specified <EM>lispfile</EM>s to bytecode (*.fas). The
compiled files can then be <CODE>load</CODE>ed instead of the sources to
gain efficiency.
<P>
<DT> <A NAME="Option -o"> <B><CODE>-o</CODE> <EM>outputfile</EM></B> </A>
<DD> Specifies the output file or directory for the compilation of the last
specified <EM>lispfile</EM>.
<P>
<DT> <A NAME="Option -l"> <B><CODE>-l</CODE></B> </A>
<DD> A bytecode listing (*.lis) of the files being compiled will be produced.
Useful only for debugging purposes. See the documentation of
<A HREF="impnotes.html#compilefile"><CODE>compile-file</CODE></A> for details.
<P>
<DT> <A NAME="Option -x"> <B><CODE>-x</CODE> <EM>expressions</EM></B> </A>
<DD> Executes a series of arbitrary expressions instead of a read-eval-print loop.
The values of the expressions will be output to standard output.
Due to the argument processing done by the shell, the <EM>expressions</EM>
must be enclosed in double quotes, and double quotes and backslashes must
be preceded by backslashes.
<P>
<DT> <A NAME="Option exec"> <B><EM>lispfile</EM> [ <EM>argument</EM> ... ]</B> </A>
<DD> Loads and executes a <EM>lispfile</EM>. There will be no read-eval-print
loop. Before <EM>lispfile</EM> is loaded, the variable <CODE>*args*</CODE>
will be bound to a list of strings, representing the <EM>argument</EM>s.
The first line of <EM>lispfile</EM> may start with <CODE>#!</CODE>,
thus permitting <CODE>clisp</CODE> to be used as a script interpreter.
If <EM>lispfile</EM> is <CODE>-</CODE>, the standard input is used instead of
a file.
This option must be the last one. No <A HREF="#Option -norc">RC file</A>
will be executed.
<P>
</DL>
<A NAME="Reference">
<H2>Reference</H2>
</A>
The language implemented mostly conforms to
<BLOCKQUOTE>
ANSI Common Lisp standard X3.226-1994
<A HREF="http://www.x3.org/tc_home/j13sd4.htm">http://www.x3.org/tc_home/j13sd4.htm</A>
</BLOCKQUOTE>
available online as the
<BLOCKQUOTE>
Common Lisp HyperSpec
<A HREF="http://www.harlequin.com/education/books/HyperSpec/">http://www.harlequin.com/education/books/HyperSpec/</A>
("CLHS" for short)
</BLOCKQUOTE>
which supersedes the earlier specifications
<BLOCKQUOTE>
Guy L. Steele Jr.: Common Lisp - The Language.
Digital Press. 2nd edition 1990, 1032 pages.
<A HREF="http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/cltl2.html">http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository/ai/html/cltl/cltl2.html</A>
("CLtL2" for short)
</BLOCKQUOTE>
and
<BLOCKQUOTE>
Guy L. Steele Jr.: Common Lisp - The Language.
Digital Press. 1st edition 1984, 465 pages.
("CLtL1" for short)
</BLOCKQUOTE>
<A NAME="Use">
<H2>Use</H2>
</A>
<DL>
<DT> <CODE>help</CODE>
<DD> to get some on-line help.
<P>
<DT> <CODE>(apropos </CODE><EM>name</EM><CODE>)</CODE>
<DD> lists the symbols relating to <EM>name</EM>.
<P>
<DT> <CODE>(exit)</CODE> or <CODE>(quit)</CODE> or <CODE>(bye)</CODE>
<DD> to quit <CODE>clisp</CODE>.
<P>
<DT>
EOF (Ctrl-D)
<DD> to leave the current read-eval-print loop.
<P>
<DT> arrow keys
<DD> for editing and viewing the input history.
<P>
<DT> Tab key
<DD> to complete the symbol's name you are just typing.
<P>
</DL>
<A NAME="Files">
<H2>Files</H2>
</A>
<DL>
<DT> <CODE>clisp</CODE>
<DD> startup script
<P>
<DT>
<CODE>lisp.run</CODE>
<DD> main executable
<P>
<DT>
<CODE>lispinit.mem</CODE>
<DD> initial memory image
<P>
<DT>
<CODE>config.lsp</CODE>
<DD> site-dependent configuration
<P>
<DT>
<CODE>*.lsp</CODE>
<DD> lisp source
<P>
<DT>
<CODE>*.fas</CODE>
<DD> lisp code, compiled by <CODE>clisp</CODE>
<P>
<DT>
<CODE>*.lib</CODE>
<DD> lisp source library information, generated and used by the
<CODE>clisp</CODE> compiler
<P>
<DT>
<CODE>*.c</CODE>
<DD> C code, compiled from lisp source by <CODE>clisp</CODE>
<P>
</DL>
<A NAME="Environment">
<H2>Environment</H2>
</A>
<DT> <CODE>CLISP_LANGUAGE</CODE>
<DD> specifies the language
<CODE>clisp</CODE>
uses to communicate with the user. The value may be
<CODE>english</CODE>, <CODE>deutsch</CODE>, <CODE>francais</CODE>
and defaults to <CODE>english</CODE>.
The <A HREF="#Option -L"><CODE>-L</CODE></A> option can be used to override this environment variable.
<P>
<DT> <CODE>LC_CTYPE</CODE>
<DD>specifies the locale which determines the character set in use. The
value can be of the form <CODE><VAR>language</VAR></CODE> or
<CODE><VAR>language</VAR>_<VAR>country</VAR></CODE> or
<CODE><VAR>language</VAR>_<VAR>country</VAR>.<VAR>charset</VAR></CODE>,
where <VAR>language</VAR> is a two-letter ISO 639 language code (lower case),
<VAR>country</VAR> is a two-letter ISO 3166 country code (upper case).
<VAR>charset</VAR> is an optional character set specification, and needs
normally not be given because the character set can be inferred from the
language and country.
<P>
<DT> <CODE>LANG</CODE>
<DD> specifies the language
<CODE>clisp</CODE>
uses to communicate with the user, unless it is already specified through
the environment variable <CODE>CLISP_LANGUAGE</CODE> or the
<A HREF="#Option -L"><CODE>-L</CODE></A> option.
It also specifies the locale determining the character set in use, unless
already specified through the environment variable <CODE>LC_CTYPE</CODE>.
The value may begin with a two-letter ISO 639 language code, for example
<CODE>en</CODE>, <CODE>de</CODE>, <CODE>fr</CODE>.
<P>
<DT> <CODE>HOME</CODE> and <CODE>USER</CODE>
<DD> are used for determining the value of the function
<CODE>user-homedir-pathname</CODE>. (Unix implementation only.)
<P>
<DT>
<CODE>SHELL</CODE> (Unix implementation only)
<DD> is used to find the interactive command interpreter called by
<CODE>(shell)</CODE>.
<P>
<DT> <CODE>TERM</CODE>
<DD> determines the screen size recognized by the pretty printer.
This environment variable is also mandatory for the built-in screen editor.
<P>
</DL>
<A NAME="See also">
<H2>See also</H2>
</A>
<A HREF="impnotes.html">impnotes.html</A>,
<CODE>cmucl</CODE>(1),
<CODE>xemacs</CODE>(1).
<A NAME="Bugs">
<H2>Bugs</H2>
</A>
<UL>
<LI> The function <CODE>inspect</CODE> is not implemented.
<LI> Not all extensions from CLtL2 are supported.
<LI> No on-line documentation beyond <CODE>apropos</CODE> and <CODE>describe</CODE>
is available.
</UL>
<A NAME="Projects">
<H2>Projects</H2>
</A>
<UL>
<LI> Writing on-line documentation.
<LI> Write <CODE>inspect</CODE>.
<LI> Enhance the compiler such that it can inline local functions.
<LI> Specify a portable set of window and graphics operations.
</UL>
<A NAME="Authors">
<H2>Authors</H2>
</A>
Bruno Haible <TT>&lt;haible@clisp.cons.org&gt;</TT>
and Michael Stoll.
<P>
<HR>
<ADDRESS>CLISP manual page<BR>
Bruno Haible &lt;haible@clisp.cons.org&gt;
</ADDRESS>
<P>
Last modified: 18 July 1999.
</BODY>