this post was submitted on 24 Feb 2026
573 points (98.2% liked)

Programmer Humor

30013 readers
1964 users here now

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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] panda_abyss@lemmy.ca 87 points 1 day ago (6 children)

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 56 points 1 day ago (1 children)

YAML is redeemed by one thing only:

All JSON is valid YAML.

[–] PieMePlenty@lemmy.world 10 points 1 day ago (1 children)

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

[–] Jayjader@jlai.lu 10 points 1 day ago* (last edited 1 day ago) (1 children)

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™.

[–] theterrasque@infosec.pub 6 points 13 hours ago (1 children)

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 4 points 11 hours ago

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

[–] Flamekebab@piefed.social 32 points 1 day ago (2 children)

As someone who works with YAML regularly:

Fuck YAML.

[–] timbuck2themoon@sh.itjust.works 1 points 8 hours ago (1 children)

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 1 points 2 hours ago

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.

[–] Damage@feddit.it 19 points 1 day ago

As someone who runs Home Assistant:
Fuck YAML.

[–] suicidaleggroll@lemmy.world 23 points 1 day ago (1 children)

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

[–] FooBarrington@lemmy.world 6 points 1 day ago

Is there a reason? Norway!

[–] ramble81@lemmy.zip 14 points 1 day ago (1 children)

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

[–] panda_abyss@lemmy.ca 17 points 1 day ago (1 children)

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

[–] ramble81@lemmy.zip 5 points 1 day ago (2 children)

Should have added if it cares about tabs vs spaces.

[–] FishFace@piefed.social 9 points 1 day ago

import yaml :)

[–] derek@infosec.pub 3 points 1 day ago (1 children)

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 4 points 1 day ago (2 children)

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

[–] MonkderVierte@lemmy.zip 3 points 23 hours ago

No, for multiple standards that handle their usecase good.