VSLisp is an embedded Lisp library and standalone interpreter. It's
very small, and runs on many platforms. It was developed as a graphics
scripting language for VMS, but now its development goes under Unix,
and old Graph library is not supported now.
The last version with VMS support was 2.5
.
VSLisp is not a Scheme or Common Lisp compatible. Surely, you can customize it to look like one of them, but by default VSLisp is a yet another Lisp dialect, and to work with it you'll need to understand the difference.
VSLisp is a former "VSLisp". Again, IT IS NOT emacs ilisp,
which is a gateway for CLisp and others.
i
in the word VSLisp stands for "Interface", or "Interactive".
Please forgive me, I haven't heard about other "ilisp" when
I started. Now it's too late to change this name.
Supported platforms are only i386-linux and alpha-dec-osf. All others was not tested, but may be will work fine.
LisP language [List Processing language] is based on a LIST data structure.
List is a something like binary tree with ATOMS in it's terminal nodes.
Every list node have HEAD and TAIL (left and right tree links).
In text representation it is "(HEAD TAIL)", where
paranthes (yes, this is why word 'Lisp' can be pronounced as "Lot of Idiotic
Senseless Paranthes") specifies LIST. By convention, if List's HEAD is a LIST
(another tree node), it must be in paranthes. Otherwise it is ATOM (terminal
node). Tail is always LIST, without paranthes. E.g., HEAD of list (A B
C)
is atom A
, and TAIL of this list is a list (B C)
.
Another example: for list ((A B) (C D))
head is a list (A
B)
, and tail is a list ((C D))
, with head (C D)
and
tail NIL
. (NIL is a NULL ATOM).
Lisp language operates only with Symbols, Lists and Atoms. Every List can be evaluated - there are no principal difference between data and program code in Lisp. Evaluation rules are very simple:
((lambda (formal-parameters) lists) real-parameters)
- it's just a function definition in the same place where this function is used. E.g:((lambda (x y) (+ 1 (* x y))) 1 2)
+
and *
function in previous example), and in SYMBOL TABLE, which can
be accessed by special system functions. Symbols is just like variables.
Function or lambda-form parameters treated as local for this function symbols.quoted
. It will not be evaluated.ParList
.Surprise! It was a COMPLETE lisp language description. All you need now to start programming in Lisp, is a set of system functions. It's differs in Lisp dialects, and here I'll describe only internal VSLisp function set.
VSLisp implements symtabs
, which is not presented in other Lisp
dialects. That is a "local" symbol tables, stored in other symbols.
They are usable for property-lists and others, when fast name access is needed.
Traditional property-lists and others special lists are not implemented in
VSLisp core - just in colors
library. Note, that symtabs
is
just a simple hashtables.