For details of these, see the documentation in the LispWorks User Guide and Reference Manual , unless a manual is referenced explicitly.
The LispWorks Java interface allows you to:
See the Chapter "Java interface" in the LispWorks User Guide and Reference Manual .
The Android interface allows your Android project, written in Java, to link to a dynamic library runtime built with LispWorks for Android Runtime and thus create an Android app with LispWorks inside.
It uses the LispWorks Java interface.
See the Chapter "Android interface" in the LispWorks User Guide and Reference Manual .
The iOS interface allows your Xcode project to link to a static object runtime built with LispWorks for Android Runtime and thus create an iOS app with LispWorks inside.
It uses the LispWorks Objective-C interface.
See the Chapter "iOS interface" in the LispWorks User Guide and Reference Manual .
The character implementation in LispWorks now covers the full range of the Unicode standard, including the supplementary planes in addition to the Basic Multilingual Plane (BMP). This involves the following changes:
cl:char-code-limit
is now #x110000
, which covers exactly the Unicode range. The surrogate code points (codes #xd800
to #xdfff
) are illegal as character codes.
cl:code-char
accepts integers from 0 below cl:char-code-limit
. Other values cause an error. For codes in the surrogate range it returns nil
. Reading characters from streams and converting characters from foreign strings can generate characters in the whole range (depending on the external format used), and can never generate character objects corresponding to surrogate code points.
Character bits and font attributes (as specified in
Common Lisp: the Language (2nd Edition)
are no longer supported. char-bits
, char-bit
, (setf char-bit)
, char-bits-limit
, char-font
and char-font-limit
have been eliminated from the LISPWORKS package. The syntax for reading characters with bits is now illegal and trying to read such a character (for example #\c-a
) will signal an error.
LispWorks 6.1 and earlier versions also accept some special characters representing keystrokes that do not correspond to Unicode characters, such as #\F1
and #\Home
. These are illegal in LispWorks 7.0 and later and will signal an error too.
Use strings rather than characters to define LispWorks Editor key sequences with modifiers. See Editor bindings for keystrokes with modifiers for examples.
In other situations when you previously used character bits, you should use Gesture Spec objects (see sys:make-gesture-spec
and sys:coerce-to-gesture-spec
). The function sys:gesture-spec-to-character
will now signal an error if the gesture spec has bits or corresponds to a non-character key like F1
, unless the new errorp argument is supplied as nil
.
lw:text-string
and lw:simple-text-string
now can store the full range of Unicode characters.
lw:simple-char
is now a synonym for cl:character
, and is deprecated.
16-bit characters and 16-bit strings are implemented by the new types lw:bmp-char
and lw:bmp-string
and lw:simple-bmp-string
(BMP is Basic Multilingual Plane, comprising the Unicode code points 0
to #xffff
).
The implementation of 8-bit characters has not changed.
Performance note: lw:text-string
and lw:simple-text-string
consume 32 bits per character now, but in LispWorks 6.1 and earlier versions they consume only 16 bits per character. If you have an application that uses many 16-bit strings and you are worried about memory size, you may consider using strings of type lw:bmp-string
instead of lw:text-string
. That will work provided that all the characters you ever use have codes less than #x10000
. If the codes are all below 256
, you can use cl:base-string
instead.
The functions lw:unicode-string-equal
, lw:unicode-string-greaterp
, lw:unicode-string-not-lessp
, lw:unicode-char-equal
, lw:unicode-alpha-char-p
and so on have been updated to follow the rules specified in Unicode 6.3.0.
Code Coverage allows you to compile your code with code execution counters which record when each piece of code is executed. After exercising your code you use a web browser or the LispWorks IDE tools to visualize which parts of your program were executed and how frequently.
Alternatively you can compile your code with a binary flag to record simply whether each piece was executed or not.
See "Code Coverage" in the LispWorks User Guide and Reference Manual , and New Code Coverage tool.
You can now perform socket I/O operations that invoke a callback when they are complete, rather than synchronously calling a function that returns a value (like cl:read-line
). This allows many operations to run in a single thread. See "The Asynchronous I/O API" in the
LispWorks User Guide and Reference Manual
.
The new functions mp:funcall-async
and mp:funcall-async-list
call a function as cl:funcall
would do, but asynchronously.
The new function hcl:fast-directory-files
is a faster way to access files than cl:directory
, especially in situations when you need to filter based on simple features such as size and access time, or filter based on the name in a more complex way than cl:directory
can.
The new hcl:unlocked-queue
is a FIFO queue that is unlocked, not thread-safe and does not have waiting functionality, but is faster than mp:mailbox
.
hcl:unlocked-queue
is useful when accessing the queue is always done together with other operations that need to be "atomic", so that you need a lock around them anyway, or when adding and removing items is done in the same process.
lw:find-regexp-in-string
can now return a vector specifying the matches of \(
and \)
in the pattern.
The new INT64 API provides a way to perform optimal raw 64-bit arithmetic. See the section "Fast 64-bit arithmetic" in the LispWorks User Guide and Reference Manual
A new external format and charset :koi8-r
has been added to support the KOI8-R (RFC 1489) encoding. You can use this in file I/O as well as the FLI functions.
The function sys:run-shell-command
is now implemented for Microsoft Windows, as well as Unix/Linux/Mac OS X. It allows you to call executables and DOS or Unix shell commands from Lisp code.
When sys:run-shell-command
is called with :wait nil
and :save-exit-status t
, it now always returns three values (stream, error-stream, process) even if none of the input, output or error-output arguments have the value :stream
. This allows the exit status of the process to be recovered by calling sys:pipe-exit-status
on stream.
Command line parsing on Microsoft Windows now uses the standard algorithm.
The main change is the interpretation of backslash and double-quote (see the CommandLineToArgvW
function at
http://msdn.microsoft.com/en-us/library/windows/desktop/bb776391%28v=vs.85%29.aspx
).
The command line parser sets system:*line-arguments-list*
on startup.
The new function win32:record-message-in-windows-event-log
and new macro win32:with-windows-event-log-event-source
comprise an API for recording messages in the Windows event log.
Ring objects can be used to hold Lisp objects and provide stack-like behavior. Each ring is limited to a maximum number of elements and can be rotated. You can control the insertion point where elements get added and removed, and iterate across the elements. For more information, see hcl:make-ring
.
system:find-encoding-option
now looks in the file options (EMACS-style -*- line) for an option called "coding", in addition to options called "encoding" or "external-format".
This addition is for compatibility with GNU Emacs. system:find-encoding-option
is part of the default algorithm whereby open
detects the encoding of a text file.
You can now specify the terminate method for a process. The terminate method is used by the new function mp:process-terminate
.
See the new keywords :remote-terminator
, :local-terminator
and :terminate-by-send
in mp:process-run-function
, and also mp:current-process-set-terminate-method
.
The new function hcl:symbol-dynamically-bound-p
is the predicate for whether a symbol is dynamically bound in the current environment.
The new functions system:octet-ref
and system:base-char-ref
allow efficient access to simple vectors of element type (unsigned-byte 8)
and strings of type simple-base-string
in the same code.
The new function hcl:reduce-memory
frees memory and tries to reduce the size of a 32-bit LispWorks image, without enlarging it even temporarily. It is therefore better than hcl:clean-down
when the operating system has signalled that memory is low.
Three new functions allow you to time Garbage Collector (GC) operations.
hcl:get-gc-timing
reports time spent in the GC as total, user and system times, like hcl:extended-time
except that the timing is done between your calls to hcl:start-gc-timing
and hcl:stop-gc-timing
.
After calling hcl:start-profiling
, you can now suspend profiling by executing:
(stop-profiling :suspend t)
Profiler information already collected is retained, so if you restart profiling like this:
(start-profiling :initialize nil)
then new profiler information is added to that which was previously retained.
Source level stepping of subforms occurring within a macro expansion works, provided that the subform is eq
to the original subform in the call to the macro. In the rare case where a macro copies a subform, making it non-eq
, you can use the dspec:replacement-source-form
macro to indicate which original subform should be identified as the source code for the new form.
The new constant system:gesture-spec-caps-lock-bit
is used to represent the state of the Caps Lock key in a Gesture Spec where the bits are used to represent the keyboard state.
The predicate function hcl:delivered-image-p
returns true when called from a delivered image, that is an image saved by a call to lw:deliver
. It returns nil
otherwise. It exists in LispWorks 6.1, but is now documented in LispWorks 7.0.
hcl:load-data-file
is now more flexible with respect to the file type of the loaded file; you can control whether loaded forms are evaluated; and you can provide a custom callback as an alternative to printing the result of each form. It still allows you to load data files created with previous versions of LispWorks and on most platforms.
The cl:compile-file
keyword argument :load
now accepts the special value :delete
, which means load the compiled file and then delete it (not affecting the source file). This is especially useful when using :output-file :temp
, to avoid leaving compiled (fasl) files on disk.
comm:socket-stream-shutdown
performs a shutdown on one or both sides of a TCP socket connection.
comm:start-up-server
and comm:accept-tcp-connections-creating-async-io-states
now accept a backlog argument which specifies the maximum number of pending connections for the socket in the operating system.
LispWorks Release Notes and Installation Guide - 2 Mar 2015