PC-LISP | |
Developer: | Peter Ashwood-Smith |
Influenced By: | Franz Lisp |
Platform: | i386, x86-64 |
Operating System: | Linux, macOS, Microsoft Windows, NetBSD |
PC-LISP is an implementation of the Franz Lisp dialect by Peter Ashwood-Smith.[1] [2] [3]
Version 2.07 was released on 1 February 1986,[4] and version 3.00 was released on 1 February 1990. A current version is available through GitHub.
Currently, PC-LISP has been ported to 32 & 64 bit versions of Linux, Mac, Windows and NetBSD.[5] For NetBSD there also exists ports for AArch64, ARMv5/6/7, PowerPC, Motorola 68000, SPARC/SPARC64, Alpha and VAX.
Note that the Franz LISP dialect was the immediate, portable successor to the ITS version of Maclisp[6] and is perhaps the closest thing to the LISP in the Steven Levy book Hackers as is practical to operate.
PC-LISP is written primarily in the C programming language, with some parts now also written in Common Lisp. PC-LISP runs well in DOS emulators and on modern Windows versions. Because PC-LISP implements Franz LISP, it is a dynamically scoped predecessor to modern Common Lisp. This is therefore an historically important implementation.
The session is running the following code which demonstrates dynamic scoping in Franz LISP. Note that PC-LISP does not implement the let
special form that Emacs Lisp provides for local variables. Instead, all variables are what an ALGOL-based language would call "global". The first dialect of Lisp to incorporate ALGOL scoping rules (called lexical scoping) was Scheme although the Common Lisp language also added this feature.
(defun main ;; define two symbols (setq mine myglobal) (setq yours yourglobal) ;; print them (princ "calling dosomething\n") (dosomething mine yours) (princ "calling nolocals\n") (nolocals) (princ "calling dosomething again\n") (dosomething mine yours))
Another example showing the use of backquote and the power of LISP. This is a differentiation example.