Either you have an infinite spec, or you always have things outside it.
[0] YAML would allows you to tag the type, but nobody does it anyway
I agree that Norway is better than YAML. Let's keep Norway and dump YAML.
> There is no problem with YAML
I am reminded of: "There are no American infidels in Baghdad. Never!"
So surely if YAML is streamable, JSON must be too?
Or are the YAML maintainers incorrect?
The json spec just doesnt do anything like that but jsonl does.
The first two formats I've implemented as fully streaming, the serializers emit into an output iterator one character/byte at a time and the deserializers only need to hold one value at a time (and not even for CBOR's byte arrays, which are streamed). BSON requires full document instantiation because of byte offsets and is genuinely anti-streaming in its design.
I happen to have implemented a serializer for YAML, fully streaming, mostly as a compact-ish human-readable debug data representation. I can scarcely think of fates worse than having to write a spec-compliant YAML parser.
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 naive simplicity.
And then you have whatever the hell OpenAPI uses.
Hating YAML is same as being childish - yo using like something but can’t come up with anything better. Worse than YAML can be only complaining about YAML. Hating YAML is a cliche.
Its much easier to come up with jokes like this website than to change the ecosystem for better.
And I definitely think the websites like this is opposite to the engineering approach.
Not defending YAML though in particular.
Edit: grammar
Biggest issue IMO is moving goal posts and people wanting one format to do it all. Different formats are good for different things, except YAML, which again tries to do it all yet excels at nothing.
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.
You really should not blame it on YAML that if you put a random hash value in a field that it may be a number. Like, duh. If you want a string, use quotes.
You mean other than when we won't be? :-(
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 ... )
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.
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:
Nobody anywhere needed more INI files.
Care to elaborate? We are using TOML for config files and just do fine.
Personally I did never pick the YAML as a first format for the configs, only my ruby friends did that.
erlich•50m ago
9dev•42m ago