Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Open Human Readable Computer Aided Design file format

by ewilhelm (Novice)
on Oct 08, 2005 at 18:11 UTC ( #498439=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Open Human Readable Computer Aided Design file format
in thread Open Human Readable Computer Aided Design file format

The beauty of using YAML is that it works well with simple shell tools like grep and also diff's well because a change of one property involves a change of one line. XML is too often stored without linebreaks, not to mention what happens when you add linebreaks and then diff that.


Comment on Re^4: Open Human Readable Computer Aided Design file format
Re^5: Open Human Readable Computer Aided Design file format
by jdporter (Canon) on Oct 10, 2005 at 19:31 UTC

    Obviously, line-oriented tools, such as grep and diff, are mismatched to XML. A proper XML toolset operates on the data structures, not on the raw text.

    The "one difference, one line" feature is nice... but it doesn't include any context, i.e. where in the data structure the different element is; you'd have to do something else to reveal that (e.g. load it in an editor). An XML diff'ing tool can report such context, because it knows it.

    Don't misunderstand me — I'm not defending XML. I know it has its problems. But — unlike yaml — being gratuitously different isn't one of them.

      ...but it doesn't include any context...

      Ahh, but one-entity, one-file gives most of the context you could want. Currently, I've just started a huge pile of work on defining a new hub for the über-converter, so I'll see how well this holds up moving into the chromista hub design.

      This example is a little old, but maybe gives you a good idea of why YAML is a Good Thing™ in this case.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://498439]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-10-22 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls