Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(even': 0.05; 'compiler': 0.07; 'level,': 0.07; 'abstraction': 0.09; 'arguments': 0.09; 'assuming': 0.09; 'differing': 0.09; 'high-level': 0.09; 'logic': 0.09; 'subject:while': 0.09; 'cc:addr:python-list': 0.11; 'translation': 0.12; 'wrote': 0.14; '(which,': 0.16; '*should*': 0.16; 'cc:name:python list': 0.16; 'constructs': 0.16; 'formally': 0.16; 'janssen': 0.16; 'machien': 0.16; 'machine?': 0.16; 'mad,': 0.16; 'other,': 0.16; 'rarely': 0.16; 'relevant.': 0.16; 'subject:recursion': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'warren': 0.16; 'all.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'normally': 0.19; 'translated': 0.19; 'entered': 0.20; 'written': 0.21; 'machine': 0.22; 'code,': 0.22; 'putting': 0.22; 'cc:addr:python.org': 0.22; "shouldn't": 0.24; 'mon,': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'long,': 0.26; 'this:': 0.26; 'asking': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; "doesn't": 0.30; 'operations,': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; '-0700,': 0.31; 'arts': 0.31; "d'aprano": 0.31; 'description,': 0.31; 'operations.': 0.31; 'pascal': 0.31; 'steven': 0.31; 'languages': 0.32; 'everyone': 0.33; '"the': 0.34; 'problem': 0.35; "can't": 0.35; 'knows': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'machine.': 0.36; 'scheme': 0.36; 'doing': 0.36; 'possible': 0.36; 'should': 0.36; 'too': 0.37; 'turn': 0.37; 'list': 0.37; 'level': 0.37; 'architecture': 0.38; 'expected': 0.38; 'sometimes': 0.38; 'somebody': 0.38; 'stable': 0.38; 'pm,': 0.38; 'that,': 0.38; 'sure': 0.39; 'how': 0.40; 'even': 0.60; 'guy': 0.60; 'gone': 0.61; 'challenge': 0.61; 'skip:* 10': 0.61; 'course': 0.61; 'simply': 0.61; "you've": 0.63; 'high': 0.63; 'such': 0.63; 'therefore,': 0.64; 'different': 0.65; '(that': 0.65; 'movie': 0.65; 'talking': 0.65; 'here': 0.66; 'between': 0.67; 'apart': 0.72; 'power': 0.76; 'challenge.': 0.84; 'complex,': 0.84; 'hardly': 0.84; 'prolog': 0.84; 'procedural': 0.91; 'washington': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FcP8ZQXRkgmmtItJMEiY8DYaIlEYyW5VsiqO2sna8Ec=; b=FT2Fkp2SM5FJMggtlR6+yvA0ZqirnaCRGf44Dos2SilKQ5QlsdqNP9wS6Z8eEu3qp/ Cc+6cXbeoaK/HWSNcE9r/EiEaaGhK1dTJ5pbN6BOXuzQrZM5X7AB/hBqhurBYgf2cd9j KlAaVV33HPXeIBexEVBuuqRQ6jVXW0xR4B6oEpT9PxyMKyCPsWvttE2ZnanYxvNWb5A7 AKreoW7F+2vLvPRrpUuRa4sNn0UHseIyjz4mjALYVMi4Kil33bzdngwTvU4ZPDqXo8Ps abmGz3V6oiPDhtoFzIsG0M8vuzEmdW3bF7uGWbB3ux21sj+zvWJgNvyHiRlZ9FMYIF6c e63w== MIME-Version: 1.0 X-Received: by 10.180.219.33 with SMTP id pl1mr21812394wic.49.1381191395167; Mon, 07 Oct 2013 17:16:35 -0700 (PDT) In-Reply-To: <525348d7$0$29984$c3e8da3$5496439d@news.astraweb.com> References: <87had0axxy.fsf@dpt-info.u-strasbg.fr> <524C80B6.3010204@unistra.fr> <87li292wnt.fsf@dpt-info.u-strasbg.fr> <878uy52ea0.fsf@dpt-info.u-strasbg.fr> <5252F610.9040403@rece.vub.ac.be> <525348d7$0$29984$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 7 Oct 2013 17:16:35 -0700 Subject: Re: Tail recursion to while iteration in 2 easy steps From: Mark Janssen To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 53 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381192919 news.xs4all.nl 15889 [2001:888:2000:d::a6]:39448 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56339 On Mon, Oct 7, 2013 at 4:50 PM, Steven D'Aprano wrote: > On Mon, 07 Oct 2013 15:47:26 -0700, Mark Janssen wrote: >> I challenge you to get >> down to the machine code in scheme and formally describe how it's doing >> both. > > For which machine? Right, I should stop assuming a modern implementation of vonNeumann architecture (even though that, too, is ambiguous) since I'm talking about theory, but yet it is relevant. My demarcation point for arguments between "the scheme way" and other procedural languages (which, apart from Pascal variants, I blithely all "the C way") gets down to differing models of computation which shouldn't get conflated, even though everyone thinks and lumps it all as "computation". They simply can't get *practically* translated between one and the other, even though they are *theoretically* translated between each other all the time. Humans, of course know how to translate, but that doesn't count from the pov of computer *science*. > Frankly, asking somebody to *formally* describe a machine code > implementation strikes me as confused. Normally formal descriptions are > given in terms of abstract operations, often high level operations, > sometimes *very* high level, and rarely in terms of low-level "flip this > bit, copy this byte" machine code operations. I'm not sure how one would > be expected to generate a formal description of a machine code > implementation. It's like this: there *should* be one-to-one mappings between the various high-level constructs to the machine code, varying only between different chips (that is the purpose of the compiler after all), yet for some operations, in languages like scheme, well... I cannot say what happens... hence my challenge. > But even putting that aside, even if somebody wrote such a description, > it would be reductionism gone mad. What possible light on the problem > would be shined by a long, long list of machine code operations, even if > written using assembly mnemonics? Only that you've got a consistent, stable (and therefore, formalizable) translation from your language to the machine. That's all. Everything else is magic. Do you know that the Warren Abstraction Engine used to power the predicate logic in Prolog into machien code for a VonNeumann machine is so complex, no one has understood it (or perhaps even verified it)? One hardly knows where these things originate. But here it gets into dark arts best not entered into too deeply. It will turn you mad, like that guy in the movie "pi". -- MarkJ Tacoma, Washington