vibe.d 0.7.19 release

Header image
Wed, 09 Apr 2014 Apart from working on the latest DMD versions, this release includes an important security enhancement in the form of new experimental code for SSL certificate validation. Other major changes include many improvements to the Diet template compiler, various performance improvements, a new FileDescriptorEvent to interface with other I/O libraries, a new web interface generator similar to the REST interface generator, many improvements to the Redis client, and a bunch of other fixes and additions.

Features and improvements

  • Compiles with DMD 2.065 (and the current DMD HEAD)
  • API improvements for the SSL support code
  • Implemented SSL certificate validation (partially by David Nadlinger aka klickverbot, pull #474)
  • Removed the old EventedObject interface
  • Implemented support for string includes in Diet templates (idea by Stefan Koch aka Uplink_Coder) - issue #482
  • JSON answers in the REST interface generator are now directly serialized, improving performance and memory requirements
  • Reimplemented the timer code to guarantee light weight timers on all event drivers
  • Libevent2TCPConnection now has a limited read buffer size to avoid unbounded memory consumption
  • Fixed the semantics of ConnectionStream.empty and connected - empty is generally useful for read loops and connected for write loops
  • Added an overload of runTask that takes a delegate with additional parameters to bind to avoid memory allocations in certain situations
  • Added vibe.core.core.createFileDescriptorEvent to enable existing file descriptors to be integrated into vibe.d's event loop
  • HTTP response compression is now disabled by default (controllable by the new `HTTPServerSettings.useCompressionIfPossible)
  • Removed the deprecated sslKeyFile and sslCertFile fields from HTTPServerSettings
  • Removed the compatibility alias Signal (alias for ManualEvent)
  • :htmlescape in Diet templates is now processed at compile time if possible
  • Added support for Rebindable!T in isStronglyIsolated and isWeaklyIsolated - issue #421
  • Added RecursiveTaskMutex
  • Throwable is now treated as weakly isolated to allow passing exceptions using vibe.core.concurrency.send
  • exitEventLoop by default now only terminates the current thread's event loop and always works asynchronously
  • Session is now a struct instead of a class
  • Added support for storing arbitrary types in Session
  • Moved the REST interface generator from to
  • Added a new web interface generator (vibe.web.web), similar to vibe.http.form, but with full support for attribute based customization
  • Added a compile time warning when neither VibeCustomMain, nor VibeDefaultMain versions are specified - starts the transition from VibeCustomMain to VibeDefaultMain
  • Added requireBoundsCheck to the build description
  • Added assertions to help debug accessing uninitialized MongoConnection values
  • Added logFatal as a shortcut to log called with LogLevel.fatal (by Daniel Killebrew aka gittywithexcitement) - pull #441
  • Empty JSON request bodies are now handled gracefully in the HTTP server (by Ryan Scott aka Archytaus) - pull #440
  • Improved documentation of sleep() - issue #434
  • The libevent2 and Win32 event drivers now outputs proper error messages for socket errors
  • Changed setTaskEventCallback to take a delegate with a Task parameter instead of Fiber
  • Added a Task.taskCounter property
  • AutoFreeListAllocator.realloc can now reuse blocks of memory and uses realloc on the base allocator if possible
  • HTML forms now support multiple values per key
  • Inverted the no_dns parameter of EventDriver.resolveHost to use_dns to be consistent with - issue #430
  • Task doesn't alias this to TaskFiber anymore, but forwards just a selected set of methods
  • Added `vibe.core.args.readRequiredOption - issue #442
  • NetworkAddress is now fully pure nothrow
  • Refactored the Redis client to use much less allocations and a much shorter source code
  • Added Bson.toString() (by David Nadlinger aka klickverbot) - pull #468
  • Added connectTCP(NetworkAddress) and NetworkAddress.toString() (by Stefan Koch aka Uplink_Coder) - pull #485
  • Added NetworkAddress.toAddressString to output only the address portion (without the port number)
  • Added compileDietFileIndent to generate indented HTML output
  • Added Travis CI integration (by Martin Nowak) - pull #486
  • Added appendToFile to conveniently append to a file without explicitly opening it (by Stephan Dilly aka extrawurst) - pull #489
  • Tasks started before starting the event loop are now deferred until after the loop has been started
  • Worker threads are started lazily instead of directly on startup
  • Added MongoCursor.limit() to limit the amount of documents returned (by Damian Ziemba aka nazriel) - pull #499
  • The HTTP client now sets a basic-auth header when the request URL contains a username/password (by Damian Ziemba aka nazriel) - issue #481, pull #501
  • Added RedisClient.redisVersion (by Fabian Wallentowitz aka fabsi88) - pull #502
  • Implemented handling of doctypes other than HTML 5 in the Diet compiler (by Damian Ziemba aka nazriel) - issue #505, pull #509
  • Boolean attributes in Diet templates are now written without value for HTML 5 documents (by Damian Ziemba aka nazriel) - issue #475, pull #512
  • Empty "class" attributes in Diet templates are not written to the final HTML output (by Damian Ziemba aka nazriel) - issue #372, pull #519
  • Implemented PUB/SUB support for the Redis client (by Michael Eisendle with additional fixes by Etienne Cimon aka etcimon)
  • The logging functions take now any kind of string instead of only string (by Mathias Lang aka Geod24) - pull #532
  • Added SMTPClientSettings.peerValidationMode (by Stephan Dilly aka Extrawurst) - pull #528
  • Diet templates that are set to null are now omitted in the HTML output (by Damian Ziemba aka nazriel) - issue #520, pull #521
  • Extended the REST interface generator to cope with any type of error response and to always throw a RestException on error (by Stephan Dilly aka Extrawurst) - pull #533
  • Added support for text blocks in Diet templates (by Damian Ziemba aka nazriel) - issue #510, pull #518
  • Added RedisClient.blpop and changed all numbers to long to be in line with Redis (by Etienne Cimon aka etcimon) - pull #527
  • Changed WebSocket.receiveBinary and WebSocket.receiveText to strictly expect the right type by default (by Martin Nowak) - pull #543
  • Avoid using an exception to signal HTTP 404 errors for unprocessed requests, resulting in a large performance increas for that case
  • Modernized the Diet templates used for the example projects (by Damian Ziemba aka nazriel) - pull #551
  • Added WebDAV HTTP status codes to the HTTPStatusCode enum (by Dmitry Mostovenko aka TrueBers) - pull #574
  • Added support for multiple recipient headers (including "CC" and "BCC") in sendMail (by Stephan Dilly aka Extrawurst) - pull #582
  • Added support for comma separated recipients in sendMail
  • Added SSL support for the MongoDB client (by Daniel Killebrew aka gittywithexcitement) - issue #575, pull #587
  • Made all overloads of listenHTTPPlain private (as they were supposed to be since a year)
  • Added using -version=VibeDisableCommandLineParsing to disable default command line argument interpretation
  • Added using -version=VibeNoSSL to disable using OpenSSL and added free functions to create SSL contexts/streams
  • Functions in now throw a JSONException instead of a bare Exception (by Luca Niccoli aka lultimouomo) - pull #590
  • Functions in vibe.http.websocket now throw a WebSocketException instead of a bare Exception (by Luca Niccoli aka lultimouomo) - pull #590

Bug fixes

  • Fixed a condition under which a WebSocket could still be used after its handler function has thrown an exception - issue #407
  • Fixed a null pointer dereference in Libevent2TCPConnection when trying to read from a closed connection
  • Fixed the HTTP client to still properly shutdown the connection when an exception occurs during the shutdown
  • Fixed SSLStream to perform proper locking for multi-threaded servers
  • Fixed the signature of TaskLocal.opAssign - issue #432
  • Fixed thread shutdown in cases where multiple threads are used - issue #419
  • Fixed SIGINT/SIGTERM application shutdown - issue #419
  • Fixed HashMap to properly handle null keys
  • Fixed processing WebSocket requests sent from IE 10 and IE 11
  • Fixed the HTTP client to assume keep-alive for HTTP/1.1 connections that do not explicitly specify something else (by Daniel Killebrew aka gittywithexcitement) - issue #448, pull #450
  • Fixed Win32FileStream to report itself as readable for FileMode.createTrunc
  • Fixed a possible memory corruption bug for an assertion in AllocAppender
  • Fixed clearing of cookies on old browsers - issue #453
  • Fixed handling of yield()ed tasks so that events are guaranteed to be processed
  • Fixed Libevent2EventDriver.resolveHost to take the local hosts file into account (by Daniel Killebrew aka gittywithexcitement) - issue #289, pull #460
  • Fixed RedisClient.zcount to issue the right command (by David Nadlinger aka klickverbot) - pull #467
  • Fixed output of leading white space in the HTMLLogger - now replaced by  
  • Fixed serialization of AAs with const(string) or immutable(string) keys (by David Nadlinger aka klickverbot) - pull #473
  • Fixed double-URL-decoding of path parameters in URLRouter
  • Fixed URL.toString() to output username/password, if set
  • Fixed a crash caused by a double-free when an SSL handshake had failed
  • Fixed Libevent2UDPConnection.recv to work inside of a Task
  • Fixed handling of "+" in the path part of URLs (is not replaced by a space) - issue #498
  • Fixed handling of <style> tags with inline content in the Diet compiler - issue #507
  • Fixed some possible sources for stale TCP sockets when an error occurred in the close sequence
  • Fixed the Win64 build (using the "win32" driver) that failed due to user32.dll not being linked
  • Fixed URLRouter to expose all overloads of match() - see also pull #535
  • Fixed deserialization of unsigned integers in the BSON serializer (by Anton Gushcha aka NCrashed) - issue #538, pull #539
  • Fixed deserialization of unsigned integers in the JSON serializer
  • Fixed serialization of nested composite types in the JSON serializer
  • Fixed two bogus assertions in the win32 event driver (one in the timer code and one for socket events after a socket has been closed)
  • Fixed WebSocket.waitForData to always obey the given timeout value (by Martin Nowak) - issue #544, pull #545
  • Fixed the high level tests in the "tests/" directory (by Mathias Lang aka Geod24) - pull #541
  • Fixed HashMap to always use the supplied Traits.equals for comparison
  • Fixed the example projects and switched from "package.json" to "dub.json" (by Mathias Lang aka Geod24) - pull #552
  • Fixed emitting an idle event when using processEvents to run the event loop
  • Fixed Path.relativeTo to retain a possible trailing slash
  • Fixed image links with titles in the Markdown compiler (by Mike Wey) - pull #563
  • Fixed a possible stale TCP connection after finalizing a HTTP client request had failed
  • Fixed makeIsolated to work for structs
  • Fixed listenHTTP to throw an exception if listening on all supplied bind addresses has failed
  • Fixed a possible crash or false pointers in HashMap due to a missing call to GC.removeRange - issue #591
  • Fixed non-working disconnect of keep-alive connections in the HTTP server (by Stephan Dilly aka Extrawurst) - pull #597
  • Fixed a possible source for orphaned TCP connections in the libevent driver
  • Fixed exitEventLoop to work when called in a task that has been started just before runEventLoop was called
  • Fixed isWeaklyIsolated to work properly for interface types (by Luca Niccoli aka lultimouomo) - pull #602
  • Fixed the BsonSerializer to correctly serialize SysTime as a BsonDate instead of as a string

Note that some fixes have been left out because they are related to changes within the development cycle of this release.


Posted at 19:39:59 +0200 by Sönke Ludwig 0 comments

New ApplyYourDLang channel on YouTube

Header image
Thu, 20 Feb 2014 A new tutorial channel for D has been started recently by Simen Endsjø and Rikki Cattermole. It contains beginner friendly step-by-step introductions to everything from system setup to the language ecosystem and the language itself, including an example of using DUB and vibe.d.

Find the full list of videos and playlists on the ApplyYourDLang channel. The following video has been recorded by Simen Endsjø, starting off by giving a general overview of the language's ecosystem and concludes with a simple vibe.d based web application. An additional setup tutorial that goes into a little more detail regarding the tools installation has been recorded by Rikki Cattermole.

Posted at 11:53:28 +0200 by Sönke Ludwig 3 comments

vibe.d 0.7.18 release

Header image
Tue, 26 Nov 2013 The new release adds support for DMD 2.064 and contains an impressive number of almost 90 additions and bug fixes. Some notable improvements are a better serialization system, reworked WebSocket support, native MongoDB query sorting support and vastly improved stability of the HTTP client and other parts of the system.

Features and improvements

  • Compiles using DMD 2.064 (and DMD 2.063.2)
  • Added with support for annotations to control serialization (replaces/extends the serialization code in and
  • Added range based allocation free (de-)serialization for JSON strings and more efficient BSON serialization
  • Added File.isOpen
  • Added a ConnectionStream interface from which TCPConnection and TaskPipe now derive
  • Added BsonDate.fromStdTime and improve documentation to avoid time zone related bugs
  • Added a TaskMutex.this(Object) constructor to be able to use them as object monitors
  • Added a non-blocking (infinitely buffering) mode for TaskPipe
  • Added (de)serialization support for AAs with string serializable key types (with toString/fromString methods) (by Daniel Davidson) - pull #333
  • Added (de)serialization support for scalar types as associative array keys
  • Added setLogFormat as a more flexible replacement for setPlainLogging
  • Added MongoCollection.aggregate() (by Jack Applegame) - pull #348
  • Added WebSocket.request to enable access to the original HTTP request and add scoped web socket callbacks for avoiding GC allocations
  • Added HTTPServerRequest.clientAddress to get the full remote address including the port - issue #357
  • Added to enable dynamically switching the underlying stream
  • Added to provide a buffered input range interface for an InputStream
  • Added that allows wrapping a ConnectionStream along with a Stream to allow forwarding connection specific functionality together with a wrapped stream
  • Added URL based overloads for HTTPServerResponse.redirect and staticRedirect
  • Added RedisClient.hset (by Martin Mauchauffée aka moechofe) - pull #386
  • Added a WebSockets example project
  • Added MongoCursor.sort to allow sorted queries using the same syntax as other MongoDB drivers (by Jack Applegame) - pull #353
  • Added random number generators suited for cryptographic applications, which is now used for session ID generation (by Ilya Shipunov) - pull #352, pull #364, issue #350
  • Added parameter and return value modifier user attributes for the REST interface generator and refactor meta programming facilities (by Михаил Страшун aka Dicebot) - pull #340, pull #344, pull #349
  • Added for piping stream data with a defined maximum latency
  • OutgoingWebSocketMessage is now automatically finalized
  • HTTPServerResponse.switchProtocol now returns a ConnectionStream to allow controlling the underlying TCP connection
  • HTTPServerResponse.startSession now sets the "HttpOnly" attribute by default to better prevent session theft (by Ilya Shipunov) - issue #368, pull #373
  • HTTPServerResponse.startSession now automatically sets the "Secure" attribute by default when a HTTPS connection was used to initiate the session - issue #368
  • Implemented Scalate whitespace stripping syntax for Diet templates (by Jack Applegame) - pull #362
  • htmlAttribEscape and friends now also escape single quotes (') - issue #377
  • now preallocates if possible
  • Optimized HTML escaping performance (by Martin Nowak) - pull #327
  • Adjusted naming of Bson.Type and Json.Type members for naming conventions
  • render!() for rendering Diet templates is assumed to be safe starting with DMD 2.064
  • Improved Json usability by enabling ~= and some more use cases for ~
  • Added a workaround for excessive compile times for large static arrays (by Martin Nowak) - pull #341
  • Improved the HTTP reverse proxy by handling HEAD requests correctly, avoiding GC allocations and optionally disabling transfer compression
  • HashMap now moves elements when resizing instead of copying
  • Added a new mode for parseRFC5322Header that outputs multiple fields with the same value as separate fields instead of concatenating them as per RFC 822 and use the new behavior for the HTTP server - issue #380
  • ThreadedFileStream now uses yield() to avoid stalling the event loop
  • Improved the performance of yield() by using a singly linked list instead of a dynamic array to store yielded tasks (incl. bugfix by Martin Nowak, see pull #402 and issue #401)

Bug fixes

  • Fixed wrongly triggering assertions on Windows when INVALID_SOCKET is returned
  • Fixed issues with by reimplementing everything using zlib directly instead of std.zlib
  • Fixed an exception in the HTTP file server when downloading a compressed file with no content transfer encoding requested
  • Fixed compilation in release and unit test modes
  • Fixed a data corruption bug caused by changed alignment in memory returned by GC.realloc
  • Fixed the libevent driver to avoid infinite buffering of output data - issue #191
  • Fixed (de)serialization of BSON/JSON with (to/from)(String/Json) methods (by Jack Applegame) - pull #309
  • Fixed possible finalization errors and possible interleaved requests in HTTPClient.request
  • Fixed a possible access violation in Libevent2TCPConnection when the connection was closed by the remote peer - issue #321
  • Fixed Win32TCPConnection.connect to wait for the connection to be established (and throw proper exceptions on failure)
  • Fixed HTTP client requests for URLs with an empty path component (ending directly with the host name)
  • Fixed out-of-range errors when parsing JSON with malformed keywords
  • Fixed an exception when disconnecting HTTP client connections where the remote has already disconnected
  • Fixed vibe.core.args.getOption to return true when an option was found (by Martin Nowak) - pull #331
  • Fixed command line options to have precedence over configuration settings for getOption
  • Fixed Cookie.maxAge having no effect (by Jack Applegame) - pull #334, issue #330
  • Fixed request/response delays in Libevent2TCPConnection (by Martin Nowak) - issue #338
  • Fixed conditional use of to validate emails
  • Fixed an assertion triggering for very small wait timeouts
  • Fixed markdown [ref][] style links (by Martin Nowak) - pull #343
  • Fixed cache headers in the HTTP file server and sending a "Date" header for all HTTP server responses
  • Fixed interleaved HTTP client requests when dropping a previous response has failed for some reason
  • Fixed opening files with FileMode.readWrite and FileMode.createTrunc to allow both, reading and writing - issue #337, issue #354
  • Fixed documentation of some parameters - issue #322
  • Fixed HTTPServerRequest.fullURL to properly set the port - issue #365
  • Fixed vibe.core.concurrency.send/receive in conjunction with immutable values
  • Fixed an assertion in Libevent2ManualEvent caused by an AA bug
  • Fixed a possible crash in Libevent2ManualEvent when using deterministic destruction
  • Fixed a resource/memory leak in the libevent2 driver
  • Fixed the "http-request" example to use the recommended requestHTTP function - issue #374
  • Fixed appending of Path values to preserve the trailing slash, if any
  • Fixed deserialization of JSON integer values as floating point values as FP values often end up without a decimal point
  • Fixed yield() to be a no-op when called outside of a fiber
  • Fixed a crash when WebSockets were used over a HTTPS connection - issue #385
  • Fixed a crash in SSLStream that occured when the server certificate was rejected by the client - issue #384
  • Fixed a number of bogus error messages when a connection was terminated before a HTTP request was fully handled
  • Fixed the console logger to be disabled on Windows application without a console (avoids crashing)
  • Fixed HTTPLogger avoid mixing line contents by using a mutex
  • Fixed the semantics of WebSocket.connected and added WebSocket.waitForData - issue #370
  • Fixed a memory leak and keep-alive connection handling in the HTTP client
  • Fixed settings of path placeholder values when "*" is used in URLRouter routes
  • Fixed a memory leak where unused fibers where never recycled
  • Fixed handling "Connection: close" HTTP client requests
  • Fixed the WebSockets code to accept requests without "Origin" headers as this is only required for web browser clients - issue #389
  • Fixed the markdown compiler to be CTFEable again (by Martin Nowak) - see pull #398
  • Fixed fixed markdown named links containing square brackets in their name - see pull #399
  • Fixed a crash (finalization error) in the HTTP client when an SSL read error occurs
  • Fixed a race condition during shutdown in Libevent2ManualEvent
  • Fixed the Task.this(in Task) constructor to preserve the task ID


Posted at 09:55:58 +0200 by Sönke Ludwig 0 comments

vibe.d 0.7.17 release

Header image
Mon, 09 Sep 2013 This release fixes compiling on DMD 2.063.2 and DMD HEAD and performs a big API cleanup by removing a lot of deprecated functionality and deprecating some additional symbols. New is also a better task local storage support, a SyslogLogger class and a number of smaller additions and bug fixes.

Features and improvements

  • Compiles using DMD 2.063.2 and DMD HEAD
  • Removed a big chunk of deprecated functionality and marked declarations "scheduled for deprecation" as actually deprecated
  • Implemented TaskPipe to support piping of data between tasks/threads (usable for converting synchronous I/O to asynchronous I/O)
  • Implemented TaskLocal!T for faster and safer task local storage
  • Implemented a SyslogLogger class (by Jens K. Mueller) - pull #294
  • Implement support for transferring pre-compressed files in the HTTP file server (by Jens K. Mueller) - pull #270
  • Implemented a first version of writeFormBody (by Ben Gradham aka SerialVelocity) - pull #288
  • Implemented vibe.inet.message.decodeMessage for decoding an internet message body
  • Implemented a moving opCast for IsolatedRef!T to allow safe casting to base or derived classes and a boolean opCast to allow checking for null
  • Implemented a basic version of a WinRT based driver
  • Added localAddress and remoteAddress properties to TCPConnection
  • Added localAddress property and a connect(NetworkAddress) overload to UDPConnection
  • Added localAddress property to HTTPClientRequest
  • Added setTaskEventCallback to support task level debugging
  • Added RedisClient.rpush and RedisClient.rpushx (by Martin Mauchauffée aka moechofe) - pull #280
  • Added a write buffer size limit to ChunkedOutputStream
  • Added HTTPClientResponse.disconnect to force disconnecting the client during request handling
  • Deprecated the index() special method for the REST interface generator in favor of @path (by Михаил Страшун aka Dicebot)
  • MongoDatabase.runCommand is now publicly accessible - issue #261
  • Cookies are now cleared on the client if set to null (by Sergey Shamov) - pull #293
  • The optional do_flush argument of OutputStream.write has been removed - flushing needs to be done explicitly now

Bug fixes

  • Fixed the HTTP file server to ignore directories (so that other handlers can e.g. generate an index page) - issue #256
  • Fixed BSON/JSON (de)serialization of string type enum values
  • Fixed inversion of boolean values when converting from Json to Bson (by Nicolas Sicard aka biozic) - pull #260
  • Fixed a possible source for memory corruption by making allocators shared between threads
  • Fixed parseRFC822DateTimeString (by Nathan M. Swan) - pull #264
  • Fixed adjustMethodStyle to cope with non-ASCII characters and fixed conversion of identifiers starting with acronyms
  • Fixed preferring compression over non-chunked transfer when both are requested for HTTPServerResponse.bodyWriter (by Jens K. Mueller) - pull #268
  • Fixed assertion in HTTPClientReponse.~this (was causing an InvalidMemoryOperationError instead of the expected AssertError) - issue #273
  • Fixed the VibeDist support code to match the latest VibeDist version (still WIP)
  • Fixed validateIdent to properly check validity of the first character
  • Fixed handling of RFC2616 HTTP chunk extensions (ignoring them for now, by Nathan M. Swan) - pull #274
  • Fixed RedisClient.smembers (by Nicolas Sigard aka biozic) - pull #277
  • Fixed RedisClient.echo and RedisClient.lpop (by Martin Mauchauffée aka moechofe) - pull #279
  • Fixed FixedRingBuffer.put (used for message passing)
  • Fixed handling of out-of-memory situations in MallocAllocator
  • Fixed sending of Isolated!T values using vibe.core.concurrency
  • Fixed several concurrency related bugs in ChunkedOutputStream and Libevent2ManualEvent
  • Fixed handling of the max_lenger parameter in validateEmail (by Mike Wey) - pull #296
  • Fixed possible failed listen attempts in the example projects - issue #8, issue #249, issue #298
  • Fixed compilation of the libevent2 driver on Win64


Posted at 09:13:03 +0200 by Sönke Ludwig 0 comments

Pages: 1 2 3 4 5 6