Live data from Hacker News

That's a Lot of YAML

noyaml.com

61–70 of 78 posts

Re: That's a Lot of YAML

#61

Earlier quoted context omitted.

> 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: htt…

He misspelled subset/superset, but the idea with streaming is right. Given: - YAML support streaming - any JSON is valid YAML Conclusion - any JSON is streaming

Nope?

The "streamed JSON" needs --- line sparators, which is not a JSON spec feature, thus that data stream is valid YAML from that point, bot not a valid JSON stream.

NDJSON is a different beast.

Re: That's a Lot of YAML

#62
post #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.

Fair point, that’s why I said I won’t pick it. But it still might be a good and simple choice for small configs, hand written. It does explode when it’s machine generated or templated.

I think it’s also strictly connected with the ecosystem devs are working with, ruby or python devs usually pick YAML, JavaScript/Node devs with JSON - this is how it works, ppl chose what they know and what they are used to.

Re: That's a Lot of YAML

#63
post #50

Earlier quoted context omitted.

Between us two I am not the one using personal attacks. I advise you to reflect upon your own words.

between us three, I am considering your comments as political propaganda against Norway. And this is off topic here. So, I advise you, guys, to reflect upon your words.

I don't care what you consider my words.

Re: That's a Lot of YAML

#64

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 just wonder why JSON doesn't get all the hate, while it is a terrible format also: […] it doesn't have comments […]

The lack of comments in JSON is not a bug; comments in JSON were an anti-feature. Douglas Crockford intentionally removed them to prevent developers from using comments to store parsing directives (which he saw people doing in earlier revisions).

* https://web.archive.org/web/20120507093915/https://plus.goog...

* 2012: https://news.ycombinator.com/item?id=3912149

Re: That's a Lot of YAML

#65

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 just wonder why JSON doesn't get all the hate, while it is a terrible format also: […] it doesn't have comments […] The lack of comments in JSON is not a bug; comments in JSON were an anti-feature. Douglas Crockford intentionally removed them to prevent developers from using comments to store parsing directives (which he saw people doing in earlier revisions). * https://web.archive.org/web/20120507093915/https://…

I'd say that only really strengthens OP's overall point of being about using "the wrong language for the wrong thing".

Re: That's a Lot of YAML

#66

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.

What is Norway? Couldn’t find a reference to it.

Re: That's a Lot of YAML

#67

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.

What do you mean that JSON is not "streamable"?

There are things like https://www.baeldung.com/jackson-streaming-api but maybe there's more in you definition of "streamable" that JSON doesn't satisfy.

Re: That's a Lot of YAML

#68

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.

What is Norway? Couldn’t find a reference to it.

I think they meant "no way," but maybe it's a joke about the Norway problem? YAML famously confuses Norway's country code ("NO" or "no" without quotes) with unquoted "no" meaning Boolean false.

Re: That's a Lot of YAML

#70

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

I used to think the same but I've mellowed. Modern editors make this a non-issue. I use both Python and YAML fairly regularly, both have significant whitespace, and I don't have any issues with either. Also, because YAML doesn't involve things like curly braces all over the place, it's actually notably less friction to type rapidly by hand than something like JSON. I don't think YAML is amazing or anything like that…

Maybe just my brain but I find it easier to follow those { and [ then tabs and -
Post reply on HN