Screwtape at
When it comes to human-editable config and data files, XML and JSON are human-unfriendly, INI syntax is limiting and unspecified, and YAML has some nice ideas that don't scale up to medium-sized documents, le alone large ones (trust me, I've spent a lot of time wrestling with Ansible playbooks).
So far, my favourite contender has been TOML (nearly as rich as JSON, much more human-friendly to write) but today I came across a thing called OGDL, the Ordered Graph Definition Language. The data-model is super-minimalist: the basic syntax produces an ordered tree of byte-strings, and there's an optional second pass that interprets some nodes as references back into another part of the tree to make a fully general directed graph. Since the data-model is simple, the syntax is deliciously simple too: write a word on a line, if the word on the next line has a greater indent, it's a child; if it has the same indent, it's a sibling, etc.
I don't think I'd want to make it my standard config file format yet (for one, there's no Python library for it), but it's something I need to keep in mind for the future.
clacke@libranet.de ❌, Charles Stanhope likes this.
clacke@libranet.de ❌ shared this.
OGDL is interesting. It certainly seems promising for descriptions of complex objects that might refer to each other. Although, for a language intended for humans, I find it's definition of a comment a little strange and likely to lead to confusing errors (the grammar also doesn't seem to match the textual description). Also, I wonder why '#=' (more confusion for the comment character) was defined for an arc to a node instead of something like '->'.
They needed a reserved character to begin a comment, I guess they figured it would be easier to say hash-space begins a comment and hash-equals begins a reference, than to have multiple reserved characters for different purposes.
On the other hand, I don't recall the spec describing what should happen with hash-followed-by-any-other-character, so that's a potential interoperability hazard, right there.
Screwtape at 2017-06-30T15:14:34Z
clacke@libranet.de ❌, clacke@libranet.de ❌, Charles Stanhope likes this.