[pmwiki-users] pagelist includes

Joachim Durchholz jo at durchholz.org
Thu Jun 29 04:00:37 CDT 2006


Martin Fick schrieb:
> Any thoughts of modofying this behaviour to instead
> keep a stack of already included pages and preventing
> duplicates that way?  A numerical limit could still be
> set for paranoid people, but at least this way loops
> would be eliminated no matter what the limit was set
> to.

Include loops may happen inside an (:if:) directive, so two or three 
iterations of the same page might actually be intentional if only one of 
the repeated inclusions changes enough context so that the (:if:) 
doesn't trigger anymore.
If this scenario is indeed possible, the combination of (:include:) and 
(:if:) is Turing complete, i.e. able to process arbitrary algorithms, 
and any software that tried to reliably distinguish between terminating 
and nontermination inclusion loops would itself run into an endless loop 
occasionally - anybody interested in the theory should try the Wikipedia 
for the Halting Problem.

Of course, in a wiki context, combining (:include:) and (:if:) could be 
considered an abuse of the mechanism. If that's the consensus, I'd 
second Martin's proposal. I'd even drop the hard inclusion limit - 
inadvertent loops usually have no more than two or three participants, 
but intentional inclusion hierarchies might break if a hard limit is set.

Regards,
Jo




More information about the pmwiki-users mailing list