swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what is "expr" in serialization methods of collections?


From: Marcus G. Daniels
Subject: Re: what is "expr" in serialization methods of collections?
Date: 03 Mar 2002 11:39:31 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.7

>>>>> "PJ" == Paul Johnson <address@hidden> writes:

PJ> In many methods of swarm's collections library, such as lispIn: or
PJ> lispInCreate:, the input is "expr".  Is expr always a Swarm List?

expr is a List of Lists and of various special objects.  It's the
parse tree of an expression in a .scm file.  The special objects are
instances of the classes Archiver{Keyword,Array,Value,Pair,List,Quoted}. 

A keyword is what you get with the syntax "#:position" or "position:".
An array is syntax like "#2((1 2) (3 4))".  A two dimensional array
with the first row with the values 1 and 2 and the second row with the
values 3 and 4.  A Value is the object you get for any kind of scalar.
A Pair is the syntax (1 . 2).  A List is a set of these objects.
Finally, a Quoted value is usually used for quoting symbols in lists,
i.e. for making identifiers.  In Scheme, unquoted symbols otherwise
evaluate to values.  See src/collections/*Stream*.m for the code for this.

Although Lisp serialization is stream-oriented, the Archiver can cache
these parse trees without evaluating them (instantiating the objects
they describe).  With HDF5, instead of these expr trees, there are
HDF5 controller objects that manage the storage of objects.

Also, thereare some testing functions in predicates.m that may be of 
use, e.g. keywordp (obj), that tests to see if an object (in an expression)
is a serialization keyword.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]