www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [RFC] =?UTF-8?B?4oiFTVFELA==?= a =?UTF-8?B?4oiFTVE=?= wrapper for D

reply "Lars T. Kyllingstad" <public kyllingen.net> writes:
I've been working on a D wrapper for the ∅MQ (aka. ZMQ/ZeroMQ) 
messaging library, and I think it's nearly ready for an "official 
release".  However, I would immensely appreciate some feedback on 
the API first.

Code:  https://github.com/kyllingstad/zmqd
Docs:  http://kyllingstad.github.io/zmqd

I've tried to stay as close as possible to the design of the C 
library, while adding a distinct D "feel".  Details are in the 
documentation.

Note that my library is different from the ZeroMQ bindings in 
Deimos, which are simple D bindings to the C API.  (In fact, ∅MQD 
depends on the Deimos bindings.)

Thanks,
Lars
Dec 21 2013
next sibling parent reply "Kelet" <kelethunter gmail.com> writes:
On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad
wrote:
 I've been working on a D wrapper for the ∅MQ (aka. ZMQ/ZeroMQ) 
 messaging library, and I think it's nearly ready for an 
 "official release".  However, I would immensely appreciate some 
 feedback on the API first.

 Code:  https://github.com/kyllingstad/zmqd
 Docs:  http://kyllingstad.github.io/zmqd

 I've tried to stay as close as possible to the design of the C 
 library, while adding a distinct D "feel".  Details are in the 
 documentation.

 Note that my library is different from the ZeroMQ bindings in 
 Deimos, which are simple D bindings to the C API.  (In fact, 
 ∅MQD depends on the Deimos bindings.)

 Thanks,
 Lars
Hi Lars, I've actually never used ZeroMQ but it seems interesting. There exists a binding called dzmq[1], but there are no immediate examples. Anyhow, if I may, I'd like to suggest a few things: * Add a license file to your repository. I see that it's under the Boost Software License from the documentation, though. * Create a package.json and add it to the DUB registry[2]. I have taken the liberty at making a simple package.json that may work but is untested[3]. [1]: https://github.com/kyphelps/dzmq [2]: http://code.dlang.org/ [3]: $ cat package.json { "name": "zmqd", "targetType": "sourceLibrary", "description": "a ZeroMQ wrapper for the D programming language", "homepage": "https://github.com/kyllingstad/zmqd", "copyright": "Copyright (c) 2013, Lars Kyllingstad", "license": "Boost Software License, version 1.0", "authors": [ "Lars Kyllingstad" ], "importPaths": ["."], "sourcePaths": ["."], "excludedSourceFiles": ["examples/*"], "dependencies": { "zeromq": "~master" } } Regards, Kelet
Dec 21 2013
next sibling parent reply "Lars T. Kyllingstad" <public kyllingen.net> writes:
On Sunday, 22 December 2013 at 01:49:59 UTC, Kelet wrote:
 Hi Lars, I've actually never used ZeroMQ but it seems
 interesting. There exists a binding called dzmq[1], but there 
 are
 no immediate examples.
I looked for something like this before I started, so I wouldn't duplicate any pre-existing efforts, but didn't find anything. (From the commit log it seems kyphelps started work on his wrapper a month after I started on this.)
 Anyhow, if I may, I'd like to suggest a few things:

 * Add a license file to your repository. I see that it's under
 the Boost Software License from the documentation, though.
Good idea, I'll do that.
 * Create a package.json and add it to the DUB registry[2]. I 
 have
 taken the liberty at making a simple package.json that may work
 but is untested[3].
I've never used DUB myself, but I will try to use your package file. Thanks!
Dec 22 2013
parent Martin Nowak <code dawg.eu> writes:
On 12/22/2013 09:34 AM, Lars T. Kyllingstad wrote:
 * Create a package.json and add it to the DUB registry[2]. I have
 taken the liberty at making a simple package.json that may work
 but is untested[3].
I've never used DUB myself, but I will try to use your package file. Thanks!
Add a CI tester. https://github.com/MartinNowak/bloom/blob/master/.travis.yml
Dec 22 2013
prev sibling parent "Lars T. Kyllingstad" <public kyllingen.net> writes:
On Sunday, 22 December 2013 at 01:49:59 UTC, Kelet wrote:

 * Create a package.json and add it to the DUB registry[2].
The "zmqd" package is now available through the DUB registry.
Dec 22 2013
prev sibling next sibling parent reply "Kelet" <kelethunter gmail.com> writes:
On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad
wrote:
 I've tried to stay as close as possible to the design of the C 
 library, while adding a distinct D "feel".  Details are in the 
 documentation.
After reviewing the API and comparing it to the C API, I think you did a fine job accomplishing this. Regards, Kelet
Dec 21 2013
next sibling parent reply "Lars T. Kyllingstad" <public kyllingen.net> writes:
On Sunday, 22 December 2013 at 01:56:10 UTC, Kelet wrote:
 On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad
 wrote:
 I've tried to stay as close as possible to the design of the C 
 library, while adding a distinct D "feel".  Details are in the 
 documentation.
After reviewing the API and comparing it to the C API, I think you did a fine job accomplishing this.
Thanks! :)
Dec 22 2013
parent reply Philippe Sigaud <philippe.sigaud gmail.com> writes:
 After reviewing the API and comparing it to the C API, I think
 you did a fine job accomplishing this.
I concur. zmqd user code looks much cleaner than the original C code. Kudos to you! I also like the docs. I see you used your own ddoc file (https://github.com/kyllingstad/ltkdoc). Clean and to the point. I might steal it :) Btw, there should be a place to put third parties ddoc templates. Maybe a wiki page?
Dec 22 2013
parent "Lars T. Kyllingstad" <public kyllingen.net> writes:
On Sunday, 22 December 2013 at 12:52:23 UTC, Philippe Sigaud 
wrote:
 After reviewing the API and comparing it to the C API, I think
 you did a fine job accomplishing this.
I concur. zmqd user code looks much cleaner than the original C code. Kudos to you!
Thanks!
 I also like the docs. I see you used your own ddoc file
 (https://github.com/kyllingstad/ltkdoc). Clean and to the 
 point. I
 might steal it :)
I'm glad to hear it, feel free to do so. :) I've long been looking for a simple and clean zero-configuration DDOC theme, but have yet to find one, so I finally just made it myself.
Dec 22 2013
prev sibling parent "Jonathan Dunlap" <jadit2 gmail.com> writes:
+1 The API surface feels fantastic! This is EXACTLY the kind of D 
bindings I would wish for when we bind to existing C libraries. 
It adds just enough D flavor to soften the edges of the client 
implementation; while not substantially changing the core library 
surface (which helps when you have to update the bindings when 
updates to the C version arrive).

This is the kinda stuff I wish we had for: CUDA, OpenCL, MPI and 
(to a lesser extent) OpenGL.

Cheers!

On Sunday, 22 December 2013 at 01:56:10 UTC, Kelet wrote:
 On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad
 wrote:
 I've tried to stay as close as possible to the design of the C 
 library, while adding a distinct D "feel".  Details are in the 
 documentation.
After reviewing the API and comparing it to the C API, I think you did a fine job accomplishing this. Regards, Kelet
Dec 22 2013
prev sibling parent reply "Rikki Guy" <dlang rikkiguy.me.uk> writes:
Brilliant! I've found myself in need of this exactly, and had 
just started on my own - you have saved me a lot of work!

On Sunday, 22 December 2013 at 00:18:51 UTC, Lars T. Kyllingstad 
wrote:
 I've been working on a D wrapper for the ∅MQ (aka. ZMQ/ZeroMQ) 
 messaging library, and I think it's nearly ready for an 
 "official release".  However, I would immensely appreciate some 
 feedback on the API first.

 Code:  https://github.com/kyllingstad/zmqd
 Docs:  http://kyllingstad.github.io/zmqd

 I've tried to stay as close as possible to the design of the C 
 library, while adding a distinct D "feel".  Details are in the 
 documentation.

 Note that my library is different from the ZeroMQ bindings in 
 Deimos, which are simple D bindings to the C API.  (In fact, 
 ∅MQD depends on the Deimos bindings.)

 Thanks,
 Lars
Dec 23 2013
parent "Lars T. Kyllingstad" <public kyllingen.net> writes:
On Monday, 23 December 2013 at 23:28:19 UTC, Rikki Guy wrote:
 Brilliant! I've found myself in need of this exactly, and had 
 just started on my own - you have saved me a lot of work!
Glad to be of assistance. :) If you run into any problems with the library, please report them here: https://github.com/kyllingstad/zmqd/issues
Dec 24 2013