Live data from Hacker News

That's a Lot of YAML

noyaml.com

41–50 of 78 posts

Re: That's a Lot of YAML

#41

Earlier quoted context omitted.

There numerous problems with YAML. It is underdefined, ambiguous, fragile, and is just impossible to write a portable parser for. JSON is naive, lacks almost everything. But is supereasy to parse and read. As funny as it sounds, XML is overspecified. Parsing is possible and predictable but supporting the full standard (all of them) is so much work that nobody does it anyway. So, given the choice above, i'd go for nai…

There is a subset of yaml which is like 99.9% of all yaml code that is fine. And then you have whatever the hell OpenAPI uses.

Yes, true, there is this legendary subset... but parsing even a sane subset of the spec is a nightmare for all parties involved.

Re: That's a Lot of YAML

#42

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.

It's also terrible for configs, for many of the reasons specified in the article.

Re: That's a Lot of YAML

#43
post #36
post #15

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

I read that as libfuckyaml

Maybe you should get your mind out of the gutter then.

Re: That's a Lot of YAML

#45
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/

Re: That's a Lot of YAML

#46
post #10
post #2

I actually like the SQL example.

right? Sensible nesting (that's how I'd break and indent a long query anyway), folding in proper code editors, proper hierarchy... what's not to like?

That `AND:` being prefix-order was the hint it just needs a few small finishing touches:

  (select (num name)
     :from  customers
     :where (exists (select name
                       :from  orders
                       :where (and (= customers.num
                                      orders.customer_num)
                                   (

Re: That's a Lot of YAML

#47
post #26

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.

YAML is (or at least, is declared by its maintainers to be) a superset of JSON, making any JSON document also a valid YAML document. So surely if YAML is streamable, JSON must be too? Or are the YAML maintainers incorrect?

> YAML is (or at least, is declared by its maintainers to be) a superset of JSON, making any JSON document also a valid YAML document. > So surely if YAML is streamable, JSON must be too?

Given YAML is not a subset, but a superset of JSON, as you correctly noted, I'm not sure how you reached that conclusion.

> Or are the YAML maintainers incorrect?

I think you should check this page before making snarky comments: https://en.wikipedia.org/wiki/Superset

See also the comment below: https://news.ycombinator.com/item?id=49476489

Offtopic note: I wanted to dig the wiki superset link up the lazy way, so searched for superset, and all I got was endless list of marketing trash links. Even on DDG. RIP, we are on the Dead Internet.

Re: That's a Lot of YAML

#48
post #4

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

TOML? It's what I've been using for complex configuration in personal projects (more complex than command line switches)

Re: That's a Lot of YAML

#49
post #14

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.

I also wonder why it’s the 2012 version of the language which gets all the hate, instead of the hate being directed at Google, who doesn’t care about putting resources towards updating the main offender, Kubernetes’ YAML 1.1 parser. https://github.com/kubernetes/kubernetes/issues/34146#issuec...

Would totally love to do that bro, is not a resource or finance problem- not even talent - AI could probably do it with oversight .. but No Promo.. cant touch it once another guy declared it complete.. that s them rules.
Post reply on HN