vibe.d 0.7.23 release

Header image
Wed, 25 Mar 2015 Apart from fixing compilation on DMD 2.067 and revamping the vibe.core.sync module to support nothrow, notable changes are extended parameter support in, improved translation support in vibe.web.web and new support for policy based customization of (de-)serialization. The Diet template parser has also received a good chunk of fixes and improvements in this release.
Features and improvements
  • Compiles on DMD frontend 2.065 up to 2.067 (most fixes for 2.067 are by Mathias Lang) - [pull #972][pull 972], pull #992
  • Changed semantics of TaskMutex and TaskCondition - this can be a breaking change for certain applications
  • The classes are now nothrow to stay forward compatible with D's Mutex and Condition classes,
  • Interruption using Task.interrupt() now gets deferred to the next wait/yield operation
  • The old behavior can be achieved using the new InterruptipleTaskMutex and InterruptibleTaskCondition classes
  • Definition of either VibeCustomMain or VibeDefaultMain is now a hard requirement - this is the final deprecation phase for VibeCustomMain
  • Added an overload of lowerPrivileges that takes explicit user/group arguments (by Darius Clark) - pull #948
  • Added handleWebSocket as a procedural alternative to handleWebSockets (by Luca Niccoli) - pull #946
  • Added support for "msgctxt" in .po files for the vibe.web.web translation framework (by Nathan Coe) - pull #896
  • Added overloads of HTTPServerResponse.writeBody and writeRawBody with an additional status code parameter (by Martin Nowak) - pull #980
  • Added @queryParam and @bodyParam to the module (by Mathias Lang) - pull #969
  • Added support for serving an "index.html" file when requesting a directory (by Martin Nowak) - pull #902
  • Added policy based customization for (by Luca Niccoli) - pull #937
  • Added SSLStream.peerCertificate and HTTPServerRequest.clientCertificate properties (by Rico Huijbers) - pull #965
  • Added RedisDatabase.zrangeByLex (by Etienne Cimon) - pull #993
  • Added support for HTTP digest authentication (by Kai Nacke aka redstar) - pull #1000
  • Diet template features
  • Added support for plain text lines starting with < (plain HTML lines) (by Kai Nacke aka redstar) - pull #1007
  • Added support for default and "prepend" modes for blocks (help from Kai Nacke aka redstar) - issue #905, pull #1002
  • Multiple "id" attributes are now explicitly disallowed (by Kai Nacke aka redstar) - pull #1008
Bug fixes
  • Fixed ping handling for WebSockets and added automatic keep-alive pinging (by Luca Niccoli) - pull #947
  • Fixed wrapped texts in .po files for the vibe.web.web translation framework (by Nathan Coe) - pull #896
  • Fixed a crash issue when storing a Timer in a class instance that does not get destroyed before application exit - issue #978
  • Fixed HTTPRouter.any to match all supported HTTP verbs (by Szabo Bogdan) - pull #984
  • Fixed setting TCPConnection.localAddr in the libasync driver (by Etienne Cimon) - issue #961, pull #962
  • Fixed some cases of missing destructor calls in vibe.utils.memory (partially by Etienne Cimon) - pull #987
  • Fixed some failed incoming SSL connection attempts by setting a default session context ID (by Rico Huijbers) - pull #970
  • Fixed RedisSessionStore.create() (by Yusuke Suzuki) - pull #996
  • Fixed HTML output of // style comments in Diet templates (by Kai Nacke) - pull #1004
  • Fixed the error message for mismatched @path placeholder parameters in (by Mathias Lang aka Geod24) - issue #949, pull #1001
  • Fixed parsing of hidden comments in Diet templates that have no leading space (by Kai Nacke) - pull #1012
  • Fixed serialization of const(Json) values
  • Fixed handling of struct parameter types in that implicitly convert to string, but not vice-versa
  • Fixed HTTP request parsing with uppercase letters in the "Transfer-Encoding" header (by Szabo Bogdan) - pull #1015
  • Fixed parsing of Diet attributes that are followed by whitespace - issue #1021
  • Fixed parsing of Diet string literal attributes that contain unbalanced parenthesis - issue #1033

Posted at 21:38:51 +0200 by Sönke Ludwig 0 comments

vibe.d 0.7.22 release

Header image
Mon, 12 Jan 2015 A small release mostly fixing compilation issues on DMD 2.065, LDC 0.14.0 and GDC. It also contains the new optional libasync based event driver for initial testing.
Features and improvements
  • Added a new event driver based on the libasync native D event loop abstraction library (by Etienne Cimon) - pull #814
  • Added support for @headerParam in the REST interface generator (by Mathias Lang aka Geod24) - pull #908
  • Added font/woff as a recognized compressed MIME type to avoid redundant compression for HTTP transfers (by Márcio Martins) - pull #923
  • The BSON deserialization routines now transparently convert from long to int where required (by David Monagle) - pull #913
Bug fixes
  • Fixed an overload conflict for urlEncode introduced in 0.7.21
  • Fixed a compilation issue with Exception typed _error parameters in web interface methods (by Denis Hlyakin) - pull #900
  • Fixed conversion of Bson.Type.undefined to Json (by Márcio Martins) - pull #922
  • Fixed messages leaking past the end of a task to the next task handled by the same fiber (by Luca Niccoli) - pull #934
  • Fixed various compilation errors and ICEs for DMD 2.065, GDC and LDC 0.14.0 (by Martin Nowak) - pull #901, pull #907, pull #927
Posted at 10:40:42 +0200 by Sönke Ludwig 0 comments

vibe.d 0.7.21 release

Header image
Tue, 18 Nov 2014 Due to a number of highly busy months (more to come), this release got delayed far more than planned. However, development didn't stall and, finally, a huge list of over 150 changes found its way into the new version. Major changes are all over the place, including some notable changes in the SSL/TLS support and the web interface generator.
Features and improvements
  • SSL/TLS support
    • Added support for TLS server name indication (SNI) to the SSL support classes and the HTTP client and server implementation
    • Changed SSLPeerValidationMode into a set of bit flags (different modes can now be combined)
    • Made the SSL implementation pluggable (currently only OpenSSL is supported)
    • Moved all OpenSSL code into a separate module to avoid importing the OpenSSL headers in (by Martin Nowak) - pull #757
    • Added support for a VibeUseOldOpenSSL version to enable use with pre 1.0 versions of OpenSSL
    • Upgraded the included OpenSSL Windows binaries to 1.0.1j
  • Web interface generator
    • Added support for Json as a return type for web interface methods (by Stefan Koch) - pull #684
    • Added support for a @contentType attribute for web interface methods (by Stefan Koch) - pull #684
    • Added vibe.web.web.trWeb for runtime string translation support
    • Added support for nesting web interface classes using properties that return a class instance
    • Added support for @before/@after attributes for web interface methods
    • Added a PrivateAccessProxy mixin as a way to enable use of private and non-static methods for @before in web interfaces
    • Added support for validating parameter types to vibe.web.web (vibe.web.validation)
    • Added the possibility to customize the language selection in the translation context for web interface translations
    • Added optional support for matching request paths with mismatching trailing slash in web interfaces
    • SessionVar, if necessary, now starts a new session also for read accesses
  • HTTP sessions
    • Added a check to disallow storing types with aliasing in sessions
    • Session values are now always returned as const to avoid unintended mutation of the returned temporary
    • Added initial support for JSON and BSON based session stores
    • Added a Redis based HTTP session store (vibe.db.redis.sessionstore.RedisSessionStore)
    • Deprecated index operator based access of session values (recommended to use vibe.web.web.SessionVar instead)
  • Redis database driver
    • Added some missing Redis methods and rename RedisClient.flushAll to deleteAll
    • Added the vibe.db.redis.types module for type safe access of Redis keys
    • RedisReply is now a typed output range
    • Added a module for Redis with common high level idioms (vibe.db.redis.idioms)
    • Improved the Redis interface with better template constraints, support for interval specifications and support for Nullable!T to determine key existence
    • Made the member argument to the sorted set methods in RedisDatabase generic instead of string - issue #811
    • Added support for ubyte[] as a return type for various Redis methods (by sinkuu) - pull #761
  • MongoDB database driver
    • MongoConnection.defaultPort is now an ushort (by Martin Nowak) - pull #725
    • Added support for expiring indexes and dropping indexes/collections in the MongoDB client (by Márcio Martins) - pull #799
    • Added MongoClient.getDatabases (by Peter Eisenhower) - pull #822
    • Added an array based overload of MongoCollection.ensureIndex - issue #824
    • Added MongoCursor.skip as an alternative to setting the skip value using an argument to find (by Martin Nowak) - pull 888
  • HTTP client
    • Made the handling of redirect responses more specific in the HTTP client (reject unknown status codes)
    • Added support for using a proxy server in the HTTP client (by Etienne Cimon) - pull #731
    • Added HTTPClientSettings.defaultKeepAliveTimeout and handle the optional request count limit of keep-alive connections (by Etienne Cimon) - issue 744, pull #756
    • Added an assertion to the HTTP client when a relative path is used for the request URL instead of constructing an invalid request
    • Avoid using chunked encoding for HTTPClientRequest.writeJsonBody
  • HTTP server
    • Added support for IP based client certificate validation in the HTTP server (by Eric Cornelius) - pull #723
    • Avoid using chunked encoding for HTTPServerResponse.writeJsonBody - issue #619
    • Added HTTPServerResponse.waitForConnectionClose to support certain kinds of long-polling applications
  • Compiles on DMD 2.064 up to DMD 2.067.0-b1
  • All external dependencies are now version based (OpenSSL/libevent/libev)
  • Removed deprecated symbols of 0.7.20
  • Increased the default fiber stack size to 512 KiB (32-bit) and 16 MiB (64-bit) respectively - issue #861
  • Enabled the use of shared delegates for runWorkerTask and avoid creation of a heap delegate
  • Added support for more parameter types in runTask/runWorkerTask by avoiding Variant
  • Added an initial implementation of a Future!T (future/promise) in vibe.core.concurrency
  • Deprecated the output range interface of OutputStream, use instead
  • Prefer .toString() to cast(string) when converting values to string in Diet templates (changes how Json values are converted!) - issue #714
  • Added variants of the vibe.utils.validation functions that don't throw
  • Added UDPConnection.close()
  • Deprecated registerFormInterface and registerFormMethod
  • Added support for implicit parameter conversion of arguments passed to runTask/runWorkerTask (by Martin Nowak) - pull #719
  • Added for vibe.d compatible wrapping of stdin/stdout and std.stdio.File (by Eric Cornelius) - pull #729
  • Added for duplicating a stream to multiple output streams (by Eric Cornelius) - pull #732
  • Added support for an inotify based directory watcher in the libevent driver (by Martin Nowak) - pull #743
  • Added support for Nullable!T in - issue #752
  • Added a constructor for BsonObjectID that takes a specific time stamp (by Martin Nowak) - pull #759
  • Added output range based overloads of and readLine
  • Added
  • Added vibe.inet.webform.formEncode for encoding a dictionary/AA as a web form (by Etienne Cimon) - pull #748
  • BsonObjectID.fromString now throws an Exception instead of an AssertError for invalid inputs
  • Avoid using initialized static array for storing task parameters (by Михаил Страшун aka Dicebot) - pull #778
  • Deprecated the simple password hash functions due to their weak security - issue #794
  • Added support for serializing tuple fields
  • Added convertJsonToASCII to force escaping of all Unicode characters - see issue #809
  • Added a parameter to set the information log format for setLogFormat (by Márcio Martins) - pull #808
  • Serializer implementations now get the number of dictionary elements passed up front (by Johannes Pfau) - pull #823
  • Changed readRequiredOption to not throw when the --help switch was passed (by Jack Applegame) - pull #803
  • Added RestInterfaceSettings as the new way to configure REST interfaces
  • Implemented optional stripping of trailing underscores for REST parameters (allows the use of keywords as parameter names)
  • Made the message parameter of enforceHTTP lazy (by Mathias Lang aka Geod24) - pull #839
  • Improve the format of JSON parse errors to enable IDE go-to-line support
  • Removed all console and file system output from unit tests (partially by Etienne Cimon, [pull #852][issue852])
  • Improved performance of libevent timers by avoiding redundant rescheduling of the master timer
Bug fixes
  • Fixed BSON custom serialization of const classes
  • Fixed serialization of DictionaryList - issue #621
  • Fixed a bogus deprecation message for Diet script/style blocks without child nodes
  • Fixed an infinite loop in HTTPRouter when no routes were registered - issue #691
  • Fixed iterating over const(DictionaryList) (by Mathias Lang aka Geod24) - pull #693
  • Fixed an assertion in the HTTP file server that was triggered when drive letters were contained in the request path - pull #694
  • Fixed recognizing application/javascript in script tags to trigger the block syntax deprecation message
  • Fixed support for boolean parameters in web interfaces
  • Fixed falling back to languages without country suffix in the web interface generator
  • Fixed alignment of the backing memory for a TaskLocal!T
  • Fixed the port reported by UDPConnection.bindAddress when 0 was specified as the bind port (libevent)
  • Fixed busy looping the event loop when there is unprocessed UDP data - issue #715
  • Fixed exitEventLoop() to work when there is a busy tasks that calls yield() - issue #720
  • Avoid querying the clock when processing timers and no timers are pending (performance bug)
  • Fixed ManualEvent.wait() to work outside of a task (fixes various secondary facilities that use ManualEvent implicitly) - issue #663
  • Fixed encoding of StreamOutputRange.put(dchar) (by sinkuu) - pull #733
  • Fixed treating undefined JSON values as null when converting to a string - issue #735
  • Fixed using an id parameter together with @path in REST interfaces - issue #738
  • Fixed handling of multi-line responses in the SMTP client (by Etienne Cimon) - pull #746
  • Fixed compile error for certain uses of Nullable!T in web interfaces
  • Enable use of non-virtual access of the event driver using VibeUseNativeDriverType
  • Fixed building the "libev" configuration (by Lionello Lunesu) - pull #755
  • Fixed TaskLocal!T top properly call destructors after a task has ended (by Etienne Cimon) - issue #753, pull #754
  • Fixed the name of RedisDatabase.zcard (was Zcard)
  • Fixed a possible race condition causing a hang in MessageQueue.receive/receiveTimeout(by Ilya Lyubimov) - pull #760
  • Fixed RangeCounter to behave properly when inserting single char values
  • Fixed RedisDatabase.getSet (by Stephan Dilly) - pull #769
  • Fixed out-of-range array access in the Diet template compiler when the last attribute of a tag is value-less (by Martin Nowak) - pull #771
  • Fixed output of line breaks in the Markdown compiler
  • Fixed handling of the key argument of getRange, lrem and zincrby in RedisDatabase (by sinkuu) - pull #772
  • Fixed handling of Nullable!T and isISOExtStringSerializable parameters in REST interfaces
  • Fixed escaping of Diet tag attributes with string interpolations (by sinkuu) - pull #779
  • Fixed handling a timeout smaller or equal to zero (infinity) for RedisSubscriber.blisten (by Etienne Cimon aka etcimon) - issue #776, pull #781
  • Fixed handling of Unicode escape sequences in the JSON parser (by Etienne Cimon aka etcimon) - pull #782
  • Fixed HTTPServerRequest.fullURL for requests without a Host header - issue #786
  • Fixed RedisClient initialization for servers that require authentication (by Pedro Yamada aka yamadapc) - pull #785
  • Fixed the JSON parser to not accept numbers containing ':'
  • Removed an invalid assertion in HTTPServerResponse.writeJsonBody - issue #788
  • Fixed handling of explicit "identity" content encoding in the HTTP client (by sinkuu) - pull #789
  • Fixed HTTPServerRequest.fullURL for HTTPS requests with a non-default port (by Arjuna aka arjunadeltoso) - pull #790
  • Fixed detection of string literals in Diet template attributes - issue #792
  • Fixed output of Diet attributes using ' as the string delimiter
  • Fixed detection of numeric types in BsonSerializer (do not treat Nullable!T as numeric)
  • Fixed the REST interface client to accept 201 responses (by Yuriy Glukhov) - pull #806
  • Fixed some potential lock related issues in the worker task handler loop
  • Fixed memory corruption when TCPListenOptions.disableAutoClose is used and the TCPConnection outlives the accepting task - issue #807
  • Fixed a range violation when parsing JSON strings that end with [ or { - issue #805
  • Fixed compilation of MongoCollection.aggregate and support passing an array instead of multiple parameters - issue #783
  • Fixed compilation and formatting issues in the HTTP logger (by Márcio Martins) - pull #808
  • Fixed assertion condition in DebugAllocator.realloc
  • Fixed shutdown when daemon threads are involved - issue #758
  • Fixed some serialization errors for structs with variadic constructors or properties or with nested type declarations/aliases (by Rene Zwanenburg) - pull #817, issue #818, pull #819
  • The HTTP server now terminates a connection if the response was not completely written to avoid protocol errors
  • Fixed an assertion triggered by a server trying to write an error message when a response had already been made - issue #821
  • Fixed using TaskLocal!T with types that have certain kinds of "copy constructors" - issue #825
  • Fixed -version=VibeNoSSL (by Dragos Carp) - pull #834
  • Use "bad request" replies instead of "internal server error" for various cases where a HTTP request is invalid (by Marc Schütz) - pull #827
  • Removed a leading newline in compiled Diet templates
  • Fixed serialization of nested arrays as JSON (by Rene Zwanenburg) - issue #840, pull #841
  • Fixed OpenSSL error messages in certain cases (by Andrea Agosti) - pull #796
  • Fixed parsing of MongoDB URLs containing / in the password field (by Martin Nowak) - pull #843
  • Fixed an assertion in TCPConnection.waitForData when called outside of a task (libevent) - issue #829
  • Fixed an InvalidMemoryOperationError in HTTPClientResponse.~this()
  • Fixed a memory corruption issue for HTTPS servers (by Etienne Cimon) - issue #846, pull #849
  • Fixed low-precision floating point number output in JsonStringSerializer
  • Fixed compilation in release mode (not recommended for safety reasons!) - issue #847
  • Fixed low-precision floating point number output in the Redis client - [issue #857][issue857]
  • Fixed handling of NaN in the JSON module (output as undefined) (by David Monagle)- pull #860
  • Fixed the Redis subscriber implementation (by Etienne Cimon) - issue #855, pull #815
  • Fixed compilation of the Isolated!T framework - issue #801
  • Fixed an InvalidMemoryOperationError in DebugAllocator (by Etienne Cimon) - pull #848
  • Fixed detection of numeric types in JsonSerializer (do not treat Nullable!T as numeric) (by Jack Applegame) - issue #686, pull #869
  • Fixed error handling in Win32TCPConnection.connect and improved error messages
  • Fixed ping handling of WebSocket ping messages (by Vytautas Mickus aka Eximius) - pull #883
  • Fixed always wrapping the e-mail address in angular brackets in the SMTP client (by ohenley) - pull #887
  • Fixed custom serialization of const instances (by Jack Applegame) - pull #879
  • Fixed the RedisDatabase.set*X to properly test the success condition (by Stephan Dilly aka Extrawurst) - pull #890
  • Fixed sleep(0.seconds) to be a no-op instead of throwing an assertion error
  • Fixed a potential resource leak in HashMap by using freeArray instead of directly deallocating the block of memory (by Etienne Cimon) - pull #893
Posted at 17:44:25 +0200 by Sönke Ludwig 3 comments

DConf 2014 wrap-up of talks mentioning vibe.d

Header image
Fri, 05 Sep 2014 DConf 2014 again featured a lot of very interesting talks. This post presents four particularly interesting posts in the context of vibe.d related development. But on top of that it is of course highly recommended to also take a look at the complete list of talks.

This year's DConf is already over for a while now, but better late than never… The talks are packed with interesting topics and this post will mention a few particularly interesting ones in the context of developing with vibe.d.

Declarative programming in D

The Declarative programming in D talk by Михаил Страшун aka Dicebot talks about a programming paradigm that has become much more popular in the D community since the relatively recent introduction of user defined attributes. The gist of it is combining compile-time reflection together with compile-time code generation using a combination of templates, compile-time function evaluation (CTFE) and string/template mixins to be able to separate the "what" (what it achieves) of a component from the "how" (how this is actually implemented procedurally).

The prime examples in vibe.d for this are the and vibe.web.web modules, of which the former is presented as an example in the talk. The resulting code is usually a lot more modular and more concise than the procedural equivalent.

Mobile Gameserver Backend in D

Stephan Dilly aka Extrawurst talks about the implementation of a Mobile Gameserver Backend in D. This gives some insight in an actual production system made using modern web building blocks.

More interesting talks

Especially two other non-vibe.d related talks are also worth mentioning here. First there is the Case Studies In Simplifying Code With Compile-Time Reflection talk by Atila Neves about his MQTT broker, which, fitting right in with Dicebot's talk, focuses on the declarative approach that he took when implementing it. The MQTT broker is also written with vibe.d as its network layer and was used to carry out some comparative benchmarks.

The second talk is about Reducing D bugs by Vladimir Panteleev. He presents some of the tools that he made, which can be extremely useful when debugging and tracing back the origin of bugs. This talk is highly recommended for any D developer. Not also that the Dustmite tool is shipped together with DMD and is also integrated into DUB since version 0.9.22 (run dub dustmite --help).

Posted at 09:50:28 +0200 by Sönke Ludwig 0 comments

Pages: 1 2 3 4 5 6 7