3 ms·
> As far as I am aware, variables, scoping rules and inheritance don't imply turing completeness and the way it does loops and conditionals could really more be
by leg100 9y ago
> As far as I am aware, variables, scoping rules and inheritance don't imply turing completeness and the way it does loops and conditionals could really more be characterized as configuration for loops/conditionals further down the stack (e.g. as seen here http://docs.ansible.com/ansible/latest/playbooks_loops.html#.. http://docs.ansible.com/ansible/latest/playbooks_loops.html#.... )
Then what does imply turing completeness?
According to the wikipedia article [1]:
"To show that something is Turing complete, it is enough to show that it can be used to simulate some Turing complete system. For example, an imperative language is Turing complete if it has conditional branching (e.g., "if" and "goto" statements, or a "branch if zero" instruction; see one instruction set computer) and the ability to change an arbitrary amount of memory (e.g., the ability to maintain an arbitrary number of variables). Since this is almost always the case, most if not all imperative languages are Turing complete if the limitations of finite memory are ignored."
[1] https://en.wikipedia.org/wiki/Turing_completeness https://en.wikipedia.org/wiki/Turing_completeness
- deleted 9y ago[deleted]
- crdoconnor 9y ago>Then what does imply turing completeness? If it did arbitrary branching and if you could mutate a variable and then reuse it later on in a playbook.
- Spivak 9y agoThe branching is a given. Variable mutation is totally possible with set_fact.