newLISP

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

newLISP
Nl logo libel side color 240X100.png
The official newLISP dragonfly
ParadigmMulti-paradigm
FamilyLisp
Designed byLutz Mueller
DeveloperLutz Mueller
First appeared1991; 28 years ago (1991)
Stable release
10.7.1 / January 31, 2017; 2 years ago (2017-01-31)[1]
Preview release
10.7.4 / September 10, 2018; 6 months ago (2018-09-10)[1]
ScopeDynamic
PlatformIA-32, x86-64
OSCross-platform: Unix, Unix-like, Windows
LicenseGPL
Websitewww.newlisp.org
Influenced by
Lisp, Common Lisp, Scheme, Pascal, C

newLISP is a scripting language, a dialect of the Lisp family of programming languages. It is developed and maintained by Lutz Mueller,[2] as free and open-source software released under a GNU General Public License (GPL).

History[edit]

newLISP design is influenced by the two main Lisp dialects, Common Lisp and Scheme, and by other languages like Pascal and C.[citation needed] newLISP originated in 1991 and was originally developed on a Sun-4 workstation.[3] It later moved to Windows 3.0, where version 1.3 was released on CompuServe around 1993, then became available as a Windows graphical user interface (GUI) graphics-capable application and a DOS console application (both 16-bit). In 1995, with the release of Windows 95, newLISP moved to 32-bit.

In April 1999, newLISP was ported to Linux; some of its core algorithms were rewritten, and all Windows-specific code removed. newLISP was released as an open-source software project licensed under the GPL, and development on Windows stopped after version 6.0.25. During the first half of 2001, newLISP was ported back to Windows on the Cygwin platform without graphics abilities. In the second half of 2001, a cross-platform Tcl/Tk frontend named newLISP-tk was released around version 6.3.0. In 2006, 64-bit precision was introduced for integer arithmetic and for some operations on files in version 9.0.

Since the release of 6.5 in mid-2002, development has been very active, and many new features have been added.[4]

Philosophy[edit]

newLISP attempts to provide a fast, powerful, cross-platform, full-featured scripting version of the language Lisp while using only a modest system resources such as data storage (e.g., disk space) and memory.[5][6]

It provides Lisp features such as lists, symbol processing, function mapping, anonymous functions (lambda expressions), s-expressions (excluding improper lists), and macros. It also provides the functions expected of a modern scripting language, including supporting regular expressions, XML, Unicode (UTF-8), networking via Transmission Control Protocol (TCP), Internet Protocol (IP), and User Datagram Protocol (UDP), matrix and array processing, advanced math, statistics and Bayesian statistical analysis, mathematical finance, and distributed computing.

newLISP runs on the operating systems Berkeley Software Distribution (BSD), Linux, macOS, Solaris, and Windows.[1] It supports MYSQL, SQLite and ODBC database access, Common Gateway Interface (CGI), Simple Mail Transfer Protocol (SMTP), Post Office Protocol (POP) 3, File Transfer Protocol (FTP) and XML remote procedure call (XML-RPC). It can run in server mode as a daemon.

Language features[edit]

Contexts[edit]

newLISP supports namespaces termed contexts, which can be assigned to variables and passed to functions, but which are associated with globally unique symbols, limiting their use as first-class citizens (objects). A prototype-based object-oriented style of programming is possible in newLISP, using contexts as prototypes to construct objects. Variables inside contexts do not interfere with variables of the same name in other contexts, but inside a context, variables behave according to the rules of dynamic scoping.

Scoping[edit]

newLISP uses dynamic scoping. When a function is called, that function can see all variables of its caller, its caller's caller, and so on, within the same context or namespace. It supports both explicitly and implicitly defined local dynamic variables that shadow variables with the same name from the outer environment, thus preventing accidental use or change of the variables from caller environment. Parameter variables of the called function automatically shadow the caller's variable environment. Globally, variables can be grouped in separate namespaces.

Memory management[edit]

newLISP uses a method of automatic memory management different from traditional garbage collection schemes, termed one reference only (ORO) memory management. Each variable is referenced only by its context, and each context is referenced globally.

Sharing of subobjects among objects, cyclic structures, or multiple variables pointing to the same object are unsupported in newLISP. Objects are copied when stored in data structures or passed to functions, except for certain built-in functions. The exceptions are symbols and contexts, which are shared instead of copied, and thus can be used for indirection. Symbols and contexts are globally named and are deleted explicitly; deleting a symbol or context scans all other objects to replace references to it with nil.

GUI options[edit]

newLISP graphical user interface (GUI) server (newLISP-GS) is a Java-based Internet protocol suite (TCP/IP) server providing a graphical programming interface. A newLISP-GS based development environment is included in newLISP binary distributions, and GTK-server, OpenGL, and Tcl/Tk-based programming interfaces are available.

Standalone binaries[edit]

Any newLISP version allows building executable files, portable applications, for deployment which are self-contained and need no installing.

Interaction with shared libraries[edit]

newLISP has an import function, which allows importing functions from a dynamic-link library (DLL) on Windows API Win32, or from a shared library on Linux or Unix.

Frameworks[edit]

Web frameworks available for newLISP include Dragonfly[7] and Rockets.[8]

References[edit]

  1. ^ a b c "newLISP". Retrieved 2018-11-20.
  2. ^ Walling, Rob. "An Interview with Lutz Mueller, Creator of newLISP". Softwarebyrob.com. Retrieved 2018-11-20.
  3. ^ Mueller, Lutz. "newLISP – a LISP Scripting Language". don Lucio. Retrieved 2018-11-20.
  4. ^ Kobayashi, Shigeru. "kosh04/newlisp". GitHub. Retrieved 2018-11-20.
  5. ^ "Category:newLISP". Rosetta Code. Retrieved 2018-11-20.
  6. ^ Lazar, Alexandru (5 January 2009). "A look at newLISP". OSNews. Retrieved 2018-11-20.
  7. ^ Slepak, Greg; Hildmann, Marc. "Dragonfly web framework". AppTruck. Retrieved 2018-11-20.
  8. ^ Reimer, Jeremy. "The newLISP on Rockets 2.0 Blog". Rocket Man. Retrieved 2018-11-20.

External links[edit]