Live data from Hacker News

TOML – Tom's Obvious, Minimal Language

toml.io

111–120 of 163 posts

Re: TOML – Tom's Obvious, Minimal Language

#111
post #106

I discovered TOML a couple of years ago when I started playing with Hugo, as it was Hugo's format of choice for configuration files. I honestly find TOML harder to read and more complicated to use than YAML. I tried to look into it but frankly I still haven't found a use case where it made more sense to use TOML.

This has been my experience as well.

There's been times I wanted YAML support in a particular app; I've never wanted TOML support. If anything, it's been "ugh, I have to use TOML".

Re: TOML – Tom's Obvious, Minimal Language

#112
post #89
post #43

Earlier quoted context omitted.

Surely you shouldn’t be limited to types as interpreted and represented in the low-level config parser library but should have a strongly typed representation i of the config structure that you implement in whatever language you’re using. C# is a good example. JSON doesn’t have any of these types. It doesn’t even make a distinction between integers and other numbers. Yet it’s common practice to marshal these into the…

> At the end of the day, if you type it with your keyboard, it’s essentially a string. I mean .. yes, but that's the exact chaos we're trying to mitigate? The different types may all get serialised as strings, but their semantics are different. And the purpose of strong typing is to make it harder for people to put semantically wrong things in the wrong place. (This is semantic markup vs all over again, isn't it)

Deserializer provides that desired semantics. You can't express all types in markup language, because its type system is inherently limited.

Re: TOML – Tom's Obvious, Minimal Language

#113
post #106

I discovered TOML a couple of years ago when I started playing with Hugo, as it was Hugo's format of choice for configuration files. I honestly find TOML harder to read and more complicated to use than YAML. I tried to look into it but frankly I still haven't found a use case where it made more sense to use TOML.

Interesting how differently competent people can perceive things. To me, YAML is a cruel joke, and I carry suspicions about the competence of anyone who opts to use it out of all possible options. I think I've even grown to like XML configuration over it.

Re: TOML – Tom's Obvious, Minimal Language

#114
And so the language churn continues. This time for configuration. TOML is fine, I guess. It doesn't seem to offer much benefit over Yaml or JSON. In the absence of those it would be great. But in a world where Yaml and JSON exist it's yet another structured data format you have to learn.

Re: TOML – Tom's Obvious, Minimal Language

#115

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.

Otoh, I got plenty of support requests from people not understanding that the space at the end of a line in an .ini file is part of the value. (app is using glib ini parser)

Quoting at least makes it clear what's part of the value.

Re: TOML – Tom's Obvious, Minimal Language

#116

And so the language churn continues. This time for configuration. TOML is fine, I guess. It doesn't seem to offer much benefit over Yaml or JSON. In the absence of those it would be great. But in a world where Yaml and JSON exist it's yet another structured data format you have to learn.

It's not like TOML is new. I'm familiar with it because of Python's pip tool, and InfluxDB/Telegraf. Apparently it's also used in Rust's Cargo.

Re: TOML – Tom's Obvious, Minimal Language

#117
post #106

I discovered TOML a couple of years ago when I started playing with Hugo, as it was Hugo's format of choice for configuration files. I honestly find TOML harder to read and more complicated to use than YAML. I tried to look into it but frankly I still haven't found a use case where it made more sense to use TOML.

I’ve had all sorts of issues with yaml due to indentation, so I don’t use yaml anymore.

Re: TOML – Tom's Obvious, Minimal Language

#118

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…

You need to use strings to store guids or ips, it should not be a configuration language’s type

Re: TOML – Tom's Obvious, Minimal Language

#119
post #91

I had tons of headaches trying to get toml to do what's trivial in Json (nested arrays of objects of arrays of ... etc). 1/10 would not try again. For very simple, hear "flat" config it checks out. But then, so does yaml or even ini files. Anything requiring composite types was just a nightmare. I'd even prefer xlm before using toml again.

I never had to work with it seriously but I still don't get why people hate XML so much.

Personally I find it a lot less readable than things like JSON or TOML.

Re: TOML – Tom's Obvious, Minimal Language

#120

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.

Really? How so? I thought the whole reason it won over XML for HTTP stuff was precisely because it could be easily written and read by humans.
Post reply on HN