Re: [mmox] XML serialization

Jon Watte <> Tue, 24 February 2009 01:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id B95F128C1C6 for <>; Mon, 23 Feb 2009 17:21:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.517
X-Spam-Status: No, score=-2.517 tagged_above=-999 required=5 tests=[AWL=0.082, BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id fkbe0U2vmo0h for <>; Mon, 23 Feb 2009 17:21:22 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id C8D0128C0DF for <>; Mon, 23 Feb 2009 17:21:21 -0800 (PST)
Received: by with SMTP id b2so1223644ana.4 for <>; Mon, 23 Feb 2009 17:21:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ItENfNv59NiHqP/qnjH+PFylnj1vF1ltvkk1OE90vmc=; b=LapcCAIU1kRl4sGADr0mI2abRe8b8v8Cbg6oKMnA8SoWA4GreqsyPY5tX9PVFe45vA z3UoaJRkpI3n4JV75VtlgoZNhGyx3YmdCuF97UI0KEX2n52m9hTVkkTaSjHD3sti4mhx ZepD65igqNsKTh4mSyOflP/OL+3xFsl25uV9I=
DomainKey-Signature: a=rsa-sha1; c=nofws;; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=jgBt3Ah6V5cYEeqI/h4FpI3pBZzvSdnArM0QPZzLL2sc/JBhrthum3zCR9/4G0FWer lpMg8Gw4MEUarpv44QkOhO1E4Z0dtKekmzf/MY3kRNkS0bjee+oj4kdbb/LGFxfpDWLT q+VAK6FRuU2hAm87DbY8VR0DvWYbfIPT0x/vM=
Received: by with SMTP id g1mr4548757and.106.1235438493005; Mon, 23 Feb 2009 17:21:33 -0800 (PST)
Received: from ? ( []) by with ESMTPS id b29sm6043918ana.11.2009. (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Feb 2009 17:21:32 -0800 (PST)
Message-ID: <>
Date: Mon, 23 Feb 2009 17:21:30 -0800
From: Jon Watte <>
User-Agent: Thunderbird (Windows/20081209)
MIME-Version: 1.0
To: "Hurliman, John" <>
References: <> <> <> <> <> <> <>
In-Reply-To: <>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: "" <>
Subject: Re: [mmox] XML serialization
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Massively Multi-participant Online Games and Applications <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 24 Feb 2009 01:21:22 -0000

Hurliman, John wrote:
> length integer encoding (such as the base-128 varints used in Google Protocol Buffers: would be a nice fix for the binary encoding.

That needs a fix for signed-ness, though. My proposal is to encode the 
sign bit in the 6th bit of the first byte IF the value is less than 0 or 
greater than 127 (keeping the encoding of small positive integers to a 
single byte). For negative numbers, encode the one's complement and the 
sign bit, and negate when done. This nicely sidesteps problems you'd get 
when trying to encode two's complement in a variable-width container. 
But that might be a slightly premature technical detail ;-)

> -1 on this. The LLIDL syntax is very easy to parse, and I posted a simple grammar file to generate a lexer/parser. Introducing a new XML schema creates just as much implementation 

My point is that XML for a schema language is even easier to parse:

xd = new System.Xml.XmlDocument();

Done. And this allows various code bases to easily adopt various levels 
of knowledge of the serialized data using existing tools, instead of 
having to add yet another kind of language parser with yet another set 
of mutually ambiguous or buggy implementations.