30

Please tell me I'm not the only one who thinks that yaml is a horrible format

Comments
  • 16
    You're not the only one who thinks that yaml is a horrible format.
  • 2
    the only thing I like about yaml is that I can sometimes use it in my markdown to syntax highlight things that otherwise would not work
  • 0
    @Alt-Tab you mean Like the Header of a markdown file? I've seen some systems do that for metadata
  • 1
    Just learned about noyaml.com and my god I didn't think it could get worse
  • 2
    It's better than people who try to shoehorn comments into JSON
  • 3
    @AlmondSauce well json really isn't meant for config files, it's a serialisation format

    The fact that it's used for config files created the need for comments

    To be fair JSON with comments do make nice config files, but I'd keep that in a separate standard personally.

    Also toml is a nice and simple format
  • 2
    @LotsOfCaffeine no, just in a code block sometimes specifying the language as yaml can highlight things a bit better better because it accepts anything as yaml :D

    ``` yaml
    some shit
    ```

    => green some shit

    100% worth it
  • 1
  • 0
    @LotsOfCaffeine The issue was that people used a serialisation format for config & comments imho. JSON just isn't well suited to that.

    Toml is pretty nice. Though I must admit I don't have a particular hatred for yaml either.
  • 0
    @AlmondSauce I'll prefer JSON with comments over yaml at any time.

    If you got some time read through the things on https://noyaml.com I had quite some fun
  • 1
    Initially when I started writing yml files I used to think json is a much simpler way understand sub key and values. But the problem starts when you have to write a complete infra in json and you have to include lists, json object every here and there. That time it will be very difficult to deal with it. In yml it is very simpler to understand and looks neat. You can integrate some plugin to format yml or lots of online formatters are available. This way its easy to understand indentation.
  • 0
    @LotsOfCaffeine Yeah, it has a bunch of gotchas that make little sense. I'm not defending any of that - I just don't hate it either.
  • 1
    I use Yaml a lot tbf...

    Works really nice for config files that need to be edited by people with less technical know-how or when JSON would become too complex to do so (since JSON is not meant for this).

    Haven't found any well-supported alternative though (ini sucks)
  • 0
    @FinlayDaG33k have you considered TOML by chance?
  • 0
    I learned how to configure my ubuntu 20.04 server's network connection to static. I saw the yaml file (with zero comments in it) and said WTF is this SHIT!

    To be fair, it has been a while since I configured networking on a linux box. But last time I did it the file was chock full of comments on how to configure the file. All I can think is server boxes from ubuntu are expected to be managed by some enterprise system en masse.

    I was really perturbed that I had to search for how to configure the networking. It used to be really straight forward.

    Edit:

    Also, don't a lot of the classic config files use tabs instead of spaces? The yaml file I modified was using spaces. Is that a yaml thing?
  • 1
    @Demolishun the yaml spec forces spaces, as two spaces are one indentation unit – which dictates where in the tree the entry sits

    Kinda like python
  • 0
    @LotsOfCaffeine I tried TOML before but did not like it at all.

    It's better than INI but faaaar behind YAML imo.
  • 0
    @LotsOfCaffeine I don't like tabs, but I have always liked how config files defaulted to tabs. Yeah, I don't think I like yaml.
  • 0
    No particular hatred towards yaml. The intents can be annoying when templating helm stuff. I hate that there are two extensions for it.
    Fucking always have to check whether .yml or .yaml is used.
  • 0
    You are not the only one..,.
  • 1
    There's a mistake in your rant, it should be "yet another horrible format" 😈
Add Comment