Isle ISLISP is an ISLISP Compiler. It is written in Common Lisp. Because it is implemented in Common Lisp, the source code itself demonstrates the differences between ISLISP and Common Lisp.
I was thinking of modifying SBCL to remove features not in ISLISP and add features as appropriate, but SBCL is constantly improving and it is difficult to keep up, so I implemented it as a Common Lisp program. Because Isle ISLISP uses SBCL by default, a top-of-the-line Common Lisp implementation, execution speed is top-notch.
For reference, these days Racket is also implemented in Chez Scheme.
- Learn Common Lisp
- Learn how to use macros
- Know the difference between ISLISP and Common Lisp
- ASDF: ASDF is the de facto standard build facility for Common Lisp. Your Lisp implementation probably contains a copy of ASDF, which you can load using (require "asdf").
Run isle.sh
or isle.bat
.
Usage: isle [OPTIONS...] [FILE]
OPTIONS:
-h print this screen.
-v print version.
If no FILE is specified, the REPL is run.
The shell script uses SBCL by default, but other Common Lisp implementations
can be used by setting the ISLE_IMPL
environment variable. Currently
supported CLs are:
- sbcl
- ccl
- clisp
ISLE_IMPL=ccl ./isle.sh
Other implementations can be used manually; consider enhancing the script with support for them if you use something else.
Right after starting Isle ISLISP,
Unix-like:
(build-exe "isle")
Windows:
(build-exe "isle.exe")
Define your main
function and then save the core image.
Example:
(defun main () (format (standard-output) "hello~%"))
(build-exe "hello.exe")
See also: Saving a Core Image - SBCL User Manual
You can use Common Lisp symbols by adding the cl: prefix. ISLISP symbols are defined in islisp package.
Example: (cl:evenp 2)
Function | Description |
---|---|
(eval form) | evaluates form |
(load filename) | loads code from filename e.g. (load "foo.lisp") |
(macroexpand form) | repeatedly expands form until it is no longer a macro form |
(macroexpand-1 form) | expands form once |
- There is a global lexical variable. (
defglobal
) - Dynamic variable is explicit. (
dynamic
) - Keywords are not self-evaluating.
- Destructuring is not supported in
defmacro
.