Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'broken': 0.03; 'computed': 0.07; 'implies': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:module': 0.09; 'thu,': 0.15; 'loops': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'unwound': 0.16; 'wrote:': 0.16; '2015': 0.20; 'am,': 0.23; 'defined': 0.23; 'specified': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'function': 0.28; "i'm": 0.30; 'skip:. 10': 0.32; 'i.e.': 0.35; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'things': 0.38; 'sure': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'determine': 0.61; 'skip:n 10': 0.62; 'believe': 0.66; 'here': 0.66; 'jul': 0.72; 'received:109': 0.75; 'awhile': 0.84; 'becker': 0.84; 'bounded': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robin Becker Subject: Re: A new module for performing tail-call elimination Date: Fri, 17 Jul 2015 09:57:54 +0100 References: <55a3dcd9$0$3024$426a34cc@news.free.fr> <55a76628$0$2846$c3e8da3$76491128@news.astraweb.com> <55A77927.7090406@chamonix.reportlab.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 109.174.168.73 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437123479 news.xs4all.nl 2831 [2001:888:2000:d::a6]:39033 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93997 On 16/07/2015 17:17, Ian Kelly wrote: > On Thu, Jul 16, 2015 at 3:28 AM, Robin Becker wrote: ............. >> >> .... >> I believe the classic answer is Ackermann's function >> >> http://demonstrations.wolfram.com/RecursionInTheAckermannFunction/ >> >> which is said to be not "primitive recursive" ie cannot be unwound into >> loops; not sure whether that implies it has to be recursively defined or can >> perhaps be broken down some other way. > that should have said "simple loops" > My recollection -- and it's been awhile since I've studied > computability theory so I may be distorting things here -- is that > primitive recursive functions can be computed using for loops, i.e. > loops where the number of iterations is bounded in advance, whereas > non-primitive recursive functions require while loops. > I'm guessing, but is the implication that for loops can be specified finitely in advance, but while loops need some processing in the calculation to determine termination? I'm an engineer :( -- Robin Becker