this post was submitted on 14 Jan 2025
408 points (92.3% liked)

memes

11383 readers
2445 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to [email protected]

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/AdsNo advertisements or spam. This is an instance rule and the only way to live.

A collection of some classic Lemmy memes for your enjoyment

Sister communities

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] towerful 61 points 3 weeks ago (13 children)

uses yaml for scripting so it's clean and readable.

Eh....

I guess yaml is fine.
I hate the significance of whitespace, and the fact that I cannot find any editor that can auto-format. Which are both related, I guess: there is no way to know a yaml document is actually correctly formatted without knowing the intended schema.

Whereas JSON doesn't have this ambiguity. But JSON has it's own drawbacks.

[–] [email protected] 28 points 3 weeks ago (3 children)

YAML is fine as a configuration language and ok data input language.

YAML is absolutely cursed as a programming language. As in Ansible has created a really shitty programming language inside of YAML. Should be burned with fire.

[–] towerful 2 points 3 weeks ago

I guess it's like HTML if it tried to also adopt it's own scripting language. Whereas JS interacts with the HTML DOM. Sure, it has quirks, but essentially modified a config.

I've never found a nice way writing YAML with variables and configurability.
Trying to use yaml to natively describe how a yaml config should be produced is broken. It diverges from the underlying schema, and (because it's .yaml) isn't distinguishable from any other yaml.
Things like helm treat yaml as a template. And I don't think language servers & tooling are up to scratch yet (happy to be corrected). So basic yaml formatters shit the bed.

Yaml is a computer readable config file that tries to be human readable, and fails at being actually useful.

Why projects try and make it useful, I will never understand.

I honestly think generating yaml from something like python would be a million times easier.
But then tools like ansible adopt yaml to essentially be a scripting language. As opposed to creating an actually decent solution that uses both python (to generate) and yaml (to apply).
Or whatever language.

load more comments (2 replies)
load more comments (11 replies)