29 karma · joined November 14, 2016
It has been discussed indeed, but unfortunately nobody volunteered yet to take the entire work of re-documenting everything and many other things that have to be done. But it's definitely something intended for the future.
I started with Mark Lutz's Learning Python (http://shop.oreilly.com/product/9780596513986.do) about 10 years ago. In the meanwhile I've been an active contributor to large Python-based open source projects, e.g., Salt (https://github.com/saltstack/salt) which not only that it helped me get feedback from people with a tremendous experience, but also reading through the code taught me good practices and many good ways to solve various problems. A few months ago I started reading Luciano Ramalho's Fluent Python (http://shop.oreilly.com/product/0636920032519.do) which is just beautifully written and with a wide variety of topics for a deeper look inside Python internals.
I had the feeling that YAML is the one that addresses your criticism ("I like YAML as configuration file language, but it's terrible for DSLs."). And yes, I do use the python one and I am very happy with it.
> The YAML is the default, and it's what you find examples and support for (Stack Overflow and so on)
Pro tip: if they are YAML on StackOverflow, you don't have to copy-paste them, but more rather translate them to the representation that satisfy your high requirements.
As a friend (big Ansible fan otherwise) would say: "Ansible is just a glorified bash script; nothing more, nothing else". Without making it a bad product, Ansible is that one limited to CM only.
Many folks miss one important point: Salt's renderer interface is also pluggable. There are quite a few choices for you: https://docs.saltstack.com/en/latest/ref/renderers/index.htm.... For data representation you can choose between: yaml, yamlex, json, json5, hjson, or even pure python. Nothing else can be more flexible than pure python. But, of course, this approach also has its drawbacks. Anyway, if none of them suits your needs for non-terrible DSL, you can even implement your own DSL, your own renderer.
All you have to do is adding few characters at the top of your pillar, i.e. #!json or #!json5 or even #!lobster.
So where is the limitation again? In reading documentation I guess.