[e-lang] [RFP] cross-language object serialization (E <---> Squeak-E)

Robert Withers rwithers12 at attbi.com
Wed Jan 22 01:59:43 UTC 2003


Tyler,  thank you for the examples.  I am looking forward to seeing how 
fast the parser for your state-machine will be.  It will be pretty 
fast, especially when, instead of building the Doc tree we Sax it and 
build the object graph directly.

If there happen to be some squeakers looking for a little project, 
implementing the encoder/decoder would be an idea... ;-)  Otherwise it 
may be a month or 2 before I could get to it.   I must finish CapTP and 
look to really isolate the Vat.

cheers,
rob

On Tuesday, January 21, 2003, at 10:10 AM, Tyler Close wrote:

> On Tuesday 21 January 2003 10:40, Robert Withers wrote:
>> Could you post an example Doc tree and a XML-text mode encoding and
>> doc-code encoding of the following 3 scenarios, please?  It would be
>> useful to see what we will be dealing with.
>
> Download the Doc, ADT and Enc distributions from:
>
> http://waterken.com/download/
>
> To convert from XML to doc-code:
>
> java -cp safe/doc.jar com.waterken.doc.code.FromXML <filename>
>
> To convert from doc-code to XML:
>
> java -cp safe/doc.jar com.waterken.doc.code.ToXML <filename>
>
>> 1)  an association with key:  'the answer is' and value: 42
>
> Do you mean a map collection like: [ "the answer is" => 42 ]
>
>> 2) an instance of class Foobar (inst vars: question, answer) with
>> question := 'the answer is' and value := 42.
>
> <doc schema="file:///Foobar">
>     <question>the answer is</question>
>     <answer>42</answer>
> </doc>
>
> This assumes that the schema for <file:///Foobar> is:
>
> <doc schema="file://waterken.com/doc/schema/Schema>
>     <annotation schema="file://waterken.com/doc/schema/Comment"/>
>     <unordered>true</unordered>
>     <children>
>         <key_schema>file://waterken.com/adt/string/String</key_schema>
>         
> <value_schema>file://waterken.com/doc/schema/Branch</value_schema>
>
>         <element>
>             <key>question</key>
>             <value>
>                 <annotation 
> schema="file://waterken.com/doc/schema/Comment" />
>                 
> <implicit>file://waterken.com/adt/string/String</implicit>
>                 <arity schema="file://waterken.com/doc/schema/Once" />
>
>                 The question.
>             </value>
>         </element>
>         <element>
>             <key>answer</key>
>             <value>
>                 <annotation 
> schema="file://waterken.com/doc/schema/Comment" />
>                 <implicit>file://waterken.com/Integer</implicit>
>                 <arity schema="file://waterken.com/doc/schema/Once" />
>
>                 The answer.
>             </value>
>         </element>
>     </children>
>
>     A property of the universe.
> </doc>
>
>> 3) a OrderedCollection of instances of Foobar
>
> <doc schema="file://waterken.com/adt/linear/Queue">
>     <element>
>         <value schema="file:///Foobar">
>             <question>the answer is</question>
>             <answer>42</answer>
>         </value>
>     </element>
>     <element>
>         <value schema="file:///Foobar">
>             <question>or maybe it is</question>
>             <answer>24</answer>
>         </value>
>     </element>
> </doc>
>
> Tyler
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
>



More information about the Squeak-dev mailing list