4 ms·
I’ll have to take a look at CUE; it might be worth using. But I have to ask: isn’t there something simpler which can handle taking a declarative specification
by rauhl 7y ago
I’ll have to take a look at CUE; it might be worth using.
But I have to ask: isn’t there something simpler which can handle taking a declarative specification and adding imperative behaviour to it? I’m writing — as anyone who knows me might suspect — of S-expressions & Lisp.
They have an advantage over CUE in that one might well choose to write one’s entire program in Lisp & S-expressions. It doesn’t look like CUE is intended to be the whole-program language.
I remember that Tcl used to be commonly used for config-files-which-need-a-bit-of-scripting, but while it is an awesome language (really!) one probably doesn’t want to write an entire program with it, but rather use it to stitch functions written in C together.
- jzwinck 7y agoI wrote PCCL for a use case like this: mostly config but with dynamic behavior. I've also used Lua in the same way. My favorite memory of this approach was when some vendor switched from a static configuration to a daily XML config on their FTP site. I modified our config file so instead of hard coding the vendor's old parameters, it would download their XML file and populate our config params such that the C++ host program did not know anything had changed. Some people say a Turing complete config language is a step too far. With great power.... https://github.com/jzwinck/pccl https://github.com/jzwinck/pccl
- frumiousirc 7y agoJsonnet (and so CUE) has a lot of overlap with LISP. I find it's syntax more suited to constructing data structures than I do LISP if only because "{}" and "[]" are more concise ways to indicate "object" and "array" than using an S-expression.
- sooheon 7y agoEDN is a lispy data notation with exactly those conventions: https://github.com/edn-format/edn https://github.com/edn-format/edn