Live data from Hacker News

Yglu: YAML augmented with an expression language

yglu.io

1–10 of 31 posts

Re: Yglu: YAML augmented with an expression language

#2
What is this for? YAML in my experience is used for writing and maintaining config at some supposed sweet-spot between human-readable and machine-readable structure.

In my experience also, YAML is already too feature-laden for it's own good in this regard, when what people usually want is just a more human-readable JSON.

Using Yglu for config seems like a bad idea (the whole point of config is that it's not code!) - so what is it for?

Re: Yglu: YAML augmented with an expression language

#5
post #2

What is this for? YAML in my experience is used for writing and maintaining config at some supposed sweet-spot between human-readable and machine-readable structure. In my experience also, YAML is already too feature-laden for it's own good in this regard, when what people usually want is just a more human-readable JSON. Using Yglu for config seems like a bad idea (the whole point of config is that it's not code!) -…

For large, repetitive configurations (Kubernetes configs, CloudFormation templates, CI job configurations, etc) you often want ways to abstract and/or DRY your configurations. Kubernetes folks use mustache/jinja/Go templates via Helm, which is a real mess. CloudFormation builds its own (shitty) evaluation language on top of YAML. This presumably aims to improve on those sort of hacky solutions. I feel strongly that the "right" solution is either (1) generate a YAML config with Python/JS/etc or (2) use a terminating expression language (I think that may be what this is). Since (2) implies a much steeper learning curve for average developers, I opt for (1).

Re: Yglu: YAML augmented with an expression language

#6
post #2

What is this for? YAML in my experience is used for writing and maintaining config at some supposed sweet-spot between human-readable and machine-readable structure. In my experience also, YAML is already too feature-laden for it's own good in this regard, when what people usually want is just a more human-readable JSON. Using Yglu for config seems like a bad idea (the whole point of config is that it's not code!) -…

For large, repetitive configurations (Kubernetes configs, CloudFormation templates, CI job configurations, etc) you often want ways to abstract and/or DRY your configurations. Kubernetes folks use mustache/jinja/Go templates via Helm, which is a real mess. CloudFormation builds its own (shitty) evaluation language on top of YAML. This presumably aims to improve on those sort of hacky solutions. I feel strongly that t…

I agree with you that the job that Yglu is trying to do would be much better done (and a hell of a lot more readable) as Python code.

Re: Yglu: YAML augmented with an expression language

#7
Dhall[1] is a similar concept, though instead of augmenting a particular format, it is an implementation of a simple pure functional programming language (with a very expressive type system which guarantees termination). Dhall programs can then be evaluated to several different formats (currently JSON, YAML and XML).

[1]: https://dhall-lang.org/

Re: Yglu: YAML augmented with an expression language

#9
post #7

Dhall[1] is a similar concept, though instead of augmenting a particular format, it is an implementation of a simple pure functional programming language (with a very expressive type system which guarantees termination). Dhall programs can then be evaluated to several different formats (currently JSON, YAML and XML). [1]: https://dhall-lang.org/

That is fascinating. I feel like I've seen this before and forgotten about. Really neat and I love that you can grab shared code from a CORS URI. That's great, especially for internal code sharing.
Post reply on HN