
Writing a Faster Jsonnet Compiler (2018) - lihaoyi
https://databricks.com/blog/2018/10/12/writing-a-faster-jsonnet-compiler.html
======
wikibob
Not 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
It's mentioned in passing a couple of times, so I assume they've tried it
wasn't faster for them.

------
rrampage
As 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
unlike 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
Termination 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/configurati...](https://landing.google.com/sre/workbook/chapters/configuration-
specifics/#guarding-against-abusive-configuration)

------
chme
Well 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
This 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)

------
zokier
Jsonnet, not Jsonata. Damn, I was excited for a moment there. Well, it was an
interesting article anyways.

