All Manuals > Release Notes and Installation Guide > 12 Release Notes

12.8 More new features

For details of these, see the documentation in the LispWorks® User Guide and Reference Manual, unless a manual is referenced explicitly.

12.8.1 Use of setf function names in map-environment and augment-environment

When a setf function is in an environment, the name passed to function in system:map-environment is now a setf function name. In previous releases, it was a symbol in the setf package that is used internally to name the setf function.

The items in the function argument to hcl:augment-environment can now be symbols or setf function names. In previous releases, they had to be symbols.

12.8.2 Printing potential numbers without escapes

The new variable hcl:*print-escape-potential-numbers* controls whether the Lisp printer escapes symbols whose names have the syntax of a potential number but do not actually have the syntax of a number. In previous releases, all potential numbers were printed with escapes.

12.8.3 Concatenating a long list of sequences

The new function hcl:concatenate* can be used to concatenate a list of sequences, to avoid using cl:apply with cl:concatenate. which risks breaching the limit imposed by cl:call-arguments-limit.

12.8.4 Recognizing case in characters that are not base-char

The Common Lisp functions such as cl:char-upcase now recognize case in characters that are not cl:base-char (those with code larger than 255). The case is based on the foldings as defined in Unicode 15.0.0 (the simple folding), provided they can be made to obey the ANSI Common Lisp standard's requirement that cased characters are always in one-to-one pairs of upper and lower characters. See 26.4 Characters with case in the LispWorks® User Guide and Reference Manual for more details.

This change affects all the case-insensitive string and character comparison, case modification and predicate functions, as well as reading and printing of symbols. It also affects LispWorks functions that are not Common Lisp functions, for example regular expression matching and Editor commands that upcase/downcase.

For case-insensitive comparison functions, characters are now folded according to the Unicode specification, which means that most characters are now downcased, but some are upcased. In previous releases of LispWorks, characters were always upcased for case-insensitive comparison functions. That does not change the resuls of equality functions, but it does change the results of ordering functions (such as cl:string-lessp and cl:char-greaterp).

The functions cl:nstring-upcase and cl:nstring-capitalize may now signal an error if given a cl:base-string containing with code 223 ("small sharp s") or code 255 ("small y with diaeresis") because the corresponding uppercase characters are not of type cl:base-char. The non-destructive functions cl:string-upcase and cl:string-capitalize create a lispworks:text-string in this case.

12.8.5 The compiler can now optimize based on free type declarations

The compiler can now optimize code based on free cl:type declarations (declarations that do not appear at the start of the body of the special form that establishes the variable binding). In previous releases, it could only optimize code based on bound cl:type declarations.

12.8.6 The compiler can now optimize using symbol macro type declarations

The compiler can now optimize code based on cl:type declarations for symbol macros, such as those defined by cl:define-symbol-macro, cl:symbol-macrolet, cl:with-slots and cl:with-accessors. In previous releases, declarations for symbol macros were ignored in most cases.

This change could lead to code being incorrectly optimized if you have an incorrect declaration. You can find incorrect cl:type declarations by compiling code with:the following cl:optimize declaration:

(optimize (safety 3) (debug 3))

12.8.7 The compiler now warns about unreferenced uninterned symbols

The compiler now warns about uninterned symbols that are not referenced and do not have an cl:ignore declaration. Likewise, it warns about uninterned symbols that have an cl:ignore declaration but are referenced. Previous versions of only warned about interned symbols in these cases.

12.8.8 Removing a user-preference value

The new function lispworks:remove-user-preference removes any persistent value in the user's registry that is associated with the accessor lispworks:user-preference.

12.8.9 The current directory in a shell command

The function system:open-pipe now has a current-directory keyword argument to control the current directory for the command, which defaults to the current directory of the LispWorks process. In previous releases on Microsoft Windows, the current directory defaulted to the lispworks:pathname-location of the lispworks:current-pathname and there was no way to change it.

The functions system:call-system and system:call-system-showing-output now use the value of the current-directory keyword on all platforms, which defaults to the current directory of the LispWorks process. In previous releases, this keyword was only used on Microsoft Windows and defaulted to the lispworks:pathname-location of the lispworks:current-pathname.

The function system:run-shell-command now has a current-directory keyword argument on all platforms to control the current directory for the command, which defaults to the current directory of the LispWorks process. In previous releases, this keyword was only allowed on Microsoft Windows and defaulted to the lispworks:pathname-location of the lispworks:current-pathname.

In practice, the default is only different when loading or compiling a file.

12.8.10 New :external-format argument to call-system-showing-output

The system:call-system-showing-output now has a external-format keyword argument to control the external format used when reading the output of the command.

12.8.11 hcl:create-universal-binary can create a shared library

The function hcl:create-universal-binary has new keyword arguments :image-type and :output-stream which allow it to create a shared library and redirect displayed messages.

12.8.12 compile-file with non-nil :load signals an error for compilation failure

The function cl:compile-file now signals an error at the end of compilation if an error occurs during compilation and the load keyword argument is non-nil. Previous versions of LispWorks would return nil.

12.8.13 Warnings for uninterned variables that are bound but not referenced

The compiler now signals a "bound but not referenced" warning for unreferenced variables that are uninterned symbols. In previous versions, the warning was only signaled for interned symbols.

12.8.14 New copy-times-p and copy-permissions-p arguments copy-file

The function lispworks:copy-file has new keyword arguments :copy-times-p and :copy-permissions-p to control copying the times and permissions of the file to the new file.

12.8.15 Detecting changes in a file system directory

The new function win32:monitor-directory-changes can be used to detect changes in a file system directory.

12.8.16 Additional options for encoding and decoding external formats

The functions external-format:decode-external-string external-format:encode-lisp-string have a new into keyword argument that allows writing into an existing string/vector or calling a function with each new element of the result. In addition, the first argument of external-format:decode-external-string can be a function that generates the bytes instead of being a vector.

12.8.17 Miscellaneous changes for SSL connections

The new function comm:ssl-connection-implementation returns the implementation name of an SSL connection.

The new reader comm:ssl-condition-ssl-code returns the associated SSL error code for an instance of comm:ssl-condition. The values for the Apple implementation are documented by the new constants such as comm:apple-err-ssl-protocol.

For the Apple implementation, function comm:ssl-connection-verify may also return the results of the Apple trust callback of the context used to create ssl-connection, See the discussion of apple-trust-callback in the documentation for comm:create-ssl-client-context and comm:create-ssl-server-context.

The new condition class comm:ssl-version-or-cipher-mismatch is signaled for SSL errors that are the result of problems with the cipher suite of key exchange during establishing an SSL connection.

12.8.18 handshake-timeout for open-tcp-stream-using-java

The function comm:open-tcp-stream-using-java has a newly documented handshake-timeout keyword argument. This has always be supported but not documented until now.

12.8.19 Performing a shutdown on an async-io-state

The new function comm:async-io-state-shutdown performs a shutdown on the socket associated with an comm:async-io-state.

12.8.20 Waiting for asynchronous input to be available

The new function comm:async-io-state-wait-for-input can be used to wait for input to be available from an comm:async-io-state. A callback is called when input becomes available.

12.8.21 Detecting if a wait-state-collection is alive

The new function comm:wait-state-collection-alive-p can be used to detect whether a comm:wait-state-collection is alive and can be used.

12.8.22 Using static buffers with buffered-stream

The class stream:buffered-stream has a new initarg :static-buffers that allows the stream's buffers to allocated as static so they can be passed directly to foreign functions.

12.8.23 The :gb18030 external format is now GB18030-2022

The :gb18030 external format now converts to/from GB18030-2022. In previous releases, it converted to/from GB18030-2005.

12.8.24 The :us-ascii external format

The external format :us-ascii has been added as a synonym for :ascii, as the name preferred by IANA.

12.8.25 Incomplete utf-8 input now signals an error

The external format :utf-8, now signals an error if the end of input is reached within the middle of a sequence of bytes.

12.8.26 Accessing fields in the Java interface without specifying a class name

The new accessor lw-ji:jobject-field-value can be used to access a non-static field in a Java object using the name of the field, for example "separator". This contrasts with functions such as lw-ji:read-java-field, which require the full field name including the package and class.

12.8.27 Improved performance of bignum division on arm64 Linux and Apple Silicon

The performance of bignum division (and cl:floor, cl:mod etc) has been improved on arm64 Linux and Apple Silicon hardware.

12.8.28 Consistency of numeric operations on floats

The exponential, logarithmic, and trigonometric functions such as cl:sin are now implemented using the standard C library on all platforms. This ensures that they return consistent results on all platforms for cases such as (sin pi) that have mathematically imprecise values due to floating point inaccuracies.

In previous releases, these functions were implemented using hardware instructions on x86 and x86_64 platforms, which causes them to return different values compared to other implementations.


Release Notes and Installation Guide - 25 Feb 2025 19:14:05