Earlier quoted context omitted.
Use the right tool for the job. I use yaml extensively but never in a situation where someone would want to edit it with a regular text processor.
do you deliver a YAML editor with your software? Because people will use notepad or nano to edit that stuff.
YAML: Probably not so great after all
141–150 of 457 posts
Re: YAML: Probably not so great after all
#142Heh, yaml haters unite! I wish yaml would go away.
I hate yaml but I have yet to find a better option for deeply nested confog files. Toml is the closest thing I have seen. Toml support is also not that great. Yaml despite its flaws works pretty well for Ansible playbooks and for storing localizations.
Re: YAML: Probably not so great after all
#143- what draft of JSON Schema are you using 4? 7? Neither?
- what version of Swagger or OpenAPI are you using?
- etc.
Sure, it's great to see ongoing development of schemas, but with each new development we have yet another dialect to consider/support.
In my view, perhaps an even greater problem with structured data formats in general is the void that separates them from programming languages esp. static languages such as Java where static type information is otherwise leveraged. The industry standard solution, code generation, is awful in almost every respect. The Manifold framework looks promising in this regard (http://manifold.systems/).
Re: YAML: Probably not so great after all
#144Yaml is great at the core. It just has too many features, the first things I disable. A simplified subset, .syml would be a good idea.
The implementation is in Python.
Re: YAML: Probably not so great after all
#145Re: YAML: Probably not so great after all
#146fish shell is looking for a new text serialization format for its history file (currently it uses an ad-hoc broken psuedo-YAML). Boxes to check: 1. Self describing format 2. SAX-style parser available to C++ 3. Easy for users to understand and ad-hoc parse using command-line tools 4. No document closing necessary, so appending is trivial YAML looks pretty good: - cmd: git checkout file.txt when: 1565133286 pwd: /home…
How about JSONL (JSON Lines)? http://jsonlines.org/ Ps. Thanks for (all the) fish, it's my daily driver shell and keeps me that much more sane c.f. the alternatives.
Re: YAML: Probably not so great after all
#147Earlier quoted context omitted.
Umm, no. You can find cases where JSON sucks, but you have to look for them. You can find cases where XML doesn't suck, but you have to look for them.
Numbers over 2^52. Unicode. Terminator vs. Separator. Weak type system no DTD. No Xpath equivalent. No namespaces.
Re: YAML: Probably not so great after all
#148Re: YAML: Probably not so great after all
#149Earlier quoted context omitted.
Attributes are XML’s foot-gun. I disagree. Back in the day we used attributes for everything that was key value and inner tags for anything with structure. We also formatted for clarity: Compared with what we used to do, I look at attribute-less maven pom.xml with horror.
What if it's to be used by french speaking software/people ? Or Dehors Außenseite Outside Quite curious about it.
Re: YAML: Probably not so great after all
#150Earlier quoted context omitted.
(suggestion) Drop the 4th requirement. Having to close contexts is a VERY good 'sanity check' to see if something is malformed or not. If appending is necessary make the parser handle multiple copies of the namespace and merge them upon output. Unknown keys and sections should also always be copied from input to output (this is how you embed comments).
I'm interested, can you explain more about the merging idea? To clarify the requirement, history could be a JSON array of objects: [ {"cmd": "git checkout", "when": 1234 }, {"cmd": "vagrant up", "when": 4567 } ] To append an entry to this file and keep it valid, one must locate the closing square bracket and overwrite it. That work is what I hope to avoid.
{"cmd": "git checkout", "when": 1234}
{"cmd": "vagrant up", "when": 4567}
Not sure about other languages and libraries, but Go supports this out of the box[1]. And while we're at it, why not CSV? That can be processed with awk. #cmd,when
"git checkout","1234"
"vagrant up","4567"
[1]: https://play.golang.org/p/sTN9z4Kv3DB