Stream: coq-community devs & users

Topic: Alternatives to mustache for the templates


view this post on Zulip Théo Zimmermann (Aug 12 2020 at 14:13):

But I'm now frequently wondering if we haven't overgrown the mustache language for our templates.

view this post on Zulip Anton Trunov (Aug 12 2020 at 15:15):

Are there any better alternatives to mustache?

view this post on Zulip Théo Zimmermann (Aug 12 2020 at 15:25):

No idea

view this post on Zulip Karl Palmskog (Aug 12 2020 at 15:28):

we could go "full Ruby". Basically Mustache is a thin layer on top of Ruby, that was then reimplemented. You can do some very crazy stuff in Ruby with a templating language. I used to use Erb: https://puppet.com/docs/puppet/5.5/lang_template_erb.html

view this post on Zulip Paolo Giarrusso (Aug 12 2020 at 21:09):

is there nothing good in OCaml?

view this post on Zulip Paolo Giarrusso (Aug 12 2020 at 21:10):

I'm not asking because of opinions on OCaml vs Ruby

view this post on Zulip Paolo Giarrusso (Aug 12 2020 at 21:12):

I just know opam better than gem or bundler — my yearly googling of how to bundle is a pain

view this post on Zulip Paolo Giarrusso (Aug 12 2020 at 21:13):

(this is not my cleverest opinion and you should feel free to ignore it, but other users might have the same problem?)

view this post on Zulip Anton Trunov (Aug 13 2020 at 08:04):

Not that I aware of. Btw, We don't even have mustache + yaml support in OCaml. The OCaml mustache implementation takes only json in, afair

view this post on Zulip Théo Zimmermann (Aug 13 2020 at 09:03):

I agree with the concern that Ruby might be a bit far off for a community that is most used to functional languages and Coq and OCaml in particular.

view this post on Zulip Rudi Grinberg (Aug 18 2020 at 18:28):

@Anton Trunov is mustache + yaml well specified somewhere? Otherwise, I think you can just convert yaml to json and proceed

view this post on Zulip Anton Trunov (Aug 18 2020 at 18:38):

@Rudi Grinberg I'm only aware of this man page http://mustache.github.io/mustache.1.html

view this post on Zulip Anton Trunov (Aug 18 2020 at 18:41):

Looks like this is the spec: https://github.com/mustache/spec

view this post on Zulip Rudi Grinberg (Aug 18 2020 at 19:19):

I see. Well it shouldn't be too hard to add this support for the mustache implementation in OCaml. It's just a shame that it will incur a fairly heavy dependency on ocaml-yaml (C bindings).

view this post on Zulip Paolo Giarrusso (Aug 18 2020 at 21:03):

Yaml is absolutely a beast to deal with, so many languages only have implementations wrapping C bindings...

view this post on Zulip Karl Palmskog (Aug 18 2020 at 21:08):

another argument for using YAML is that we have other configuration files in Coq projects that already use it, namely the ones for Docker-Coq Action and Travis.

view this post on Zulip Karl Palmskog (Aug 18 2020 at 21:09):

I'm not sure I could stay sane in an environment with 3-4 different configuration file languages


Last updated: Feb 05 2023 at 14:02 UTC