• =?UTF-8?Q?ANNOUNCE=3A_Next_Scripting_Framework_2=2E5=2E0_=28NX/XOTc?= =?UTF-8?B?bCkg4oCUIFRjbCA5LjAgYW5kIDkuMSBzdXBwb3J0?=

    From Stefan Sobernig@stefan.sobernig@wu.ac.at to comp.lang.tcl on Thu Sep 17 07:58:03 2026
    From Newsgroup: comp.lang.tcl

    We are pleased to announce the availability of the Next Scripting
    Framework (NSF) 2.5.0, including NX 2.5.0 and XOTcl 2.5.0. This
    release completes the Tcl 9 compatibility work for the Tcl 9.0 and 9.1
    series while retaining support for Tcl 8.5 and 8.6 on Linux, Windows,
    and macOS. Highlights include return-value checking for nsf::proc, introspection of constant object variables, improved argument
    validation, and fixes for method dispatch, memory management, and
    interpreter shutdown. The MongoDB binding has also been updated for
    Tcl 9.

    Special thanks are due to the following adopters and supporters (in alphabetical order): Oleg Checkulaev, Jan Nijtmans, Antonio Pisano,
    H|-ctor Romojaro, and Maksym Zinchenko.

    With this release, NSF and its predecessors have been available and
    supported for more than 27 years. In May 1999, the first paper on
    XOTcl was presented at the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '99):

    Gustaf Neumann & Uwe Zdun: Filters as a Language Support for Design
    Patterns in Object-Oriented Scripting Languages, in: Proc. of
    COOTS'99, San Diego, California, USA, May, 1999, URL:

    https://www.usenix.org/legacy/events/coots99/full_papers/neumann/neumann.pdf

    The work leading to this release was presented at the 10th OpenACS
    conference and the 22nd European Tcl/Tk Users Meeting in July 2026 in
    Vienna, Austria:

    https://openacs.km.at/evaluate/org/129998253/conferencenews/

    Diff stats since 2.4.0:

    130 files changed, 9157 insertions(+), 6217 deletions(-)

    The main changes are:

    - Tcl 9.1 compatibility (stubs and TIP 626/627 Command layout): Tcl 9.1
    removed the legacy objProc/objClientData fields from the Command
    struct, replacing them with objProc2/objClientData2. NSF added a set
    of version-neutral accessor macros (TCL_COMMAND_OBJPROC, etc.) and
    supporting CPP machinery. Stub headers and stub vector
    initialisation for 9.1 were also added.

    Binary compatibility: NSF uses internal Tcl interfaces and data
    structures that changed between Tcl 9.0 and 9.1. Separate NSF builds
    are therefore required for Tcl 9.0 and Tcl 9.1. When distributing
    binaries, provide builds for the Tcl versions you support.

    Background:
    https://core.tcl-lang.org/tips/doc/trunk/tip/626.md
    https://core.tcl-lang.org/tips/doc/trunk/tip/627.md

    - Tcl 9 size-type support: Updated collection lengths, indexes,
    argument counts, and related formatting to use Tcl_Size-compatible
    types and APIs throughout the NSF core. These changes address
    remaining assumptions about int-sized values while preserving
    compatibility with Tcl 8.

    Background:
    https://core.tcl-lang.org/tips/doc/trunk/tip/494.md
    https://core.tcl-lang.org/tips/doc/trunk/tip/660.md

    - Method dispatch: Fixed a crash and missing error reporting when a
    nonexistent method is called and all registered filter guards reject
    execution. Such calls now follow the unknown-method dispatch path.

    - Hashtable-lookup version-agnostic idiom: Introduced
    NsfFindHashEntry() to do lookup-only access using Tcl_FindHashEntry
    on 9.1+ instead of Tcl_CreateHashEntry(..., NULL), preventing
    accidental creation of empty command-table entries when using
    Tcl_CreateHashEntry() in modern Tcl (post TIP 626). Applied across
    method lookup, precedence lists, resolvers, filter/variable/forward
    listings, etc.


    - Scripting improvements:

    * nx::Object "info consts" (nx.tcl): New introspection method that
    lists only unmodifiable (constant) variables, similar to "info
    vars" but restricted to constants created via the Tcl 9 "const"
    command. The method accepts an optional pattern for filtering. On
    Tcl 8, it returns an empty list.

    * "nsf::proc" return-value checkers (nsf.c + tests): You can now
    write "nsf::proc ... -returns <spec> ..." and introspect it
    with "nsf::cmd::info returns". The underlying Tcl "string is" checker
    was also fixed so it no longer clobbers the result when used as a
    return-value checker (save/restore of the original result).

    * "nsf::parseargs": Now enforces "required" flags when passed an
    empty argument list, reporting missing required arguments.

    * NX parameter validation: Malformed property and variable
    specifications, such as ":property {fiscalyear:integer,
    required}", now produce an explicit error.

    * "nsf::parseargs": Better error handling for malformed parameter
    specs. Stray spaces like in ":property {fiscalyear:integer,
    required}" now raise a proper error.

    * Script-level refinements to NX and XOTcl 2 object systems (nx.tcl,
    xotcl.tcl):

    The "delete" accessor now rejects single-valued properties and
    variables, consistently with add. Additional tests document
    per-slot accessor behaviour.

    Incremental slot operations now correctly preserve custom
    "value=add" and "value=delete" methods, while avoiding repeated
    computations.

    "info" introspection for object parameters now returns "switch"
    correctly

    Tcl 9 "trace variable removal" (testo.xotcl) rCo trace variable
    (deprecated since 8.4) was removed by TIP 673 in Tcl 9; tests
    updated accordingly.

    * File encoding (Script.xotcl): Switched to UTF-8 for robustness
    across Tcl 9 variants (e.g. TIP 657).

    * Serializer verbosity (serializer.tcl): Reduced log noise

    * ZIP downloads: nx::zip now flushes buffered output between files
    to avoid excessive buffering and potential integer overflows on
    slow connections. The ns_returnZipFile method accepts an optional
    -channel argument for downloads using an existing NaviServer
    connection channel, including background operations.

    - MongoDB: Updated the NSF/NX binding for Tcl 9, including size-type
    corrections that fix stack corruption in collection queries. JSON
    generation now uses Canonical Extended JSON through
    bson_as_canonical_extended_json(), replacing the deprecated
    bson_as_json() call. Applications consuming generated JSON should
    account for the changed representation.

    Added ::mongo::oid::gettimestamp to extract the timestamp embedded
    in an ObjectId, and updated the build instructions and tests.

    Testing covered MongoDB C driver/libbson 1.30.8 and MongoDB
    Community Server 8.0.28 on macOS and Linux. MongoDB C driver 2.x
    has not been integrated or tested.


    - Bug fixes & hardening (selection):

    * Thread-safe exit handling (POSIX, other than WIN native):
    ExitHandler reworked to call Tcl_Release(interp) only from the
    interp-owning thread (i.e., the one registered during Nsf_Init()),
    avoiding "Tcl_AsyncDelete: async handler deleted by the wrong
    thread" crashes and a memory leak.

    * Safe interpreters: Fixed NSF initialisation in Tcl 9 safe
    interpreters by skipping access to the unavailable
    ::tcl::unsupported::disassemble command.

    * Simplified memory management: Removed the "canFree" flag from the
    "nsfParam" struct, in favour of pure refcounts, fixing a memory leak
    on Tcl_DupInternalRep.

    * Worked around a Tcl 9 memory leak involving an NX method-context
    object.

    * MongoDB client pool: guarded "mongoc_client_pool_push/pop" with a
    mutex to prevent races.

    * XOTcl2: fixed handling of leading "~" in file paths under Tcl 9.

    * Robust parallel package installs (e.g., avoid overwriting of the
    package index files)

    * Runtime hardening: Selected internal consistency checks now remain
    active in release builds and produces explicit diagnostics when an
    invariant is violated. Additional checks improve error handling in
    method dispatch, command-list maintenance, and variable
    resolution.

    * Build improvements: Compiler-specific warning detection improves
    portability across GCC and Clang. Generated NSF stub declarations
    now include printf-format annotations, allowing compilers to
    detect format-string mismatches. Warning groups and Tcl source
    directories used for stub generation can be overridden.

    - Documentation:

    * Object.man: Added fragment about "info consts"

    - NSF has been built and tested with Tcl 9.0.4 and the Tcl 9.1b1 RC1
    prerelease. Build and test results are available at:

    https://github.com/nm-wu/nsf/actions
    https://ci.appveyor.com/project/mrcalvin/nsf-2ylk0/history

    Important: As for Tcl 8.5, NSF is only tested with (unreleased) Tcl
    8.5 revisions taken from `core-8-5-branch` at
    https://core.tcl-lang.org/tcl/.

    The detailed changelog is available at

    https://next-scripting.org/xowiki/download/file/ChangeLog-2.4.0-2.5.0.log

    The Next Scripting Framework version 2.5.0 (containing NX 2.5.0 and XOTcl 2.5.0) can be obtained from https://next-scripting.org/. Please report
    issues and wishes by opening a ticket at:

    https://sourceforge.net/p/next-scripting/tickets/

    Best regards
    - Gustaf Neumann
    - Stefan Sobernig
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Harald Oehlmann@wortkarg3@yahoo.com to comp.lang.tcl on Thu Sep 17 08:25:46 2026
    From Newsgroup: comp.lang.tcl

    Wow, incredible and awesome work!
    Thanks for all your engagement,
    Harald

    Am 17.09.2026 um 07:58 schrieb Stefan Sobernig:
    We are pleased to announce the availability of the Next Scripting
    Framework (NSF) 2.5.0, including NX 2.5.0 and XOTcl 2.5.0. This
    release completes the Tcl 9 compatibility work for the Tcl 9.0 and 9.1
    series while retaining support for Tcl 8.5 and 8.6 on Linux, Windows,
    and macOS. Highlights include return-value checking for nsf::proc, introspection of constant object variables, improved argument
    validation, and fixes for method dispatch, memory management, and
    interpreter shutdown. The MongoDB binding has also been updated for
    Tcl 9.

    Special thanks are due to the following adopters and supporters (in alphabetical order): Oleg Checkulaev, Jan Nijtmans, Antonio Pisano,
    H|-ctor Romojaro, and Maksym Zinchenko.

    With this release, NSF and its predecessors have been available and
    supported for more than 27 years. In May 1999, the first paper on
    XOTcl was presented at the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS '99):

    -a Gustaf Neumann & Uwe Zdun: Filters as a Language Support for Design
    -a Patterns in Object-Oriented Scripting Languages, in: Proc. of
    -a COOTS'99, San Diego, California, USA, May, 1999, URL:

    https://www.usenix.org/legacy/events/coots99/full_papers/neumann/ neumann.pdf

    The work leading to this release was presented at the 10th OpenACS
    conference and the 22nd European Tcl/Tk Users Meeting in July 2026 in
    Vienna, Austria:

    -ahttps://openacs.km.at/evaluate/org/129998253/conferencenews/

    Diff stats since 2.4.0:

    -a130 files changed, 9157 insertions(+), 6217 deletions(-)

    The main changes are:

    - Tcl 9.1 compatibility (stubs and TIP 626/627 Command layout): Tcl 9.1
    -aremoved the legacy objProc/objClientData fields from the Command
    -astruct, replacing them with objProc2/objClientData2. NSF added a set
    -aof version-neutral accessor macros (TCL_COMMAND_OBJPROC, etc.) and
    -asupporting CPP machinery. Stub headers and stub vector
    -ainitialisation for 9.1 were also added.

    -aBinary compatibility: NSF uses internal Tcl interfaces and data
    -astructures that changed between Tcl 9.0 and 9.1. Separate NSF builds
    -aare therefore required for Tcl 9.0 and Tcl 9.1. When distributing
    -abinaries, provide builds for the Tcl versions you support.

    -aBackground:
    -a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/626.md
    -a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/627.md

    - Tcl 9 size-type support: Updated collection lengths, indexes,
    -aargument counts, and related formatting to use Tcl_Size-compatible
    -atypes and APIs throughout the NSF core. These changes address
    -aremaining assumptions about int-sized values while preserving
    -acompatibility with Tcl 8.

    -aBackground:
    -a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/494.md
    -a-a-a https://core.tcl-lang.org/tips/doc/trunk/tip/660.md

    - Method dispatch: Fixed a crash and missing error reporting when a
    -anonexistent method is called and all registered filter guards reject
    -aexecution. Such calls now follow the unknown-method dispatch path.

    - Hashtable-lookup version-agnostic idiom: Introduced
    -aNsfFindHashEntry() to do lookup-only access using Tcl_FindHashEntry
    -aon 9.1+ instead of Tcl_CreateHashEntry(..., NULL), preventing
    -aaccidental creation of empty command-table entries when using
    -aTcl_CreateHashEntry() in modern Tcl (post TIP 626). Applied across
    -amethod lookup, precedence lists, resolvers, filter/variable/forward
    -alistings, etc.


    - Scripting improvements:

    -a* nx::Object "info consts" (nx.tcl): New introspection method that
    -a-a lists only unmodifiable (constant) variables, similar to "info
    -a-a vars" but restricted to constants created via the Tcl 9 "const"
    -a-a command.-a The method accepts an optional pattern for filtering. On
    -a-a Tcl 8, it returns an empty list.

    -a* "nsf::proc" return-value checkers (nsf.c + tests): You can now
    -a-a write "nsf::proc ... -returns <spec> ..." and introspect it
    -a-a with "nsf::cmd::info returns". The underlying Tcl "string is" checker
    -a-a was also fixed so it no longer clobbers the result when used as a
    -a-a return-value checker (save/restore of the original result).

    -a* "nsf::parseargs": Now enforces "required" flags when passed an
    -a-a empty argument list, reporting missing required arguments.

    -a* NX parameter validation: Malformed property and variable
    -a-a specifications, such as ":property {fiscalyear:integer,
    -a-a required}", now produce an explicit error.

    -a* "nsf::parseargs": Better error handling for malformed parameter
    -a-a specs. Stray spaces like in ":property {fiscalyear:integer,
    -a-a required}" now raise a proper error.

    -a* Script-level refinements to NX and XOTcl 2 object systems (nx.tcl,
    -a-a xotcl.tcl):

    -a-a The "delete" accessor now rejects single-valued properties and
    -a-a variables, consistently with add. Additional tests document
    -a-a per-slot accessor behaviour.

    -a-a Incremental slot operations now correctly preserve custom
    -a-a "value=add" and "value=delete" methods, while avoiding repeated
    -a-a computations.

    -a-a "info" introspection for object parameters now returns "switch"
    -a-a correctly

    -a-a Tcl 9 "trace variable removal" (testo.xotcl) rCo trace variable
    -a-a (deprecated since 8.4) was removed by TIP 673 in Tcl 9; tests
    -a-a updated accordingly.

    -a* File encoding (Script.xotcl): Switched to UTF-8 for robustness
    -a-a across Tcl 9 variants (e.g. TIP 657).

    -a* Serializer verbosity (serializer.tcl): Reduced log noise

    -a* ZIP downloads: nx::zip now flushes buffered output between files
    -a-a to avoid excessive buffering and potential integer overflows on
    -a-a slow connections. The ns_returnZipFile method accepts an optional
    -a-a -channel argument for downloads using an existing NaviServer
    -a-a connection channel, including background operations.

    --a MongoDB: Updated the NSF/NX binding for Tcl 9, including size-type
    -a corrections that fix stack corruption in collection queries. JSON
    -a generation now uses Canonical Extended JSON through
    -a bson_as_canonical_extended_json(), replacing the deprecated
    -a bson_as_json() call. Applications consuming generated JSON should
    -a account for the changed representation.

    -a Added ::mongo::oid::gettimestamp to extract the timestamp embedded
    -a in an ObjectId, and updated the build instructions and tests.

    -a Testing covered MongoDB C driver/libbson 1.30.8 and MongoDB
    -a Community Server 8.0.28 on macOS and Linux. MongoDB C driver 2.x
    -a has not been integrated or tested.


    - Bug fixes & hardening (selection):

    -a* Thread-safe exit handling (POSIX, other than WIN native):
    -a-a ExitHandler reworked to call Tcl_Release(interp) only from the
    -a-a interp-owning thread (i.e., the one registered during Nsf_Init()),
    -a-a avoiding "Tcl_AsyncDelete: async handler deleted by the wrong
    -a-a thread" crashes and a memory leak.

    -a* Safe interpreters: Fixed NSF initialisation in Tcl 9 safe
    -a-a interpreters by skipping access to the unavailable
    -a-a ::tcl::unsupported::disassemble command.

    -a* Simplified memory management: Removed the "canFree" flag from the
    -a-a "nsfParam" struct, in favour of pure refcounts, fixing a memory leak
    -a-a on Tcl_DupInternalRep.

    -a* Worked around a Tcl 9 memory leak involving an NX method-context
    -a-a object.

    -a* MongoDB client pool: guarded "mongoc_client_pool_push/pop" with a
    -a-a mutex to prevent races.

    -a* XOTcl2: fixed handling of leading "~" in file paths under Tcl 9.

    -a* Robust parallel package installs (e.g., avoid overwriting of the
    -a-a package index files)

    -a* Runtime hardening: Selected internal consistency checks now remain
    -a-a active in release builds and produces explicit diagnostics when an
    -a-a invariant is violated. Additional checks improve error handling in
    -a-a method dispatch, command-list maintenance, and variable
    -a-a resolution.

    -a* Build improvements: Compiler-specific warning detection improves
    -a-a portability across GCC and Clang. Generated NSF stub declarations
    -a-a now include printf-format annotations, allowing compilers to
    -a-a detect format-string mismatches. Warning groups and Tcl source
    -a-a directories used for stub generation can be overridden.

    - Documentation:

    -a* Object.man: Added fragment about "info consts"

    - NSF has been built and tested with Tcl 9.0.4 and the Tcl 9.1b1 RC1
    -aprerelease. Build and test results are available at:

    -a-a https://github.com/nm-wu/nsf/actions
    -a-a https://ci.appveyor.com/project/mrcalvin/nsf-2ylk0/history

    -aImportant: As for Tcl 8.5, NSF is only tested with (unreleased) Tcl
    -a8.5 revisions taken from `core-8-5-branch` at
    -ahttps://core.tcl-lang.org/tcl/.

    The detailed changelog is available at

    -ahttps://next-scripting.org/xowiki/download/file/ChangeLog-2.4.0-2.5.0.log

    The Next Scripting Framework version 2.5.0 (containing NX 2.5.0 and XOTcl 2.5.0) can be obtained from https://next-scripting.org/. Please report
    issues and wishes by opening a ticket at:

    -ahttps://sourceforge.net/p/next-scripting/tickets/

    Best regards
    - Gustaf Neumann
    - Stefan Sobernig

    --- Synchronet 3.22a-Linux NewsLink 1.2