NewLISP
Encyclopedia
newLISP is an open source
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 scripting language
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

 in the Lisp family of programming languages
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

 developed by Lutz Mueller and released under the GNU General Public License
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

.

History

newLISP originated in 1991 and was originally developed on a Sun-4
Sun-4
Sun-4 is a series of Unix workstations and servers produced by Sun Microsystems, launched in 1987. The original Sun-4 series were VMEbus-based systems similar to the earlier Sun-3 series, but employing microprocessors based on Sun's own SPARC V7 RISC architecture in place of the 68k family...

 workstation. It later moved to Windows 3.0
Windows 3.0
Windows 3.0, a graphical environment, is the third major release of Microsoft Windows, and was released on 22 May 1990. It became the first widely successful version of Windows and a rival to Apple Macintosh and the Commodore Amiga on the GUI front...

, where version 1.3 was released on CompuServe
CompuServe
CompuServe was the first major commercial online service in the United States. It dominated the field during the 1980s and remained a major player through the mid-1990s, when it was sidelined by the rise of services such as AOL with monthly subscriptions rather than hourly rates...

 around 1993, then became available as a Windows GUI graphics-capable application and a DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 console application (both 16-bit). In 1995, with the release of Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

, 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
Open source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...

 project licensed under the GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

, 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
Cygwin
Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment...

 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.

Philosophy

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.

It provides Lisp features such as lists, symbol processing, function mapping, anonymous functions (lambda expressions), s-expression
S-expression
S-expressions or sexps are list-based data structures that represent semi-structured data. An S-expression may be a nested list of smaller S-expressions. S-expressions are probably best known for their use in the Lisp family of programming languages...

s (excluding improper lists), and macros. It also provides the functions expected of a modern scripting language, including support for regular expressions, XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

, Unicode (UTF-8
UTF-8
UTF-8 is a multibyte character encoding for Unicode. Like UTF-16 and UTF-32, UTF-8 can represent every character in the Unicode character set. Unlike them, it is backward-compatible with ASCII and avoids the complications of endianness and byte order marks...

), TCP
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...

/IP
Internet Protocol
The Internet Protocol is the principal communications protocol used for relaying datagrams across an internetwork using the Internet Protocol Suite...

 and UDP
User Datagram Protocol
The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...

 networking, matrix
Matrix (mathematics)
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

 and array processing, advanced math, statistics and Bayesian
Bayesian inference
In statistics, Bayesian inference is a method of statistical inference. It is often used in science and engineering to determine model parameters, make predictions about unknown variables, and to perform model selection...

 statistical analysis, financial mathematics
Mathematical finance
Mathematical finance is a field of applied mathematics, concerned with financial markets. The subject has a close relationship with the discipline of financial economics, which is concerned with much of the underlying theory. Generally, mathematical finance will derive and extend the mathematical...

, and distributed computing support.

NewLISP runs on the BSD
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

, Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

, Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, and Solaris operating systems. It provides support for MYSQL
MySQL
MySQL officially, but also commonly "My Sequel") is a relational database management system that runs as a server providing multi-user access to a number of databases. It is named after developer Michael Widenius' daughter, My...

, SQLite
SQLite
SQLite is an ACID-compliant embedded relational database management system contained in a relatively small C programming library. The source code for SQLite is in the public domain and implements most of the SQL standard...

 and ODBC database access, CGI
Common Gateway Interface
The Common Gateway Interface is a standard method for web servers software to delegate the generation of web pages to executable files...

, SMTP
Simple Mail Transfer Protocol
Simple Mail Transfer Protocol is an Internet standard for electronic mail transmission across Internet Protocol networks. SMTP was first defined by RFC 821 , and last updated by RFC 5321 which includes the extended SMTP additions, and is the protocol in widespread use today...

, POP3, FTP
File Transfer Protocol
File Transfer Protocol is a standard network protocol used to transfer files from one host to another host over a TCP-based network, such as the Internet. FTP is built on a client-server architecture and utilizes separate control and data connections between the client and server...

 and XML-RPC
XML-RPC
XML-RPC is a remote procedure call protocol which uses XML to encode its calls and HTTP as a transport mechanism. "XML-RPC" also refers generically to the use of XML for remote procedure call, independently of the specific protocol...

. It can run in server mode as a daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...

.

Contexts

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
Prototype-based programming
Prototype-based programming is a style of object-oriented programming in which classes are not present, and behavior reuse is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as classless, prototype-oriented or instance-based programming...

 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
Scope (programming)
In computer programming, scope is an enclosing context where values and expressions are associated. Various programming languages have various types of scopes. The type of scope determines what kind of entities it can contain and how it affects them—or semantics...

.

Scoping

NewLISP uses dynamic scoping
Scope (programming)
In computer programming, scope is an enclosing context where values and expressions are associated. Various programming languages have various types of scopes. The type of scope determines what kind of entities it can contain and how it affects them—or semantics...

. 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

NewLISP uses a method of automatic memory management different from traditional garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

 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

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
GTK-server
GTK-server is an open source project released under the GNU General Public License. The GTK-server project aims to bring Graphical User Interface programming to any interpreted language using the GIMP Tool Kit or XForms .-Philosophy:...

, OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...

 and Tcl/Tk-based programming interfaces are also available.

Stand-alone binaries

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

newLISP has an import function, which allows importing functions from DLLs
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...

 (Dynamic Link Libraries) on Win32 or shared libraries on Linux/UNIX.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK