So far, only comments complaining about syntax. You can do better, HN!
Dhall: A Non-Repetitive Alternative to YAML
21–30 of 181 posts
Re: Dhall: A Non-Repetitive Alternative to YAML
#22To 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…
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 specifically focused on human friendliness (except uniform lists) and readability
As an underappreciated feature, the ability to have scoped keyvalues allow to define nested table with flat statements.
Re: Dhall: A Non-Repetitive Alternative to YAML
#23Earlier 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…
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?
If people are curious about examples of DSLs in Haskell projects, they can look at cabal files, persistent's entity syntax, and servant's type level DSL for API definitions. These go on a scale from "fully separate" to "embedded in the language". (Persistent is in between, it uses something called Template Haskell)
The stack Haskell build/project management tool uses YAML files.
- - -
I think Dhall's power is not that it is an alternative syntax to YAML. It's more about the typesystem than anything else. If you're sold on types, then Dhall is definitely worth a look
Re: Dhall: A Non-Repetitive Alternative to YAML
#24Earlier 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…
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?
Re: Dhall: A Non-Repetitive Alternative to YAML
#25So far, only comments complaining about syntax. You can do better, HN!
Re: Dhall: A Non-Repetitive Alternative to YAML
#26Earlier quoted context omitted.
How is this at all related to Dhall? It looks like a completely different thing with a completely different purpose.
They are both text based configuration file formats made to be easier for humans to interact with, so I'm not sure what you're confused about?
Re: Dhall: A Non-Repetitive Alternative to YAML
#27Immediate 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.
Re: Dhall: A Non-Repetitive Alternative to YAML
#28- 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.
Re: Dhall: A Non-Repetitive Alternative to YAML
#29Earlier quoted context omitted.
They are both text based configuration file formats made to be easier for humans to interact with, so I'm not sure what you're confused about?
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.
Re: Dhall: A Non-Repetitive Alternative to YAML
#30Earlier 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?
Its more like an alternative to scripts generating configuration from templates. they claim that this is better because you cant for example write an infinite loop ruining the script.