Re: [vos-d] revamping vosapp config files

2005-10-17 Thread Reed Hedges


Yes, this is a good idea. Terangreal could use the same mechanism (it already
stores preferences in properties but does not save them).

> This would also mean that if the module added a listener to the vobjects 
> in the configuration tree, it could be reconfigured on the fly.  It would 
> also be possible to dump the configuration to a COD file and reload it.

Maybe we need a version of COD that is plain text? (Also useful for Terangreal's
config file)

> I should mention one neat ability of the current (old) system that would 
> have to be dropped is the ability to set configuration paramaters via 
> environment variables and the command line.  
...
> I don't think we can keep this feature if we decide to 
> allow options to show up more than once in the configuration, and for it 
> to be order-sensitive.

I think we can expand the feature for multiple command line arguments easily.  
This is a very useful feature of vosapp, since it takes care of one of the
most annoying aspects of making a command line app.

For environment variables, you just need to parse the value of the variable:

VOSAPP_COD_FILES="file1.cod file2.cod \"file 3.cod\" file\ 4.cod"

or do something like this:

VOSAPP_COD_FILE_1="file1.cod"
VOSAPP_COD_FILE_2="file2.cod"
...

Reed

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


[vos-d] Re: revamping vosapp config files

2005-10-17 Thread Lalo Martins
may I suggest YAML (www.yaml.org) or a subset thereof?

best,
   Lalo Martins
--
  So many of our dreams at first seem impossible,
   then they seem improbable, and then, when we
   summon the will, they soon become inevitable.
--
http://www.exoweb.net/  mailto:[EMAIL PROTECTED]
GNU: never give up freedom http://www.gnu.org/


___
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 Peter Amstutz

-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


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