From: Clark C. E. <cc...@cl...> - 2004-12-14 03:20:26
|
On Mon, Dec 13, 2004 at 08:23:14PM +0200, Oren Ben-Kiki wrote: | I've checked-in a reasonable CVS version of the draft Which repository? SF.NET? | > 1. A very nice "presentation" tabular form (that would not | > be great for editing since columns wouldn't line up). | | As Tim pointed out, this: | | - [Dysmorphology , , Physical Examination ] | - [Acondroplasia , Marfan Syndrome , ... , Height , Weight , ...] | - [Not Evaluated , Positive , ... , 63 , 130 , ...] Not the same... this is a sequences of sequences. I'm looking for a nice syntax for sequences of _mappings_ ;) | Of course, if you want a tabular syntax to express a sequence of | mappings, well, that's a whole separate issue. Yes, that's the issue -- sequences of mappings, aka lists of objects, when the set of keys is heavily repeating is just an eyesore. Someting like what I orginal posted would be nice... > --- > | name | hr | ave > |--------------+----+------ > | Mark McGwire | 65 | 0.278 > | Sammy Sosa | 63 | 0.288 > ... > > This particular structure would then be equivalent to > example 2.4 in the specification, > > --- > - > name: Mark McGwire > hr: 65 > avg: 0.278 > - > name: Sammy Sosa > hr: 63 > avg: 0.288 > ... ... | It seems to me that | defining exactly how CSV (or CSV-like) column headers get converted to | nested mapping keys would be a huge PITA. I'm really not that concerned about CVS compatibility - really! | What GUI people would want is two menu entries: "export to yaml" and | "import from yaml" ... | CLI people, being CLI people, would have no problem using csv2yaml and | yaml2csv, and in fact would probably prefer it that way :-) ... | I don't see that the set of users who need to cut&paste text in notepad | from a csv to YAML is that large... It just doesn't seem to justify the | effort (and un-yaml-ness) required. Right. I'm sold, CVS-in-YAML is a _bad_ idea. However, I still have a ton of YAML data that is tabular (and modeled in my programming languages as a sequence of mappings). I'd like a nice clean way to express this, and it'd be nice if it allowed for "pivot table" like format... > --- > | player | stastic > | | hr | ave > |--------------+----+------ > | Mark McGwire | 65 | 0.278 > | Sammy Sosa | 63 | 0.288 > ... > > being mapped to... > > --- > - > player: Mark McGwire > stastic: > hr: 65 > avg: 0.278 > - > player: Sammy Sosa > stastic: > hr: 63 > avg: 0.288 > ... Now that would make alot of my YAML data _super_ nice to read! But that said, if we have a nice syntax we can add this later... that's good 'enuff for now. Best, Clark |