For a pragmatic, really readable configuration file format, TOML never disappointed me ( https://github.com/toml-lang/toml#user-content-local-date ). - This is human readable contrary to the JSON family and its {} abuses. - It is not space / ident base contrary to YAML that becomes very quickly a mess to write and a mess to parse.
TOML is almost perfect. The only things I don't like are the need for commas and the double brackets.
Dhall: A Non-Repetitive Alternative to YAML
41–50 of 181 posts
Re: Dhall: A Non-Repetitive Alternative to YAML
#42Hmm... So the authors claim that their language is guaranteed to terminate for all well-typed programs. That is actually a nice spot for configuration languages. Yet, I wonder how a) they guarantee it, as I have seen no obvious link to the language's semantics b) useful this is in practice. Nevertheless, very nice approach, indeed.
Re: Dhall: A Non-Repetitive Alternative to YAML
#43Earlier quoted context omitted.
Dhall heavily borrows both ideas and syntax from the ML family of languages. E.g. Haskell, OCaml, Elm, Purescript Colons are used for type signatures. Commas are presumably required because you can have multi line and nested records. (don't quote me on this, not a parser expert) The comment syntax is from Haskell. Not saying this syntax is familiar to everyone , but it is familiar to some. The lineage of the syntax m…
Yeah, but how is this relevant? YAML, for example, makes JSON a subset, which lets it consume existing JSON without any need for conversion. It's easy to learn, and readable. Leading commas are eyesores. Plus, not everybody is a fan of ML! These are not mass market languages.
Re: Dhall: A Non-Repetitive Alternative to YAML
#44Earlier quoted context omitted.
So? They live in the same solution domain for the same problem. Moreover, Dhall can generate (typechecked) YAML and JSON.
It's not even in the same solution space. I can't replace my YAML with Dhall and consume it directly. I have to now depend on the converter to go from Dhall -> YAML/JSON. All I did was add another layer of complexity into my config. Maybe you'll benefit from the added abstraction; I see the value in having "typed" configs that are semi-scriptable but not turing complete. But it's in no way a "replacement".
If that was in fact all you had done, it would not be worth it. But it might remove a ton of boilerplate from your YAML.
Re: Dhall: A Non-Repetitive Alternative to YAML
#45What's with the commas at the start of lines?
Re: Dhall: A Non-Repetitive Alternative to YAML
#46Immediate response? I hate commas at the start of lines and I would prefer not to have curly braces in a human editable/readable format. Neither reason is terribly rational but my first impressions weren't great.
are not a requirement.
Re: Dhall: A Non-Repetitive Alternative to YAML
#47Earlier quoted context omitted.
Makes it easier when commenting out. Use this trick for SQL and JS too (to prevent trailing comma issue)
I don't get why you'd build a language in 2019 which disallows a trailing comma in lists.
Re: Dhall: A Non-Repetitive Alternative to YAML
#48Re: Dhall: A Non-Repetitive Alternative to YAML
#49So far, only comments complaining about syntax. You can do better, HN!
Re: Dhall: A Non-Repetitive Alternative to YAML
#50Earlier quoted context omitted.
Dhall heavily borrows both ideas and syntax from the ML family of languages. E.g. Haskell, OCaml, Elm, Purescript Colons are used for type signatures. Commas are presumably required because you can have multi line and nested records. (don't quote me on this, not a parser expert) The comment syntax is from Haskell. Not saying this syntax is familiar to everyone , but it is familiar to some. The lineage of the syntax m…
Yeah, but how is this relevant? YAML, for example, makes JSON a subset, which lets it consume existing JSON without any need for conversion. It's easy to learn, and readable. Leading commas are eyesores. Plus, not everybody is a fan of ML! These are not mass market languages.
YAML has its detractors and many of the criticisms against it are valid. It’s ambiguous and confusing and deeply nested significant white space, with odd indentation rules and optional syntax, is incredibly hard to follow as a human.