From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gnuist007@hotmail.com (gnuist) Newsgroups: gmane.emacs.help Subject: Re: Lambda calculus and it relation to LISP Date: 6 Oct 2002 21:58:09 -0700 Organization: http://groups.google.com/ Sender: help-gnu-emacs-admin@gnu.org Message-ID: <9e8ebeb2.0210062058.5c7ab267@posting.google.com> References: <9e8ebeb2.0210041920.2e480123@posting.google.com> <20021006050255.A63895-100000@agora.rdrop.com> NNTP-Posting-Host: localhost.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1033966939 22429 127.0.0.1 (7 Oct 2002 05:02:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2002 05:02:19 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17yQ23-0005pb-00 for ; Mon, 07 Oct 2002 07:02:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17yQ1W-0001qh-00; Mon, 07 Oct 2002 01:01:42 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.lang.lisp,sci.math,sci.logic Original-Lines: 56 Original-NNTP-Posting-Host: 209.178.179.198 Original-X-Trace: posting.google.com 1033966689 18484 127.0.0.1 (7 Oct 2002 04:58:09 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: 7 Oct 2002 04:58:09 GMT Original-Xref: shelby.stanford.edu gnu.emacs.help:105772 comp.lang.lisp:95826 sci.math:550017 sci.logic:61632 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2318 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2318 Gareth.McCaughan@pobox.com (Gareth McCaughan) wrote in message news:... > William Elliot wrote: > I believe you know the answers to all these questions :-). You guys obviously are very talented in lisp. For me to benefit from your posts, which certainly seem of great promise to me due to my inability to actually analyze them, I need to bridge the gap from where I am and what they propound. It will require me to put more effort. Here is what I have to show and then perhaps you can fill in with your explanations and what I most request is a concrete example to be able to run on emacs via its interpreter. Even if you answer one question in depth, it is better than many superficially. OK. I have gotten a bibliography of lisp papers. I drove to a library and got hold of a section of lisp in honor of jm which has a micro-manual for lisp and a single page eval on p712. I know basic car/cdr/cons and the notion of list being isomorphic to binary tree. Probably the idea is to have pre-parsed expression just as the emacs' delimited prefix notation is pre-associated and precedence-explicit, making interpreter simple and less on the BNF notation and FiniteStateMachine formalism. I am not a CS so please do not throw indigestible theoretical rocks w/o concrete examples at me. Now I have seen examples of lambda where it is used to associate a hook with the anonymous function. I do not see what advantage this gives over defun other than saving a name in the name-space. Is there any other advantage of lambda? Or is defun defined using lambda and name associating function? The Lisp papers talk of "LABEL" function. But where is it in emacs or what is its emacs counterpart called? Here is a lambda function that I know for starters. ( (lambda(x y) (- x y)) 1 2) I can write more complicated defuns, single recursion, gcd, and all classic stuff. But I am looking for a particularly instructive and clear example of a double recursion and then probably a tricky one. In the same way I ask for GRADED examples of use of lambda. I am sure many of you can just cut and paste from your collection. Examples to illustrate recursion, etc. And how will you do recursion without/with "LABEL"? One last question at this stage: I know how you "add-hook" but how do you create a hook variable in the first place? Is it something particular to emacs or is it only a lispy object? And a little aside: Can one create something close to this in C/C++/Java? There are many kind souls out there with a lot of material and I am going through it as best as I can. Help from kind souls like you would be very beneficial. Please answer atleast one question in depth rather than many superficially. Many thanks again. And I will be looking how to set the preferred reply group header on google and implement it if they make that possible.