[zeromq-dev] cl-zmq - Common Lisp bindings
lucas.r.hope at gmail.com
Tue May 31 11:31:19 CEST 2011
First, thanks for making such a great, easy to use product. The guide is a
great education in distributed programming. I have learned so much just by
I am using the Common Lisp bindings as I am a Common Lisp programmer. :-)
I have found a few issues and am happy to contribute, but I want to make
sure I'm following the right protocols. I am an experienced lisp programmer,
but not so experienced at contributing to open source projects. I want to
help with my expertise because this zeromq library is awesome. :-)
Here are a couple of issues I have found:
1. Some of the constants are missing. E.g. router, dealer, and particularly
2. The implementation of setsockopt assumes all ints are int64. In some
cases such as ZMQ_LINGER, this is not the case. :-)
Here is my replacement setsockopt:
(defun setsockopt (socket option value &optional (int-type :int64))
(string (with-foreign-string (string value)
(%setsockopt socket option string (length value))))
(integer (with-foreign-object (int int-type)
(setf (mem-aref int int-type) value)
(%setsockopt socket option int (foreign-type-size
So it defaults to :int64 (current behaviour), but you can pass :int and
things like ZMQ_LINGER now work.
Also, I have implemented versions of ppqueue, ppworker and lpqueue for
common lisp (mainly line-for-line ports of the C++). I am happy to donate
them to the zguide - but again, not sure of the protocol.
Peace, and again thanks for a great product.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev