78
you are viewing a single comment's thread
view the rest of the comments
[-] thevoiceofra@mander.xyz -5 points 1 year ago

Interesting. But what If I'm not using CoreOS? Also RedHat fucked up by using YAML for configuration.

[-] kylian0087@lemmy.world 23 points 1 year ago

What is wrong with YAML for configuration? It is much more easy to read then say json.

[-] brian@programming.dev 3 points 1 year ago

There is some surprising behavior with some of the features of yaml, mostly arising from the fact that it looks nice to read. Here's a list of things that you can avoid to avoid a lot of the pitfalls: https://hitchdev.com/strictyaml/why/ . I haven't actually used strictyaml, but the arguments it presents are pretty solid and some are things I've run into in real environments

[-] anyhow2503@lemmy.world 1 points 1 year ago

YAML is way too bloated of a standard and has a ton of inconsistencies between implementations, despite the widespread reputation of simplicity. It is easy to read as long as you limit yourself to a fraction of its capabilities and err on the side of caution when it comes to escaping characters (especially when number literals are involved, or booleans for that matter). As far as alternatives go, I prefer TOML for simple key=value configs, but it has its own issued and is nowhere near as featureful, for better or worse.

[-] sasoiliev@lemmy.world 1 points 1 year ago

JSON was never meant for configuration.

YAML has a ton of footguns.

[-] thevoiceofra@mander.xyz 0 points 1 year ago* (last edited 1 year ago)

If you're just reading configs then yeah, it's superior. If you're maintaining big complex configurations, possibly for multiple machines, you need something to reduce boilerplate. Jsonnet, nickel or nix are excellent here. So the best way is to use one of those, generate yaml, and deploy. Saves you a lot of headaches but it's one more moving thing in your pipeline which can break.

load more comments (5 replies)
this post was submitted on 26 Sep 2023
78 points (89.8% liked)

Selfhosted

40183 readers
401 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS