Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'explicitly': 0.05; 'output': 0.05; 'subject:Python': 0.06; '*not*': 0.07; 'encoded': 0.07; 'everybody,': 0.07; 'explicit': 0.07; 'expressions': 0.07; 'extent': 0.07; 'processing.': 0.07; 'referring': 0.07; 'result,': 0.07; 'variables': 0.07; 'wednesday,': 0.07; 'subject:skip:c 10': 0.09; 'variables.': 0.09; 'python': 0.11; 'language.': 0.14; 'question.': 0.14; '"lambda"': 0.16; '(x,': 0.16; 'betsy,': 0.16; 'constructs': 0.16; 'does,': 0.16; 'expressions,': 0.16; 'haskell,': 0.16; 'hint:': 0.16; 'ignoring': 0.16; 'iteration': 0.16; 'itself,': 0.16; 'lambda': 0.16; 'lisp': 0.16; 'lisp,': 0.16; 'nope,': 0.16; 'opposite': 0.16; 'repetition': 0.16; 'scopes': 0.16; 'subject: \n ': 0.16; 'subject:between': 0.16; 'subject:programming': 0.16; 'sure.': 0.16; 'syntactic': 0.16; 'tape': 0.16; 'two.': 0.16; 'variables,': 0.16; 'x),': 0.16; 'all.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'trying': 0.19; "hasn't": 0.19; 'stack': 0.19; 'example': 0.22; 'programming': 0.22; 'accommodate': 0.24; "aren't": 0.24; 'example.': 0.24; "haven't": 0.24; 'question': 0.24; 'academic': 0.26; 'equivalent': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'idea': 0.28; 'function': 0.29; 'am,': 0.29; 'room': 0.29; "doesn't": 0.30; '(like': 0.30; 'programming.': 0.30; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; "skip:' 10": 0.31; '13,': 0.31; 'anonymous': 0.31; 'styles': 0.31; 'subject:that': 0.31; 'class': 0.32; 'there.': 0.32; 'languages': 0.32; "we're": 0.32; 'run': 0.32; 'text': 0.33; 'says': 0.33; 'everyone': 0.33; 'entirely': 0.33; 'style': 0.33; "i'd": 0.34; "can't": 0.35; 'common': 0.35; 'created': 0.35; 'except': 0.35; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'data,': 0.36; 'machine.': 0.36; 'reality': 0.36; 'science.': 0.36; "i'll": 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'too': 0.37; 'two': 0.37; 'limited,': 0.38; 'machines': 0.38; 'same.': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'rather': 0.38; 'that,': 0.38; 'explain': 0.39; 'does': 0.39; '12,': 0.39; 'functional': 0.39; 'itself': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'medical': 0.61; 'john': 0.61; "you're": 0.61; 'making': 0.63; 'name': 0.63; 'more': 0.64; 'different': 0.65; 'specialized': 0.65; 'anything.': 0.68; 'commercial': 0.71; 'repeat': 0.74; 'theoretical': 0.74; 'special': 0.74; '2015': 0.84; 'appearance.': 0.84; 'computation.': 0.84; 'describes': 0.84; 'evaluation.': 0.84; 'infamous': 0.84; 'iterative': 0.84; 'shock': 0.84; 'subject: *': 0.84; 'terrible': 0.84; 'this...': 0.84; 'mistake': 0.91; 'procedural': 0.91; 'subject:Good': 0.91; 'dirty': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=sD+bmQfmpffz+A4nz6u7OAQepgYz2TdWeeGyD8gkMSk=; b=azdb/MT2EeRY0OjBmBa9zIa0gMiQG3i7kmZjxy1eNGbs9T2iNBiejL/0PdtZxC7MvA Um6NShzceckeDB1LzHkKWq54mNvKhcq2CMWdYQ9PiQCMMf5A8hLgaS91pT9vbGKxy9tJ vXRlBBNm3Mf9Bmuu8nVtQ0UIsmrLg9YgZW0fhxWlXsdxEeuPVyE427QooXBCa1QOvHTY PdLZEy3Yv3xQ0mu+pIgVn2uovXzCT0A3/RKnP2p75rVZSThKbnKAdUyqo9sI09/eDGxq MVgeE7pTkBOUMVhBZf6K4CwH2s92+oNVaO3fh5rnhaX2wkc90k3xjGo9OvXAJZfpd6jg JrUQ== X-Received: by 10.107.17.29 with SMTP id z29mr1191564ioi.69.1431553149770; Wed, 13 May 2015 14:39:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <71ee2dbb-27a3-45ad-b903-bffca6d8923f@googlegroups.com> References: <02dba7aa-8466-4937-a8d8-82ffd03e5568@googlegroups.com> <87wq0gyvyr.fsf@elektro.pacujo.net> <55515f9d$0$12987$c3e8da3$5496439d@news.astraweb.com> <569169cf-d232-48c0-bd49-91090e9c0ddb@googlegroups.com> <1fdbee0a-b425-44ff-b706-b6b407358bf1@googlegroups.com> <5552b74e$0$12985$c3e8da3$5496439d@news.astraweb.com> <5a982567-8d89-42b0-9f47-956e61a21274@googlegroups.com> <71ee2dbb-27a3-45ad-b903-bffca6d8923f@googlegroups.com> From: Ian Kelly Date: Wed, 13 May 2015 15:38:28 -0600 Subject: Re: Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea? To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 110 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431553152 news.xs4all.nl 2829 [2001:888:2000:d::a6]:58016 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90584 On Wed, May 13, 2015 at 12:07 PM, zipher wrote: > On Wednesday, May 13, 2015 at 10:27:23 AM UTC-5, Ian wrote: >> I don't know why I'm replying to this... > > Because you're trying to get an answer to a question that even Academia h= asn't answered or understood. > >> On Wed, May 13, 2015 at 8:44 AM, zipher wrot= e: >> > On Tuesday, May 12, 2015 at 10:35:29 PM UTC-5, Rustom Mody wrote: >> >> How history U-turns!! >> >> Lisp actually got every major/fundamental thing wrong >> >> - variables scopes were dynamic by mistake >> >> - lambdas were non-first class because the locution 'first-class' was= still 8 >> >> years in the future >> > >> > I think you're confused. LISP doesn't have variables. >> >> Yes, it does. > > No, Common LISP does, but as the website says Common LISP is a "multi-par= adigm" langauge. It's trying to be everything to everybody, just like Pyt= hon tried to do in the other direction, making "everything an object". Pyt= hon was trying to be too pure, while LISP was trying to be too universal: = be everything to everyone -- you might say "batteries included". > > True LISP, doesn't need a 'let' statement for example. To understand tru= e LISP you have to understand the modus operandi of the "lambda the ultimat= e" crowd. Very few do from academic computer science. MIT understands it.= You think you understand it, but you don't. By "true LISP" are you referring to the original specification by John McCarthy? Here's an example lambda S-expression from McCarthy's original paper: (LABEL, SUBST, (LAMBDA, (X, Y, Z), (COND ((ATOM, Z), (COND, (EQ, Y, Z), X), ((QUOTE, T), Z))), ((QUOTE, T), (CONS, (SUBST, X, Y, (CAR Z)), (SUBST, X, Y, (CDR, Z))))))) Ugh, what a mess. But ignoring that, tell us how many variables you see there. I'll give you a hint: I count more than two. > It's only abstractions, like math. It's purpose is to output a final res= ult, that is all. It's not at all to make commercial applications. It's r= ather like Asimov's computer in the Last Question. It's a whole different = model of computation. Instead of a Turing Tape or VonNeumann stream, you h= ave hierarchies of expressions all evaluating... > > ...well I would say all at the same time, but since I have to constrain m= y description to a common set of reality that is shared with you, then I'd = say "on the stack frame". It's why they had specialized machines to run tr= ue LISP. Sure. Lisp machines never, ever ran computer graphics applications. Or medical image processing. Nope, never, because that would be commercial and dirty and a hideous perversion of the idol of computer science created by the prophet McCarthy. Text editors? Heavens to Betsy, now you're just trying to shock me, aren't you! >> > with an entirely different model computation than other programming la= nguages which use variables all the time. To the extent that it DOES have = variables, it's to accommodate those coming over from iterative programming= . >> >> What is "iterative programming"? If you mean "writing programs that >> work iteratively", then this describes both functional and procedural >> styles alike. > > Yes, and LISP is neither. Although LISP is a functional style, that is o= nly by appearance. It's completely different from Haskell, which I would d= escribe as a true functional language. The difference is how the program i= s lexed in the mind or on the machine. But that's too difficult to explain= on this thread. And Fermat had a truly marvelous proof, which you would think wonderful, if only he had enough room in that infamous margin. >> The opposite of "iterative programming" would then be a style where >> the program can't ever repeat anything. That would be a very limited >> language and would *not* be equivalent to a Turing machine. > > > The "opposite" of iterative programming is recursive programming. It's n= ot limited, except that it has an entirely different relationship to data, = one orthogonal to iterative computation. Iteration is a type of recursion. Specifically, it's the type of recursion that doesn't require keeping a stack of values from each higher-up repetition in the evaluation. Also known as "linear recursion" or "tail recursion". Often people use the word "iteration" to mean a syntactic construct that repeats itself without explicit reference to a function and "recursion" to mean a syntactic construct where a function explicitly repeats itself, but from a theoretical standpoint this is all just syntax. The two constructs are fundamentally the same. > >> > And the idea of lambdas were already encoded by the use of special exp= ressions, set-off by parenthesis. So they practically *defined* the concep= t of lambdas. >> >> LISP is also the reason why we're cursed with the terrible name >> "lambda" for anonymous functions rather than something more mnemonic >> (like "function"). > > No, you haven't understood, padawan. *plonk*