News for hackers. Stuff that matters.
Re:Dhall: A Non-Repetitive Alternative to YAML by cryptonector on Thursday July 04, 2019 @09:23PM (#20359224)
I mean, jq is a powerful programming language. Did you look at the link I posted?
Re:Dhall: A Non-Repetitive Alternative to YAML by Quekid5 on Friday July 05, 2019 @11:18AM (#20363153)
Sure, I'm familiar with it. It's nothing compared to what Dhall can do.

... unless of course it's grown to a similar point. As of about a year ago, for some complex transformations I had to stitch together multiple invocations of jq using pipes, etc. etc. That may have been my inexperience with using it, though.

Regardless, the point about typing stands. Dhall uses structural typing/subtyping which turns out to be hugely useful for config transformation.

Re:Dhall: A Non-Repetitive Alternative to YAML by cryptonector on Friday July 05, 2019 @11:26AM (#20363241)
I never have to "stitch together multiple invocations of jq using pipes". There was a time when I did have to, but that was years ago, and it now has the features needed to avoid that. Not sure what the point about typing was -- you can do the same derivation of data from a master entity with or without strong typing (though my preference is always for strong typing, which jq lacks).
Re:Dhall: A Non-Repetitive Alternative to YAML by Quekid5 on Friday July 05, 2019 @02:06PM (#20364466)
> you can do the same derivation of data from a master entity with or without strong typing (though my preference is always for strong typing, which jq lacks).

Yes, of course you can. The point is that the strong typing helps prevent inadvertent and hard-to-spot mistakes. In jq even simple typos of a field name can lead to "empty result set" silent failures instead of "what do you mean!" loud failures. That's a big thing.

Re:Dhall: A Non-Repetitive Alternative to YAML by cryptonector on Friday July 05, 2019 @03:47PM (#20365282)
Strong typing generally doesn't speak to "how many values this expression should produce", only their types. Not saying it couldn't, but that even in Haskell you don't quite get that.
Re:Dhall: A Non-Repetitive Alternative to YAML by Quekid5 on Friday July 05, 2019 @04:14PM (#20365484)
I was talking about a mismatched field name. What case are you talking about?

EDIT: Actually, responding to

> Strong typing generally doesn't speak to "how many values this expression should produce"

Have you heard of affine/linear types?

Re:Dhall: A Non-Repetitive Alternative to YAML by jessaustin on Friday July 05, 2019 @10:15AM (#20362651)
Well, you did format it so that it's not clickable...