From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barb Knox Newsgroups: gmane.emacs.help Subject: Re: The fundamental concept of continuations Date: Tue, 09 Oct 2007 18:59:28 +1300 Organization: I'm not unemployed; I'm a consultant Message-ID: References: <1191906949.179197.217470@57g2000hsv.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1191912557 25144 80.91.229.12 (9 Oct 2007 06:49:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2007 06:49:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 09 08:49:15 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1If8u0-0004YK-Ao for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 08:49:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1If8tu-0008Ss-VW for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Oct 2007 02:49:06 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!see Original-Newsgroups: comp.lang.scheme, comp.lang.lisp, comp.lang.functional, gnu.emacs.help, comp.lang.python Original-Lines: 56 Original-NNTP-Posting-Host: 203.173.231.37 Original-X-Trace: lust.ihug.co.nz 1191909569 13011 203.173.231.37 (9 Oct 2007 05:59:29 GMT) Original-X-Complaints-To: abuse@ihug.co.nz Original-NNTP-Posting-Date: Tue, 9 Oct 2007 05:59:29 +0000 (UTC) User-Agent: MT-NewsWatcher/3.4 (PPC Mac OS X) Original-Xref: shelby.stanford.edu comp.lang.scheme:74374 comp.lang.lisp:230753 comp.lang.functional:62582 gnu.emacs.help:152733 comp.lang.python:515491 X-Mailman-Approved-At: Tue, 09 Oct 2007 02:47:28 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48241 Archived-At: In article <1191906949.179197.217470@57g2000hsv.googlegroups.com>, gnuist006@gmail.com wrote: > Again I am depressed to encounter a fundamentally new concept that I > was all along unheard of. Don't be depressed about that. There are countless concepts out there they you haven't yet heard of. > Its not even in paul graham's book where i > learnt part of Lisp. Its in Marc Feeley's video. > > Can anyone explain: > > (1) its origin Lambda calculus. Instead of function A returning to its caller, the caller provides an additional argument (the "continuation") which is a function B to be called by A with A's result(s). In pure "continuation style" coding, nothing ever "returns" a result. It is easy to mechanically transform normal function-style lambda calculus into continuation-style, but the reverse is not so. > (2) its syntax and semantics in emacs lisp, common lisp, scheme > (3) Is it present in python and java ? Java, sort of. For example, the Run interface. Python, I don't know. > (4) Its implementation in assembly. for example in the manner that > pointer fundamentally arises from indirect addressing and nothing new. > So how do you juggle PC to do it. You can have a "spaghetti stack", or keep continuation data-structures in the heap. > (5) how does it compare to and superior to a function or subroutine > call. how does it differ. This sounds like homework. What do you have so far? > Thanks a lot. > > (6) any good readable references that explain it lucidly ? Google? -- --------------------------- | BBB b \ Barbara at LivingHistory stop co stop uk | B B aa rrr b | | BBB a a r bbb | Quidquid latine dictum sit, | B B a a r b b | altum viditur. | BBB aa a r bbb | -----------------------------