News for hackers. Stuff that matters.
Re:Bugs in the YAML specification by eyelidlessness on Sunday September 04, 2016 @10:03PM (#12427681)
I have minimal experience with YAML (100% of which configuring for CI environments because apparently that's what all the modern ones prefer). I don't really know the ins and outs of the format, and try to stick to extremely simple representations.

Today I learned that what I perceived as somewhat complicated syntax is actually overwhelmingly complex.

I know that my preference for s-expressions is not shared by everyone, but the more complex a syntax I encounter, the more I wonder if simpler alternatives were even considered.

Genuine question: apart from inertia, and apart from recursive references (noted in comments before I wrote this), is there a use case for YAML that isn't solved by simpler and less ambiguous formats like EDN or Transit?

Re:Bugs in the YAML specification by jaredklewis on Monday September 05, 2016 @01:21AM (#12428295)
Just one data point, but I had never heard of transit or edn before today. Both look awesome.

On the other hand I picked up YAML in less than a day (many years ago) and despite its complexity can't remember that ever causing me any issues. Not 100% sure if missing from your suggested formats (which do support multi line strings) but I enjoy use of yaml's folded strings.

Re:Bugs in the YAML specification by stubish on Monday September 05, 2016 @04:39AM (#12428945)
I think all the cited bugs I'd also fail in a code review. YAML is great, provided you pretend most of the spec doesn't exist and treat it as JSON with some syntactic sugar. I don't ever want to see !! even in output for machines.

The big problem is when the useless features that you should, never, ever use (and if you do you are doing it wrong) bite you on the arse. Because it tried to do too much, like XML, even when we knew that was a bad idea. But is is still the best 'JSON with better layout' out there, which is what we want when we want readable documents and maintainable code. EDN, Transit and TOML all fail in that somewhere, IMO, and of course popularity is actually a hugely important feature for any data interchange format.

Re:Bugs in the YAML specification by fibo on Monday September 05, 2016 @02:08AM (#12428440)
YAML was the first human readable/writable format, so better t'han XML and JSON for us humans. Also is a superset of JSON.
Re:Bugs in the YAML specification by Someone on Monday September 05, 2016 @03:11AM (#12428631)
Human writable? I have little experience with it, but if what Amazon uses for its CodeDeploy configuration files is representative for the format, I disagree.

IMO, a human writable format shouldn't need a help page like this: http://docs.aws.amazon.com/codedeploy/latest/userguide/app-s...

Yes, part of that is CodeDeploy, but saying "tab characters must not be used in indentation" for me, disqualifies a standard as "human writable".

CodeDeploy makes that horrendous by requiring five or so clicks to figure out what causes an error (try forgetting adding an app spec.yml file or saving a file with a BOM)

Re:Bugs in the YAML specification by mst on Monday September 05, 2016 @06:51AM (#12429404)
It's an indentation-is-semantic format.

I've had more trouble with things trying to allow both spaces and tabs than I've had with YAML's refusal to allow tabs.

Re:Bugs in the YAML specification by mst on Monday September 05, 2016 @06:48AM (#12429399)
YAML is designed for machines to write, and only incidentally for humans to read.

If you want a configuration format, ingy and I designed JSONY for that.