AltME: Ren - Data Exchange Format


How does the above proposal make it harder for non-Redbol languages?

Answered in "Ren - Time & Duration" group.
Anything specific in YAML? I do note it, and other formats evaluated and why Ren isn't them.
YAML format is getting traction among open source projects, it is nicer and richer than JSON. It provides "heredoc" features for embedding other formats (like XML or JSON). It's a very good human-readable format. OTOH, the specification itself is rather long and complex, but that is not a show-stopper for YAML adoption among many languages. I think we have to learn from it.
Maybe providing a C-level library for Ren would be a good way to simplify the integration with non-Rebol languages.
I looked at YAML in depth many years ago, and even started a parser for it at one point, thinking it looked OK on the surface, but I quickly gave up on it. Aside from a couple JS tools using it for config/proj files, I didn't know it was gaining wider traction. What looks simple and readable really has complex rules that can leak through to users. I'm happy to have someone point out specific things we can learn from it though.
I mentioned a C Ren lib as an important piece to aid adoption in another group, so I very much agree.

Hocon is a pretty nice format. Basically, a firendlier superset of JSON
Interesting. I hadn't seen that. It's not just a format though, it defines a lot of behavior as well. I think we may offer some guidelines for Ren library behaviors, but I don't want to head down the path Hocon has. And some things just seem like a bad idea. e.g.:
// this is an array with one element, the string "1 2 3 4"
[ 1 2 3 4 ]
// this is an array of four integers
[ 1
  4 ]
It did remind me of something on a Units type format. They talk about n^2 vs n^10 byte values and, e.g. the kilo vs kibi prefix or kB vs Ki. For byte units, my thought was to do something like binary! where you would do KB2 or KB10.
Wonky case sensitivity
(not that there is a better solution per se)
I wish there was a page with side by side JSON vs this for example.

Map comments (also posted in Gitter)
I'm considering both [] and () as list and map brackets for Ren. What I haven't considered is the newer concept of allowing any value as a key. If Ren supports that, does it even need a separate map type? If Ren requires set-word keys, Red can directly support Ren maps, but not the other way around. Red maps would have to become Ren lists. If we do that, we lose the ability to distinguish them from parens when exchanged via Ren.
The idea of allowing () for lists is that it makes Ren more Redbol compatible, as well as flexible for those not used to square brackets. We may decide that more constraints are better, at least to begin with.
There is nothing that says Ren has to require pairs of values either, though there is certainly merit in that. We could just as easily say that a leading # before a list is just a hint.
e.g., if there is no map hint, the loader should never try to coerce the result to a map, if there is a hint, the loader decides what type to coerce to based on contents. If there is no outer list, as in a streaming scenario, there is implicitly no hint.
This came from seeing!-datatype that defines literal map! syntax in Red.
Remember that map! in Red is just a specialized version of hash!.
And hash! is as flexible as block! is.
Understood. The question is not what Red can do, but what Ren should support.
Well, if you move too far from Redbol syntax, I'm not sure where you want to go with Ren.

Last message posted 159 weeks ago.