News for hackers. Stuff that matters.
Re:Consul 1.0 Released by zenlikethat on Monday October 16, 2017 @08:02PM (#15487663)
It's really quite a nice config language -- I much prefer HCL to any of the alternatives. Has comments (unlike JSON), is properly nestable (unlike TOML), is extremely human readable and not too verbose, has a built-in pretty printer, etc.

I wasn't ever really a huge YAML fan. It's way too ambiguous and sensitive to whitespace. One erroneous space is way more likely to mess up your YAML file than your HCL file.

It's not perfect, but I actually would like to see MORE systems using HCL, not fewer.

Re:Consul 1.0 Released by willtim on Tuesday October 17, 2017 @03:39AM (#15489265)
HCL is not used in the rest API though. So we have to integrate our apps using both HCL and JSON. It's also schemaless, which means we have to guess the API using various "samples".
Re:Consul 1.0 Released by zenlikethat on Tuesday October 17, 2017 @04:46PM (#15494773)
Which REST API?
Re:Consul 1.0 Released by willtim on Thursday October 19, 2017 @02:07AM (#15505777)
Re:Consul 1.0 Released by daveroberts on Tuesday October 17, 2017 @02:09PM (#15493210)
How is TOML not properly nestable?
Re:Consul 1.0 Released by zenlikethat on Tuesday October 17, 2017 @04:34PM (#15494664)
Because in TOML you just specify additional keys after the first one, leading to redundancy and representing a structure that's actually nested as flat.

In TOML you can indent but it's not required:

    [[fruit]]
      name = "apple"
    
    [[fruit.physical]]
      color = "red"
      shape = "round"
In HCL it's all just one (properly nested) object and you can `fmt` it:

    fruit {
        name = "apple"
        physical {
            color = "red"
            shape = "round"
        }
    }
It seems arbitrary but really matters once you're nesting a few levels deep, which tends to happen in anything complex such as an orchestration system.