this post was submitted on 10 Feb 2025
917 points (97.7% liked)

linuxmemes

22763 readers
451 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     

    Let the apologists have a field day in the comments.

    you are viewing a single comment's thread
    view the rest of the comments
    [–] mlg@lemmy.world 20 points 1 week ago (6 children)
    [–] paequ2 21 points 1 week ago* (last edited 1 week ago) (5 children)

    Yeah, I've definitely grown to like TOML, especially after spending hours trying to edit a giant (nested) YAML file...

    I didn't realize the indentation in TOML was purely aesthetic.

    This

    [servers]
      [servers.alpha]
      ip = "10.0.0.1"
      dc = "eqdc10"
    
      [servers.beta]
      ip = "10.0.0.2"
      dc = "eqdc10"
    

    equals this

    [servers]
    [servers.alpha]
    ip = "10.0.0.1"
    dc = "eqdc10"
    
    [servers.beta]
    ip = "10.0.0.2"
    dc = "eqdc10"
    

    which equals this

    {
      "servers": {
        "alpha": {
          "ip": "10.0.0.1",
          "dc": "eqdc10"
        },
        "beta": {
          "ip": "10.0.0.2",
          "dc": "eqdc10"
        }
      }
    }
    
    [–] fushuan@lemm.ee 5 points 1 week ago (4 children)

    Once the file is big enough wouldn't it be better to convert it to json before editing, then converting it back?

    Let the computer deal with indents and all that stuff.

    [–] paequ2 1 points 1 week ago

    Because ... well ... wait, not a bad idea. Although, this would get rid of comments. Which in my case, I didn't have too many, so I could have manually added them back.

    load more comments (3 replies)
    load more comments (3 replies)
    load more comments (3 replies)