dhall-aws-cloudformation
sjsonnet
Our great sponsors
dhall-aws-cloudformation | sjsonnet | |
---|---|---|
2 | 2 | |
28 | 253 | |
- | 0.4% | |
6.6 | 6.9 | |
about 2 months ago | about 1 month ago | |
Haskell | Scala | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dhall-aws-cloudformation
-
The Dhall Configuration Language
I have been writing a fair amount of Dhall using autogenerated CloudFormation bindings ( https://github.com/jcouyang/dhall-aws-cloudformation/ ). It is a fantastic way to reduce boilerplate and factor out recurring blobs. My main frustration is that the type checker is not smart enough (or maybe the type system is undecidable?) - every time you want to use a polymorphic function, you must pass in the type parameters yourself (this is also true for empty lists and `None`). This makes simple FP idioms extremely noisy, to the point where you're better off writing longhand. In a language that's meant to be alleviating YAML/JSON boilerplate.
It's still a massive improvement, but it could be so much better if the typechecker was smarter.
- Typecheck and Modularize AWS CloudFormation with Dhall
sjsonnet
-
The Dhall Configuration Language
> jsonnet seemed like a great idea to me, but I've experienced extremely low performance.
Although each implementation of jsonnet has some quirks, take a look at (scala-based) sjsonnet^1 or go-jsonnet^2 for improved performance. We use go-jsonnet because of some issues we had with the scala version - but it does seem to be the fastest by a large margin.
There's also a Rust version^3 that claims to be the fastest yet^4, but I haven't experimented with it at all.
[1]: https://github.com/databricks/sjsonnet
[2]: https://github.com/google/go-jsonnet/
[3]: https://github.com/CertainLach/jrsonnet
[4]: https://gist.github.com/CertainLach/5770d7ad4836066f8e0bd91e...
-
Template engines / expression languages for YAML?
Check out Jsonnet, specifically this Scala implementation. I'm currently generating a lot of OpenAPI YAML using it, and couldn't be happier.
What are some alternatives?
dhall-nix
circe-yaml - YAML parser for circe using SnakeYAML
cachix - Command line client for Nix binary cache hosting:
jrsonnet - Rust implementation of Jsonnet language
kubernetes-mixin - A set of Grafana dashboards and Prometheus alerts for Kubernetes.
go-jsonnet
skycfg - Skycfg is an extension library for the Starlark language that adds support for constructing Protocol Buffer messages.
shake-dhall - Facilities for using Shake + dhall
dhall-manual - The Dhall Configuration Language Manual
dhall-kubernetes - Typecheck, template and modularize your Kubernetes definitions with Dhall