Earlier quoted context omitted.
Jinja is a text templating language. A valid ninja template may not produce valid JSON/YAML/etc. Sometimes you need more power than a config language gives you, specifically when you want reuse. Helm uses something like jinja, but the template files are often complex and messy (and they are looking into supporting Lua to deal with these problems). CloudFormation built function semantics on top of JSON/YAML twice: onc…
Why not jq, then?
Jsonnet – A data templating language
51–60 of 90 posts
Re: Jsonnet – A data templating language
#52There's a real need for JSON templating languages not targeting developers. Tools like Zapier, Customer.io's webhooks, etc. allow integration with arbitrary APIs and have become a standard part of many marketing/sales stacks. These apps use things like Jinja, Mustache, or Liquid which are great for text but not JSON templates. Curly braces as primary delimiters, not allowing trailing commas on final elements, and oth…
What is it about "curly braces as primary delimiters" that you think is a hassle? What would you suggest instead?
Re: Jsonnet – A data templating language
#53Re: Jsonnet – A data templating language
#54Also check out https://dhall-lang.org It's GCL but with a strong type system and termination guarantees. I personally like the syntax a bit more than jsonnet. It's a bit less noisy. I'm also a bit biased because I work on https://github.com/dhall-lang/dhall-kubernetes . We're currently working on a 2.0 release so the current state of the repo is a bit in turmoil. Programmable configuration language like dhall an json…
Re: Jsonnet – A data templating language
#55Also check out https://dhall-lang.org It's GCL but with a strong type system and termination guarantees. I personally like the syntax a bit more than jsonnet. It's a bit less noisy. I'm also a bit biased because I work on https://github.com/dhall-lang/dhall-kubernetes . We're currently working on a 2.0 release so the current state of the repo is a bit in turmoil. Programmable configuration language like dhall an json…
Just my two cents but I would go against the first interaction with the user being find the bug, I didn't didn't find it and missed the point, granted I didn't take much time and I'm on mobile, but I guess that's the reality for many people if not most :)
Re: Jsonnet – A data templating language
#56All the people suggesting to use JS instead of Jsonnet are completely missing the point. Jsonnet is a functional lazy evaluated language that supports powerful referential concepts. Unfortunately the website sucks at getting this across. JS on the other hand is an imperative programming language. If you say "use JS" you may as well say "use Python", the 2 are equivalent in this context and neither are in the same cla…
Re: Jsonnet – A data templating language
#57Aren't they supposed to be predefined values?
Re: Jsonnet – A data templating language
#58Finally a public version of GCL/Borgcfg :-) For people who doesn't know, GCL (Generic/Google Config Language) is a language that uses dynamic scope. You can define a `template` object with a variable defined as `external`. This way you can create similar objects by providing a concrete value for those `external`s at the time of instantiating. The following paper was referenced in Google's borg paper and gives a good…
Maybe it’s because I’m not a top 1% intelligence that I don’t get this but under what circumstances would configurations become complex enough to where this becomes necessary?