Katana VentraIP

Lisp (programming language)

Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized prefix notation.[3] Originally specified in the late 1950s, it is the second-oldest high-level programming language still in common use, after Fortran.[4][5] Lisp has changed since its early days, and many dialects have existed over its history. Today, the best-known general-purpose Lisp dialects are Common Lisp, Scheme, Racket, and Clojure.[6][7][8]

"LISP" redirects here. For the speech impediment, see Lisp. For other uses, see Lisp (disambiguation).

Lisp was originally created as a practical mathematical notation for computer programs, influenced by (though not originally derived from)[9] the notation of Alonzo Church's lambda calculus. It quickly became a favored programming language for artificial intelligence (AI) research.[10] As one of the earliest programming languages, Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, the self-hosting compiler,[11] and the read–eval–print loop.[12]


The name LISP derives from "LISt Processor".[13] Linked lists are one of Lisp's major data structures, and Lisp source code is made of lists. Thus, Lisp programs can manipulate source code as a data structure, giving rise to the macro systems that allow programmers to create new syntax or new domain-specific languages embedded in Lisp.


The interchangeability of code and data gives Lisp its instantly recognizable syntax. All program code is written as s-expressions, or parenthesized lists. A function call or syntactic form is written as a list with the function or operator's name first, and the arguments following; for instance, a function f that takes three arguments would be called as (f arg1 arg2 arg3).

LISP 1 – First implementation.

[24]

LISP 1.5 – First widely distributed version, developed by McCarthy and others at MIT. So named because it contained several improvements on the original "LISP 1" interpreter, but was not a major restructuring as the planned LISP 2 would be.

[25]

Stanford LISP 1.6 – A successor to LISP 1.5 developed at the Stanford AI Lab, and widely distributed to PDP-10 systems running the TOPS-10 operating system. It was rendered obsolete by Maclisp and InterLisp.

[26]

[27] – developed for MIT's Project MAC, MACLISP is a direct descendant of LISP 1.5. It ran on the PDP-10 and Multics systems. MACLISP would later come to be called Maclisp, and is often referred to as MacLisp. The "MAC" in MACLISP is unrelated to Apple's Macintosh or McCarthy.

Maclisp

[28] – developed at BBN Technologies for PDP-10 systems running the TENEX operating system, later adopted as a "West coast" Lisp for the Xerox Lisp machines as InterLisp-D. A small version called "InterLISP 65" was published for the MOS Technology 6502-based Atari 8-bit computers. Maclisp and InterLisp were strong competitors.

Interlisp

– originally a University of California, Berkeley project; later developed by Franz Inc. The name is a humorous deformation of the name "Franz Liszt", and does not refer to Allegro Common Lisp, the dialect of Common Lisp sold by Franz Inc., in more recent years.

Franz Lisp

which AutoLISP was based on.

XLISP

and Portable Standard Lisp were widely used and ported, especially with the Computer Algebra System REDUCE.

Standard Lisp

also termed Lisp Machine Lisp – used on the Lisp machines, direct descendant of Maclisp. ZetaLisp had a big influence on Common Lisp.

ZetaLisp

is a French Lisp dialect. One of the first Interface Builders (called SOS Interface[29]) was written in LeLisp.

LeLisp

(1975).[30]

Scheme

(1984), as described by Common Lisp the Language – a consolidation of several divergent attempts (ZetaLisp, Spice Lisp, NIL, and S-1 Lisp) to create successor dialects[31] to Maclisp, with substantive influences from the Scheme dialect as well. This version of Common Lisp was available for wide-ranging platforms and was accepted by many as a de facto standard[32] until the publication of ANSI Common Lisp (ANSI X3.226-1994). Among the most widespread sub-dialects of Common Lisp are Steel Bank Common Lisp (SBCL), CMU Common Lisp (CMU-CL), Clozure OpenMCL (not to be confused with Clojure!), GNU CLisp, and later versions of Franz Lisp; all of them adhere to the later ANSI CL standard (see below).

Common Lisp

was in its first version a mix of Scheme with the Common Lisp Object System.

Dylan

– attempt to develop a new efficient and cleaned-up Lisp.

EuLisp

– attempt to develop a new efficient and cleaned-up Lisp. Standardized as ISO/IEC 13816:1997[33] and later revised as ISO/IEC 13816:2007:[34] Information technology – Programming languages, their environments and system software interfaces – Programming language ISLISP.

ISLISP

IEEE – IEEE standard, 1178–1990 (R1995).

Scheme

ANSI – an American National Standards Institute (ANSI) standard for Common Lisp, created by subcommittee X3J13, chartered[35] to begin with Common Lisp: The Language as a base document and to work through a public consensus process to find solutions to shared issues of portability of programs and compatibility of Common Lisp implementations. Although formally an ANSI standard, the implementation, sale, use, and influence of ANSI Common Lisp has been and continues to be seen worldwide.

Common Lisp

or "A Computational Logic for Applicative Common Lisp", an applicative (side-effect free) variant of Common LISP. ACL2 is both a programming language which can model computer systems, and a tool to help proving properties of those models.

ACL2

a recent dialect of Lisp which compiles to the Java virtual machine and has a particular focus on concurrency.

Clojure

(or GOAL) is a video game programming language developed by Andy Gavin at Naughty Dog. It was written using Allegro Common Lisp and used in the development of the entire Jak and Daxter series of games developed by Naughty Dog.

Game Oriented Assembly Lisp

not limited to goto

Conditionals

First-class functions

Recursion

Treating variables uniformly as , leaving types to values

pointers

Garbage collection

Programs made entirely of with no statements

expressions

The data type, distinct from the string data type

symbol

Notation for code made of trees of symbols (using many )

parentheses

Full language available at , compile time, and run time

load time

Paul Graham identifies nine important aspects of Lisp that distinguished it from existing languages like Fortran:[59]


Lisp was the first language where the structure of program code is represented faithfully and directly in a standard data structure—a quality much later dubbed "homoiconicity". Thus, Lisp functions can be manipulated, altered or even created within a Lisp program without lower-level manipulations. This is generally considered one of the main advantages of the language with regard to its expressive power, and makes the language suitable for syntactic macros and meta-circular evaluation.


A conditional using an if–then–else syntax was invented by McCarthy for a chess program written in Fortran. He proposed its inclusion in ALGOL, but it was not made part of the Algol 58 specification. For Lisp, McCarthy used the more general cond-structure.[60] Algol 60 took up if–then–else and popularized it.


Lisp deeply influenced Alan Kay, the leader of the research team that developed Smalltalk at Xerox PARC; and in turn Lisp was influenced by Smalltalk, with later dialects adopting object-oriented programming features (inheritance classes, encapsulating instances, message passing, etc.) in the 1970s. The Flavors object system introduced the concept of multiple inheritance and the mixin. The Common Lisp Object System provides multiple inheritance, multimethods with multiple dispatch, and first-class generic functions, yielding a flexible and powerful form of dynamic dispatch. It has served as the template for many subsequent Lisp (including Scheme) object systems, which are often implemented via a metaobject protocol, a reflective meta-circular design in which the object system is defined in terms of itself: Lisp was only the second language after Smalltalk (and is still one of the very few languages) to possess such a metaobject system. Many years later, Alan Kay suggested that as a result of the confluence of these features, only Smalltalk and Lisp could be regarded as properly conceived object-oriented programming systems.[61]


Lisp introduced the concept of automatic garbage collection, in which the system walks the heap looking for unused memory. Progress in modern sophisticated garbage collection algorithms such as generational garbage collection was stimulated by its use in Lisp.[62]


Edsger W. Dijkstra in his 1972 Turing Award lecture said,


Largely because of its resource requirements with respect to early computing hardware (including early microprocessors), Lisp did not become as popular outside of the AI community as Fortran and the ALGOL-descended C language. Because of its suitability to complex and dynamic applications, Lisp enjoyed some resurgence of popular interest in the 2010s.[64]

The , CLOS, is an integral part of ANSI Common Lisp. CLOS descended from New Flavors and CommonLOOPS. ANSI Common Lisp was the first standardized object-oriented programming language (1994, ANSI X3J13).

Common Lisp Object System

ObjectLisp or Object Lisp, used by Lisp Machines Incorporated and early versions of Macintosh Common Lisp

[73]

LOOPS (Lisp Object-Oriented Programming System) and the later

CommonLoops

built at MIT, and its descendant New Flavors (developed by Symbolics).

Flavors

KR (short for Knowledge Representation), a -based object system developed to aid the writing of Garnet, a GUI library for Common Lisp.

constraints

(KEE) used an object system named UNITS and integrated it with an inference engine[74] and a truth maintenance system (ATMS).

Knowledge Engineering Environment

Various object systems and models have been built on top of, alongside, or into Lisp, including

Operating systems[edit]

Several operating systems, including language-based systems, are based on Lisp (use Lisp features, conventions, methods, data structures, etc.), or are written in Lisp,[75] including:


Genera, renamed Open Genera,[76] by Symbolics; Medley, written in Interlisp, originally a family of graphical operating systems that ran on Xerox's later Star workstations;[77][78] Mezzano;[79] Interim;[80][81] ChrysaLisp,[82] by developers of Tao Systems' TAOS.[83]

Self-modifying code

John McCarthy's history of 12 February 1979

History of Lisp

– Herbert Stoyan's history compiled from the documents (acknowledged by McCarthy as more complete than his own, see: McCarthy's history links)

Lisp History

History of LISP at the Computer History Museum

Bell, Adam Gordon (2 May 2022). . CoRecursive (podcast, transcript, photos). about the use of LISP software on NASA robots.

LISP in Space, with Ron Garret

Cassel, David (22 May 2022). . The New Stack.

"NASA Programmer Remembers Debugging Lisp in Deep Space"