Saturday, July 12, 2008

DOS CMD Variable Editing

http://www.ss64.com/ntsyntax/varsearch.html

Can replace value of a variable at quote time.
E.g. if variable "mypath" is "C:\Temp\Test",
and I quote it using "%mypath:\=\\%",
then it comes out as "C:\\Temp\\Test".

Wednesday, July 09, 2008

Google Releases Protocol Buffer Serialisation Framework

Today Google released their Protocol Buffer serialisation framework into open source. There is a blog about it, and here is the news item comparing it to XML.

The docs are here.

It looks pretty cool, and easy to use. It will encode to little endian on the wire, with very compact and optimised encoding, including 128 *varint* and zig-zag encoding (which encodes and decodes with just 3 bitwise operations). Backwards compatibility is handled as well (so long as we only extend the message field ID and not reuse previous ones). So far there are only 3 language bindings: C++, Java, and Python. Unfortunately there is no C# mapping yet.

This serialisation framework is optimised for speed and efficiency, and versioning/compatibility. The language binding from spec (.proto) files saves the need for writing hand-coded serialisation code for every class in your library, or for classes in different languages in your system needing to communicate with each other.

Details of the encoding is here.

The language guides are here, and the API reference is here.

There are also some tutorials, including a C++ tutorial.

Tuesday, July 01, 2008

Google C++ coding guidelines