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.
Dhall: A Non-Repetitive Alternative to YAML
31–40 of 181 posts
Re: Dhall: A Non-Repetitive Alternative to YAML
#32Earlier quoted context omitted.
That’s about the least interesting thing about Dhall. (It’s weird that they tout it prominently on the homepage.) There are so many flavors of syntax sugar for JSON, Dhall is a completely different beast.
You might want to ask the HN admins to rename the title for this post, then.
Re: Dhall: A Non-Repetitive Alternative to YAML
#33Re: Dhall: A Non-Repetitive Alternative to YAML
#34To me, worrying about config files seems like the ultimate exercise in bikeshedding. You either need a simple list of items (eg. dependencies) or key/value pairs. Use a text file or yml or json or whatever. Or you need templating, the use of functions, etc, like dhall provides. But then, why not use the language you're already using for the rest of your project, or a bash script to export some variables? Might sound…
One reason is that "configuration language" is an extremely wide topic. Some configs use yaml to encode bash scripts for example. Overall a reason enough is that human-friendly languages have different priority than parser-friendly ones. Honestly it is the reason I like TOML, with the exception of the date data type it cleanly maps to json (which everyone agrees it is a good enough serialization format) and it is spe…
Okay thanks, that's a good one. Readability might be a big deal.
Re: Dhall: A Non-Repetitive Alternative to YAML
#35Earlier 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
#36Earlier quoted context omitted.
I don't get why you'd build a language in 2019 which disallows a trailing comma in lists.
On the other hand - why would you build a language where commas aren’t treated as whitespace?
Re: Dhall: A Non-Repetitive Alternative to YAML
#37Re: Dhall: A Non-Repetitive Alternative to YAML
#38Earlier quoted context omitted.
Weird that it's billed as an alternative to YAML, but effectively has zero roots or influence from YAML. Looks more like an alternative to... whatever configuration language is popular in ML language projects?
So? They live in the same solution domain for the same problem. Moreover, Dhall can generate (typechecked) YAML and JSON.
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".
Re: Dhall: A Non-Repetitive Alternative to YAML
#39Immediate 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.
It looks that Dhall has been inspired of the Elm language [0] and it's formatter. [0]: https://guide.elm-lang.org/