newLISP® v.10.5.0 Stable Release
2013-05-21
This stable release adds processing for JSON formatted data and support for
unlimited precision, big integer arithmetic.
The link feature to produce selfcontained executables is now built-in as
a command-line option and works on all platforms.
Several other functions have enhanced options.
Changes and additions
- The functions json-parse and json-error allow fast parsing
of JSON formatted text-data. The module json.lsp has been removed
from the distribution, but is still available at www.newlisp.org.
- The integer operators, + - * / % = < <= > >= != and the
functions abs, even?, odd?, length,
number? and zero?
now accept big integers with unlimited precision. If the first argument in
any of these operators and functions is a big integer, the calculation
performed will be in big integer mode. Integer values greater than 9223372036854775807
or smaller than -9223372036854775808, or integers with an appended letter L,
will be processed in big integer mode - as in 123L -. For details see the new
manual section about big integers in chapter: 8. Evaluating newLISP expressions.
- The new function bigint can be used to convert from integer,
float values or strings to big integer.
- The new predicate bigint? checks for big integer type.
- The function flat now can take an optional level parameter to limit flattening
a list to certain depth level: (flat <list> [<level>]).
- The usage of $0 in replace on lists (not regular
expressions) has been eliminated. The count of replacements is now contained in
the new $count system var, not $0, which is strictly reserved
for regular espressions. This also speeds up replace.
- read-expr now uses $count instead of $0 for the
number of characters processed.
- When using option 8 in xml-parse to translate XML tags into newLISP
symbols, colons ':' in XML namespace tags will be translated into
a '.' dot.
- Crtl-D in Unix will now emit a line-feed before exiting.
- In the file? function, the true flag not only causes the
filename to be returned but now also implies that the filename is not a directory,
else nil is returned.
- Using an addtional true flag in the real-path function,
the executable path of an executable is returned - similar to the UNIX
utility which. On Windows and BSDs, real-path now also veryfies
that path and file are valid, as it always did on non-BSD Unix (OSX, Linux).
- On LINUX and BSD, when compiled with GNU libreadline support, a matching
parenthesis will blink on the simple or multiple newLISP command line (REPL).
For this, the line: set blink-matching-paren on should be put into the
Bash .inputrc configuration file.
- newLISP server mode now sets the environment variable REMOTE_ADDR to the
IP-string of the connecting client.
- Debug mode for get-url now also outputs status line of remote
server.
- Linking the newLISP exeutable and source code is now built-in via the new
command line option -x. The file util/link.lsp is not
required any more. Linking is now documented in chapter 4. about Command-line
options and works on all operating system platforms.
- Extended command line buffer to 1024 (previously 512).
- The parser now also accepts -.9 as -0.9 and +.9
as +0.9.
- The module sqlite3.lsp has added paths for the imported library (1).
- Added make android_dist and make android_dist_utf8 commands
for making newlisp-ndk-x.x.x.tgz and newlisp-ndk-utf8-x.x.x.tgz
packages for compilation in the Android Native Development Kit (NDK). To run newLISP
on Android in server mode and to support data transfers of more than 4072 bytes
in the multiprocessing Cilk API and shared memory API, a /data/tmp
directory must be present on the Android device. (sys-info -1) on
Android is 11 and ostype is "Linux".
- The OSX Intel binary distribution is now 64-bit by default.
Bug fixes
- When passing a wrong second parameter type to an uninitialized symbol in
extend, the function crashed. Now an error exception will be thrown.
- A fix for sort when the sorting function is generated at run-time.
- When newLISP is compiled as a library big/small -endianess is now calculated
as in the main version instead of always assuming big-endian. This affected
pack, unpack and get-int in the shared library version.
Compatibility with previous versions
Except for the usage of $0 as outlined above and the behavior of
real-path on Windows, this version is compatible with previous versions
in the 10.4 series of newLISP.
(1) Changes in module files are always posted immediately online at
www.newlisp.org/modules/.
∂