Live data from Hacker News

The Dhall Configuration Language

dhall-lang.org

31–40 of 192 posts

Re: The Dhall Configuration Language

#31
Apparently I'm in the minority that feels config languages should be little more than namespaces and key-value storage and should not be programmable.

I would not want to use a bash script as a config file, for example.

Re: The Dhall Configuration Language

#32
post #5

{ home = "/home/bill" , privateKey = "/home/bill/.ssh/id_ed25519" , publicKey = "/home/blil/.ssh/id_ed25519.pub" } This is the most awkward abuse of formatting I've seen in a long time. Just allow/require a final trailing comma, and this nonsense goes away

I would actually prefer no comma's {:home "/home/bill" :private-key "/home/bill/.ssh/id_ed25519" :public-key "/home/bill/.ssh/id_ed25519.pub"}

That's the same as a leading comma.

Re: The Dhall Configuration Language

#35

Earlier quoted context omitted.

I would actually prefer no comma's {:home "/home/bill" :private-key "/home/bill/.ssh/id_ed25519" :public-key "/home/bill/.ssh/id_ed25519.pub"}

That's the same as a leading comma.

How so? Leading comma puts the terminator on the line after what it's terminating (which is why it bothers me, can't speak for others). This doesn't do that.

Re: The Dhall Configuration Language

#36
post #31

Apparently I'm in the minority that feels config languages should be little more than namespaces and key-value storage and should not be programmable. I would not want to use a bash script as a config file, for example.

I too don't want to or would use a bash script as a config file. That's the point of dhall: you get good static types and it's not turing complete, so you get a lot of the safety and code reusability tools without the pitfalls of a general purpose programming language.

And, have you ever worked with giant configs in json or yaml? It becomes incredibly painful to manage.

Re: The Dhall Configuration Language

#37
post #5

{ home = "/home/bill" , privateKey = "/home/bill/.ssh/id_ed25519" , publicKey = "/home/blil/.ssh/id_ed25519.pub" } This is the most awkward abuse of formatting I've seen in a long time. Just allow/require a final trailing comma, and this nonsense goes away

Yeah, I also really dislike this mixing up of indentation levels because of a language limitation. The "{" denotes a container, and the "," a separation between items of said container, for me it makes sense for them to be nested a level deeper

Re: The Dhall Configuration Language

#40
post #33

{- You can optionally add types `x : T` means that `x` has type `T` -} let Config : Type = Config's type is Type? Clear as mud.

Config is a type, so it's type is Type.

Figured, but it's a pretty goofy way to introduce it after that comment.

[EDIT] I mean, you can almost "who's on first?" this.

"OK, what type do you want this to be?"

"Type."

"Yes, what type do you want it to be?"

"Type."

"Great, ok, yes, the type, what type is Config?"

"Type."

"WHAT IS THE NAME OF THE TYPE YOU WANT CONFIG TO BE???"

"Type."

flips desk

Post reply on HN