5 ms·
Writing a Faster Jsonnet Compiler (2018)
- zokier 8y agoJsonnet, not Jsonata. Damn, I was excited for a moment there. Well, it was an interesting article anyways.
- chme 8y agoWell it might be fast, but Java/Scala doesn't sound like it is very compact and easy to deploy. It results in a ~10MB jar file + the java runtime.
- JoshRosen 8y agoThis can be somewhat mitigated by AOT compilation. Here's a link to some experiments from using SubstrateVM to create a self-contained executable from sjsonnet: https://github.com/databricks/sjsonnet/issues/2 https://github.com/databricks/sjsonnet/issues/2
- wikibob 8y agoNot mentioned is the official GoLang version of the Jsonnet compiler. https://github.com/google/go-jsonnet https://github.com/google/go-jsonnet In my experience the Go version is 10x faster than the original C++ implementation due to improvements. The only thing missing in the Go version is the formatter.
- mpartel 8y agoIt's mentioned in passing a couple of times, so I assume they've tried it wasn't faster for them.
- rrampage 8y agoAs someone who is new to configuration-based langages, how is Jsonnet different from Dhall? Do they fill the same niche? Does Jsonnet offer similar guarantee of termination of the config programs like DHall?
- ithkuil 8y agounlike DHall, Jsonnet is Turing complete and untyped. In a way that might make it a bit easier to approach but harder to reason about your configs.
- sparkprime 8y agoTermination is a red herring, the real problem you want to be worried about is configs that take more CPU / RAM than you have spare. Restricting to primitive recursion does not help there. See https://landing.google.com/sre/workbook/chapters/configuration-specifics/#guarding-against-abusive-configuration https://landing.google.com/sre/workbook/chapters/configurati...