4 ms·
Yes! Please, for the love of all that is holy, please quit writing tools that make me write code in something that isn't a general purpose programming languag
by smw 11y ago
Yes! Please, for the love of all that is holy, please quit writing tools that make me write code in something that isn't a general purpose programming language! Didn't we learn from Ant and xml?
I really want to see a clojure/clojurescript based config management system -- it would be so pleasant to write EDN/sexps for basic config, and yet have it be a real language when you need to do something hard.
Edit:
Forgot to mention, pallet [1] is something like that, but unfortunately it appears to be mostly dead.
[1]: http://palletops.com/ http://palletops.com/
- dm3 11y agoWe're using pallet. Even though it's not trivial to get started with and the docs are quite sparse, it provides a solid foundation for scripting the configuration management tasks. I much prefer it to Ansible/Chef/Puppet. However, as you're exposed to the full programming language, there are much less constraints to what you can do. You'll need a layer of rules (a framework) of your own if you don't want to end up in a mess. Activity of the core project seems to be low, but that's true for many other mature Clojure projects. You can still use them successfully.
- vacri 11y agoThe only tool I've used that used native language was Buildbot, from which I still have the scars. Not because of the native language, but from the versioned documentation that didn't match behaviour of the given version, and the complex workflow that had zero examples because "everyone's setup is different" - so you had to figure out their words for terms, and build your config from scratch. It was an entirely unpleasant experience.
- crdoconnor 11y ago>Yes! Please, for the love of all that is holy, please quit writing tools that make me write code in something that isn't a general purpose programming language! Didn't we learn from Ant and xml? Yes, we learned to use less powerful languages where it was appropriate because they're more readable and less susceptible to technical debt. This principle, in other words : https://en.wikipedia.org/wiki/Rule_of_least_power https://en.wikipedia.org/wiki/Rule_of_least_power Ant XML was as powerful as Java - it was turing complete and terribly designed to boot. That was its primary failing. Likewise, using turing complete PHP to generate HTML was never as clean as using a less powerful templating language (like jinja2) to generate the HTML. Separation of concerns with a language barrier is a good thing. If all of this means nothing to you, you've probably created some huge code messes in your time.
- Singletoned 11y ago> Likewise, using turing complete PHP to generate HTML was never as clean as using a less powerful templating language (like jinja2) to generate the HTML. I strongly agree with your point, but Jinja2 is Turing Complete as well (it's still preferable to PHP though).
- crdoconnor 11y agoI don't really know enough computer science to validate this idea, but I can sense that there are different levels of "power" among turing complete languages (and also among non-turing complete languages). And Jinja2 < Python/PHP, despite all three being turing complete. Metaprogramming / C++ style templating, for instance, goes above and beyond the power provided by regular turing complete programming constructs, and while that means that you can do cool stuff with them you couldn't easily do otherwise, they're a massive headache to reason about, debug, and keep free from technical debt. Similarly, when you take blocks of code and "lower the power" to make it declarative instead of imperative (e.g. using list comprehensions instead of for loops) it almost inevitably ends up cleaner.
- deleted 11y ago[deleted]
- alanning 11y agoWe also use pallet. Harder to grok in the beginning since you have to learn the lib but it's pretty amazing what you can do with a full language. If anyone is frustrated by the speed of jclouds (which pallet uses internally), I recommend trying pallet's Amazon-specific driver; it's much faster.