Appendix A. Frequently Asked Questions (With Answers) about CLISP

Abstract

This is a list of frequently asked questions about CLISP on the CLISP mailing lists and the USENET newsgroup comp.lang.lisp. All the legitimate technical question are addressed in the CLISP documentation (CLISP impnotes, clisp(1)), and for such questions this list provides a link into the docs. The frequently asked political questions are answered here in full detail (meaning that no further explanations of the issues could be provided).

Please submit more questions (and answers!) to (http://lists.sourceforge.net/lists/listinfo/clisp-list).

FAQ

A.1. Meta Information
A.1.1. Miscellaneous
A.1.1.1. The official CLISP documentation sucks - is anything better available?
A.1.1.2. License - why GNU GPL?
A.1.1.3. What about [ANSI CL] compliance?
A.1.1.4. How do I ask for help?
A.1.1.5. Which mailing lists should I subscribe to?
A.1.1.6. Why is my mail to a mailing list rejected?
A.1.1.7. How do I report bugs?
A.1.1.8. How do I help?
A.1.1.9. How do I debug CLISP?
A.1.2. Logo
A.1.2.1. Why is CLISP using menorah as the logo?
A.1.2.2. Shouldn't the logo be changed now due to the current political developments in the Middle East?
A.1.2.3. Aren't there other political issues of concern?
A.1.2.4. Aren't you afraid of losing some users who are offended by the logo?
A.1.2.5. Using software to promote a political agenda is unprofessional!
A.2. Running CLISP
A.2.1. Where is DEFUN?
A.2.2. Where is the IDE?
A.2.3. What are the command line arguments?
A.2.4. How do I get out of the debugger?
A.2.5. What CLISP extensions are available?
A.2.6. Where is the init (“RC”) file on my platform?
A.2.7. Where are the modules with which I built CLISP?
A.2.8. How do I create a GUI for my CLISP program?
A.3. Application Delivery
A.3.1. How do I create an executable file with all my code in it?
A.3.2. When I deliver my application with CLISP does it have to be covered by GNU GPL?
A.4. Troubles
A.4.1. Where is the binary distribution for my platform?
A.4.2. But a previous release had a binary distribution for my platform, why does not the current one?
A.4.3. Why does not CLISP build on my platform?
A.4.4. What do these messages mean: “invalid byte #x94 in CHARSET:ASCII conversion” and “character #\u00B3 cannot be represented in the character set CHARSET:ASCII”?
A.4.5. What does this message mean: “Display all 1259 possibilities? (y or n)”
A.4.6. Why does not command line editing work?
A.4.7. How do I avoid stack overflow?
A.4.8. Why does my program return different values on each invocation?
A.4.9. Why is autoconf invoked during build?
A.4.10. Why don't floating point arithmetics return what I want? (- 1.1 0.9) ⇒ 0.20000005
A.4.11. Why does $ clisp -x '(RANDOM 1s0)' always print the same number?
A.4.12. How do I disable this annoying warning?
A.4.13. Why is the function FOO broken?!

A.1. Meta Information

A.1.1. Miscellaneous
A.1.1.1. The official CLISP documentation sucks - is anything better available?
A.1.1.2. License - why GNU GPL?
A.1.1.3. What about [ANSI CL] compliance?
A.1.1.4. How do I ask for help?
A.1.1.5. Which mailing lists should I subscribe to?
A.1.1.6. Why is my mail to a mailing list rejected?
A.1.1.7. How do I report bugs?
A.1.1.8. How do I help?
A.1.1.9. How do I debug CLISP?
A.1.2. Logo
A.1.2.1. Why is CLISP using menorah as the logo?
A.1.2.2. Shouldn't the logo be changed now due to the current political developments in the Middle East?
A.1.2.3. Aren't there other political issues of concern?
A.1.2.4. Aren't you afraid of losing some users who are offended by the logo?
A.1.2.5. Using software to promote a political agenda is unprofessional!

A.1.1. Miscellaneous

A.1.1.1. The official CLISP documentation sucks - is anything better available?
A.1.1.2. License - why GNU GPL?
A.1.1.3. What about [ANSI CL] compliance?
A.1.1.4. How do I ask for help?
A.1.1.5. Which mailing lists should I subscribe to?
A.1.1.6. Why is my mail to a mailing list rejected?
A.1.1.7. How do I report bugs?
A.1.1.8. How do I help?
A.1.1.9. How do I debug CLISP?
A.1.1.1.

The official CLISP documentation sucks - is anything better available?

As with all generic complaints, the answer to this one is PTC.

Additionally, the nightly builds of the CLISP implementation notes documenting the current CVS head are available at http://www.podval.org/~sds/clisp/impnotes/. It contains both the documentation for the new features and the general improvements in the documentation.

A.1.1.2.

License - why GNU GPL?

Because CLISP uses GNU readline.

Note that this does not necessarily prevent you from distributing your proprietary products based on CLISP. See Note in COPYRIGHT.

A.1.1.3.

What about [ANSI CL] compliance?

CLISP purports to conform to the [ANSI CL] specification, so all deviations in

$ clisp -ansi

from the [ANSI CL] standard are bugs and are not (yet) fixed only due to lack of resources.

On the other hand, some decisions made by the ANSI X3J13 committee were not as justified from the technical point of view as were most of them, and some of those questionable decisions were made after the alternative behavior has already been implemented in CLISP. The CLISP developers took pains to modify CLISP to unconditionally comply with the [ANSI CL] specification in all cases except for a handful of situations where they believed that the committee had made a mistake, in which cases the committee behavior is still optionally available.

CLISP does not start in the ansi mode by default for historical reasons and this is not about to change. Dumping an image or passing a command line argument are easy enough.

A.1.1.4.

How do I ask for help?

Politely - please refer to Netiquette.

If you have a question about CLISP, you have the following options (listed in the order of decreasing audience size):

USENET group comp.lang.lisp
This is the right place to ask all general Lisp questions, such as "how do I access a character in a string?"
CLISP User Mailing List (http://lists.sourceforge.net/lists/listinfo/clisp-list)
AKA http://news.gmane.org/gmane.lisp.clisp.general
This is the right place to ask user-level CLISP-specific questions, such as "how do I save my CLISP image?"
CLISP Developer Mailing List (http://lists.sourceforge.net/lists/listinfo/clisp-devel)
AKA http://news.gmane.org/gmane.lisp.clisp.devel
This is the right place to discuss CLISP internals, submit patches, offer help. You must be subscribed to post. If you read this list on Gmane and do not want to receive it also by e-mail, you can subscribe to it using the aforementioned web interface and then disable mail delivery.
Individual CLISP developers
This is never the right thing to do, unless you want to hire this developer to do CLISP consulting (commercial support, custom enhancements etc). This is actually for your own benefit: the CLISP developers are very busy, they might get weeks to answer your question, and some other user may be able to help you in the meantine; as well as for the benefit of the other CLISP users, since the mailing lists are publicly archived (you are encouraged to search them before asking). Please do not copy your messages to the individual developers.
A.1.1.5.

Which mailing lists should I subscribe to?

Cross-posting in the CLISP mailing lists is very actively discouraged and is virtually non-existent, thus you can subscribe to all mailing lists that are relevant to you without getting duplicate messages:

(http://lists.sourceforge.net/lists/listinfo/clisp-announce)
extremely low-level moderated list, you should definitely subscribe to this list if you have any interest in CLISP whatsoever
(http://lists.sourceforge.net/lists/listinfo/clisp-list)
subscribe to this list of you use CLISP and want to ask (and answer!) questions
(http://lists.sourceforge.net/lists/listinfo/clisp-devel)
subscribe to this list if you want to help with CLISP developments; CVS commit notes go here (as a daily digest).
A.1.1.6.

Why is my mail to a mailing list rejected?

CLISP mailing lists get a lot of spam, so the maintainers have to take care to protect the users. If you get a note that “your message is held for moderator's approval”, you can safely assume that it went to /dev/null and try again, noting the following:

(http://lists.sourceforge.net/lists/listinfo/clisp-announce)
do not mail here without a prior discussion on (http://lists.sourceforge.net/lists/listinfo/clisp-devel)
(http://lists.sourceforge.net/lists/listinfo/clisp-devel)
subscriber-only, you must post from a subscribed address, no exceptions (see above)
(http://lists.sourceforge.net/lists/listinfo/clisp-list)

the only open list, so it is filtered especially aggressively:

  • no MIME mail (no HTML formatting, no attachments - send the URL instead)
  • the list address must be in CC or TO, not BCC.
  • do not mention “virgin”, “penis” or “viagra” in the Subject line.

If you do not like this policy, please volunteer to maintain the mailing lists - you will be required to go through all the “held for moderator's approval” mail and approve/discard as appropriate at least twice a day.

A.1.1.7.

How do I report bugs?

Patiently!

A.1.1.8.

How do I help?

Please read Chapter 35, Extending CLISP and submit your patch, together with a src/ChangeLog entry (see other entries there for inspiration), to (http://lists.sourceforge.net/lists/listinfo/clisp-devel).

See src/CodingStyle for the style one should follow.

If your patch is more than just a few lines, it is much preferred that you make your patch available on the web and send the link to the list.

The patch must be against the CVS head (reasonably recent).

A.1.1.9.

How do I debug CLISP?

When debugging the core:

$ ./configure --with-debug --build build-g
$ cd build-g
$ gdb lisp.run            ;; or lisp.exe on windows and cygwin
(gdb) base
(gdb) run

When debugging module foo:

$ ./configure --with-debug --with-module=foo --build build-g
$ cd build-g
$ gdb full/lisp.run       ;; or lisp.exe on windows and cygwin
(gdb) full
(gdb) run

A.1.2. Logo

A.1.2.1. Why is CLISP using menorah as the logo?
A.1.2.2. Shouldn't the logo be changed now due to the current political developments in the Middle East?
A.1.2.3. Aren't there other political issues of concern?
A.1.2.4. Aren't you afraid of losing some users who are offended by the logo?
A.1.2.5. Using software to promote a political agenda is unprofessional!
A.1.2.1.

Why is CLISP using menorah as the logo?

Whimsical

If you must have some answer and you do not care whether it is correct or not, you may simply think that Common Lisp brings the Light to a programmer, and CLISP is a vehicle that carries the Light.

Accordingly, CLISP enables you to see the truth, thus you can pronounce it as see-lisp. Alternatively, if you are a seasoned expert, you might pronounce it as sea-lisp.

Historical

CLISP has been using the menorah for the logo since the project was first started in the late 1980-ies by Bruno Haible and Michael Stoll. This probably reflects the authors' affection toward the Jewish people, Judaism or the State of Israel (neither of the two original authors is Jewish by birth). You may ask the original authors for details yourself. Both of them are very busy though, so do not expect a prompt reply.

A.1.2.2.

Shouldn't the logo be changed now due to the current political developments in the Middle East?

The CLISP developers, both the original creators and the current maintainers, do not subscribe to the mainstream view that blames the Jews for everything from high oil prices and Islamic extremism to El Niño and Sun spots.

Moreover, today, when Jews are being pushed out of the American and European academic institutions with various obscene boycott and divestment campaigns, it is crucial for all of us to stand together against the resurgence of Nazism.

For more information, please see:

A.1.2.3.

Aren't there other political issues of concern?

Yes, there are! For example, in 1989 the communist government of the People's Republic of China murdered some 3000+ student human rights protesters at the Tienanmen square in Beijing, and people appear to have already forgotten this crime. A note to that effect was kept in the file src/timezone.lisp until 2002, when it was decided that is was not visible enough there and it was moved here.

We also oppose software patents and support other liberal (i.e., pro-liberty) causes.

A.1.2.4.

Aren't you afraid of losing some users who are offended by the logo?

Do you have in mind people like this one? Good riddance!

A.1.2.5.

Using software to promote a political agenda is unprofessional!

Expressing their opinion is a perfectly natural thing for the authors, be it artistic preferences, political views or religious beliefs. The use of the menorah has its roots somewhere between these areas, and the authors are proud to display it. If you are unlucky enough to have lost the freedom to express your opinion, due to the constraints of a government, society, religion, or expectations of “professional relationships”, the Free World condoles with you. The authors of CLISP are not operating under such constraints. If you are unhappy about their artistic preferences, political views or religious beliefs, you are free to ignore them.

Many scientists have been doing art, politics and religion. René Descartes and Isaak Newton combined mathematics and Christianity. Albert Einstein helped the U.S. to counter the danger of an atomic bomb in the hands of the Nazis. Bram Moolenaar, the author of VIM, promotes charitable donations to Uganda.

A.2. Running CLISP

A.2.1. Where is DEFUN?
A.2.2. Where is the IDE?
A.2.3. What are the command line arguments?
A.2.4. How do I get out of the debugger?
A.2.5. What CLISP extensions are available?
A.2.6. Where is the init (“RC”) file on my platform?
A.2.7. Where are the modules with which I built CLISP?
A.2.8. How do I create a GUI for my CLISP program?
A.2.1.

Where is DEFUN?

Pass -M to the runtime (lisp.run or lisp.exe). Use the driver clisp (or clisp.exe) instead of invoking the runtime directly.

A.2.2.

Where is the IDE?

Emacs-based. 

non-Emacs-based. 

A.2.3.

What are the command line arguments?

See clisp(1).

A.2.4.

How do I get out of the debugger?

See Section 25.1, “Debugging Utilities [CLHS-25.1.2]”.

A.2.5.

What CLISP extensions are available?

Distributed with CLISP
Quite a few modules are included with CLISP, pass --with-module=... to configure to build them and use the full linking set.
3rd party
See the incomplete list of Common Lisp software running in CLISP”.
DIY
See Section 31.2, “External Modules” and Section 31.3, “The Foreign Function Call Facility” for information on how to interface with external C libraries.
HTTP (very Frequently Asked!)

Both AllegroServe and CL-HTTP require multithreading and do not work with CLISP yet.

A.2.6.

Where is the init (“RC”) file on my platform?

Read the file <clisp.html#opt-norc> in your build directory or binary distribution (this is the version of the user manual clisp(1) for your platform).

A.2.7.

Where are the modules with which I built CLISP?

In the full linking set. Run CLISP like this:

$ clisp -K full

The reasons for base being the default are explained here.

A.2.8.

How do I create a GUI for my CLISP program?

There are many options, see "Common Lisp software running in CLISP".

A.3. Application Delivery

A.3.1. How do I create an executable file with all my code in it?
A.3.2. When I deliver my application with CLISP does it have to be covered by GNU GPL?
A.3.1.

How do I create an executable file with all my code in it?

Use EXT:SAVEINITMEM, see also Section 31.6, “Quickstarting delivery with CLISP.

A.3.2.

When I deliver my application with CLISP does it have to be covered by GNU GPL?

Not necessarily.

CLISP is Free Software, covered by the GNU GPL, with special terms governing the distribution of applications that run in CLISP. The precise terms can be found in the COPYRIGHT file contained in the source and binary distributions of CLISP. Here is an informal clarification of what these terms mean in practice. Please refer to the said COPYRIGHT file when in doubt.

In many cases, CLISP does not force an application to be covered by the GNU GPL. Nevertheless, we encourage you to release your software under an open source license. The benefits of such a license for your users are numerous, in particular they are free to modify the application when their needs/requirements change, and they are free to recompile the application when they upgrade their machine or operating system.

CLISP extensions, i.e. programs which need to access non-portable CLISP internal symbols (in the packages SYSTEM, CLOS, FFI, etc), must be covered by GNU GPL as well.

Other programs running in CLISP have to or need not to be placed under GNU GPL, depending on their distribution form:

  • Programs distributed as Lisp source or #P".fas" files can be distributed without restrictions coming from CLISP.
  • Programs distributed as CLISP memory images can be distributed only if accompanied with the non-CLISP #P".fas" files which make up the memory image, and a Makefile (or clear textual instructions) for rebuilding the memory image.
  • If you need to distribute a modified CLISP executable (for example, incorporating additional modules written in C), you must distribute its full source under GNU GPL. If you are not satisfied with this, you can instead put the additional modules into a separate (non-CLISP) program, with which your Lisp program will communicate via SOCKET:SOCKET-STREAMs.

A.4. Troubles

A.4.1. Where is the binary distribution for my platform?
A.4.2. But a previous release had a binary distribution for my platform, why does not the current one?
A.4.3. Why does not CLISP build on my platform?
A.4.4. What do these messages mean: “invalid byte #x94 in CHARSET:ASCII conversion” and “character #\u00B3 cannot be represented in the character set CHARSET:ASCII”?
A.4.5. What does this message mean: “Display all 1259 possibilities? (y or n)”
A.4.6. Why does not command line editing work?
A.4.7. How do I avoid stack overflow?
A.4.8. Why does my program return different values on each invocation?
A.4.9. Why is autoconf invoked during build?
A.4.10. Why don't floating point arithmetics return what I want? (- 1.1 0.9) ⇒ 0.20000005
A.4.11. Why does $ clisp -x '(RANDOM 1s0)' always print the same number?
A.4.12. How do I disable this annoying warning?
A.4.13. Why is the function FOO broken?!
A.4.1.

Where is the binary distribution for my platform?

The CLISP maintainers can only build CLISP binary distributions on those SourceForge CompileFarm platforms that are up an running at the time of the CLISP release and also have a reasonably modern C compiler.

Note that CLISP is included in many software distributions, see the section “Get CLISP” on the CLISP's home page.

A.4.2.

But a previous release had a binary distribution for my platform, why does not the current one?

It was probably contributed by a user who did not (yet?) contribute a binary distribution for the current release. You can find out who contributed a specific binary distribution by looking at the release notes in the SourceForge Files section.

A.4.3.

Why does not CLISP build on my platform?

Please see file unix/PLATFORMS in your source distribution for information about some known troublesome platforms as well as instructions on porting CLISP to new platforms.

A.4.4.

What do these messages mean: “invalid byte #x94 in CHARSET:ASCII conversion” and “character #\u00B3 cannot be represented in the character set CHARSET:ASCII”?

This means that you are trying to read (“invalid byte”) or write (“character cannot be represented”) a non-ASCII character from (or to) a character stream which has ASCII :EXTERNAL-FORMAT. The default is described in -Edomain encoding .

This may also be caused by filesystem access. If your CUSTOM:*PATHNAME-ENCODING* is set incorrectly, many filesystem accesses (like LOAD, DIRECTORY etc) will raise this error. Note that LOAD will traverse the directories mentioned in CUSTOM:*LOAD-PATHS* - this applies to the init (RC) file too. You will need to set CUSTOM:*PATHNAME-ENCODING* or pass -Edomain encoding to CLISP. Using a “1:1” encoding, such as ISO-8859-1, should help you avoid this error.

Note that this error may be signaled by the Print part of the read-eval-print loop and not by the function you call. E.g., if file "foo" contains non-ASCII characters, you will see such an error when you type

(with-open-file (s "foo" :direction :input :external-format charset:iso-8859-1)
  (read-line s))

If instead you type

(with-open-file (s "foo" :direction :input :external-format charset:iso-8859-1)
  (setq l (read-line s))
  nil)

CLISP will just print NIL and signal the error when you type l.

A.4.5.

What does this message mean: “Display all 1259 possibilities? (y or n)

CLISP uses GNU readline for command line editing and completion. You get this “Display all 1259 possibilities” message (and sometimes many screens of symbols) when you hit TAB too many times in an inappropriate place. You can turn this feature off if you are using Emacs. It is a good idea not to use TABs in your code.

A.4.6.

Why does not command line editing work?

See Section 21.2.1, “Command line editing with GNU readline”.

A.4.7.

How do I avoid stack overflow?

CLISP has two stacks, the “program stack” and the “lisp stack”, and both may occasionally overflow.

Avoiding stack overflow: Generic

  • You will always get a stack overflow when you try to print a circular object (list or structure) and *PRINT-CIRCLE* is NIL. Just set *PRINT-CIRCLE* to T.
  • You will always get a stack overflow on infinite recursion.
  • Some simple functions (like Ackermann's) recurse more than you might expect and can run out of stack on relatively small inputs.
  • Compiled code uses less stack (and memory) and is faster.
  • If you really do need more Lisp stack, you can increase it by telling CLISP to pre-allocate more memory.
  • If you get a segmentation fault after (or instead of) a “program stack overflow” message, please make sure that you had GNU libsigsegv installed when you configured and built CLISP.

Avoiding stack overflow: Platform-specific

Platform Dependent: Win32 platform only.
modify SYSTEM.INI or change PIF that you use to invoke CLISP or set program stack using editbin (answered on (http://lists.sourceforge.net/lists/listinfo/clisp-list))
Platform Dependent: UNIX platform only.
Increase program stack with ulimit -s (or limit stacksize if you are using csh) to at least 8 MB.
A.4.8.

Why does my program return different values on each invocation?

The following code modifies itself:

(let ((var '(a b c)))
  (nconc var '(1 2 3)))

and will not work as one would naively expect. (on the first invocation, it will return (a b c 1 2 3), the second invocation will produce a circular list, the third will hang trying to NCONC a circular list).

Instead you must do

(let ((var (copy-list '(a b c))))
  (nconc var (copy-list '(1 2 3))))

DISASSEMBLE will show the constants in your compiled functions. See Chapter 36, The CLISP bytecode specification for the explanation of the DISASSEMBLE output.

See Lisp Programming Style for more useful information.

A.4.9.

Why is autoconf invoked during build?

When building from the CVS HEAD development sources, you will sometimes get errors when make tries to regenerate a configure script for you. This is never necessary! (and will not happen in an officially released source distribution). Please just touch the target, e.g.:

$ touch src/configure

and re-run make.

You can also pass --disable-maintainer-mode to the top-level configure script (this is the default when you are not working from the CVS).

A.4.10.

Why don't floating point arithmetics return what I want?

(- 1.1 0.9)
⇒ 0.20000005

This not a bug, at least not a bug in CLISP. You may argue that this is a bug in IEEE 754, but first make sure that you do know What Every Computer Scientist Should Know About Floating-Point Arithmetic.

See also this message in (http://lists.sourceforge.net/lists/listinfo/clisp-list).

PS. If you want exact calculations, use RATIONALs:

(- 11/10 9/10)
⇒ 1/5
A.4.11.

Why does

$ clisp -x '(RANDOM 1s0)'

always print the same number?

Reproducibility is important. See Section 12.3.1, “Random Numbers”.

A.4.12.

How do I disable this annoying warning?

CLISP often issues WARNINGs when it encounters suspicious behavior. It is best to fix your code rather than to suppress them. To figure out where the warning is coming from, do

 (SETQ *BREAK-ON-SIGNALS* 'WARNING)

and examine the stack (see Section 25.1, “Debugging Utilities [CLHS-25.1.2]”) to see where the warning is coming from.

If everything else fails, read the manual.

A.4.13.

Why is the function FOO broken?!

When confronted with unexpected behavior, try looking in the CLISP impnotes.

E.g., CLISP DIRECTORY is different from the CMU CL implementation, so, to find out how to get the results you want, you should search the CLISP implementation notes for "DIRECTORY".

Alternatively, since the implementation notes are organized in parallel to the [ANSI CL], and DIRECTORY belongs to the Chapter 20 in [ANSI CL], you can just go to Chapter 20, Files [CLHS-20] in impnotes and look for "DIRECTORY" there.


These notes document CLISP version 2.41Last modified: 2006-10-13