Live data from Hacker News

TOML – Tom's Obvious, Minimal Language

toml.io

51–60 of 163 posts

Re: TOML – Tom's Obvious, Minimal Language

#52

Of configuration file formats, TOML is my favorite. It hits the right balance of power and simplicity, it's been able to handle my needs with minimal effort and fuss. I tried Python's INI for configuration, but it was both too simple and too complex at the same time, very frustrating. YAML is a nightmare, the formatting is way too easy to get wrong and accidentally break your configuration. JSON is too strict/simple.…

JSON is too strict/simple

This is why I like JSON!

I have seen the horrors of XSLT and I’m never going back.

Re: TOML – Tom's Obvious, Minimal Language

#53

TOML superficially looks clean, but it has many of the same problems other similar languages have. Such file formats are typically used for configuration files. Yet, a substantial amount of effort was expended on data types not commonly seen in configuration files, such as a date-time-offset. Meanwhile, much more common data types typically used in configuration files is missing, such as GUIDs, IP Addresses, and byte…

I've been using TOML recently and what displeases me most is that almost all string values need to be quoted.

Array of objects is terrible in TOML. I grudgingly use it only because it's categorically better than YAML IMO and INI isn't powerful enough.

Re: TOML – Tom's Obvious, Minimal Language

#54

YAML and TOML wouldn't have been necessary if JSON had been slightly more expressive. If JSON had * comments * bareword (not double quoted) object key names it'd be a much more suitable configuration file format for everything, and I don't think we'd see the motivation to make things like TOML and YAML.

Yep. And trailing commas,

Re: TOML – Tom's Obvious, Minimal Language

#55
post #31

TOML sucks in so many ways. It is about 8x better than YAML, INI, or JSON though. It is good enough that I can ignore its flaws.

JSON should be banned for configuration, if only for the fact it doesn’t support comments.

JSON is great, but not for config: It was never really meant to be written by humans.

Re: TOML – Tom's Obvious, Minimal Language

#56
post #27

Earlier quoted context omitted.

I think terseness and readability are often at odds past a certain point, and TOML seems to optimize for readability at the expense of terseness. E.g., having to specify column names again and again is tedious to write, but makes the file easier to read and modify safely.

Yeah, I think toml is great short/simple config files, yaml is good for medium length/complexity, and I have yet to see anything that’s not painful for long config files.

There is always cutting to the chase and using SQLite.

https://www.sqlite.org/appfileformat.html

Re: TOML – Tom's Obvious, Minimal Language

#57

Earlier quoted context omitted.

JSON should be banned for configuration, if only for the fact it doesn’t support comments.

JSON is great, but not for config: It was never really meant to be written by humans.

Of course it was meant to be written by humans - every programming language and text based data format was meant to be both written and read by humans. JSON is basically Javascript objects, and Javascript was definitely meant to be written by humans.

Re: TOML – Tom's Obvious, Minimal Language

#58

TOML superficially looks clean, but it has many of the same problems other similar languages have. Such file formats are typically used for configuration files. Yet, a substantial amount of effort was expended on data types not commonly seen in configuration files, such as a date-time-offset. Meanwhile, much more common data types typically used in configuration files is missing, such as GUIDs, IP Addresses, and byte…

Yah, you gotta point.

Re: TOML – Tom's Obvious, Minimal Language

#59

“Obvious” is subjective. I find TOML to be remarkably confusing and surprising and UNobvious, whereas YAML makes perfect sense to me, even though plenty of folks hate it. Essentially, the name is pretty obnoxious in multiple ways, given that it’s basically just an extension of the long-established INI format.

YAML makes perfect sense until one of its many, many edge cases bites you.

There is a subset of yaml that is almost good. But even then, there are cases where yaml is interpreted differently the average human would expect.

Re: TOML – Tom's Obvious, Minimal Language

#60
post #32
post #10

I'm personally sick of yet-another-config-formats. Why did designing metaformats become cool? They all have warts because using the same symbolic notation for data and structure leads to encoding issues that have cognitive overhead. So instead of getting used to the pratfalls involved in making mistakes in one format/library set, we can do it in a whole bunch of different ones. And of course if anyone uses the new fo…

> I'm personally sick of yet-another-config-formats. Why did designing metaformats become cool? I can't seem to find a date for it, but I think TOML is pretty old, so probably predates a lot of these YACFs. I think that the problem is that it's such an easy workflow: 1. No existing config format is perfect. Look at this should-be easy thing I want to do that isn't easy! 2. Create a new format that makes the desired s…

3. Realize that making a good general purpose config language that works well for a variety of different use cases is actually quite difficult.
Post reply on HN