In theory, Ansible should be used for creating ‘playbooks’ listing the packages and configuration files which are present on a server or collection of servers, and then ‘playing the playbook’ arranges it so that those servers exist and are configured as you specified. You shouldn’t really care how that is achieved; it is declarative.
However, in practice it has input, output, loops, conditional branching, and the ability to execute subtasks recursively. (In fact, it can quite difficult to stop people from using those features, since ‘declarative’ doesn’t necessarily come easily to everyone, and it makes for very messy config.) I think those are all the features required for Turing equivalence?
Being able to deploy a whole fleet of servers in a very straightfoward way comes as close to the ‘infinite memory’ requirement as any programming language can get, although you do need basically infinite money to do that on a cloud service.
Pure SQL, as in relational algebra, is LOGSPACE/PTIME. Datalog is PTIME-complete when the program (“query”) is fixed, EXPTIME-hard otherwise.
It’s all quite tractable, but there’s definitely turing-complete declerative langugages. Not just pretty much every functional language, but also the likes of prolog.
Are those Turing complete? (Legit question, I’d love to know)
Frezik has a good answer for SQL.
In theory, Ansible should be used for creating ‘playbooks’ listing the packages and configuration files which are present on a server or collection of servers, and then ‘playing the playbook’ arranges it so that those servers exist and are configured as you specified. You shouldn’t really care how that is achieved; it is declarative.
However, in practice it has input, output, loops, conditional branching, and the ability to execute subtasks recursively. (In fact, it can quite difficult to stop people from using those features, since ‘declarative’ doesn’t necessarily come easily to everyone, and it makes for very messy config.) I think those are all the features required for Turing equivalence?
Being able to deploy a whole fleet of servers in a very straightfoward way comes as close to the ‘infinite memory’ requirement as any programming language can get, although you do need basically infinite money to do that on a cloud service.
Pure SQL, as in relational algebra, is LOGSPACE/PTIME. Datalog is PTIME-complete when the program (“query”) is fixed, EXPTIME-hard otherwise.
It’s all quite tractable, but there’s definitely turing-complete declerative langugages. Not just pretty much every functional language, but also the likes of prolog.