Replies: 1 comment
-
For now there are no concrete plans for this, but this is a good point to consider. As you say, the zero level of interfacing would be to write strings and interpolate Nickel values in it directly, but it's not very nice. Another solution is to write a generic serializer as a library, but in pure Nickel directly, without needing special support from the interpreter. For example, a function Then your Nickel configuration could look like:
user www www; ## Default: nobody
worker_processes 5; ## Default: 1
error_log logs/error.log;
pid logs/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 4096; ## Default: 1024
}
http {
include conf/mime.types;
include /etc/nginx/proxy.conf;
include /etc/nginx/fastcgi.conf;
... One of the reason (albeit not the only) to allow arbitrary recursion in Nickel was that for some use-case, like Bazel, you end up needing to write simple parsers and serializer for obscure formats by hand, and it's nice when the language can do so without too much pain. Of course, it may prove not very performant for big configurations, especially at the time being. If some formats are common, I guess we can consider adding them to the possible |
Beta Was this translation helpful? Give feedback.
-
I'm wondering how Nickel plans on interfacing with external configuration languages (nginx, etc)? I understand this is out of scope for Nickel but I don't want to see Nickel having a few thousand contracts and becoming yet another templating language for $external_configuration_lang.
Beta Was this translation helpful? Give feedback.
All reactions