newLISP

From Wikipedia, the free encyclopedia
  (Redirected from Newlisp)
Jump to: navigation, search
newLISP
Nl logo libel side color 240X100.png
Paradigm(s) Multi-paradigm
Designed by Lutz Mueller
Developer Lutz Mueller
Appeared in 1991
Stable release 10.6.0 / April 8, 2014; 5 months ago (2014-04-08)
Preview release 10.5.8 / March 11, 2014; 6 months ago (2014-03-11)
OS Cross-platform
License GNU General Public License
Website www.newlisp.org

newLISP is an open source scripting language in the Lisp family of programming languages developed by Lutz Mueller[1] and released under the GNU General Public License.

History[edit]

newLISP expresses things differently from traditional Lisps, so books about Common Lisp or Scheme — two different, older standards of Lisp — teach unneeded concepts for learning newLISP.[2][1]

newLISP design is influenced by Common Lisp and Scheme, other Lisp dialects, and 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 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 eliminated. NewLISP was released as an Open Source 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 capabilities. A multi-platform Tcl/Tk frontend named newLISP-tk was released around version 6.3.0, during the second half of 2001. 64-bit precision was introduced for integer arithmetic and for some operations on files in version 9.0 in 2006.

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

Philosophy[edit]

NewLISP attempts to provide a fast, powerful, cross-platform, full-featured scripting version of the Lisp programming language while using only a modest amount of system resources such as disk space and memory.[4]

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 support for regular expressions, XML, Unicode (UTF-8), TCP/IP and UDP networking, matrix and array processing, advanced math, statistics and Bayesian statistical analysis, financial mathematics, and distributed computing support.

NewLISP runs on the BSD, Linux, Windows, Mac OS X, and Solaris operating systems. It provides support for MYSQL, SQLite and ODBC database access, CGI, SMTP, POP3, FTP and XML-RPC. It can run in server mode as a daemon.

Language features[edit]

Contexts[edit]

NewLISP supports namespaces called contexts, which can be assigned to variables and passed to functions, but which are associated with globally unique symbols, limiting their usage as first-class objects. A prototype-based object-oriented style of programming is possible in newLISP, using contexts as prototypes for construction of 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 name space. It supports both explicitly and implicitly defined local dynamic variables that shadow variables with the same name from the outer environment, so accidental use or change of the variables from caller environment is prevented. 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, called One Reference Only (ORO) Memory Management. Each variable is referenced only by its context, and each context is referenced globally.

Sharing of sub-objects among objects, cyclic structures, or multiple variables pointing to the same object are not supported in newLISP. Objects are copied when stored in data structures or passed to functions, except for particular built-in functions. The exceptions are symbols and contexts, which are shared instead of copied, and therefore 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-GS (Gui Server) is a Java-based TCP/IP server providing a graphical programming interface. A newLISP-GS based development environment is included in newLISP binary distributions, but GTK-server, OpenGL and Tcl/Tk-based programming interfaces are also available.

Stand-alone binaries[edit]

It is possible to construct executable files for deployment using any version of newLISP. These files are self-contained and require no installation.

Interaction with shared libraries[edit]

newLISP has an import function, which allows importing functions from DLLs (Dynamic Link Libraries) on Win32 or shared libraries on Linux/UNIX.

References[edit]

  1. ^ a b Walling, Rob. "An Interview with Lutz Mueller, Creator of newLISP". Softwarebyrob.com. [unreliable source?]
  2. ^ newLISP FAQ, section 3
  3. ^ newLISP – a LISP Scripting Language
  4. ^ A look at newLISP

External links[edit]