ANN: protocol-buffers (very early edition) version 0.0.5

Chris Kuklewicz haskell at list.mightyreason.com
Fri Jul 11 20:05:12 EDT 2008


Hi all,

   The Haskell version of protocol-buffer is still pre-bootstrap, but further, 
so there is a 0.0.5 release on
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/protocol-buffers
and a darcs repository on
http://darcs.haskell.org/packages/protocol-buffers/

The leading 0.0 in the type should show how early this code is :)

What are protocol buffers? The are google's data interchange format:
http://code.google.com/apis/protocolbuffers/docs/overview.html

> What are protocol buffers?
> 
> Protocol buffers are a flexible, efficient, automated mechanism for
> serializing structured data – think XML, but smaller, faster, and simpler. You
> define how you want your data to be structured once, then you can use special
> generated source code to easily write and read your structured data to and from
> a variety of data streams and using a variety of languages. You can even update
> your data structure without breaking deployed programs that are compiled against
> the "old" format.

In addition to a manual translation of the self describing 'decriptor.proto' it 
has a partial code generator in Gen.hs and a stub of a parser in ProtoParser.hs 
and an intermediate data type in WireMessage.hs that I expect to sit between the 
byte stream reader/writer and the message types.

Eventually the parser with read 'decriptor.proto' and the generator will emit 
source code to replace the manual translation.

FAQ 1: Why is the Text.DescriptorProtos.* hierarchy so huge and the imports so 
plentiful?

ANSWER 1: The namespace management.  The namespace paradigm is the nested OO 
style namespace of C++, so I need modules and imports to fake nested Haskell 
namespaces.

Cheers,
   Chris Kuklewicz




More information about the Libraries mailing list