Live data from Hacker News

Tom's Obvious, Minimal Language (like INI, only better)

github.com

11–20 of 31 posts

Re: Tom's Obvious, Minimal Language (like INI, only better)

#11
post #2

INI, JSON and YAML all have problems. None of them are serious enough for me to consider this for a small project with one or two config files required. Good to be able to point to a config file syntax done right though.

Do tell about the problems with JSON for use as a configuration object? Almost every language has a library that can parse JSON.

Re: Tom's Obvious, Minimal Language (like INI, only better)

#12

The format could be very simple, but... allowing comments after values make it unnecessarily complex to parse. For example: value = "example # no that's not a comment" # but here's one If inline comments where not allowed we could just check the first and last character for a quote and we know we have a string, same for arrays (check for [ and ]). But with inline comments, we need to parse the whole string. As far as…

That's not hard to parse. Inline comments are nice. You'll be doing more reading of files that writing of parsers.

Re: Tom's Obvious, Minimal Language (like INI, only better)

#13
post #2

INI, JSON and YAML all have problems. None of them are serious enough for me to consider this for a small project with one or two config files required. Good to be able to point to a config file syntax done right though.

Do tell about the problems with JSON for use as a configuration object? Almost every language has a library that can parse JSON.

It’s hard to author by hand. Ever added a comma after the last element in a list? It’s not very forgiving.

Re: Tom's Obvious, Minimal Language (like INI, only better)

#14
I don't know if this is the answer, but I'm a fan of someone trying.

I personally never jumped on YAML or JSON. I liked that they weren't XML, but they each felt like XML++ too much for me. There was still too much, I don't know, weirdness/typing/oops! Don't get me wrong, I think they were better than XML, but only marginally. It would be nice to see more of a phase change type of approach. I'd LOVE to see something like this (or something else) that involves much less typing/special characters/etc than YAML and JSON.

Personal opinion.

Re: Tom's Obvious, Minimal Language (like INI, only better)

#15

I don't know if this is the answer, but I'm a fan of someone trying. I personally never jumped on YAML or JSON. I liked that they weren't XML, but they each felt like XML++ too much for me. There was still too much, I don't know, weirdness/typing/oops! Don't get me wrong, I think they were better than XML, but only marginally. It would be nice to see more of a phase change type of approach. I'd LOVE to see something…

How many less characters could there be while still maintaining meaning? Could you show an example of what you'd prefer?

Re: Tom's Obvious, Minimal Language (like INI, only better)

#16

I don't know if this is the answer, but I'm a fan of someone trying. I personally never jumped on YAML or JSON. I liked that they weren't XML, but they each felt like XML++ too much for me. There was still too much, I don't know, weirdness/typing/oops! Don't get me wrong, I think they were better than XML, but only marginally. It would be nice to see more of a phase change type of approach. I'd LOVE to see something…

[deleted]

Re: Tom's Obvious, Minimal Language (like INI, only better)

#17
post #2

INI, JSON and YAML all have problems. None of them are serious enough for me to consider this for a small project with one or two config files required. Good to be able to point to a config file syntax done right though.

Do tell about the problems with JSON for use as a configuration object? Almost every language has a library that can parse JSON.

I like to put comments in my configuration files. How do you comment out blocks of a JSON configuration file?

Re: Tom's Obvious, Minimal Language (like INI, only better)

#18

I don't know if this is the answer, but I'm a fan of someone trying. I personally never jumped on YAML or JSON. I liked that they weren't XML, but they each felt like XML++ too much for me. There was still too much, I don't know, weirdness/typing/oops! Don't get me wrong, I think they were better than XML, but only marginally. It would be nice to see more of a phase change type of approach. I'd LOVE to see something…

How many less characters could there be while still maintaining meaning? Could you show an example of what you'd prefer?

> How many less characters could there be

"Less" characters? Do you mean physical smaller characters, like "e" instead of "E"? Or do you perhaps mean fewer characters?

http://en.wikipedia.org/wiki/Fewer_vs._less

Re: Tom's Obvious, Minimal Language (like INI, only better)

#19
post #2

INI, JSON and YAML all have problems. None of them are serious enough for me to consider this for a small project with one or two config files required. Good to be able to point to a config file syntax done right though.

You seem picky. :) But check out libconfig. Maybe it'll work for you.

Re: Tom's Obvious, Minimal Language (like INI, only better)

#20
Possible improvements occur to me:

1. If indentation is significant and required, dotted notation should be optional:

    [foo]
        [bar]
            [car]
The parser should be able to understand that this results in a foo.bar.car structure without explicitly using dotted notation in the keys.

2. Support include files. With #1 implemented, includes would be extremely powerful and flexible. Since indentation is required, no special syntax is needed to relatively position the included files. And without requiring dotted notation in keys, include files can be reused in a configuration (such as common settings in the [servers] section of the example).

Post reply on HN