pike.git / CHANGES

version» Context lines:

pike.git/CHANGES:1:   Pike 8: Changes since Pike 7.8 (scratch area for future release notes)   ----------------------------------------------------------------------    -  +    New language features   ---------------------      o Added a way to access the local, and not the overloaded,    implementation of a symbol.       As an example, given the classes:    | class Test    | {    | int a( ) { return 1; }
pike.git/CHANGES:51:    | }      o Added new syntax for referring to and naming inherits.       | inherit "foo.pike";    | inherit "foo/bar/baz.pike" : "foo/bar";    | // ...    | "foo.pike"::foo();    | "foo/bar"::baz();    - o Lookup of named inherits now also looks in indirect inherits. + o Look up of named inherits now also looks in indirect inherits.       | class A { int fun() {} }    | class B { inherit A; }    | class C {    | inherit B;    | // ...    | // The function fun may here be referred to as any of:    | B::A::fun();    | B::fun();    | A::fun(); // New.
pike.git/CHANGES:172:      o Added a shorthand syntax for integer rages: xbit, where x is a    number between 1 and 31. This can be used as an example to indicate    that a string is 8 bits wide only: string(8bit)       This is equivalent to the range (0..255) but can be easier to parse.       Similarly int(1bit) is an alias for 'bool', and int(12bit) is    the same as int(0..4095).    -  +    o 'this::x' is now equivalent to 'this_program::x' -- access the    identifier x in the current object.         New preprocessor features   -------------------------      o Support for the ", ##__VA_ARGS__" cpp feature.       This makes the ‘##’ token paste operator have a special meaning
pike.git/CHANGES:198:    then the comma before the ‘##’ will be deleted. This does not    happen if you pass an empty argument, nor does it happen if the    token preceding ‘##’ is anything other than a comma.      o The define __COUNTER__ has been added. It is a unique integer    value, the first time the macro is expanded it will be 1, the next time    2 etc.      o The preprocessor can now be run with a cpp prefix feature.    -  This is currently used by the precompiler to avoid two levels of +  This is currently used by the precompiler to run two levels of    preprocessing, one using "#cmod_" as the prefix and the other "#".      o Dynamic macros       You can now add programmatic macros. There is currently no syntax    that can be used to define these while compiling code, but you can    add them from one program before compiling plug-ins/modules.       The main use is macros like DEBUG(...) and IFDEBUG() that would    expand to something if a debug setting is enabled in the module but
pike.git/CHANGES:230:    | (["ID":(string)next_metric_id++,    | "NAME":stringify(name),    | "TYPE":type,    | "AGGREGATE":aggregate,    | "FORMAT":format,    | "CODE":make_value_function(code),    | ]));    | });       -  That is, a macro that needs does some calculations, and rewrite the -  code more than is possible in normal macros.. +  That is, a macro that needs to do some calculations, and rewrite the +  code more than is possible in normal macros.       This one expands something along the lines of       | METRIC("requests", Summarize, PerSecond,    | floating_average_diff(requests));       into       | class Metric_requests_01    | {
pike.git/CHANGES:332:    If nothing else the binary size shrunk by about 5%.      o string(x..y) (constant) types       The strings now keep track of the min/max values in addition to two    new flags: all-uppercase and all-lowercase.       | > typeof("foo");    | (1) Result: string(102..111)    -  This is used to optimize certain operations, -  lower_case, upper_case, search and string_has_null for now. -  It could be added to other places in the future as well. +  This is used to optimize certain operations, lower_case, upper_case, +  search and string_has_null for now. It could be added to other +  places in the future as well.    -  The fairly common case where you are doing lower_case or upper_case -  on an already lower or uppercase strings is now significantly +  A fairly common case is where you are doing lower_case or upper_case +  on an already lower or uppercased string. This is now significantly    faster.      o Several other optimizations to execution speed has been done       + object indexing (cache, generic speedups)       + lower_apply, changes to apply in general -  +     Taken together these individually small optimizations speeds up at    least pike -x benchmark more than 5%.       + A lot of opcodes implemented in machine-code for x86-64    This speed up the loop benchmarks close to a factor of 3. But then    again, most real code is nothing like that benchmark.       + Several new opcodes added    As an example an observation was that most branch_if_zero is    followed by an is_eq, is_lt or is_gt or similar. Those opcodes
pike.git/CHANGES:368:    pop_stack etc.       + Demacroified some code, resulting in smaller code-size       This makes things faster, it is often better to branch to a small    block of code than to have it inlined in a lot of different    locations on modern architectures.      o Faster hash-function for strings    -  + Also siphash24 was added and is used in case the string hash table -  becomes inefficient +  If your CPU has the crc32 instruction (modern x86 mainly) the +  hashing is now an order of magnitude faster, albeit the risk of +  attacks using known crc:s in things like http request headers (to +  force long hashtable chains and slow things down) is greater, but:    -  +  + Also added siphash24, and use that when the string hash table +  becomes inefficient.    -  +    Deprecated features and modules   -------------------------------      o Tools.PEM and Tools.X409 deprecated       Use the corresponding modules in Standards.    - o The built in sandbox is now deprecated + o The built in security sandbox is now deprecated       Unless somebody wants to take ownership of the feature and keep it    up to date the security system will be removed in the next stable    release.      o The compiler now warns about switch statements where the cases    aren't enumerable, since these will generate random failures    if the code is read from a dump.      o strlen() now only accepts strings
pike.git/CHANGES:496:       An implementation of the WebSocket (RFC 6455) standard, both server    and client      o Image.WebP       Encoder and decoder for the WEBP image format.    More information about the format can be found on    https://developers.google.com/speed/webp/    +  Requires libwebp. +    o Serializer       APIs useful to simplify serialization and deserialization of    objects Mainly it allows you to easily iterate over the object    variables, including the private ones.       + Serializer.Encodable -  A class that can be inherit to make an object easily serializable -  using encode_value. +  A class that can be inherited to make an object easily +  serializable using encode_value.    - o Filesystem.Monitor and the low level System.Inotify + System.FSEvents + o Filesystem.Monitor (and the low level System.Inotify + +  System.FSEvents)       Basic filesystem monitoring.       This module is intended to be used for incremental scanning of a    filesystem.       Supports FSEvents on MacOS X and Inotify on Linux to provide low    overhead monitoring; other systems currently use a less efficient    polling approach.      o Mysql.SqlTable       This class provides some abstractions on top of an SQL table.    -  At the core it is generic for any SQL database, but the current -  implementation is MySQL specific on some points, notably the -  semantics of AUTO_INCREMENT, the quoting method, knowledge about +  At the core it is generic and could work with any SQL database, but +  the current implementation is MySQL specific on some points, notably +  the semantics of AUTO_INCREMENT, the quoting method, knowledge about    column types, and some conversion functions. Hence the location in    the Mysql module.       Among other things, this class handles some convenient conversions    between SQL and pike data types      o Parser.CSV       This is a parser for line oriented data that is either comma, -  semi-colon or tab separated. It extends the functionality -  of the Parser.Tabular with some specific functionality related -  to a header and record oriented parsing of huge datasets. +  semi-colon or tab separated. It extends the functionality of the +  Parser.Tabular with some specific functionality related to a header +  and record oriented parsing of huge datasets.      o ZXID       ZXID is a library that implements SAML 2.0, Liberty ID-WSF 2.0    and XACML 2.0.       This module implements a wrapper for ZXID. The interface is similar    to the C one, but using generally accepted Pike syntax.      o Git       A module for interacting with the Git distributed version control    system.      o Val    -  This module contains special values used by various modules, e.g. -  a Val.null value used both by Sql and Standards.JSON. +  This module contains special values used by various modules, e.g. a +  Val.null value used both by Sql and Standards.JSON.       In many ways these values should be considered constant, but it is    possible for a program to replace them with extended versions,    provided they don't break the behavior of the base classes defined    here. Since there is no good mechanism to handle such extending in -  several steps, pike libraries should preferably ensure that the -  base classes defined here provide required functionality directly. +  several steps, pike libraries should preferably ensure that the base +  classes defined here provide required functionality directly.      o __builtin    -  The __builtin module is now a directory module, so that it can provide -  a suitable namespace for code written in Pike intended for being -  inherited from modules written in C (cf precompile). +  The __builtin module is now a directory module, so that it can +  provide a suitable namespace for code written in Pike intended for +  being inherited from modules written in C (cf precompile).         Extensions and new functions   ----------------------------      o Bz2.File added       It implements a Stdio.File like API, including support for the same    iterator API that Stdio.File has, allowing for convenient line    iterations over BZ2 compressed files.
pike.git/CHANGES:669:    + Add QTYPE T_ANY to DNS enum EntryType in DNS.pmod.       + Handle truncated labels       + TCP client and server support      o Thread no longer inherits Thread.Thread (aka thread_create)      o Thread.Farm now might work    - o Cmod precompiler. + o Cmod precompiler:    -  +  + You can now use #cmod_{define,if,ifdef,include} etc to do +  preprocessing using CPP before the .cmod file is processed by the +  precompiler. +  +  This preprocessing is done with the pike precompiler, while the +  C-compiler preprocessor will then be used on the generated file +  (like before) +     + inherit "identifier"    -- inherit the program returned by calling master()->resolve() on    the specified identifier. Useful to inherit code written in pike.    -  +  + Object types on return and argument types are now resolved +  dynamically when needed. +  +  This means that the typing information is sifnificantly more strict. +  +  If you use classes that are not defined in the file (or +  src/program_id.h) they will be resolved when your .so-file is +  loaded. +  +  Note: Circular dependencies does not work (currently, at least). +  +  Also, the parser still often have problems with types containing +  '.'. You can use object(X.Y) instead of X.Y. +    o String.levenshtein_distance()       The function calculates the Levenshtein distance between two    strings. The Levenshtein distance describes the minimum number of    edit operations (insert, delete or substitute a character) to get    from one string to the other.       This can be used in approximate string matching to find matches    for a short string in many longer texts, when a small number of    differences is expected.
pike.git/CHANGES:715:    In this case, if any of the given patterns match the function will    return true, or, if the second argument is also an array, all    entries that match any glob in the first array.      o Stdio.UDP():       + added IPv6 multicast support       + added set_buffer    - o Added client and server support for TCP_FASTCONNECT + o Stdio.Port(): +  + Added client and server support for TCP_FASTCONNECT       To connect using this TCP extension simply pass the data as the    fifth argument to connect.       The server support is automatically enabled if possible when a    Stdio.Port object is bound to a port.    -  +  + Added support for SO_REUSEPORT. In this mode multiple Stdio.Port +  instances can bind to the same port (mainly used with the ports +  being opened in different processes). +  +  This allows automatic load sharing between the processes, incoming +  connections will only be sent to one of them by the OS. +  +  The presence of these features are indicated by constants in +  Stdio.Port: Stdio.Port.SO_REUSEPORT_SUPPORT and +  Stdio.Port.TCP_FASTOPEN_SUPPORT (although the same code should +  work regardless of the existence of TCP fast open in both server +  and client mode, it can be useful to know if support is available) +  +  + Added a query_fd() method +  +  + o Stdio.Buffer(): +  +  This is a byte buffer (unlike String.Buffer which is a string +  buffer, and thus contains unicode characters and not bytes) that is +  optimized for both reading from it and adding data to it at the +  same time. +  +  The main intent of the class is buffering for binary and non-binary +  protocol parsing and output, and also buffering when using +  non-blockign I/O. +    o Stdio.File():       + send_fd and receive_fd    These functions can be used to send and receive an open    file-descriptor over another file-descriptor. The functions are    only available on some systems, and they generally only work    when the file the descriptors are sent over is a UNIX domain    socket or a pipe.       + Changed internally to remove one level of indirection.    The Stdio.File object no longer has a _Stdio.Fd_ref in _fd. They    are instead directly inheriting _Stdio.FD.       _fd is still available for compatibility, but internally it is gone.    -  +  + The callbacks now get the file object as the first object if no +  other id has been set. +  +  + Added support for buffering via Stdio.Buffer. +  +  This can be used to greatly simplify the writing of non-blocking code. +  +  - When read and/or write buffer is enabled the corresponding +  callbacks get a buffer object as the second argument +  +  - The only thing the callback has to do is add data to the buffer or read from it, depending on what callback it is. +  +  - The write callback will now only be called when the buffer +  contains no more output, and data that is not read in one read +  callback is kept for the next time data arrives. +     + Fixed grantpt() on Solaris failing with EPERM.    -  +    o Unicode databases updated to 7.0.0 from 5.1.0       This is the latest released Unicode database from unicode.org.      o The Search search engine module has seen several fixes       + Added support for padded blobs. This improves performance when    incrementally growing blobs. This feature is only enabled if    Search.Process.Compactor says this is OK, see the documentation    for more information.
pike.git/CHANGES:934:       + Server:    - More forgiving MIME parsing for MSIE    - Fixed range header handling    - Fixed parsing of broken multipart/form-data data    - Added optional error_callback to attach_fd    - The response processor (response_and_finish) now treats the    reply mapping as read-only.    - Support if-none-match (etag:s)    - Ignore errors in close when destroying the object +  - Fixed ordo of sending large chunks of data without using files      o Multiple threads can now call the Backend `() function (the function    that waits for events).       The first thread will be the controlling thread, and all callbacks    will be called in it, the other threads will wake when the    controlling thread is done.      o dtrace support (on MacOSX)       Pike now supports dtrace events on function enter and leaving (and    when stack frames are notionally popped, for functions doing    tailrecursion).    - o sizeof() now supports ADT.struct. -  +    o Standards.JSON.encode can now get the initial indentation level    specified.       This is rather useful for recursive calls encode in pretty print    mode (common for objects with encode_json methods).      o Added Pike.identify_cycle(x)       Checks to see if x contains any circular structures.