all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gnuist007@hotmail.com (gnuist)
Subject: Re: Lambda calculus and it relation to LISP
Date: 6 Oct 2002 21:58:09 -0700	[thread overview]
Message-ID: <9e8ebeb2.0210062058.5c7ab267@posting.google.com> (raw)
In-Reply-To: slrnaq13ce.nmd.Gareth.McCaughan@g.local

Gareth.McCaughan@pobox.com (Gareth McCaughan) wrote in message news:<slrnaq13ce.nmd.Gareth.McCaughan@g.local>...
> 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.

  reply	other threads:[~2002-10-07  4:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-05  3:20 Lambda calculus and it relation to LISP gnuist
2002-10-05  7:51 ` Luke A. Olbrish
2002-10-05 10:46   ` William Elliot
2002-10-12  0:28     ` Alfred Einstead
2002-10-12  4:02       ` William Elliot
2002-10-05 11:44   ` David Kastrup
2002-10-09  4:38     ` James Wong
2002-10-09  4:48       ` William Elliot
2002-10-05  7:58 ` Charles Matthews
2002-10-05  8:05 ` Gareth McCaughan
2002-10-06 12:03   ` William Elliot
2002-10-06 19:22     ` Gareth McCaughan
2002-10-07  4:58       ` gnuist [this message]
2002-10-07  7:14         ` William Elliot
2002-10-07  7:37         ` Barb Knox
2002-10-07  9:34           ` David Kastrup
2002-10-07  9:59             ` William Elliot
2002-10-07 11:10               ` Barb Knox
2002-10-07 14:34                 ` William Elliot
2002-10-07 10:44             ` Christian Lemburg
2002-10-08  1:02               ` ozan s yigit
2002-10-07 10:59             ` Barb Knox
2002-10-08  3:05               ` David Kastrup
2002-10-07 23:12         ` Gareth McCaughan
2002-10-07  9:54       ` William Elliot
2002-10-07 22:48         ` Gareth McCaughan
2002-10-08  8:42           ` William Elliot
2002-10-05 14:46 ` Fred Gilham
2002-10-05 16:15 ` Kaz Kylheku
2002-10-06 12:22 ` Thaddeus L Olczyk
2002-10-06 13:46   ` Joona I Palaste
2002-10-12  0:36 ` Alfred Einstead

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e8ebeb2.0210062058.5c7ab267@posting.google.com \
    --to=gnuist007@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.