Language
Language features
LispPad is an application for developing and running Scheme code. The programming language supported by LispPad is called LispKit. LispKit implements the following features, many of which are based on R7RS (small):
- Modules based on R7RS libraries
- Hygienic macros based on
syntax-rules - First-class environments
call/cc,dynamic-windand exceptions- Dynamically-scoped parameters
- Multiple return values
- Delayed execution via promises and streams
- Support for the full numerical tower consisting of arbitrary size integers, rationals, real numbers, and inexact complex numbers.
- Unicode strings and characters
- Vectors and bytevectors
- Text and binary ports
- R7RS-compliant records
- R6RS-compliant hashtables
- R6RS-compliant enumerations
- SRFI 18-compliant multi-threading
- All R7RS (small) libraries:
(scheme base),(scheme case-lambda),(scheme char),(scheme complex),(scheme cxr),(scheme eval),(scheme file),(scheme inexact),(scheme lazy),(scheme load),(scheme process-context),(scheme read),(scheme repl),(scheme time),(scheme write),(scheme r5rs) - Some R7RS (large) libraries from Scheme Red and Scheme Tangerine editions:
(scheme bitwise),(scheme box),(scheme charset),(scheme comparator),(scheme division),(scheme fixnum),(scheme flonum),(scheme generator),(scheme hash-table),(scheme ideque),(scheme list),(scheme mapping),(scheme red),(scheme rlist),(scheme set),(scheme sort),(scheme stream),(scheme text),(scheme vector) - LispKit-specific libraries:
(lispkit archive tar),(lispkit archive zip),(lispkit base),(lispkit bitset),(lispkit box),(lispkit bytevector),(lispkit char-set),(lispkit char),(lispkit clos),(lispkit combinator),(lispkit comparator),(lispkit control),(lispkit core),(lispkit crypto),(lispkit csv),(lispkit datatype),(lispkit date-time),(lispkit debug),(lispkit disjoint-set),(lispkit draw),(lispkit draw barcode),(lispkit draw chart),(lispkit draw chart bar),(lispkit draw chart function),(lispkit draw map),(lispkit draw turtle),(lispkit draw web),(lispkit dynamic),(lispkit enum),(lispkit format),(lispkit graph),(lispkit gvector),(lispkit hashtable),(lispkit heap),(lispkit http),(lispkit http oauth),(lispkit http server),(lispkit image),(lispkit image process),(lispkit iterate),(lispkit json),(lispkit json schema),(lispkit list),(lispkit list set),(lispkit location),(lispkit log),(lispkit logic),(lispkit markdown),(lispkit match),(lispkit math),(lispkit math matrix),(lispkit math stats),(lispkit math util),(lispkit object),(lispkit pdf),(lispkit port),(lispkit prettify),(lispkit prolog),(lispkit queue),(lispkit record),(lispkit regexp),(lispkit serialize),(lispkit set),(lispkit sqlite),(lispkit stack),(lispkit stream),(lispkit string),(lispkit styled-text),(lispkit sxml),(lispkit sxml html),(lispkit sxml xml),(lispkit system),(lispkit system call),(lispkit system keychain),(lispkit system pasteboard),(lispkit test),(lispkit text-table),(lispkit thread),(lispkit thread channel),(lispkit thread future),(lispkit thread shared-queue),(lispkit type),(lispkit url),(lispkit vector),(lispkit vision), and(lispkit wt-tree). - LispPad-specific libraries:
(lisppad applescript),(lisppad applet),(lisppad audio),(lisppad log),(lisppad speech),(lisppad system macos), and(lisppad turtle).
The libraries are documented in the Libraries section: the LispKit libraries, the LispPad-specific libraries, and the SRFI libraries.
Language limitations
The language support by LispPad is incompatible or incomplete with respect to the following R7RS features:
- Lists are immutable. Mutable cons-cells are supported in a way similar to Racket
- Literals in
syntax-rulesare not matched based on their definition but their symbol identity
Source code
The source code of the Scheme interpreter and the included libraries has been open-sourced and published at GitHub. Example code and the Scheme sources of the included libraries can be found here.
It is also possible to access the source code from within LispPad. On macOS, pressing option while opening the File menu will reveal a menu item "Open LispKit…" which provides access to the LispKit source code bundled with LispPad. Similarly, pressing control while opening the File menu will reveal a menu item "Open LispPad..." for accessing the LispPad-specific code, e.g like the LispPad prelude.