Re: [vos-d] Re: revamping vosapp config files
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
Reed Hedges wrote: > Peter Amstutz wrote: >> It should be somewhat context-sensitive. > 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 > } ANother way to help people out is to make the prefixes optional if you've given an object a type: avatar { types = misc:avatar nick { types = property:property value = reed type = text/plain } } "expands" to: avatar { types = misc:avatar misc:nick { types = property:property property:value = reed property:type = text/plain } ___ 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
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. = types = ... = ... = = ... or { types = , , { types = ... } = = children = , } 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
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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. 3) It should be able to represent any arbitrary collection of Vobjects. 4) It should include shorthand syntax for common operations like defining property objects (possibily acomplished through a macro preprocessing step). 5) It should be suitable for writing anything from simple configuration files up to complete worlds. For the former task, there should be an absolute minimum of overhead (in the sense of minimizing the amount of typing required to define a property, going along with (4)). 6) Going along with (5), we'll probably want the ability to include directives to load other COD files. So it'll be the holy grail, basically :-) But I haven't yet decided how it's going to look... On Mon, 17 Oct 2005, Reed Hedges wrote: Peter Amstutz wrote: 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 ... [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDWAFdaeHUyhjCHfcRAlLjAKCz0g4lqBHCI/m4M/8s3Ws+uCdEjQCfdqvG THISXIG0J81/aeT2TTtVrdw= =iFbN -END PGP SIGNATURE- ___ 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
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
Re: [vos-d] Re: revamping vosapp config files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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) Any others? [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDU/RRaeHUyhjCHfcRAkKqAJ9ObOUvu9kT0lM+3fgiJmlYhIw1EwCePGv8 5GTYDRZ/ZYj3FQdPQbJ629E= =VPDl -END PGP SIGNATURE- ___ vos-d mailing list vos-d@interreality.org http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d