newLISP® v.10.1 Release Notes
June 22nd, 2009
Versions 10.0.2 to 10.0.8 are development releases leading up to this
stable release version 10.1.
Improved support for concurrency and multi core CPUs
Release 10.1 improves concurrency support for multi core CPUs with
new messaging functions for parent and child processes launched
with spawn. The new non-blocking API works without locks and semaphores
and is safe against collisions. Besides constants, any expression with any size
can be transferred with the new send and receive functions.
Objects bigger then the OS's shared memory pagesize are transferred using
files internally. The new message API is only available on Mac OS X, Linux and
other UNIX.
New and changed functionality
- dotree can filter hash symbols starting with an underscore character
as used in hashes and bayes-train when using an optional true
flag.
- expand when used with an association list as second parameter can now
take an optional third boolean parameter to indicate evaluation of the value part
in associations:
(expand '(a b) '((a (+ 1 2)) (b (+ 3 4))) true) → (3 7)
- expand and letex now also expand symbols on the top level
of an expression or letex body:
(set 'x 123 'y 456)
(expand 'x 'x) → 123 ; threw error before
(letex (x 'y) x) → 456 ; returned y before
(letex (x '(+ 3 4)) x) → 7 ; returned (+ 3 4) before
- Eliminated stack-size dependence in functions find and map.
- A new inf? predicate tests if a number is infinite:
(inf? (div 1 0)) → true
Before, a floating point division by zero would throw a "divsion by zero" error.
- lambda - functions now can be of unlimited length in their body without
affecting the runtime result-stack. Before the number of statements in a lambda
was limited to 2 to 4 thousand.
- New last-error replaces eliminated error-number and
error-text and returns number and text in a list consistent with the
behavior of net-error and sys-error. All three functions now
behave the same way and can enumerate all errors when given the error number
as parameter.
- The prob-z function is now implemented using the error function errf
and gives results with a higher precision.
- The receive function receives a messge from a parent or child process
launched with spawn.
- The send functions sends a message to a parent or child process
launched with spawn.
- The share function now can share any lisp expression and size. On older versions
only boolean, number and strings constants were supported.
- The function swap now can swap the contents of two places in lists,
arrays or variables specifying locations in the same form as done by the functions
setf or setq and inc or dec. The old syntax
of swap using three parameters has been eliminated. The new syntax also
allows swapping places from two different data objects. In the old form this was
only possible when swapping the contents of two variables. Now two elements from
two different lists or arrays can be swapped too:
; swap places in one list
(set 'lst '(a b c d e f))
(swap (first lst) (last lst)) → a
lst → (f b c d e a)
; swap places in two lists
(set 'lst-b '(x y z))
(swap (lst 0) (lst-b -1)) → f
lst → (z b c d e a)
lst-b → (x y f)
(set 'lst '((a 1 2 3) (b 10 20 30)))
(swap (lookup 'a lst -1) (lookup 'b lst 1))
lst → ((a 1 2 10) (b 3 20 30))
- The function sys-info now also returns the process id (pid) of the
parent process which launched the current process using fork or spawn.
The pid is 0 (zero) if newLISP was launched not from fork or spawn.
The pid can be found at position -4. It is recommended to access the last
four members with negative offsets, to be compatible with older versions of
newLISP.
- The function write-buffer now behaves like write-line. When
no parameters are given the contents of (current-line) line is written
to stdout. Whithout the second parameter the contents of (current-line)
is written to either the string buffer or file handle sepcified in the first
parameter.
- The new xfer-event function monitors byte-transfer in get-url,
post-url and put-url and in all file operations which take URLs:
(xfer-event (fn (n) (println "->" n)))
(length (get-url "http://newlisp.org"))
->10240
->11221
11221
§
Changes and additions in external files
- The MySQL interface using the mysql.lsp module file has been
ovehauled and the mysql5.lsp and mysql51.lwp module
files have been eliminated. The new mysql.lsp should be version
independent for versions including and after 4.0.
- A new postgres.lsp interfaces to the PostSQL database.
- The SQLite sqlite3.lsp module has been expanded with parameter binding
fucntionality for safer ussage of the database in web applications, where the
danger of SQL injection exists.
- All three modules mysql.lsp, postgres.lsp and sqlite3.lsp
have also been tested on 64-Bit newLISP.
- The documentation utility newlispdoc now accepts custom tags. Any line starting
with ;; @mytag my description will be formatted like any other tag line,
but has no effect other wise.
- In the newLISP-GS editor newlisp-edit(.lsp) in both the editor and the monitor pane,
font face and size now can be changed interactively.
- Added makefiles for 64-bit BSD, tested on OpenBSD.
- When installing using make install or when installing from the UBUNTU Linux binary
installer, a newlisp-x.x.x and a symbolic link is created for newlisp → newlisp.x.x.x,
where x.x.x is the version number. This older versions of the newLISP binary are not deleted
and are still accessible. The binary installers for Win32 and Mac OS X have not changed.
- When building newLISP on Mac OS X or other Unix, make check is now recognized
additionally to make test and make all check will make and test.
§
Bug fixes
- bind did not allow for recursive-incremental definitions.
- The definition of legal? for symbols was too restrictive and caused
longer code than necessary when serializing symbols using save or
source
- Some HTTP errors where not registered in net-error.
- An unknown host result with net-lookup is now register with
net-error.
- pack did no convert from floats (doubles) to integers only from
integers to floats. Now pack will correctly convert in both directions.
- The replace in remove mode did not work correctly when all list
members where nil.
- Under some circumstances nil and true could confuse
the sort and unique functions.
- The floating point division zero by zero and subtracting two infinite numbers
from each other will now return NaN:
(NaN? (div 0 0)) → true
(set 'infinite (div 1 0))
(NaN? (sub infinite infinite)) → true
- Fixed a memory mapping problem surfacing on IBM AIX compiled newLISP.
- Better handling of status in HTTP headers sent back from newLISP server mode.
∂