Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of jjore (6662)

Saturday November 25, 2006
11:52 AM

YAML sucks. It's a read only language.

[ #31714 ]

I hate YAML. I really do. I'm emotional about a data serialization format. People have told me that YAML is "soo easy!" but whenever I try to write some by hand I get an incomprehensible error from the parser and it's greek to me about what I'm doing. Fuck.

YAML is nice to read but I don't understand how anyone manages to write it. Surely it's parsing rules are more complex than ... something complex.

Maybe the other half the time I'm getting fouled up by an intolerance for Windows new lines. Fuck. Same incomprehensible error.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • In mathematics, if you can't prove a thing, it does not mean it cannot be proved or that it is wrong. It just means that at that time it is beyond your patience.

    YAML.pm has serious issues but it most works. It helps if you know some of its limitations.

    • It is more complete than YAML::Syck (although 100x slower :( ).
    • Don't dare to include non-alphanumerics in anchor names.
    • Don't be so bold to forget the new line at the end of the document.

    And the list goes on. For many (me among them), YAML rocks.

    • So what the hell is wrong with YAML that a person still needs to handle all that stuff I wouldn't be able to guess? Why isn't it DWIMming that stuff you mentioned? I don't really want an answer.

      I figure eventually I'll be forced to deal in YAML and then I'll really take the time to figure out YAML. All I'm doing now is being BITCHY that YAML isn't a DWIMy kind of language and it's freaking easy to write invalid syntax.

      If it was meant to be used by humans it shouldn't be so difficult to write acceptably!
      • I don't think your genuine frustration with YAML is experienced by everyone. It may depend on the specific corners of YAML you are reaching or the amount of YAML you're using. A similar pain to me is DBD::Oracle which I just can't get right to install anywhere I try -- it is different however, I recognize it usually as my fault or fault of the bloody environment in use (Oracle installation, OS, available compiler, etc.) But the frustration is similar. I usually don't have bad times writing YAML that YAML.pm
        • At least YAML.pm is horrible with its error messages, which makes it completely unusable for human-generated files. If a module dies with die; [cpan.org], that's unacceptable.

          A config file format that insists on a file being terminated with a newline also is stupid, especially if the parser cannot correct that, but dies.

          • That's just one parser and I'm sure that it's either better now or it will be.
  • YAML came out as a reaction to XML, and for a brief while it was fine and easy for data serialisation, but then the YAML spec came out, and as the spec was refined -- the authors discovered that the issues that XML solves are actually HARD, and the spec grew and grew. The YAML spec is now about 5 times the length of the XML spec, and it is *way* harder to implement.

    I'd stick with XML if I were you, but YMMV.
  • Just thought I'd chime in with a "me too". I find YAML OK to read but don't seem to have had much like writing it.

    I've also had a number of strange situations where a data structure written out with YAML.pm turned out to not be readable by YAML.pm - so it's not just us.