3 ms·
Have you seen ucl? https://github.com/vstakhov/libucl https://github.com/vstakhov/libucl It seems very similar.
by craftkiller 3y ago
Have you seen ucl? https://github.com/vstakhov/libucl https://github.com/vstakhov/libucl
It seems very similar.
- kunley 3y agoThanks for the link! Yeah, ucl looks syntactically similar. On the other hand, I am not sure if it has expressions, and the variables usage is limited - they need to be registered in the parser, so they are existing outside of the config file; plus, they seem to represent just text. My assumption was to use variables in the same file, to make the content more modular/DRY, and to evaluate expressions using these variables. Moreover, variables and expressions have basic types: int, float, string and bool. This is not an artificial need, I will give you concrete examples what I want to have in the config file: - port numbers increased from a base value (int arithmetic) - recalculated frequency/throughput values (float arithmetic) - fields enabled if some other condition is true (comparisons, bool arithmetic) - names concatenated from text and numbers What else... in BCL variables are internal to the file; I want also to resolve the information existing external to the file, which would be: env varables (planned builtin function getenv) and ideally, output of executing command (like shell's $(), also planned). With this I can express easily and shortly quite complex configurations. Actually thanks a lot for your comment, because answering this makes me realize I should put such information in the README of my project, maybe in some more structured way.