newLISPtm v.9.3 Release Notes February 1st, 2008, rev 5

Improved newLISP-GS Graphics Server module and editor

This is the second release with the new Java based graphical user interface (GUI) server for newLISP. Since newLISP-GS appeared for the first time in release 9.2 new functions have been added, many bugs where fixed, and the newLISP-GS based multi tab editor has much improved behavior when launching applications. The monitor area at the bottom of the editor now works as an interactive newLISP shell.
The new way of doing Graphics and GUIs in newLISP using the Java based newLISP-GS module has been well received by the community. newLISP can also still be used with GTK-Server or Tcl/Tk.
As in previous releases, most new functionality and changes where asked for or contributed by the community of newLISP users.

Full support for nested association lists

This version has a new set of functions for managing nested association lists. Nested association lists are frequently the result from converting XML into Lisp s-expressions. XML has established itself as a format for data interchange on the internet. The new functions permit access, modification and deletion of associations in nested association lists. These functions also work together with FOOP, which represents objects as associations.

FOOP – Functional Object Oriented Programming

Using the : colon operator to implement polymorphism in method application and using context namespaces to encapsulate all methods of an object class, an object oriented programming system for newLISP has been designed. Thanks to Michael Michaels from neglOOk for designing most of this new way of object oriented programming in newLISP and for creating the training video series: “Towards FOOP”. FOOP melts contexts, the new colon operator : and functional programming into a simple and efficient way of object oriented programming in newLISP. The system features polymorphism and inheritance and can have anonymous objects, which are memory managed automatically by newLISP.
A very short description of FOOP can be found in the Users Manual. For a more in depth treatment of this topic see Michael Michaels's video series accessible from the newLISP documentation page and the neglOOk website.

New functions

assoc-set, set-assoc, pop-assoc – change or delete an association, handle nested associations.
bind – the function binds expressions to symbols from an association list and is normally used in logic programming together with unify. This function was already present in earlier versions, but was not documented.
destroy – destroys a process addressed by the process id returned by yhr newLISP functions process or fork.
dostring – iterates over a string with the character value in the loop variable. On UTF-8 compiled newLISP UTF8 character values are returned by the loop variable.
NEWLISPDIR - this environment variable will be registered on startup as /usr/share/newlisp on Unix and Unix like OSs and as %PROGRAMFILES%/newlisp on Win32. This allows writing platform independent code for loading modules. An already existing definition of NEWLISPDIR will not be overwritten during startup.
ref-set, set-ref, ref-set-all – these functions modify one or all elements in a list searched by a key. The key can be any type of expression and unify, match or a user-defined function can be specified as comparison function. Like the nth, set-nth and nth-set family of functions these new list search-and-replace functions can pass lists by reference using a context name which is interpreted as a default functor.
when – works like if without the else clause evaluating a block conditionally and without the necessity of begin.
The : (colon) now also works as a function and can be attached to a symbol following it. The operator forms a context symbol from the symbol following it and the context symbol found as the first element of the list contained in the next argument. The colon operator is used to implement polymorphism in FOOP.

Enhancements and changes to existing functionality

assoc – now handles nested multilevel associations.
count – has been rewritten to be many times faster on Unix and Unix like OSs.
dup - without the repetition parameter will assume 2.
find – when used with a comparison functor puts the last found expression into $0.
find-all – can now be used on lists too.
get-url, post-url, put-url, delete-url - have been extended and reworked to return more error information as supplied by the server and have improved debugging support.
last, nth, nth-set, set-nth – now have last element speed optimization as previously only present in push and pop.
nth, set-nth, nth-set, push, pop – when used on lists, indices overshooting the beginning or the end of the list now will cause an error to be thrown. Before, out of range indices would pick the first or last element in a list. The new behavior is consistent with the behavior of indexing arrays.
pack – now can take lists for data.
process – this reworked function now creates the new process without the previous time and memory overhead on Unix. No extra newLISP fork will be created to launch the new process. In most cases the full path must now be given for the command in process.
rand – integer random number generation with better statistical quality on Win32.
ref – when used with a comparison function puts the last found expression into $0.
set-assoc – renamed replace-assoc changes an association, handles nested associations.
set-nth, nth-set – now return the old list or value when the second argument is not present. They behave now like set without the value argument. Before both, set-nth and nth-set returned nil when the value argument was missing.
signal – the nil flag now specifies SIG_IGN and the true flag SIG_DFL. Before 9.3 nil would specify an empty newLISP handler and the true flag was not available. This allows to reset the signal handler for a specific signal to its OS default.

Other additions and changes

newlisp.vim – the syntax highlighting and editing control file for the VIM text editor has been much improved by Cyril Slobin.

crypto.lsp – this module has been expanded to offer hmac encryption using MD5 or SHA-1 hashing.

amazon.lsp – this new module interfaces to the Amazon Web Services, S3 storage API.

newlispdoc – this utility has been improved to handle indices and links to external module collections.

wordnet.lsp - this new module interfaces to the WordNet 3.o datebase

The amazon.lsp and wordet.lsp modules are not part of the distribution, but can be accessed in the new section.

Bug fixes and documentation corrections

Many bugs have been fixed in this release stabilizing some of the new features in the previous 9.2 release and fixing older previously undetected bugs. For more detail on bug fixes and changes see the CHANGES file in the source distribution of newLISP v.9.3.0 in newlisp-9.3.0/doc/CHANGES. This file details fixes changes for the development versions between 9.2.0 and to 9.3.0.