Skip to content

Releases: sociomantic-tsunami/ocean

v2.3.0-preview

08 Nov 16:02
v2.3.0-preview
6a8cc69
Compare
Choose a tag to compare
v2.3.0-preview Pre-release
Pre-release

Release Notes for Ocean v2.3.0

Note: If you are upgrading from an older version, you have to upgrade incrementally, following the instructions in the previous versions' release notes.

Dependencies

Dependency Version
makd v1.3.x
tangort v1.3.x

New Features

  • ocean.core.Traits
    A new symbol, TemplateInstanceArgs was introduced.
    It allows to get the arguments of a template instance in a D1-friendly manner.
    It can also be used to check if a type is an instance of a given template.

  • ocean.util.config.ConfigFiller

    Provides the same functionality as the old ClassFiller, but it's
    extended to support structs too.

  • ocean.util.container.queue.LinkedListQueue

    Added the ability to walk over a LinkedListQueue with a foreach statement.
    It will walk in order from head to tail.

  • ocean.util.encode.Base64

    • the encode and decode tables used by encode, encodeChunk and decode have been rewritten in a readable way,
      and made accessible to user (public) under the defaultEncodeTable and defaultDecodeTable names, respectively;
    • encode and decode table for url-safe base64 (according to RFC4648) have been added under the urlSafeEncodeTable
      and urlSafeDecodeTable, respectively;
    • encode and decode now accepts their table as template argument: this means one can provide which characters are
      used for base64 encoding / decoding. By default default{Encode,Decode}Table are used to keep the old behavior.
    • encode now takes a 3rd argument, bool pad which defaults to true, to tell the encoder whether to pad or not.
  • ocean.net.server.unix.UnixListener, ocean.net.server.unix.UnixConnectionHandler

    UnixListener and UnixConnectionHandler classes are added with support for listening on the unix socket
    and responding with the appropriate actions on the given commands. Users can connect to the application on
    the desired unix socket, send a command, and wait for the application to perform the action and/or write
    back the response on the same connection.

  • ocean.io.serialize.StringStructSerializer

    A new optional boolean flag has been added to the serialize() function. If
    this flag is set, then single character fields in structs will be serialized
    into equivalent friendly string representations if the fields contain
    whitespace or other unprintable characters.
    For example, the string '\n' will be generated for the newline character, '\t'
    for the tab character and so on.

  • ocean.io.select.EpollSelectDispatcher

    Optional delegate argument of eventLoop method now can return bool,
    indicating if there is any pending work left at the call
    site. This is likely to only be relevant for ocean.task.Scheduler internals

Deprecations

  • ocean.util.config.ClassFiller

    Deprecated in favour of the new ConfigFiller which provides the
    same interface.

  • ocean.io.select.EpollSelectDispatcher

    Old overload of eventLoop was deprecated. If your app call eventLoop with
    no arguments, it won't be affected.

v2.2.2-preview

08 Nov 16:04
v2.2.2-preview
c9f5d37
Compare
Choose a tag to compare
v2.2.2-preview Pre-release
Pre-release

Fixed Issues

  • MapSerializer: Allow structs without full backward compatibility
  • Fix broken links in README
  • Fix implementation of math.hypot
  • Don't consider KillException scheduling failure
  • debug(ISelectClient): Wrong errno output

v2.2.1-preview

01 Nov 18:35
v2.2.1-preview
4acc96a
Compare
Choose a tag to compare
v2.2.1-preview Pre-release
Pre-release

Issues Fixed

v2.1.3-preview

01 Nov 18:51
v2.1.3-preview
adb53af
Compare
Choose a tag to compare
v2.1.3-preview Pre-release
Pre-release

Issues Fixed

  • Problems with Buffer!(void[])
  • Check waitid for signal interruption
  • TaskPool/ThrottledTaskPool doesn't recycle the task object when the scheduler throws a queue full exception
  • D2: Enable stomping prevention + fix serializer
  • Process Root before other loggers
  • Fix recursive class defintion crashing d2conv
  • Fix debug trace functionality in ThrottledTaskPool

v2.2.0-preview

29 Sep 16:12
v2.2.0-preview
6500d67
Compare
Choose a tag to compare
v2.2.0-preview Pre-release
Pre-release

Release Notes for Ocean v2.2.0

Note: If you are upgrading from an older version, you have to upgrade
incrementally, following the instructions in the previous versions' release
notes.

These notes are usually structured in 3 sections: Migration Instructions,
which are the mandatory steps a user must do to update to the new version,
Deprecated, which contains deprecated functions which are not recommended to
be used (and will be removed in the next major release) but will not break any
old code, and New Features which are new features available in the new
version that users might find interesting.

New Features

  • ocean.util.cipher.gcrypt.AES

    Aliases for AES-CBC ciphers have been added.

  • ocean.text.utf.UtfUtil

    Add truncateAtN method which truncates a string at the last space before
    the n-th character or, if the resulting string is too short, at the n-th
    character.

  • ocean.util.cipher.gcrypt.c.kdf

    Bindings to gcrypt's C functions for key derivation have been added.

  • ocean.util.cipher.gcrypt.core.KeyDerivationCore

    A wrapper class for gcrypt's key derivation functions has been added.

  • ocean.util.cipher.gcrypt.PBKDF2

    An alias for key derivation using the PBKDF2 algorithm has been added.

  • ocean.util.cipher.misc.Padding

    New module with cryptographic padding functions, currently contains functions
    for PKCS#7 and PKCS#5 padding.

  • ocean.text.convert.Formatter

    This new module provides similar functionalities to ocean.text.convert.Layout_tango,
    but use compile-time type information instead of TypeInfo to do so.
    In the long run, ocean.text.convert.Layout_tango will be deprecated and this module will replace it.

    The module provides 4 different functions:

    • format takes no buffer and allocate a new istring. Equivalent to Format(format_string, args).
    • The first sformat overload takes a Sink (scope delegate of type size_t delegate (cstring)) as first parameter and will
      call this sink (possibly multiple times) with the data to append.
    • The second sformat overload takes a buffer (ref mstring) which will be appended to.
    • A snformat function which takes a buffer (mstring) and will overwrite it. The buffer won't be extended and if the formatted
      string is too long, the extra data will be discarded.

    This brings a couple of advantages:

    • If a type isn't supported, an error will be issued at compile-time
    • Support formatting of type which don't have enough TypeInfo attached, like struct
    • As a result of the previous point, support formatting our Typedef implementation
    • Better code is generated, as lots of branches can be taken in advance
    • Doesn't use excessive amount of stack space

    As a result of the re-implementation, some behaviour might differ from Layout_tango's.
    For example:

    • Pointers are now formatted as "{X16#}" in 64 bits and "{X8#}" in 32 bits
      So formatting a random pointer will give "0XFF002A0042000000" in 64 bits for example.
    • null pointers and references will now be formatted as null instead of 0
    • If a type define an overload of toString that takes a string sink as a parameter
      (e.g. void toString (scope size_t delegate (cstring) sink), it will be preferred
      over the regular toString overload, as the sink one is most-likely non-allocating.
      Previously only istring toString() was supported.
    • Structs will now be formatted as a curly-braced enclosed, comma-separated list
      of "field: value".
      For example struct T { uint c; char[] data } will be formatted as { c: 0, data: null }
      by default.
      Inside structs, char and string types will be quoted. Using the previously defined struct T,
      an instance of T(42, "Hello world") will result in { c: 42, data: "Hello world" }
    • AA formatting changed from {key => value, ...} to [ key: value, ... ].
    • String nested inside an aggregate (arrays, AAs, struct...) are now quoted.
    • Function pointers are now formatted as their type + pointer, delegates as type + funcptr + ptr.
    • union is the only built-in type which is not supported, as the formatter would need to be
      able to discriminate it in order to print it, or avoid following references, which would lead
      to an inconsistent behaviour.
    • Many types might now be more respectful of the formatting options given to them, especially
      when it comes to string size limitation.

    In addition, the following are not supported by Formatter:

    • Formatting from / into arrays of wchar or dchar will output an array instead of string.
      Though it is not inherent to the design, the current version only support arrays of char as strings.
    • Formatting values of imaginary or complex floating point type. Those are deprecated in D2.
    • Formatting floating point as hexadecimal

v2.1.2-preview

29 Sep 16:11
v2.1.2-preview
6fe8f73
Compare
Choose a tag to compare
v2.1.2-preview Pre-release
Pre-release

Issues Fixed

v2.0.9-preview

29 Sep 16:09
v2.0.9-preview
120273c
Compare
Choose a tag to compare
v2.0.9-preview Pre-release
Pre-release

Issues Fixed

  • Add license to new task package (120273c)

v2.1.1-preview

21 Sep 17:20
3eeaa22
Compare
Choose a tag to compare
v2.1.1-preview Pre-release
Pre-release

Bug fixed

  • Replace TempFile usage with File in TaskPoolSerializer

v2.1.0-preview

21 Sep 17:19
v2.1.0-preview
234ed85
Compare
Choose a tag to compare
v2.1.0-preview Pre-release
Pre-release

Release Notes for Ocean v2.1.0

Note: If you are upgrading from an older version, you have to upgrade
incrementally, following the instructions in the previous versions' release
notes.

These notes are usually structured in 3 sections: Migration Instructions,
which are the mandatory steps a user must do to update to the new version,
Deprecated, which contains deprecated functions which are not recommended to
be used (and will be removed in the next major release) but will not break any
old code, and New Features which are new features available in the new
version that users might find interesting.

Migration Instructions

  • ocean.text.convert.Integer_tango

    format and formatter are now templated on the integer type they get as an argument,
    allowing to properly format negative numbers into their non-decimal
    (binary, octal, hexadecimal) representation.
    In addition, passing an ulong value which is > long.max with format "d" will now
    be correctly formatted (before it resulted in a negative value and required "u" to be used).

  • ocean.util.serialize.model.VersionDecoratorMixins

    VersionHandlingException has been changed to avoid allocating a
    new message any time a conversion fails.

  • ocean.transition

    enableStomping function now can't be called on arrays of immutable or
    const elements. This may cause compilation errors but any code which
    is subject to it was triggerring undefined behaviour and must be fixed
    with uttermost importance.

Deprecations

  • ocean.util.cipher.gcrypt: MessageDigest, HMAC

    HMAC has been moved to a separate module, ocean.util.cipher.gcrypt.HMAC.
    The HMAC class in ocean.util.cipher.gcrypt.MessageDigest is deprecated.

    MessageDigest.hash() and HMAC.hash(void[][] ...) are deprecated and
    replaced with calculate(ubyte[][] ...). This is to avoid an implicit
    cast from void[][] to void[] when calling the function, which causes a
    wrong hash result, and the error is hard to find.

  • ocean.io.select.client.EpollProcess.ProcessMonitor

    All references to the ProcessMonitor class should be removed. It existed
    only as a workaround for a bug in EpollProcess, but is no longer required.

  • ocean.task.util.StreamProcessor

  • Constructor that expects max_tasks, suspend_point and resume_point has
    been deprecated in favor of one that takes a ThrottlerConfig struct.

  • ThrottlerConfig.max_tasks and the constructors which accept a max_tasks
    argument have been deprecated. New constructors have been added which do not
    expect or use max_tasks, instead creating an unlimited task pool. If you
    want to limit the maximum number of tasks in the pool, use getTaskPool and
    set a limit manually.

  • ocean.text.util.StringC

    The function toCstring() is now deprecated in favour of toCString() (note
    the uppercase S).

  • ocean.text.convert.Float

    parse overloads for version = float_dtoa and format overload
    for version = float_old have been deprecated.

  • ocean.util.cipher.gcrypt.core.Gcrypt

    The Gcrypt template has been deprecated, either GcryptWithIV or
    GcryptNoIV should be used, depending on if your desired encryption mode
    requires initialization vectors or not.

  • ocean.util.serialize.contiguous.VersionDecorator

    The VersionDecorator defined in this module is deprecated.
    The VersionDecorator in the MultiVersionDecorator module of the same package
    should be prefered, as it handles multiple version jump without runtime performance.

  • ocean.io.serialize.XmlStructSerializer

    This unmaintained module is deprecated.

  • ocean.text.xml.Xslt, ocean.text.xml.c.LibXslt, ocean.text.xml.c.LibXml2

    The XSLT processor implemented here is not generic and is thus being removed
    from ocean. It will be moved to another repository.

  • ocean.util.cipher.gcrypt.AES

    The AES alias has been deprecated in favor of the equivalent AES128.

New Features

  • ocean.io.serialize.StringStructSerializer

    Introduced an overload of the StringStructSerializer serializer
    which takes an array of known timestamp field names.
    If a field matches one of the names and implicitly converts to ulong,
    an ISO formatted string will be emitted in parentheses next to the value of
    the field (which is assumed to be a unix timestamp).

    Bugfix: Trailing spaces are no longer emitted for arrays with length zero.

  • ocean.util.cipher.gcrypt.AES

    Added libgcrypt AES (Rijndael) algorithm with a 128 bit key.

  • ocean.util.config.ClassFiller

    In the ClassIterator, a new opApply() function has been added to provide
    foreach iteration only over the names of the matching configuration
    categories.

  • ocean.text.convert.Float

    A new format method has been introduced, which formats a floating point value according to
    a provided format string, which is a subset of the one passed to Layout.
    It mimics what Layout will do, with the exception that "x" and "X" format string aren't handled
    anymore as the original output wasn't correct.

  • ocean.sys.socket.model.ISocket

    Add formatInfo method which formats information about the socket into the
    provided buffer

  • ocean.task.util.StreamProcessor

    Added getter method for the internal task pool.

  • ocean.io.select.client.TimerSet

    The schedule() method now returns an interface to the newly scheduled event
    (IEvent), allowing it to be cancelled.

  • ocean.task.Task

    Task has gained methods registerOnKillHook/unregisterOnKillHook that can be
    used to register/unregister callback hooks to be called when the Task is killed.

  • ocean.util.cipher.gcrypt.AES

    Additional aliases for 192- and 256-bit AES ciphers have been added.

  • ocean.time.timeout.TimeoutManager

    TimeoutManager now has a constructor that takes an optional bucket element
    allocator. The intended usage is to allow the use of an alternative allocator,
    e.g. BucketElementFreeList. This can reduce the number of GC allocations
    performed. The existing constructor uses the default bucket allocator of
    map (BucketElementGCAllocator), which will cause garbage collections.

  • ocean.task.ThrottledTaskPool

    ThrottledTaskPool has been moved out of ocean.task.util.StreamProcessor and
    made public.

  • ocean.task.util.TaskPoolSerializer

    Added methods to dump and restore tasks inside of a task pool to disk to
    facilitate preserving tasks between application restarts.

    To use the serialization and deserialization funtionality the derived task
    must implement serialize and deserialize.
    public void serialize ( ref void[] buffer )
    public void deserialize ( void[] buffer )

    See usage example in the unit test for example implementation.

v2.0.8-preview

08 Sep 10:31
v2.0.8-preview
0721c6b
Compare
Choose a tag to compare
v2.0.8-preview Pre-release
Pre-release

Issues Fixed

  • Fix BucketElementFreeList : instantiateAllocator

    The type of the return value did not match the type actually being returned by the function.