Live data from Hacker News

TOML, Tom's Own Markup Language

github.com

51–60 of 173 posts

Re: TOML, Tom's Own Markup Language

#51
post #49
post #43

Earlier quoted context omitted.

I use it liberally, but the only thing that I find wrong with json is the [\u2028\u2029] issue: {"The invisible character":"really messes with javascript "} Copy the text and paste it in console.

Nitpick: that's an issue with JavaScript, not JSON.

I'd agree if JSON had a different name, but given that it is called "JavaScript Object Notation" on the main page (http://json.org/) there's an implicit expectation that it's somehow related to javascript.

Re: TOML, Tom's Own Markup Language

#52
post #47

Earlier quoted context omitted.

In the authors own words[1]: { 'because': { '80': 'percent' }, {'of': 'JSON', 'is': 'brackets' } } [1] https://github.com/mojombo/toml/issues/2#issuecomment-140029...

That's actually not valid JSON -- should use double quotes { "because": { "80": "percent" }, {"of": "JSON", "is": "brackets" } }

That's not valid JSON either! (The second value has no key). Needs to be:

{ "because": [{ "80": "percent" }, {"of": "JSON", "is": "brackets" }] }

Re: TOML, Tom's Own Markup Language

#55

It seems to me that YAML does this better already (with parsers which are already high-quality). If we want simplicity, then why not make sure it is a subset of YAML?

Agreed, I'd much rather have a normalized subset of YAML without the object serialization stuff (I don't even understand why it's there: why take a format intended to be read by humans and then muck it up with complex and dangerous object serialization notation).

Re: TOML, Tom's Own Markup Language

#56
post #47

Earlier quoted context omitted.

That's actually not valid JSON -- should use double quotes { "because": { "80": "percent" }, {"of": "JSON", "is": "brackets" } }

That's not valid JSON either! (The second value has no key). Needs to be: { "because": [{ "80": "percent" }, {"of": "JSON", "is": "brackets" }] }

And this is only 10% curly braces, not counting spaces.

Re: TOML, Tom's Own Markup Language

#57
post #15

Would this be considered legal? [ [1,2], ["a", "b"] ]

This has now been clarified - it is legal

Which I find to be quite odd [1]. Data types in `TOML` can be mixed at the level of the hash table. Arrays ought to be homogeneous.

[1] - https://github.com/mojombo/toml/issues/28

Re: TOML, Tom's Own Markup Language

#59
post #7
post #6

Earlier quoted context omitted.

Well, he's the CEO of Github, and he's probably been drinking, so I suppose a little bit of arrogance is expected.

For the love of baby jesus why can't people get the 'H' right.

github likes daring escapades with sharks

Re: TOML, Tom's Own Markup Language

#60

I note that, like many erstwhile specs, TOML does not document the escape sequences accepted in strings. Nor does it exhaustively specify integer formats and float formats - rather ironic for a spec that advertises "TOML is designed to be unambiguous and as simple as possible." The limitation on array types seemed fairly arbitrary at first glance, but after thinking it over I realized it aided compatibility with lang…

>I realized it aided compatibility with languages that do not support homogeneous arrays.

Don't you mean languages that only support homogeneous arrays (or languages that do not support non-homogeneous)?

As the spec says that the array elements must all be of the same type, thus homogeneous.

If I a mistaken, can you please explain why?

Post reply on HN