On Nov 6, 2008, at 1:03 AM, David Schmitt wrote:
>
> Luke Kanies schrieb:
>> On Nov 5, 2008, at 1:14 AM, David Schmitt wrote:
>>
>>> Luke Kanies schrieb:
>>>> On Oct 31, 2008, at 10:33 AM, jerico wrote:
>>>>> I don't agree on that. It might be a specially declarative and
>>>>> less
>>>>> procedural/imperative language and is probably not turing complete
>>>>> (no
>>>>> idea about that, I didn't try the proof!) But maybe this is just
>>>>> an
>>>>> argument about wording and therefore not so important.
>>>> I agree it's mostly a terminology point, but it's definitely not
>>>> Turing-complete, although Brice might have slipped that in with his
>>>> last series of updates. :)
>>>
>>> I beg to differ. Puppet manifests have recursion (define) and choice
>>> (if
>>> ). In my reading that's enough for turing completeness.
>>
>>
>> Is that really recursion, though? Wouldn't we need to be able to
>> pass
>> resources to the resources, which we can't currently do?
>>
>> I'd've thought we'd at least need to be able to have the definitions
>> interact with the resources in some way.
>>
>
> Just for the fun of it, a define that creates $name files in /tmp:
>
>
> define mul() {
> if ($name > 0) {
> file { "/tmp/$name": ensure => exists }
> $next = add($name, -1)
> mul { $next: }
> }
> }
>
> I think there was a recent patch to get the comparison into the if(),
> else this could be eumulated by a function too.
I *knew* we were in for it when Brice added better conditionals.
Someone queue up that infinite tape... :)
--
Progress isn't made by early risers. It's made by lazy men trying to
find easier ways to do something. --Robert Heinlein
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---