From: Phillip Gawlowski Date: 2009-12-31T21:40:38+09:00 Subject: Re: Where to find a description of yaml for ruby? On 31.12.2009 13:27, Fritz Trapper wrote: > Phillip Gawlowski wrote: >> But one thing is annoying with YAML: Significant whitespace. \t or a >> proper space have different meanings, as does the amount of space. > > Thats really a bad issue. After reading docs on YAML, I decided to use > it for plane data only, no structs or trees, as I wanted to. You probably meant "plain data"? Stupid false friends... Anyway: Yeah, significant whitespace is an issue. It's what keeps me looking at Python off and on (that, and the performance experience of two of the three Python apps I use is less than stellar). >> Ain't it grant that >> require "yaml" >> var = Object.to_yaml # or dump, if you want to write a file >> another_var = YAML.load var >> >> makes it so very easy to use? And it can be read (not necessarily >> written) by humans, too. > > Yes, that's very elegant and useful f端r simple configuration files. Or simple data structures, like Hashes and Arrays, or Rails' test mock ups. >> Try reading and writing XML in just one three lines! ;) > > Reading complex data structures expressed in well formated XML is > possible. Reading the same in YAML is at least quite difficult. Well, I meant "reading and writing programmatically" :) -- Phillip Gawlowski