Re: minimal YAML recommendations?

mofo syne <[email protected]> Sun, 1 Feb 2015 16:59:02 +1100
Newsgroups gmane.text.yaml.general
Message-ID <CAPJM1pczb96SLDh5ta=HW=M85HbK5z1d6_pKHQgqvxwZOn8tqA@mail.gmail.com>
That's an interesting point about how JSON is different from YAML.

I guess what draws people to YAML for simple configuration, is that it
doesn't look as programmish as an ini file. (Similar to why markdown is
popular over other more powerful markups). Thus it is easier to jump in and
use. Basically visual complexity is lower in YAML compared to TOML. Thus is
much faster to learn and use.

```TOML
[servers]
  [servers.alpha]
    ip = "10.0.0.1"
    dc = "eqdc10"
  [servers.beta]
    ip = "10.0.0.2"
    dc = "eqdc10"
```

Compared to YAML, which has much less visual noise.

```YAML
servers:
  alpha:
    ip : 10.0.0.1
    dc : eqdc10
  beta:
    ip : 10.0.0.2
    dc : eqdc10
```

----

>  You can of course work out a scheme to serialize any data with JSON, but
you could also do that with XML or English. I actually did this with JSON.
It's called JSYNC.

Ah, JSYNC sounds better in solving lossless conversion between YAML to json
to YAML. Adding it to the wiki then.

----

> JSON is a simple exchange format for very common data structures.

All the more reason to make YAML accessible to those that want a more
readable "JSON" alternative for such 'common data structure'.

----

Perhaps you can see the unconventional usage of YAML as not an abuse of a
program to do other things it is not designed to do. But rather as a
symptom of a need that is not being fulfilled. Which is in this, case a low
cost, low noise configuration system.

Do recall that it is used in not just standalone games and programs. But it
is also used in very widely used systems like Jekyll as a "front matter"
configuration for individual blog post. It is most likely an abuse of YAML
(if going by your opinions), but it serve it's job very well in making it
easier for non-programmers to learn how to use it.

----

So maybe instead of seeing YAML as an object serialization language verses
data serialization. Perhaps you can see it as the difference between
"lawyerise/advance english" and "simple/conversational english".

Both are english, but both serves a highly distinct role. While the advance
english is probably more canonical than conversational english, the
common/conversational english is still important. The shared heritage of
both forms, means that there is less of a mental switching cost (since
common english is a subset of advance english). This is in comparison to
having to learn "mandarin for imperial bureaucrats" vs "cantonese for the
common folks".

In terms of subsets:

"simple english" --> "conversational english" -->
"advance/lawyer/professional english" : All part of english

So in analogies, we can perhaps call the way we write Key:Values plus
indentations as YAML (like english). And the embedded form is like "simple
english", the normal form is like "standard english", and the full form is
like "advance english".

tl;dr: YAML can be more than just an object serialization standard. Just
depends on the phiosophy, and how inclusive we want to be.

----

> So a YAML Lite (or whatever we called it) would adhere to a subsetted
Grammar and a certain Schema.

That sounds about right.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core