1. 29
  1. 5

    My impression after messing around in this space is that CUE is a better fit for the task of configuration, though certainly not as good a gateway drug to Haskell.

    1. 2

      Wait, if you can’t compare string values in Dhall what do you do instead?

      1. 3

        If you need to work with a string that can have a finite set of possible values then use an enum type. If the string can be an abritrary value, then you probably ought not compare it.

        1. 1

          presumably you have to convert them to the same string type first? (e.g. if one is raw bytes and the other is decoded, or one is list of 32-bit chars and the other is vector of utf-8 bytes)

        2. 2

          Dhall is great for configuration and having pure functions for config migrations is really powerful.

          Having said that the dhall-kubernetes integration looks a little bit weird. Since Kubernetes configs have quite a lot of optional fields almost everything needs to be wrapped in Some and that makes the dhall kubernetes files kind of hard to read (at least for me). See: https://github.com/dhall-lang/dhall-kubernetes#quickstart---a-simple-deployment

          1. 1

            Agreed, it makes YAML look sexy.