[PD] Why does this cause stack overflow?

Claude Heiland-Allen claude at mathr.co.uk
Mon May 27 20:14:16 CEST 2019


On 2019-05-27 18:44, Claude Heiland-Allen wrote:
> On 2019-05-27 18:23, Philip Stone wrote:
>> On my system, the stack over-flows at count 331.
> 
> But the simplest(*) way to get recursive calls to work is often to
> break the recursion with a [delay 0] to start a new depth first
> execution chain after the current one is finished, or to refactor it
> to use [until](+) to iterate instead of recurse.

I attached an example of both techniques.

> (*) but it can become unmaintainable in larger patches...
> (+) but [bang(--[until] can take a while to finish, be careful...


Claude
-- 
https://mathr.co.uk
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stack-overflow-solutions.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20190527/6892b962/attachment.ksh>


More information about the Pd-list mailing list