There are a couple I have in mind. Like many techies, I am a huge fan of RSS for content distribution and XMPP for federated communication.

The really niche one I like is S-expressions as a data format and configuration in place of json, yaml, toml, etc.

I am a big fan of Plaintext formats, although I wish markdown had a few more features like tables.

  • Kissaki
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    2 months ago

    TOML instead of YAML or JSON for configuration.

    YAML is complex and has security concerns most people are not aware of.

    JSON works, but the block quoting and indenting is a lot of noise for a simple category key value format.

    • FizzyOrange
      link
      fedilink
      arrow-up
      16
      ·
      2 months ago

      TOML is not a very good format IMO. It’s fine for very simple config structures, but as soon as you have any level of nesting at all it becomes an unobvious mess. Worse than YAML even.

      What is this even?

      [[fruits]]
      name = "apple"
      
      [fruits.physical]
      color = "red"
      shape = "round"
      
      [[fruits.varieties]]
      name = "red delicious"
      
      [[fruits.varieties]]
      name = "granny smith"
      
      [[fruits]]
      name = "banana"
      
      [[fruits.varieties]]
      name = "plantain"
      

      That’s an example from the docs, and I have literally no idea what structure it makes. Compare to the JSON which is far more obvious:

      {
        "fruits": [
          {
            "name": "apple",
            "physical": {
              "color": "red",
              "shape": "round"
            },
            "varieties": [
              { "name": "red delicious" },
              { "name": "granny smith" }
            ]
          },
          {
            "name": "banana",
            "varieties": [
              { "name": "plantain" }
            ]
          }
        ]
      }
      

      The fact that they have to explain the structure by showing you the corresponding JSON says a lot.

      JSON5 is much better IMO. Unfortunately it isn’t as popular and doesn’t have as much ecosystem support.

      • ulterno@lemmy.kde.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        JSON5

        Nice. I mostly use Qt JSON and upon reading the spec, I see at least a few things I would want to have out of this, even when using it for machine-machine communication

      • Hawk@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        3
        ·
        2 months ago

        You’re using a purposely convoluted example from the spec. And I think it shows exactly how TOML is better than JSON for creating config files.

        The TOML file is a lot easier to scan than the hopelessly messy json file. The mix of indentation and symbols used in JSON really does not do well in bigger configuration files.

    • NostraDavid
      link
      fedilink
      arrow-up
      15
      ·
      2 months ago

      YAML is complex and has security concerns most people are not aware of.

      YAML is racist to Norwegians.

      If you have something like country: NO (NO = Norway), YAML will turn that into country: False. Why? Implicit casting. There are a bunch of truthy strings that’ll be cast automagically.

    • timbuck2themoon@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 months ago

      People bitch about YAML but for me it’s still the preferred one just because the others suck more.

      TOML like said is fine for simple things but as soon as you get a bit more complex it’s messy and unwieldy. And JSON is fine to operate on but for a config? It’s a mess. It’s harder to type and read for something like a config file.

      Heck, I’m not even sold on the S-expressions compared to yaml yet. But then, I deal with so much with all of these formats that I simply still prefer YAML for readability and ease of use (compared to the others.)