keithlisp/doc/main.md

25 lines
1.2 KiB
Markdown

# The Keithlisp Programmer's Reference
Keithlisp is a tiny, stripped-down version of Lisp written in C. It's
vaguely reminiscent of Common Lisp; however, **Keithlisp does NOT fully
adhere to the Common Lisp standard!** Many Common Lisp functions are not
present or behave differently in Keithlisp.
## General Advice
- Keithlisp assumes that you, the programmer, know what you are doing.
**Many Keithlisp functions will segfault or otherwise misbehave if you
do not provide them with the data they expect.**
- Keithlisp doesn't properly parse tokens longer than 64 bytes. This
includes string literals.
- Strings in Keithlisp are sequences of *bytes*. A zero byte does not
necessarily correspond to the end of a string.
- You can comment out `#define LISP_USE_ATOMS_ALIST` in main.h to remove
the atoms_alist. This significantly reduces Keithlisp's memory
footprint, but makes it impossible to retrieve the name of an atom.
- Keithlisp doesn't automatically garbage-collect return values at the
moment, but this may change in the future. If you know whether a
function will return a cons/string referenced elsewhere or not, you
should insert a garbage collector annotation in your code.
## Contents
- [The Keithlisp Standard Library](stdlib.md)