brettsky said:

brettsky

YAML would be cool if it was just simpler. Maybe simpleyaml needs to come into existence.

9 months, 3 weeks ago.

10 comments so far

  • ajani

    I think you want JSON.

    9 months, 2 weeks ago by ajani.

  • brettsky

    No, because I like YAML's line-delimited format. I want to force people to write config files that aren't messy by cramming everything on a single line. =)

    9 months, 2 weeks ago by brettsky.

  • ajani

    Well, YAML doesn't force you to write things in the line delimited format, you can happily use braces and mush it all together. (You do know that JSON is a subset of YAML, right?)

    I'd be tempted to say that if you want a config file that you have to delimit with lines, perhaps the Java properties file format or the windows ini file format might be good. They're insanely easy to parse, and are easier for people who don't know the format to grok. (Complex YAML files are positively close to line noise, if you don't know all the delimiters)

    9 months, 2 weeks ago by ajani.

  • brettsky

    It's because of YAML's ability to mush it together I think the standard is too big (among other things). And I do know JSON is a subset.

    The reason I don't like Java property files is that they are not order-specific when you need that. Plus I just like using indentation to denote scope. =)

    And that line about complex YAML files being hard to read is why I thought a subset of YAML (or something similar) which was much simpler would be great to have.

    9 months, 2 weeks ago by brettsky.

  • ajani

    You and your indentation addiction. I think I've figured out what you want: PON. ;)

    All kidding aside, it seems that it wouldn't be that hard to implement what you want, since it would be semantically JSON, just with a slightly different syntax.

    9 months, 2 weeks ago by ajani.

  • ajani

    Oh, and I'm all for simple formats, so now you have me wondering How hard could it be?

    9 months, 2 weeks ago by ajani.

  • ajani

    grah. It destroyed my silly %gt;TopGear< tags. (We'll see if the escapes go through)

    9 months, 2 weeks ago by ajani.

  • ajani

    I give up. enough replying to myself and adding noise.

    9 months, 2 weeks ago by ajani.

  • brettsky

    Good point; it could just be JSON with line-delimited scope.

    And your TopGear tags showed up in the email.

    9 months, 2 weeks ago by brettsky.

  • voidspace

    ConfigObj using the 'unrepr' mode is pretty good for simple config files. It is 'key' 'value' pairs and you use Python syntax for the values (numbers, floats, lists, strings etc.)

    In fact ConfigObj without 'unrepr' mode is pretty damn good for config files...

    9 months, 2 weeks ago by voidspace.

Sign in to add a comment