Re: [vos-d] Re: sample VOS XML

2005-10-25 Thread Neil Mosafi
OK I know (unfortunately) I've not been paying huge attention to recent VOS going ons but I would say that I'd be highly inclined to go down the XML route here.  As you said, XML is pretty much the norm nowadays for describing any form of arbitrary data. Other reasons I can think of for going with XML are:

 
- XML can be validated (using XSD) and transformed (using XSLT), which could both prove to be useful for VOS in the future
- XML parsers exist for every platform out there from PDA to supercomputer!
- Syntax highlighting is built in to most editors (vi, notepad2, textpad, visual studio etc).  Some of these can even link to the XSD file and can provide you real time validation as you type
- There are also lots of XML editors out there which can give you a graphical or collapsable view of your XML configuration file
- There are lots of other bolt-on technologies and standards related to to XML, such as XML signing, XML encryption and SOAP web services.
 
Regards
Neil
 
  
On 10/25/05, Peter Amstutz <[EMAIL PROTECTED]> wrote:
-BEGIN PGP SIGNED MESSAGE-Hash: SHA1On Tue, 25 Oct 2005, Lalo Martins wrote:> And so says Peter Amstutz on 10/24/05 01:29...
>> Alright, I've come around and decided that maybe an XML representation>> is the way to go.  Here's a sample file that demonstrates how it might>> look:>> Yuck.  Can I insist on YAML?  :-P
>> It looks horrible, and I really don't think XML is the best choice for> *anything* that has to be written, read, and edited by humans.Ok then, for comparison's sake, here's how it might look in YAML:
Site:# Site consists of one or more root vobjects  - Vobject: worldType: a3dl:sector# (optional) defines access control policy for this vobject and#  all children that don't define their own access control policy
Acl:  - Policy: core:accept-all,property:deny-all- Member: /phred- Member: /barneyChildren:# Shorthand for defining a child vobject property  - Property: example
Datatype: text/plainData: Data goes here# Link to a vobject on a remote site  - Link: bloxxTo: vip://interreality.org/bloxx
# Link to a vobject on the local site - Link: that-guyTo: /phred# Can also specify a child object and supply datablocks (so it is# loaded via the persistance interface)  - Child: another-example
Type: property:propertyBlocks:  - Name: property:dataData: Hello there  - Name: property:datatypeData: text/plain# Child nodes are processed recursively the same way as vobject nodes
  - Child: an-objectType: a3dl:object3d.cube- Property: a3dl:position  Data: 1 2 3- Property: a3dl:orientation  Data: 0 1 0 90- Child: a3dl:material
  Type: a3dl:material  - Property: a3dl:colorData: .3 .5 .7# Can define additional vobjects which are not connected to the# first vobject- Vobject: phred  Type: core:identity,misc:avatar
- Vobject: barney  Type: core:identity,misc:avatarNumber of lines in XML: 45Number of of lines in YAML: 53This represents a fairly literal translation of the proposed XML grammar
to a YAML grammar.  There may be a better way to do it...  Or it may bethat there are restrictions in the data model that I'm not seeing, whichwould require expanding the structure a bit more.Alright, my comments.  First off, I'm not keen whitespace-sensitive
syntaxes in general.  Python (for example) is nice and all, but in myexperience whitespace sensitivity just makes tasks like cutting andpasting blocks of code a huge pain in the ass, because it's impossible to
have the editor autoformat your code.  Also, as you can see above, whenyou start inserting comments and empty lines, or a data block becomesparticularly large, it becomes increasingly hard to keep track of
indentation level.  So I don't feel it is huge advantage in readabilityand editing that people make it out to be.My second issue is that it doesn't seem to directly support the notion ofa "associative array" which is at the heart of VOS.  It has a sequence
type, and a mapping type, but no ordered, associative sequence type.This makes specifying heterogenous lists (such as the child list, whereeach entry can be an embedded object, a link, or a property) at best a bit
less elegant, at worst impossible (I haven't looked closely enough at theschema language yet).Third, it's not clear there is even a working C++ or C implementation of aYAML parser, and I don't intend to write my own.
Reasons I've come around to XML, despite not liking it initially:* Parts of VOS were deliberately based on XML DOM -- this is why HyperVOSworks so well.  So mapping VOS into XML isn't that much of a stretch.
* Everybody and their dog knows XML and is already comfortable with thesyntax.* Rich toolset and library support for every language, OS and platform.* It's the magical XML pixie dust that makes everything more exciting!!!
I do agree

[vos-d] Re: here's another format :-)

2005-10-25 Thread Lalo Martins
I like this quite a bit.  "Explicit is better than implicit" when
compared to YAML, "Simple is better than complex" when compared with
XML, and all in all, "Beautiful is better than ugly, readability counts".

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: here's another format :-)

2005-10-25 Thread Peter Amstutz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 25 Oct 2005, Lalo Martins wrote:


I like this quite a bit.  "Explicit is better than implicit" when
compared to YAML, "Simple is better than complex" when compared with
XML, and all in all, "Beautiful is better than ugly, readability counts".


Well, I'm waiting for Reed to weigh in, but at this point I'm still 
leaning towards XML for most of the reasons that Neil stated in his email 
(mainstream standard, can be validated, editor/tool support etc).  I 
should point out here that the proposed XML and alternate language are 
basically structurally identical, the difference is merely the specifics 
of syntax, so there's no reason we couldn't eventually have both and even 
be able to cleanly convert between them.


For the time being, however, the practical reasons for using XML override 
the aesthetic reasons of going with an alternative.  Worse is better...


[   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)

iD8DBQFDXpmsaeHUyhjCHfcRAsYDAJ43Cl1EqU2edBEUaxuc4SO/5fPf0ACfUQ8S
m3keMomF/tRu6Tq/qzFjpKQ=
=aP59
-END PGP SIGNATURE-


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


Re: [vos-d] sample VOS XML

2005-10-25 Thread Reed Hedges

I'm also inclined to avoid XML a bit, though it will be attractive to people 
who want
to convert from other XML formats, and simply for buzzword compliance. Also, I
have a python script that creates vobjcets from XML and it was pretty easy to
write, I haven't added it to CVS yet since it can't deal with authorization
login yet due to some weird problem with swig.

...
What the hell does "href" mean?  ;)

Reed


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


Re: [vos-d] sample config file in XML

2005-10-25 Thread Reed Hedges
On Sun, Oct 23, 2005 at 01:31:03PM -0400, Peter Amstutz wrote:
> 
>  

One issue with using this syntax for what are ostensibly just "configuration"
files is that using terms like site and vobject here might confuse users who
know little or nothing about how VOS works.

> 
>   
>   

What does sws mean?

>   
>   
>  name="vosapp:plugin-path">plugins/.libs/libomniplg_cod.so
> worlds/blocks
>   

Again, XML forces you to be explicit about naming these element types, so to an
outsider it seems strange to have a child XML element named "child" (isn't that
redundant?) with a magic type.

Reed



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


[vos-d] Re: sample VOS XML

2005-10-25 Thread Lalo Martins
And so says Reed Hedges on 10/26/05 05:08...
> What the hell does "href" mean?  ;)

The "h" is for hyper or hypertext or somesuch.

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