I have released a new version of my serialization library. I hope no one has dug in too far on using it yet because I rearranged the interface a fair bit in this release. To accommodate more complex serializers and unserializers as well as supporting a with-buffer macro, the buffer is no longer the first argument to the serialize and unserialize methods. Now, it is a &key argument to the serialize and unserialize generics. Further, the serialize and unserialize generics also &allow-other-keys.
In an intervening and unannounced release, I added serializers for slots and accessors.
In this release, I have also really fleshed out the documentation and examples.
For instructions on obtaining and using the USerial library, please refer to the USerial library web page.
Edit: This had been v0.3.2011.03.04, but I made a minor update to add MIT License and correct a few glitches in the docs. Now, it’s v0.3.2011.03.05.
just out of curiosity, have you tried hu.dwim.serializer?
if yes, then it would be interesting to read in the documentation about the reasons why you rolled your own as opposed to using or extending one of the other serializer libraries? what was the motivation for a new one?
I didn’t know about the hu.dwim.serializer package at all. I searched through the networking category on Cliki.net, searched Cliki, and searched Google. The things that I found were CL-Store which is stream-oriented and the S-SERIALIZATION package which is XML-oriented. I was looking to go to binary buffers.
As for how my library differs from the hu.dwim library, I’m not sure yet. Do you have a link that I can explore for documentation and/or examples? The documentation subdirectory in the DARCS repository is only an outline.
From what I can tell in the source, my library avoids something that I don’t think the hu.dwim library does. I wanted to be able to define multiple, different serializers for the same object/type. One reason that I wanted this decoupling of serializer from type is that there are cases where one doesn’t want to send all of the information contained in a class to all clients. Additionally, I hope to be able to use my library to prepare packets for a variety of protocols, so I wanted to be able to make serializers for 32-bit unsigned integers that encoded them most-significant-byte first and ones that encoded them least-significant-byte first.
Maybe the hu.dwim library is really capable of this. I haven’t followed back through the dependencies enough to know whether some of these things are CLOS methods instead of functions or how (def (function o) …) differs from (def (function oe) …), etc.