ConorAB
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
skepller@lemmy.world to Programmer Humor@programming.devEnglish · 1 个月前

TOML

lemmy.world

message-square
162
link
fedilink
626

TOML

lemmy.world

skepller@lemmy.world to Programmer Humor@programming.devEnglish · 1 个月前
message-square
162
link
fedilink
  • panda_abyss@lemmy.ca
    link
    fedilink
    arrow-up
    98
    ·
    1 个月前

    If yaml didn’t have anchors and 8 different white space formats, it’d be a great replacement for this kind of thing.

    But yaml is a mess, and you’d think you could parse it easily, but you can’t.

    • floquant@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      63
      arrow-down
      1
      ·
      1 个月前

      YAML is redeemed by one thing only:

      All JSON is valid YAML.

      • PieMePlenty@lemmy.world
        link
        fedilink
        arrow-up
        12
        ·
        1 个月前

        No way. You’re telling me I can just write json instead?

        • Jayjader@jlai.lu
          link
          fedilink
          arrow-up
          14
          ·
          edit-2
          1 个月前

          Yup! YAML is defined as a “strict superset” of JSON (or at least, it was the last time I checked).

          It’s a lot like markdown and HTML; when you want to write something deeply structured and somewhat complex you can always drop back/down to the format with explicit closing delimiters and it just works™.

          • Terrasque@infosec.pub
            link
            fedilink
            arrow-up
            8
            ·
            1 个月前

            I found out the hard way this is not entirely correct, as a user found a valid json that yaml parsers didn’t handle. IIRC it was some exotic whitespace issue

            • floquant@lemmy.dbzer0.com
              link
              fedilink
              arrow-up
              7
              ·
              1 个月前

              Yes, in true YAML fashion, there are some edge cases where things act weird but are technically correct.

    • Flamekebab@piefed.social
      link
      fedilink
      English
      arrow-up
      38
      ·
      1 个月前

      As someone who works with YAML regularly:

      Fuck YAML.

      • Damage@feddit.it
        link
        fedilink
        arrow-up
        23
        ·
        1 个月前

        As someone who runs Home Assistant:
        Fuck YAML.

      • timbuck2themoon@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 个月前

        Nah, yaml isn’t great by virtue of itself but with what it competes with. I far, far prefer it to any other BS. Json is garbage for human creation and obviously toml due to above. XML… Obviously just for machines.

        Again, only good because of its competition.

        • Flamekebab@piefed.social
          link
          fedilink
          English
          arrow-up
          3
          ·
          1 个月前

          I prefer writing JSON by hand. The whitespace stuff in YAML is just such a nuisance as far as I’m concerned, which is odd as I have no problem with it in Python.

    • suicidaleggroll@lemmy.world
      link
      fedilink
      arrow-up
      28
      ·
      1 个月前

      I want to like yaml, I really do, but why are there so many different ways of specifying the same thing?

      • FooBarrington@lemmy.world
        link
        fedilink
        arrow-up
        8
        ·
        1 个月前

        Is there a reason? Norway!

    • ramble81@lemmy.zip
      link
      fedilink
      arrow-up
      21
      arrow-down
      3
      ·
      1 个月前

      I have a fundamental disdain for formats with restrictive white space definitions (I’m looking too at you Python)

      • panda_abyss@lemmy.ca
        link
        fedilink
        arrow-up
        17
        ·
        1 个月前

        I’ve never had this issue with Python, but makefile has given me plenty of whitespace issues.

        • ramble81@lemmy.zip
          link
          fedilink
          arrow-up
          6
          ·
          1 个月前

          Should have added if it cares about tabs vs spaces.

          • thesmokingman@programming.dev
            link
            fedilink
            arrow-up
            9
            ·
            1 个月前

            The author knew it was a bad idea

          • JackbyDev@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 个月前

            But my vertical tabs!

    • FishFace@piefed.social
      link
      fedilink
      English
      arrow-up
      9
      ·
      1 个月前

      import yaml :)

    • derek@infosec.pub
      link
      fedilink
      arrow-up
      3
      ·
      1 个月前

      I’m a fan of NestedText. It’s no panacea but I’d argue it’s the most well-considered and useful file format for structured data in plain text.

      • kibiz0r@midwest.social
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 个月前

        There just needs to be one universal standard that handles everyone’s use cases

        • thesmokingman@programming.dev
          link
          fedilink
          arrow-up
          6
          ·
          1 个月前

          https://xkcd.com/927/

        • MonkderVierte@lemmy.zip
          link
          fedilink
          arrow-up
          3
          ·
          1 个月前

          No, for multiple standards that handle their usecase good.

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.59K users / day
  • 4.23K users / week
  • 9.74K users / month
  • 18.4K users / 6 months
  • 1 local subscriber
  • 30.6K subscribers
  • 2.2K Posts
  • 86.4K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • UI: 0.19.11
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org