News for hackers. Stuff that matters.
Re:Dhall: A Non-Repetitive Alternative to YAML by nikolay on Thursday July 04, 2019 @02:13PM (#20356613)
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 by ljm on Thursday July 04, 2019 @03:26PM (#20357059)
Not everybody’s a fan of C++, yet still...

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.

Re:Dhall: A Non-Repetitive Alternative to YAML by ben509 on Thursday July 04, 2019 @05:12PM (#20357845)
Honestly, having wrestled with YAML, I find it's easy to write YAML and a bear to process it, in that it seems to be a "read-only" format for machines.

Given some YAML file, making any kind of automated change generally nukes the formatting entirely, let alone the comments. I'm sure there are some libraries that do it right, but there seem to be far more that are just awful.

One nice thing about Dhall is that there's a reference implementation written in Haskell where they have very good pretty printing libraries so it's likely that programs would be able to do automated updates to configuration.

Re:Dhall: A Non-Repetitive Alternative to YAML by ff_ on Thursday July 04, 2019 @05:36PM (#20358003)
Yep, we use the Haskell implementation as a library in Spago [0] and automatically migrating the configuration from old versions is a breeze as we can just manipulate the AST by pattern matching on it, e.g. see [1]

The above is quite standard in JSON/YAML too though, but an awesome thing you can do in Dhall is that - since you have functions - you can write migrations for Dhall data in Dhall itself, e.g. see [2]

[0]: https://github.com/spacchetti/spago [1]: https://github.com/spacchetti/spago/blob/a77b869edcfddd592f4... [2]: http://www.haskellforall.com/2017/11/semantic-integrity-chec...

Re:Dhall: A Non-Repetitive Alternative to YAML by mcaruso on Thursday July 04, 2019 @03:14PM (#20356999)
Seems like you're criticizing it just because it's different from what you're used to.
Re:Dhall: A Non-Repetitive Alternative to YAML by hk__2 on Thursday July 04, 2019 @03:44PM (#20357182)
> Seems like you're criticizing it just because it's different from what you're used to.

This is a valid criticism. There are already widely-used data formats; if you do something different it should be justified.

Re:Dhall: A Non-Repetitive Alternative to YAML by mcaruso on Thursday July 04, 2019 @05:15PM (#20357877)
I don't really see why the author needs to justify it. New languages with new syntax come out all the time, some become popular some do not. Sometimes a new language comes out with a different syntax and becomes popular, creating a new norm.

But in any case Dhall does actually follow a norm rather closely, just a different norm than the grandparent is used to. Namely, ML and other functional languages/research. Which makes sense since Dhall is a product of that community.

Re:Dhall: A Non-Repetitive Alternative to YAML by nikolay on Thursday July 04, 2019 @03:36PM (#20357122)
Yeah, it deviates from the norm and the expectations of most people, most of who are not even developers - lots of BAs today configure apps via such files.
Re:Dhall: A Non-Repetitive Alternative to YAML by GordonS on Thursday July 04, 2019 @06:31PM (#20358318)
Sorry, "BAs"?
Re:Dhall: A Non-Repetitive Alternative to YAML by nikolay on Thursday July 04, 2019 @06:44PM (#20358392)
Business Analysts