# Frequently Asked Questions (With Answers) about &clisp;

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 (, ), 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 &clisp-list;.

## FAQ

## Meta Information

## Miscellaneous

The official &clisp; documentation sucks - is anything better available?

As with all generic complaints, the answer to this one is PTCPatches Thoughtfully Considered.

Additionally, the nightly builds of the &clisp; implementation notes documenting the current CVS head are available at . It contains both the documentation for the new features and the general improvements in the documentation.

License - why &gnu; &gpl;?

Because &clisp; uses &readline;.

Note that this does not necessarily prevent you from distributing your proprietary products based on &clisp;. See Note in `COPYRIGHT`.

What about &ansi-cl; compliance?

&clisp; purports to conform to the &ansi-cl; specification, so all deviations in

    &sh-prompt; clisp &ansi-opt;

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.

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 &clisp-list;
AKA

  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 &clisp-devel;
AKA

  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-e; copy your messages to the individual developers.

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:

&clisp-announce;

  extremely low-level moderated list, you should definitely subscribe to this list if you have any interest in &clisp; whatsoever

&clisp-list;

  subscribe to this list of you use &clisp; and want to ask (and answer!) questions

&clisp-devel;

  subscribe to this list if you want to help with &clisp; developments; CVS commit notes go here (as a daily digest).

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:

&clisp-announce;

  do not mail here without a prior discussion on &clisp-devel;

&clisp-devel;

  subscriber-only, you must post from a subscribed address, no exceptions (see above)

&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.

How do I report bugs?

Patiently!

How do I help?

Please read and submit your patch, together with a `src/ChangeLog` entry (see other entries there for inspiration), to &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).

How do I debug &clisp;?

When debugging the core:

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

When debugging module `foo`:

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

## Logo

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 &cl; 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.

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:

- Committee for Accuracy in Middle East Reporting in America

- Information Regarding Israel's Security

- Middle East Media Research Institute

- YES to peace, NO to terror

- More links

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 moved it here.

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!

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.

## Running &clisp;

Where is &defun;?

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

Where is the IDEIntegrated Development Environment?

## &emacs;-based

- `inferior-lisp`

- &slime;

- &ilisp;

- The Common Lisp Cookbook

## non-&emacs;-based

- VisualCLisp

- Jabberwocky

- GClisp

- &phemlock;

What are the command line arguments?

See .

How do I get out of the debugger?

See .

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; &linkset;.

3rd party

  See the incomplete list of "Common Lisp software running in &clisp;".

DIYDo It Yourself

  See and for information on how to interface with external &c-lang; libraries.

&http; (really Frequently Asked!)

  - &clisp; comes with `src/inspect.lisp` which implements a rudimentary &http; server

  - CLOCC/src/donc/ has an &http; server

  - CLOCC/src/cllib/ handles URLs

  - mod_lisp hooks lisp into &apache;

  - Object-Oriented HTTP server for &clisp;

  Both AllegroServe and CL-HTTP require multithreading and do not work with &clisp; yet.

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 for your platform).

Where are the modules with which I built &clisp;?

In the &full; &linkset;. Run &clisp; like this:

    &sh-prompt; clisp &opt-K; full

The reasons for &base; being the default are explained here.

How do I create a GUIGraphical User Interface for my &clisp; program?

There are many options, see "Common Lisp software running in &clisp;".

## Application Delivery

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

See .

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 &sys-pac;, &clos-pac;, &ffi-pac;, 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 &fasl-file; files can be distributed without restrictions coming from &clisp;.

- Programs distributed as &clisp; &mem-image;s can be distributed only if accompanied with the non-&clisp; &fasl-file; files which make up the &mem-image;, and a &make-file; (or clear textual instructions) for rebuilding the &mem-image;.

- If you need to distribute a modified &clisp; executable (for example, incorporating additional &module;s written in &c-lang;), you must distribute its full source under &gnu; &gpl;. If you are not satisfied with this, you can instead put the additional &module;s into a separate (non-&clisp;) program, with which your Lisp program will communicate via &socket-stream;s.

## Troubles

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.

## What do charset errors mean?

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; &extfmt;. The default is described in .

This may also be caused by filesystem access. If your &path-enc; is set incorrectly, many filesystem accesses (like &load;, &directory; etc) will raise this error. Note that &load; will traverse the directories mentioned in &load-paths; - this applies to the init (RC) file too. You will need to set &path-enc; or pass &opt-E; 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 &repl; and &not-e; 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`.

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

&clisp; uses &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 `TAB`s in your code.

Why does not command line editing work?

See .

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-var; is &nil;. Just set &print-circle-var; 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 &libsigsegv; installed when you configured and built &clisp;.

## Avoiding stack overflow: Platform-specific

&win32-only;

  modify SYSTEM.INI or change PIF that you use to invoke &clisp; or set program stack using editbin (answered on &clisp-list;)

&unix-only;

  Increase program stack with `ulimit -s` (or `limit stacksize` if you are using `csh`) to at least 8 MB.

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 for the explanation of the &disassemble; output.

See Lisp Programming Style for more useful information.

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.:

    &sh-prompt; touch src/configure

and re-run `make`.

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

## Is floating point arithmetics broken?

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-bfp;, but first make sure that you do know What Every Computer Scientist Should Know About Floating-Point Arithmetic.

See also this message in &clisp-list;.

## PS

If you want exact calculations, use &rational-t;s:

    (- 11/10 9/10)
    1/5

## Is &random; broken?

Why does

    &sh-prompt; clisp &opt-x; '(&random; 1s0)'

always print the same number?

Reproducibility is important. See .

Why is the function `FOO` broken?!

When confronted with unexpected behavior, try looking in the .

E.g., &clisp; &directory; is different from the &cmucl; 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 in impnotes and look for "DIRECTORY" there.