logoalt Hacker News

That's a Lot of YAML

64 pointsby hisamafahritoday at 7:03 AM68 commentsview on HN

Comments

fodkodrasztoday at 9:12 AM

There is no problem with YAML, just like there was no problem with XML at all. The problem is with the software devs who use it for the wrong thing. I just wonder why JSON doesn't get all the hate, while it is a terrible format also: it is not streamable (YAML is), it doesn't have comments... and non-standard workarounds are used for these features. Norway better than YAML, in my opinion.

show 10 replies
fypantotoday at 9:25 AM

chuckle

Well most of that is due to 1.1 which has been deprecated god knows for how long.

1.2 does not have the 'Norway' problem any more.

Tooting my own horn, this is how a modern YAML library looks like nowadays:

https://github.com/pantoniou/libfyaml

show 1 reply
vova_hn2today at 10:01 AM

I'm still sad that JSON5 never became industry standard.

Unlike hjson, toml and many others, JSON5 didn't try to reinvent the wheel and create a totally new syntax.

Instead, they took 2 already well established standards (JSON and ECMAScript 5.1) and put them together.

I think that it is pleasant enough to write by hand while not creating yet another new syntax that you have to get used to.

[0] https://json5.org/

NoboruWatayatoday at 9:23 AM

Surprised TOML didn't get mentioned in the alternatives section, it's probably my favourite configuration format.

I'm working on a project now that uses YAML for configuration (it makes more sense in this context than TOML) and am parsing it using Rust's `serde` crate (via `serde_norway`). It's not so bad if you use `#[serde(deny_unknown_fields)]` everywhere.

masfoobartoday at 10:19 AM

My usage of YAML has been limited. For the times I have used it (kubenetes, docker compose, other things, etc) -- I don't get what it so special about it.

It just seems reinventing the wheel again and again.

I am not suggesting JSON is perfect, either. However I do prefer it to YAML (and XML) by a mile.

It's a shame s-expressions never taken off.

  (select (id name)
    (:from users)
    (:where (= name "Peter")))
Or

  (orders
    (order
      (id 1)
      (code "aa1")
      (qty 32)))

I know - its a sample, but you get it. :-)
elfrinjotoday at 9:18 AM

Put quotes around your strings an you'll be mostly fine.

show 3 replies
discreteeventtoday at 9:21 AM

- "something broke" is way better than stack traces with line numbers

That sums it up. Its the same since the days of XML. Someone decides to make something configurable externally and then everything gets put in there for convenience. Now we are programming in XML/YAML without even a stack trace (or a debugger, or call hierarchy, or type checking or ... )

show 1 reply
ishouldnotbutk8today at 10:14 AM

Ctrl+F "KYAML", 0 results

I think KYAML[1] is very relevant here. KYAML is a strict subset of yaml[2], supported natively by kubernetes tooling in most recent versions.

In my opinion it's closer to JSON with comments than to YAML, but overall it looks like a pretty nice format, that solves some of pain points of both technologies. This is not the first nor the only JSON-with-comments format, so I wonder if it manages to break out of kubernetes world and become popular.

[1] https://kubernetes.io/blog/2026/08/11/how-to-pretty-print-ku...

[2] https://www.kubernetes.dev/resources/keps/5295/

rererereferredtoday at 12:55 PM

> noyaml.com

Is this supposed to read as Norway's YAML?

_superposition_today at 10:41 AM

I would wager that just in the time it takes me to write this comment, millions of yaml documents have been successfully parsed. Works for me. Until it doesn't. Just like anything else. No silver bullets.

coder-pmtoday at 9:58 AM

It’s because ppl are not using it correctly, it was designed for configs and now it’s being used as a programming language… a language without types and debugger. It’s frustrating devs because they find the issue at the deployment time, not the compile time.

Personally I did never pick the YAML as a first format for the configs, only my ruby friends did that.

show 1 reply
pi-victortoday at 9:29 AM

there's already a better alternative, it's called starlark.

ChocolateGodtoday at 9:45 AM

I think a format that relies so heavily on invisible characters is terrible, but thats just me.

show 2 replies
erlichtoday at 9:12 AM

I actually like the SQL example.

show 1 reply
grim_iotoday at 10:01 AM

Thanks for the page, I'll feed it to the LLM when it writes yaml next time, probably today.

I won't even look at it, and it will be just fine.

cheptsovtoday at 9:15 AM

Next time the author would like to write an article like that, it’s better that they offer a new standard that is as flexible while also doing the work YAML is doing today

show 3 replies
poloticstoday at 9:28 AM

This is hilarious, and so true!

zahrevskytoday at 9:17 AM

Am I the only one who finds this writing style hard to read?

I stumbled upon this page a few years back and was very confused by the language. It took me some time to parse it and realize that all the comments are actually sarcastic. Overall, the general style feels like I'm reading comments on TikTok.

It's not that I'm against this style; it's just that you don't expect it in a technical article.

boobsbrtoday at 9:31 AM

Wait until you find shell code inside a pipeline YAML definition. Now that's programming with YAML.

taspeotistoday at 9:20 AM

Yelling At My Laptop

XorNottoday at 9:46 AM

YAML is fine. TOML is a lot worse.

Nobody anywhere needed more INI files.

show 1 reply