this post was submitted on 19 Mar 2024
362 points (97.4% liked)

Programmer Humor

32371 readers
592 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 22 points 7 months ago (2 children)

Don’t forget, Kubernetes is totally happy with json input and output instead. Use json, be the change you want to see in the world!

[–] [email protected] 9 points 7 months ago

Press X to "Jason!"

[–] [email protected] 9 points 7 months ago

That's because YAML syntax is a superset of JSON. Any YAML parser should also accept JSON, not just the one k8s uses.

[–] [email protected] 15 points 7 months ago (2 children)

Add on a CI system (not Jenkins) and you got yaml controlling your yaml!

[–] [email protected] 11 points 7 months ago (1 children)

My last job is currently controlling kubernetes with Ansible (configuration management and orchestration) in a hybrid cloud model. The new engineering director likes yaml so they put yaml on his yaml.

[–] [email protected] 2 points 7 months ago
[–] [email protected] 2 points 7 months ago

Wait I do that and never realized it. YAMLception

[–] [email protected] 13 points 7 months ago

If yaml wasn't such a pain to edit on mobile, I wouldn't mind it so much. Yes, XML uses closing tags, but it's the 2020's, I think we can stand that extra few K of space so I can edit my portainer stacks without the UI freaking the fuck out because I want to delete something. YMMV...

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago)

It felt unusual at first that they attached semantics to (white spaces and tabs as) non-printable characters. On the other hand other n.p.- characters like line feeds always had a meaning (I.e. within multi line strings).

So why not, when it helps to reduce the amount of (printable) characters to describe your thing and increase clarity? 🤔