Pike 9.0: Changes since Pike 8.0
----------------------------------------------------------------------

New language features
---------------------

o Unlimited character constant size.

  There is no longer any limit to the size of character constants,
  e.g. 'acdefghijk' creates the bignum 0x61636465666768696a6b.

o Support for \u{xxx} and \U{xxx} style Unicode escapes in strings
  and character literals.

  Eg "\u{10000}" is equivalent to "\U00010000".

o Syntax for annotating classes and symbols added.

o Syntax for specifying default values for function arguments added.

  The function definition

    string foo(string bar = "bar") { return bar; }

  will now result in a function(string|void:string) that returns
  "bar" if called with no arguments or UNDEFINED, and its argument
  otherwise. The local variable 'bar' above will be typed string
  (ie not string|void) in the function body.

  The syntax is also valid for implicit create:

    class foo(string bar = "bar") {}

o Syntax for using multi-assign in function calls.

  The function definition

    int add([int a, int b], int c) { return a + b + c; }

  will result in a function that may be called as

    add(({ 1, 2 }), 3);

o Support for sub-modules with names with an initial digit.

  This allows for module names like Standards.X.509.

o Major changes to the compiler type checker.

  - The type for the value 0 or UNDEFINED now needs to be
    declared explicitly. For convenience the symbol 'zero'
    now evaluates to the type 'zero'.

o '__unknown__' type added.

  This is a type that is the inverse of the type mixed|void,
  and is used eg in the type for the empty string
  string(zero:__unknown__) and for the generic function type
  function(__unknown__...:mixed).

o '__experimental__' type attribute added.

  This identifier is analogous to __deprecated__, but warns that
  the symbol is experimental rather than deprecated. There are
  also #pragmas {no_,}experimental_warnings that are analogous
  to the #pragmas {no_,}deprecation_warnings.

o Syntax for declaring and using generic types added.

    class Foo (< T >) (protected T val) {
      T get_val() { return val; }
    }

    class Bar (< X, Y >) {
      inherit Foo (< Y >);
      X z;
    }

    class Foobar {
      __generic__ Z;  // This is equivalent to declaring Foobar (< Z >) above.
      inherit Bar (< Z, Z >);
    }

    Bar(<float, int>) bar = Bar(<float, int>)(17);

    bar->z = 1.0;

o Support for _Generic() special form added from C23.

o Several modules have been updated to use generic types.

  - ADT.CircularList

  - ADT.Heap

  - ADT.List

  - ADT.LowLevelStack

  - ADT.Scheduler

  - ADT.Set

  - ADT.Stack

  - ADT.Trie

  - Concurrent.Future

  - Concurrent.Promise

  They all default their generics to mixed in order to be backward-compatible.

o 'auto' type added.

  This is much like a strict typed mixed. The actual type is deduced
  compile-time.

  Typical use is as the type for variables in foreach when looping over
  complexly typed values, or as the type in macro-defined functions and
  similar.

  auto can be used as return type for a function, it will be the
  type-union of all the types of the return statements in the
  function.

o typeof(X) can now be used as a type.

  The main use case is in macros, but it might be useful for other
  things as well (as an example in a typedef).

  typedef typeof(Val.true)|typeof(Val.false) bool;

  typeof, when used like this, behaves very much like the C++
  decltype() expression.

o Shorthand for int(val..val) added: int(val) .

  A syntax for when the range of an integer type only
  contains a single value.

o Shorthand for string(val..val) added: string(val) .

  A syntax for when the range of a string type only
  contains a single value.

o Syntax for specifying the length of array and string types.

  Eg string(4bit: 8bit) is 8-bit strings of lengths 0-15.

o Syntax for specifying the type of named constants.

  Eg constant int(0..1) flag = 0, other = 1;

o Backward-compatible syntax for specifying the type of named constants.

  Eg constant flag = [int(0..1)](mixed)0, other = [int(0..1)](mixed)1;

  This syntax is intended for use by code that needs to be backward-
  compatible with Pike 8.0 and earlier.

o ** operator added. It's exponentiation and works with most
  combination of numerical types (int,float,Gmp.mpq,Gmp.mpf,Gmp.mpz)

  `** and ``** operator overloading functions added.

  This introduces one incompatible change: Previously the "pow"
  function called a "_pow" function in the first argument if it was an
  object. It has now been changed to also use `** (or, rather, pow()
  is now implemented using predef::`**()).

o __cast() added.

  This efun performs a cast of a value to a specified type, where the type
  may be specified either as a type value or as a string. It is intended
  to help in implementing lfun::cast().

o Binary or between a multiset and UNDEFINED is now behaves like
  binary or between the multiset and the empty multiset.

o Three pass compiler.

  An extra pass of the compiler has been added. It is used to properly
  resolve types in forward referring expressions, and is only run when
  needed.

o The preprocessor (aka cpp()) has several new features:

  - It is now possible to customize the preprocessor and eg add
    custom directives.

  - Improved white-space fidelity.

    White space characters that aren't '\r' are now kept unmodified in the
    output. '\r' characters are removed if they are followed immediately
    by a '\n' character, and are otherwise kept. This change makes cpp()
    keep indentations, and improves the readability of the output from
    Tools.Standalone.precompile.

  - Support for C99-style varargs macros.

  - Warn about redefining macros.

    The preprocessor now warns if a macro is redefined with a non-equivalent
    definition.

  - #elifdef and #elseifdef

    These work as a combined @[#else] and @[#ifdef] without
    adding an extra level of nesting. Added from C23.

  - #if __has_include()

    This checks whether an include file is available. Added from C23.

  - #embed and #if __has_embed()

    This embeds integers read from an include file and checks whether
    it is available respectively. Added from C23.

  - #pragma disassemble

    This directive is now available even in pikes compiled --without-debug.

    The byte code output is now interleaved with the generated machine code
    on selected architectures.

  - #pragma experimental_warnings and #pragma no_experimental_warnings

    These enable/disable warnings for use of experimental symbols
    (default: enabled).

  - #pragma no_strict_types

    It is now possible to turn off the strict types mode for a section
    of code.

  - Some macros regarding the version of Unicode used by Pike have
    been added: __STDC_ISO_10646__ and __UNICODE_VERSION__.

o Complain about redundant backslash escapes.

  The compiler now complains about redundant backslash escapes
  in literal strings and character constants.

o '__weak__' modifier added.

  It is now possible to declare object variables to have weak references.

o Support for arguments to implicit lambdas added.

  Implicit lambdas now behave as if they were declared as
  lambda(mixed ... __ARGS__).

  Support for this feature can be detected with #ifdef __ARGS__.

o Function local function declarations are now statements
  (and not expressions). This means that there is no longer
  any need to terminate them with a semicolon.

o Anonymous class definitions are now always expressions.

o Function local class definitions are now statements
  (and not expressions). This means that there is no longer
  any need to terminate them with a semicolon.

o The inherit statement's argument is now a proper
  constant expression. This means that it is possible
  to dynamically (at compile-time) generate the value
  to be inherited, eg with Pike.ProxyFactory().

o Complain about shadowed variant functions.

o Syntax for generator (and restartable) functions added.

  - Added the new modifier __generator__, which causes such functions
    to become generator functions, where calling the function sets
    up a restartable function context.

  - continue may preceed return statements, which causes
    the restartable function state to be saved before returning.

    Alternatively the "function" yield() may be used to return
    a value, and restart with a value from the restarter.

  - Re-entrant/concurrent calls of restartable functions save
    the argument(s) (NB: only one set), returns UNDEFINED, and
    causes the next continue return or yield() in the initial
    function call to continue immediately with the new argument(s)
    instead of returning.

  - continue::this_function may be used to refer to the restartable
    function from within restartable functions. This is useful eg
    when setting callbacks.

  Restartable functions get the type signature

    X fun(mixed|void value, function(mixed|void: void)|void resume_cb)

  where X is the declared return type of the generator function,
  value is the value to be returned by yield(), and resume_cb
  is a function that will be called at the yield point. resume_cb
  may be used to eg behave as if yield() had thrown an error.

  Eg:

    __generator__ int foo(int count) {
      while (--count) continue return count;
    }

  Behaves similar to (resume handling not provided):

    function(:int) foo(int count) {
      int state;
      return lambda() {
        switch(state) {
          case 0:
            while(--count) return count;
            state = 1;
            return 0;
            break;
          default:
            return UNDEFINED;
        }
      };
    }

o Syntax for asynchronous functions added.

  - Added the new modifier __async__, which causes such functions
    to become asynchronous functions, which automatically return
    Concurrent.Future objects.

    Asynchronous functions are implemented with generators with
    some differences. Eg:

      __async__ T foo(mixed ... args) {
        // ...
      }

    Behaves similar to:

      Concurrent.Future (<T>) foo(mixed ... args) {
        Concurrent.Promise (<T>) __async_promise__ = Concurrent.Promise(<T>)();
        __async_promise__->failure(catch {
            __async_promise__->success(
              __generator__ lambda() {
                // ...
              }()()
            );
          });
        return __async_promise__->future();
      }

  - Add Concurrent.Future()->on_async()

    This function is shorthand for on_success(f)->on_failure(f, throw).

  - Add "function" await(future), which sets up callbacks in the
    future and then yields control, to resume when the future is
    fulfilled. It returns the value of the future on success,
    and throws the failure value on failure.

    Eg:

      mixed x = await(f);

    Behaves similar to:

      f->on_await(continue::this_function);
      mixed x = yield(0);

  - The main() function may return a Concurrent.Future (ie it may
    be declared __async__) in which case the master object will
    enter asynchronous mode, and stay around until the object is
    fulfilled. This is thus similar to main() returning negative.

o Simplified the Iterator API.

  - Renamed Iterator API functions and made them LFUNs:

    o index() ==> iterator_index()

    o value() ==> iterator_value()

    o next() ==> iterator_next()

  - Iterators now start at the position before the first element
    to be iterated over. This position may be the the same
    position as after the last element.

  - The only function that is required for an Iterator is
    iterator_next(). It should advance the iterator one
    element, and return UNDEFINED if the position is now
    after the last element. It may return any other value
    otherwise. The returned value will be used in place of
    the values returned by iterator_index() and/or
    iterator_value() if they do not exist.

  - Restartable functions (or any other functions that have state)
    may be used as iterators:

      __generator__ int foo(int count) {
        while (--count) continue return count;
      }
      foreach(foo(2);; int val) { werror("val: %d\n", val); }

o Machine code support for more architectures.

  There's now machine code support for arm32 and arm64.

o Fixed multiple integer over- and underflow bugs.

o Extended sscanf %O

  sscanf() is now able to parse all base types that sprintf %O can
  output. It can now also parse most literal constants pike accepts,
  including integers prefixed with 0x and 0b, and floating point
  numbers in scientific notation.

o Returning void

  It is now possible to return void responses from void functions.

    void a() { return; }
    void b() { return a(); }

o Cleaned up expression grammar.

  The base expression grammar now mirrors that of the C-standard.

  This makes it easier to understand what the various expression
  productions mean.

o Added the unary +-operator (noop).


Bug fixes
---------

o predef::{en,de}code_value()

  Several fixes related to encoding and decoding of programs.

o Charset

  - Updated Unicode translation table for ISO IR-181 to follow n1818.

  - The encoders now support encoding of characters outside the BMP.

o Cpp

  Fixed line numbering issue when handling multi-line comments
  in arguments to macros.

o Compiler

  - Constant integers outside the 32-bit signed range no longer
    get their types mapped to int(-0x80000000) or int(0x7fffffff),
    (depending on sign) but instead keep the generic int type.
    This fixes issues where the type resolution system derived
    erroneous types from the truncated types.

  - Under some circumstances the compiler would insert erroneous
    F_ESCAPE_CATCH opcodes. This could cause very strange
    runtime errors.

  - The compiler could get confused by combinations of labels
    with inline functions or constant expressions.

  - The type checker now checks that operator assignment
    expressions are valid.

  - The safe-indexing operators (->?, [?] and (?)) now short-circuit
    the expression when the operand is false. Previously later unsafe
    operators were still applied.

  - The compiler now allows some C2Y syntax.

o Runtime

  - The runtime could get confused by PROGRAM_DESTRUCT_IMMEDIATE
    objects having destruct callbacks under some circumstances.

  - A signal handler for SIGCHLD is now always installed. On some
    operating systems (eg FreeBSD) system calls are apparently
    not interrupted when ignored signals are received. By always
    installing a SIGCHLD signal handler, we can guarantee that
    pthread_kill(THREAD, SIGCHLD) will interrupt the specified thread.

o Operator functions

  - Calling operator functions with more than two arguments will now
    work correctly for objects, where previously only the first two
    objects where added.

  - When adding arrays, multisets and mappings, UNDEFINED will now
    always be ignored. Previously it was only ignored when first in the
    argument list, otherwise an exception would be thrown.

  - Adding UNDEFINED with UNDEFINED now results in UNDEFINED
    (rather than 0).

  - The LFUNs will now be called with a consistent number of
    arguments. Pike implementations rarely implemented varargs on
    operator LFUNs, so this change should address many potential hidden
    errors.

  - Most operators that use LFUNs now have types that check
    that the arguments to the corresponding LFUN are correct.

o ADT.OrderedMapping

  Adding duplicate keys now replaces the existing keys.

o GTK2

  Support GTK2.8 and earlier again.

o Pike.Backend

  Backend callbacks throwing errors could cause backends to
  enter a state where they got stuck throwing "Backend already
  running - cannot reenter.". This was typically triggered via
  the Stdio.sendfile() result callback.

o Protocols.HTTP.Server

  The server module will now read payloads for HTTP PUT requests, just
  as any other method. Previously it would stop reading the body and
  it was up to the caller to read enough data from the socket and
  combine with already read data.

  Setting "connection" header in the "extra_heads" to Request object
  method response_and_finish() will now control if keep-alive should be
  used or not. Otherwise it will be decided by the clients request
  headers, as previously.

  The headers "content-type", "content-range", "content-length",
  "server", "date" and "last-modified" will not be added or
  overwritten if provided in the "extra_heads".

  Header names in "extra_heads" will not have their case modified.

o SSL.File: Propagate fatal alerts to close and write callbacks.

  SSL did not call the close_callback on SSL.File()s that connect outgoing
  and abort the handshake by sending fatal alerts to the server.

  Fatal alerts generated locally (ie due to broken data from peer)
  are now signalled on the close and write callbacks with errno set
  to ECONNABORTED and fatal alerts received from the peer have errno
  set to ECONNRESET.

o Standards.JSON and Standards.JSON5

  encode() now allows other threads to run every now and then.

o Stdio.File: Support concurrent close() during read() and write().

  Previously this had an inconsistent behavior.

o Tools.Standalone.autodoc_to_split_html

  - Fixed some navigation issues for enums.

  - Fixed rendering of non-inherited symbols when there is a circular inherit.

  - Avoid invalid simplification of references.

o Tools.Standalone.pv

  Support Gtk 3.0 and Gtk 4.0 via the GI module.


Incompatible changes
--------------------

o Compatibility code for Pike 7.6 and earlier removed.

o Require GMP 4.1 or later.

  Support for compiling Pike without bignums or with ancient
  GMP has been removed.

o As mentioned above; variables that may be set to 0 or UNDEFINED
  now need to be declared accordingly. Note that this is not needed
  for code that is compiled in Pike 8.0 or earlier compat mode.

o The new stricter type checker may expose old bugs that the
  old type checker did not find.

o Iterator API changed. See "Simplified the Iterator API" above.

o Sql.Sql is no longer a wrapper class, but a function.

  The wrapper class has been obsoleted by introduction of the
  new base class __builtin.Sql.Connection. Note that it is
  still possible to use Sql.Sql as the type of connection objects.

o Standards.XML.Wix now generates XML intended for Wix 3.x.

  Generation of XML for Wix 2.x is available in 8.0::Standards.XML.Wix.

o Stdio.File has had some name space cleanups.

  Multiple symbols in Stdio.File are now protected:

    * {in,out}buffer

    * ___{read,write,close,read_oob,write_oob,fs_event}_callback

    * ___id

  Moved the {read,write}_callback_t types to the Stdio module proper.

o Stdio.Port now has a default id of itself (as documented).

  Previously the default id for Stdio.Port objects was 0.

o Thread.Farm()->run() et al now return Concurrent.Future objects.

  Previously they returned Thread.Farm.Result objects (which had
  similar functionality, but a different API).

o Thread.Mutex()->lock() and Thread.Condition()->wait() et al.

  Several functions that wait on other threads or similar
  now complain (ie throw a runtime error) if called in a
  signal handler context. Previously such code was prone to
  cause dead-locks. See also Pike.signal_contextp() below.

o Named classes are always statements.

  As mentioned above, it is no longer possible to define a named
  class in an expression. Such code has been observed, but none
  where the name was actually used. Use an anonymous class instead.

o Anonymous classes are always expressions.

  It used to be possible (but typically not useful) to define
  an anonymous class as a statement. Add a name for the class.

o Errorcodes on NT are now unified.

  In cases where there is both an errorcode System.Exxx and a
  System.WSAExxx the runtime will now always return the former.
  This applies to eg System.ECONNRESET/System.WSAECONNRESET.

o Gz.crc32 and Nettle.crc32c now only return positive results.

o glob() has changed.

  The main incompatibilities are that [ and \ are now special
  characters in the pattern, and if you check the return value against
  1 instead of checking if it's true, and use an array as the first
  argument you will have to change your code.

  This is in order to extend the glob function to cover what
  'standard' glob functions do:

  - glob() now accepts quotes (eg \* to match a single *) and
    handles ranges (eg [abc] for a, b or c, [a-z0-9] for a single
    character between a and z or 0-9).

  - You can also negate a range using ^ or ! (eg [^a-zA-Z]).

  - When the first argument (the pattern) to glob is an array, glob now
    returns the pattern in the array that matched.

o hash() has been changed to use siphash. The old hash function is
  available under the name hash_8_0(). Note that this is not a
  cryptographic hash function.

o Stdio.UDP()->send() no longer throws errors on EMSGSIZE and EWOULDBLOCK.

o When a thread exits by throwing, the thrown value is propagated to
  wait() which in turn will throw the value further. Previously it
  was sent directly to master()->handle_error().

o String.trim_all_whites() renamed String.trim().

o Floats are no longer by default sorted before added. This may reduce
  the precision but increases the speed of adding large number of
  floats by a factor of 500. Applications handling floats with large
  differences in magnitude need to apply the appropriate sorting
  before arithmetics. As `+ was the only operator that performed
  sorting, and functions like Array.sum did not, this was already a
  concern.

o Returning UNDEFINED from `+ and ``+ is not allowed and will cause an
  exception.

o RegGetValue(), RegGetKeyNames(), RegGetKeyValues(), openlog(),
  syslog() and closelog() have been moved to System.

o Some GL constants have been renamed to match the documentation.

o The ZXID module has been removed.

New modules and functions
-------------------------

o predef::m_add()

  This function adds (as opposed to inserts) an element to a multiset.

o predef::tzname()

  Returns an array with the names of the non-dst and dst timezones.

o ADT.Scheduler & ADT.TreeScheduler

  These are variants of ADT.Heap where elements typically aren't
  removed from the heap.

o Apple.Keychain

  Parser for Apple Keychain format files (like the ones in
  /System/Library/Keychains/).

o __builtin.Sql

  Generic base classes for Sql API modules.

o Filesystem.Zip

  New filesystem class with support for operation on Zip files.

o Function.bind()

  Partially evaluate a function. Similar to Function.curry, but with
  better granularity.

o GI.repository

  Implementation of GObject-Introspection. Indexing this module
  will load (and compile) the corresponding GObject namespace.
  This adds support for eg Gtk 4.0.

o Standards.HPack (RFC 7541)
o Stdio.FakePipe

  A simulated Stdio.Pipe.

o Parser.Markdown

o Crypto.AES.OCB etc

  Add support for the AEAD OCB.

o Crypto.Checksum

  This module collect non-cryptographic checksums. Support for crc32,
  adler32 and Castagnoli CRC (CRC32C).

  NB: In the future these may be amended to support the Crypto.Hash API.

o Crypto.ECC.Curve.GOSTDSA

  Add support for GOSTDSA (RFC 5832 and RFC 7091).

o Crypto.ECC.Curve448

  Add support for Edwards curve 448.

o Crypto.SHA256.balloon() (and others)

  This is a memory-hard password hashing algorithm. It requires Nettle 3.9
  or later.

o GL

  Added some missing functions.

o Parser.ECMAScript

  This module simply provides a token splitter for
  ECMAScript/JavaScript.

o Pike.Annotations

  Multiple common annotations are available.

o Pike.DestructImmediate

  Objects of classes that inherit Pike.DestructImmediate will be
  destructed immediately on their references reaching zero (rather
  than at some arbitrary time "soon"). This class should be used
  for any classes that are (or hold) locks or similar.

o Pike.InhibitDestruct

  Objects of classes that inherit Pike.InhibitDestruct may
  control whether explicit destruct() calls should succeed
  (or be delayed until later). Note that this class is just
  a convenience API, and that this functionality may also
  be implemented by hand. The intended use is for C-classes
  that do not want their storage to be zapped eg during
  library calls.

  Note that it is not possible to inhibit destruction due
  to running out of references or by the gc.

o Pike.LiveBacktraceFrame

  This is similar to Pike.BacktraceFrame, but refers two-way
  to an active (or not) execution context. It can be used
  to eg examine (and change) local variables, and is intended
  for debugger use.

o Pike.ProxyFactory()

  This is a function that generates a proxy class for objects
  of the given class.

o Pike.signal_contextp()

  This function returns whether the current thread is running
  in a signal handler context or not.

o Process.Process

  Support using Stdio.Fd for "cwd" and "chroot" on OSes that
  have fchdir(2).

o Protocols.LysKOM

  Updated to protocol version 11.

o Web.Auth & Web.Api
o Web.EngineIO & Web.SocketIO
o Protocols.HTTP2
o Bittorrent.DHT
o Standards.MsgPack

o System.Memory

  Support mmapping of devices on relevant platforms.

o System

  Added set_file_atime() and set_file_mtime() as per documentation.

o Thread.Mutex

  - Implemented support for multiple readers / single writer
    operation by adding shared_lock() and try_shared_lock().

  - Asynchronous locking added with future_lock() and
    future_shared_lock().


New features
------------

o Command-line options

  - It is now possible to define function-style macros with the
    command-line option '-D'. Eg:

      $ pike '-DFOO(X)=X'

o Runtime support for C11-threads

  - The runtime will now use C11 threads on non NT if pthreads
    are not available. This is mostly relevant for platforms
    that are both not NT and not POSIX-based.

o predef::backtrace()

  predef::backtrace() now takes an optional argument that causes it
  to return LiveBacktraceFrames (instead of BacktraceFrames), which
  may be used to access local variables for the frame while they are
  still in use. This is intended for debugger use.

o predef::destruct()

  lfun::_destruct() may now inhibit explicit destruction.

o predef::equal()

  equal() on functions now checks if their definitions are the same
  identifier in the same program.

o predef::gc()

  gc() called with a weak mapping as argument now removes weak references
  that are only held by that mapping.

o predef::m_clear()

  m_clear() now supports operation on multisets and objects.

o predef::m_delete()

  - m_delete() now supports operation on multisets.

  - m_delete() now supports atomic test and remove.

o predef::sprintf %x

  %X and %x can now be used on 8-bit wide strings to get a hexadecimal
  representation of their contents. Just calling sprintf("%x",data) is
  the same as calling String.string2hex(data).

o ADT.CircularList

  Added replace_{back,front}().

o ADT.Heap

  - An indirection object ADT.Heap.Element has been added to make it
    possible to optimize several heap operations.

  - Added low_pop().

o Backend.PollDeviceBackend

  - Support using port_create() on recent Solaris.

o Calendar

  - Timezone data updated to tzdb-2025b.

  - The timezone expert system has been updated for the first time
    in quite a while.

o Calendar.mkrules

  - Support %z as timezone abbreviation. This is needed to support
    tzdb-2025a and later.

  - Fix issue with %s in zone abbreviation.

o CompilerEnvironment()->lock()

  Access to the compiler lock.

o Concurent.Future

  - Improved signal-safety.

  - Runtime warning about ignoring return values from callbacks added.
    This should help catching errors like eg using on_failure() where
    recover() or recover_with() was intended.

o Crypto & Nettle

  - Added Curve25519 with EdDSA.

  - Added support for CMAC.

o Crypto.ECC.Curve.Point

  A point on an ECC curve.

o Filesystem.Monitor

  The filesystem monitoring system now uses accelleration via
  Inotify et al.

o Gmp

  - mpf is now implemented using gmpf if the library is available.

  - Improved support for GMP 5.0 and later.

o Graphics.Graph

  Fix rendering of line-style legend plupps.

o GTK2

  Multiple runtime fixes.

o Image.ANY

  - Fixed detection of XWD.

  - Added detection of NEOChrome format.

o Image.DSI

  Add support for encoding.

o Image.Image

  Add quantize_colors() that quantizes the colors of an image
  to the specified number of bits per channel.

o Image.NEO

  Add encode().

o Image.TIM

  - Add support for 24bit format.

  - Add support for encoding of 15bit and 24bit images.

o Image.X

  Added convert_xy_to_z() that converts XY pixmaps to Z pixmaps.

o Image.XWD

  - Added support for XY format.

  - Add support for encoding to 24bit TrueColor ZPixmap.

o JOSE (JSON Object Signing and Encryption)

  Some low-level API support has been added to the Crypto and Web
  modules to support parts of RFC 7515 - 7520.

o MasterObject

  - Protect against the same file being compiled concurrently
    in multiple threads.

  - cast_to_program() and cast_to_object() should now be thread safe.

  - main() may now return a Concurrent.Future object, in which case
    the default backend will be started, and the pike interpreter
    will terminate when the Concurrent.Future object is fulfilled.

o Mysql.SqlTable

  - handle_extraargs() has moved to the db-connection.

    A bindings mapping may now be provided after the sprintf-style
    arguments to the various query functions.

    Also makes handle_extraargs() externally visible.

  - Avoid explicit use of db_conn->master_sql.

    Switches from using eg

      db_conn->master_sql->big_query(q, 0, query_charset)

    to

      db_conn->big_query(q, query_options)

    This makes it easier to make wrappers for db_conn that wrap
    big_query() et al.

o Netutils

  Support ip(8) in addition to ifconfig(8). Some distributions of Linux
  no longer provide ifconfig(8) by default, so support ip(8) too.

o Nettle.BlockCipher16

  - Add support for RFC 5649-style key wrapping.

  - Move RFC3394 support to wrap_key() and unwrap_key().

  - The submodule KW is no more. Its API was not suitable for use.

o Parser.Markdown

  Added a simple LaTeX renderer.

o Parser.Pike

  Support new language features.

o Pike.get_runtime_info

  Added several new fields:

  - "debug_malloc" indicates that the runtime has been built
    --with-debug-malloc.

  - "rtl_debug" indicates that the runtime has been built
    --with-rtldebug (or equivalent).

  - "running_on_valgrind" contains the number of nested valgrinds
    the runtime is running under (if any).

o Protocols.DNS

  - Protocols.DNS now supports encoding and decoding CAA RRs.

  - Classes derived from Protocols.DNS.server may now override
    report_decode_error() and handle_decode_error() to change how
    errors while decoding a DNS packet are reported and handled.

o Protocols.WebSocket

  Multiple API changes.

o Random rewrite

  The random functions have been rewritten to ensure security by
  default. random_string() and random() now get their data directly
  from the operating system random generator, i.e. /dev/urandom on
  most unixen. This is about half the speed compared with the
  random_string function in Pike 8.0, but is now as secure as the
  system random generator.

  For consumers of random data that have additional requirements,
  different random generators are exposed in the new module
  Random. The module has the following generators:

  - Random.Interface

    This is not actually a generator, but an interface class that is
    inherited into all the other generators. It contains code that can
    turn the output from the random_string method into random numbers
    with different limits without introducing bias. It also contains
    code for all the different variants of random() on different
    types. This is currently not possible to implement in Pike code,
    as the typing is too complicated and it is not possible to access
    private/protected _random methods in objects.

  - Random.System

    This generator maps directly on top of the system random
    generator. This is the default generator used for random() and
    random_string().

  - Random.Deterministic

    This generator creates the same sequence of random numbers for a
    given seed, with good pseudo random properties.

  - Random.Hardware

    This generator accesses the hardware random generator, when
    available.

  - Random.Fast

    This generator takes entropy from the Random.System, but feeds
    it into a cryptographic pseudo random number generator to be
    able to output data fast. This is not the default random number
    generator to avoid loading crypto code on every startup.

  Comparing the different generators with each other gives the
  following approximate speeds on a Linux system with hardware
  random support:

    Random.System           1.0
    Pike 8.0 random_string  0.45
    Random.Hardware         0.25
    Random.Fast             0.20
    Random.Deterministic    0.20

  Objects implementing the _random lfun now get two arguments, the
  current random_string() and random() functions. This is convenient
  for C-level functions in that they don't need to look up functions
  themselves. Note that it is possible for a user to replace these
  with non-conforming functions (returning values of the wrong type,
  strings of the wrong length or shift size, and values outside the
  given range) or even non-functions.

  All code in Pike that use random numbers now use the current random
  functions (though in some cases fixed at object creation). This
  allows for repeatable results if the random functions are replaced
  with a deterministic random generator, such as
  Random.Deterministic. Example:

    Random.Deterministic rnd = Random.Deterministic( seed );
    add_constant( "random_string", rnd->random_string );
    add_constant( "random", rnd->random );

o Sql

  - Most Sql C-modules converted to cmod.

  - All Sql driver modules have __builtin.Sql.Connection as
    a common base class.

  - Added a new method for specifying query options (by adding them
    to the bindings mapping).

  - Added next_result() to support queries returning multiple resultsets.

  - Added insert_id() and affected_rows() to the generic API.

  - ODBC & tds: Support more datatypes.

  - ODBC: Support big_typed_query().

  - pgsql: Lots of changes and fixes.

  - pgsql: Toggle cache_autoprepared_statements default to off;
    turning it on triggers a bug in PostgreSQL sometimes
    that causes spikes in CPU usage of the database.

o Sql.sql_util

  - Removed stuff that is present in __builtin.Sql.Connection.

  - Also renamed __builtin.Sql.zero to __builtin.Sql.zero_arg (analogous
    to __builtin.Sql.null_arg) to avoid name confusion with predef::zero.

o SSL

  - Support session tickets.

  - Support Negotiated FF-DHE.

  - Support Curve25519 key exchange.

  - Support client certificates.

  - Support ALPN.

  - Prefer AEAD suites to CBC suites.

  - SSL.File supports set_buffer_mode().

  - Improved support for timeouts in SSL.File.

o Standards.JSON.CANONICAL

  Support RFC 8785-compliant canonical encoding of JSON on platforms
  where the Pike float type is 64 bits or more. On other platforms
  a best-effort is performed.

o Standards.PKCS

  Support PKCS#8 private keys.

o Standards.UUID.UUID

  Stricter parsing of hexadecimal UUIDs.

o Stdio.Fd

  - Support changing directory relative to an open file.

o String

  Add strict mode for hex2string().

o String.Buffer & Stdio.Buffer

  Added _search().

o System.LookupAccountName(), etc [NT]

  Several NT-specific functions now support wide strings
  as arguments and as output.

o The self testing framework now supports *.test-files.

o Thread

  - _sprintf() improvements: Thread.Mutex now prints the ID of the thread
    holding the lock, and thread IDs are shown as hexadecimal numbers.

  - Thread.Farm now supports a callback for thread creation and termination
    for the purpose of tracking thread names.

  - Thread.Condition are now bound to the first Thread.Mutex object
    that they are used together with. This ensures that the correct
    Thread.Mutex is aways used.

o Thread.Farm

  Errors thrown via run_async() are now reported.

o Thread.Mutex

  Add future_{,shared_}lock().

  These return a Concurrent.Future(<Thread.MutexKey>) corresponding
  to the respective {,shared_}lock().

o Tools.Hilfe

  Support __generator__ and __async__ modifiers.

o Tools.Standalone.precompile

  - Program identifiers can now be preallocated, allowing method prototypes
    to reference classes defined further down in the cmod.

  - Attempt to keep comments in place for EXTRA. This fixes some issues
    where autodoc comments were moved around.

o Unicode 10.0.0.

o Unicode.is_whitespace()

  This new function returns whether a unicode character is a whitespace
  character or not.


Deprecated symbols and modules
------------------------------

o Sql.mysql_result and Sql.mysqls_result have been deprecated.
  Use Sql.Result instead.

o call_function() has been deprecated. Use `()() instead.

o Stdio.Buffer()->match has been deprecated.
  Use Stdio.Buffer()->sscanf() instead.


Removed features and modules
----------------------------

o Compatibility for Pike versions before 7.8 is no longer available.

o GTK1 library is deprecated, so glue code has been removed.


C-level API changes
-------------------

o The contract for functions is now changed so that a function is no
  longer required to clean the stack. The topmost value of the stack
  will be regarded as the return value and the rest of the items on
  the stack, compared to before the function arguments were pushed,
  will be popped and discarded. Efuns still have to clean their stack
  as previously.

o Object destructor callbacks may now run during pop_stack() and
  pop_n_elems(). This means that code must be prepared for arbitrary
  state changes after having called them.

o Removed add_function, pike_add_function, pike_add_function2,
  simple_add_variable, map_variable and MAP_VARIABLE. This removes the
  remaining few API:s where text types were used. Use ADD_FUNCTION and
  PIKE_MAP_VARIABLE instead.

o Removed the functions my_rand and my_srand. Use the random functions
  on the stack for _random lfuns, the push_random_string or look up
  the random function from get_builtin_constants(). For deterministic
  pseudo random, create a private Random.Deterministic object.

o The preprocessor has been converted into a cmod, and been modified
  to use more standard Pike datatypes.

o The preprocessor-specific hashtable implementation has been removed.

o The gdb_backtraces() function is now available also --without-debug.

o There's now support to block mapping hashtables from being shrunk
  on map_delete().

o guaranteed_memset() is replaced with secure_zero() which fills a
  buffer with zero. On x86 SSE2 is used to zero the memory without
  loading it into the CPU cache, as this function is typically used
  before calling free() on memory with cryptographic key data.

o The GC marker hash table has been removed. For types which require
  GC markers, they are now allocated as part of the data type. Such
  structures must now start with GC_MARKER_MEMBERS (which includes
  eg the refs field). See "gc_header.h" for details.

  This change significantly improves GC performance (up to a factor
  of 2 in some situations).

o Several header files have been renamed to avoid conflicts with
  system header files:

  - port.h renamed to pike_port.h

    Conflicted with <port.h> on Solaris.

  - threads.h renamed to pike_threads.h.

    Conflicted with <threads.h> from C11.


Documentation
-------------

o RFC references added.

o Character encoding issues fixed.

o Added @enum/@endenum markup.

o Support undocumented enums with documented constants.

o Lots of previously undocumented symbols are now documented.

o Add some support for documenting annotations.

o Lots of broken cross-references have been fixed.

o Some documentation has been regenerated and updated.


Building and installing
-----------------------

o GMP 4.1 or later is now required.

o Nettle 3.5 is now supported.

o C99 assumed

  The configure tests will not check for functions defined in C99
  anymore and C99 compiler support is assumed.

o GCC 15.2.1 supported.


Issues fixed
------------

Github pikelang/pike: #16, #25, #40, #49

Lysator pikelang/pike: #1694, #2100, #2315, #3150, #3658, #3681, #4312,
  #4934, #5466, #7363, #7831, #8042, #10003, #10004, #10006, #10012,
  #10017, #10018, #10021, #10022, #10023, #10026, #10027, #10028, #10029,
  #10033, #10035, #10037, #10039, #10040, #10041, #10042, #10043, #10045,
  #10046, #10047, #10048, #10050, #10055, #10059, #10065, #10072, #10076,
  #10077, #10083, #10084, #10085, #10086, #10089, #10090, #10094, #10096,
  #10097, #10098, #10104, #10105, #10107, #10109, #10111, #10112, #10113,
  #10114, #10117, #10118, #10119, #10121, #10122, #10125, #10128, #10129,
  #10130, #10131, #10132, #10133, #10134, #10135, #10136, #10137, #10139,
  #10142, #10143, #10144, #10146, #10147, #10150, #10151, #10154, #10155,
  #10156, #10158, #10159, #10160, #10161, #10162, #10163, #10164, #10165,
  #10167, #10170, #10171, #10173, #10174, #10175, #10176, #10177, #10178,
  #10179, #10180, #10181, #10182, #10183, #10185, #10187, #10188, #10191,
  #10192, #10195, #10196, #10197, #10198, #10200, #10202, #10203, #10204,
  #10205, #10206, #10207, #10208, #10209, #10210, #10213, #10214, #10217
