31 comments

[ 4.9 ms ] story [ 71.9 ms ] thread
ctrl+f grammar

Term not found.

> Provide as few ways as possible—preferably one—of representing something.

TRUTH!

Or, expressed in YAML 1.1 [1]

    y
    Y
    yes
    Yes
    YES
    true
    True
    TRUE
    on
    On
    ON
As expressed in YAML 1.2 [2]:

    true
I couldn't help but notice almost immediately one feature that is not human oriented, but most likely exists because it's easier for a machine to parse: single (":") vs double colon ("::"). This is not human-friendly. A human wants to write "key" "is" "value", and YAML has for a very long time supported a single ":" for "is" regardless of the actual type of the value.

I shouldn't have to care about what the type of the value is when writing out effectively YAML. This double-colon feature will do nothing but lead to bug reports from people confused as to why their document is invalid.

In my theory of "human-readability", odd double tokens like :: can exist successfully so long as there is sufficient utility and logic in the single token :

Tokens are inseparable from human instincts of single = less, double = more and the corresponding emotions: single=less=easier=quicker, double=more=complicated=longer=difficult

If you are not emphasizing the single token as them most common, it's going to cause confusion.

"Human readability and editability above all else" would not chose significant whitespace for a markup language. IMO.

Or restrictions like "only one space allowed after : before a value"

Why not just use YAML?
For something like this I would love to see a formal spec to go along with the examples.
This is the main reason why YAML and Python are bad. Give us CLEAR beginnings and ends to code statements and blocks, not these dubious beginnings and ends. Ignore white space and use clear EOL delineation. Clearly, XML and JSON are superior to YAML and even this weird-looking HUML. Not to mention almost any other language syntax being superior to Python.
I have actually practically tried out a test where I give a huge config file in XML and then JSON and ask folks question on its structure.

The ones who read the XML file understood immediately. Why ? Because XML is self-documenting and the repetition via clear de-limitation extensively aids human memory.

The one who read the JSON file just glazed over it and needed to refer back to the document and re-read several times.

I urge all the XML naysayers and XML haters to please carry out this practical test with their colleagues. Please choose a good level of complexity and nesting and please make use of XML attributes for scalar values.

XML is SO FAR ahead in readability and grokking that it is not funny.

Exactly. And with a proper color scheme it is so much easier to "parse" a document as a human. But JSON popularity is linkend to the web and javascript so not much that can be done. Coming up with new ambiguous markups just for config files is just a waste.

I really don't get it; the whole point of computing is to make stuff rigorous and precise so that you don't have to run a whole guesstimate translation layer as you need to with humans.

JSON5 allows comments.

Can someone explain to me what is so horrible about curly braces that we need a whole host of "human-friendly" configuration languages with nontrivial parsing just to get around them?

I can see someone wanting the Markdown of markup languages: more convenient for people to read and write. Sure, without markdown you could write HTML, say. But editing Markdown is a nicer experience.
JSON 5 is pretty good. It just needs to make the top-level brace and all commas optional, and add proper support for multi-line strings (writing '/n/' at the end of every line doesn't count).

Allowing only valid JavaScript identifiers to be unescaped keys is also a bit quirky (You have to quote reserved keywords).

But they will never change any of that because it would break JavaScript compatibility.

Posting a link to the XKCD comic would be a cliche at this point, yes?
Wasn't this solved by yaml 1.2?
Oh good, another even more confusing YAML alternative that still offers less functionality, flexibility and readability than JSON.
Oh lord. We already have TOML, which is an improvement on limited JSON when a human-readable, easily-diffable, more flexible format is needed.

We don't even need HCL (offers little value), YAML (has too many features making it inherently less secure), XML (is a mess with too many features and too much verbosity), or INI (insufficient features) except for existing and historical reasons.

In cases where a single file is attempted to be managed by multiple, competing interests, it's probably better to split the file into multiple, modular/include files like *.d/* so there would be less chances for merge conflicts.

And then there's /{proc,sys}-like configuration with one "value" per file where the path forms the heirarchy.

Please. Just. Stop reinventing wheels that were already round enough.

I like the idea of using `::` to denote a vector value.
If the goal is to look similar to YAML and fix its problems and assert itself as something that's needed in a world with YAML, the introduction should probably explicitly call out some clear differences.
The buttstock of a rifle, trigger and other operating details are "human oriented" and the muzzle end is also frequently "human oriented".

Not sure which one we have here.

My only pet peeve: can we define decimals as dec128 rather then float64 in configuration files?
Strictly 2 spaces for indentation? What's human about that.
`::` is quite strange. 1) It only allows to resolve nesting conflicts for a single level. 2) Could be hard to read and could lead to reasoning mistakes. 3) Looks like an attempt to differentiate HUML from YAML somehow.
I don’t hate this nearly as much as I hate YAML. Now get everyone else to adopt it - good luck.
LSP is the only thing that matters to me, regardless of the language I’m evaluating.

Weeks of my life have been reclaimed thanks to TypeScripts LSP.

All configuration languages suck in Monaco, so much so that I would rather use C# or TS to generate a config with docs in the tooltips, red squiggles under my typos, and location-aware autocomplete.