Re: [vos-d] Re: revamping vosapp config files

2005-10-22 Thread Reed Hedges
Peter Amstutz wrote:
 Well, I haven't had a chance to sit down and work on this, but basically
 I have a few principals I want to follow:
 
  1) It should be very easy to write by hand.  Requiring less typing than
 XML for example.
  2) It should be readable and scan well, minimize extraneous and
 magical punctuation.  It should be somewhat context-sensitive.

Well one of the easiest things to immediately grasp is simple key=value
pairs.  I think we will need some kind of grouping syntax though.  This
could be Python-style and just use indenting, or use actual start and
end markers.

objectname =
  types = ...
  childobject =
...
  type-specific = val
nextobject =
  ...

or

objectname {
  types = type1, type2, type3
  childobject {
types = ...
  }
  type-specific-key = value
  type-specific-key = value
  children = childreference, childreference
}


e.g.

terangreal {
  avatar {
types = misc:avatar
misc:nick { 
  # Since a property key is given (the loading code will have
  # a list of these, added by metaobjects), we can
  # assume this object has property:property
  # type and don't make them specify that:
  property:value = reed
  property:type = text/plain
}
# Or maybe you should be able to just do this, and assume that
# any unknown keys mean to create a property with the given value:
misc:fullname = Reed Hedges
  }
  bookmarks
  {
# A comma could let you continue on a new line
# (like Python I think, and gnu awk, let you do):
children = vip://interreality.org/world,
  vip://interreality.org/otherworld,
  vip://blacksun.com/world
  }
  example:xyzzy {
# referencing other objects in this config file:
children = avatar, bookmarks, vip://foo.bar/baz
  }
}



  5) It should be suitable for writing anything from simple configuration
 files up to complete worlds.

I think we should favor simple configuration files over complete
world, i.e., not worry that much about parsing efficiency or whatever,
since binary COD does pretty well at that.

Reed


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Re: revamping vosapp config files

2005-10-22 Thread Reed Hedges
Reed Hedges wrote:
 Well one of the easiest things to immediately grasp is simple key=value
 pairs.


And then they're always the good old INI format that everyone knows and
loves or hates, though it doesn't really do hierarchy so well


[objectname]
key = value
key = value
key = value

[objectname]
key = value
key = value




(... just throwing ideas into the pot, sorry for so many messages! ...)

___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d


Re: [vos-d] Re: revamping vosapp config files

2005-10-17 Thread Reed Hedges
Peter Amstutz wrote:
 On Tue, 18 Oct 2005, Lalo Martins wrote:
 
 may I suggest YAML (www.yaml.org) or a subset thereof?
 
 
 It's a thought.  Despite support for a bunch of scripting languages,
 it's not clear if there is a C library available for it.  However I
 can't say I'm thrilled by the syntax, and the specification is
 supprisingly hefty. For our purposes, we actually want something that is
 a little bit specialized towards the structure of Vobjects, because VOS
 itself is the generic data structure that everything fits into.
 
 So I agree, this is a good opportunity to look into designing a text
 version of Compact Object Description (COD), so what would that be, Text
 Object Description (TOD)? :-)
 
 Off the top of my head, some possible meta-syntaxes we might want to
 look at for representing structed data:
 
 XML
 YAML
 S-Expressions (lisp-style syntax)


Some lightweight thing easily parsed by spirit maybe...


# Object with three types but no children
foo (type1,type2, type3)

# OBject with type-specific information in it, also a child
bar (property:property)
{ Property data; text/plain }
[foo;]


# Object with no types but 3 children
baz
[   
foo;
bar;
bar;
];


... or whatever other thing you come up with ...


___
vos-d mailing list
vos-d@interreality.org
http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d