From: Fernando Mato Mira
Subject: Continuations in CL
Date: 
Message-ID: <dc2f1d1b.0303120701.6588b9f3@posting.google.com>
Any CL implementors considering adding full continuations now that web
programming has made them fashionable?

[I am disqualifying CL in favor of Scheme just because of this]

From: Duane Rettig
Subject: Re: Continuations in CL
Date: 
Message-ID: <4wuj44gei.fsf@beta.franz.com>
········@acm.org (Fernando Mato Mira) writes:

> Any CL implementors considering adding full continuations now that web
> programming has made them fashionable?

I assume you are talking specifically about the Scheme continuation-
passing style.

What kind of things are you wanting to do that you can't do in CL?

> [I am disqualifying CL in favor of Scheme just because of this]

A statement like this makes it quite hard for an implementor to give
a serious answer, since it makes it strongly appear that you don't
really want an answer, but want instead just to knock CL.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Pascal Costanza
Subject: Re: Continuations in CL
Date: 
Message-ID: <costanza-492036.19152812032003@news.cs.tu-berlin.de>
In article <·············@beta.franz.com>,
 Duane Rettig <·····@franz.com> wrote:

> ········@acm.org (Fernando Mato Mira) writes:
> 
> > Any CL implementors considering adding full continuations now that web
> > programming has made them fashionable?
> 
> I assume you are talking specifically about the Scheme continuation-
> passing style.
> 
> What kind of things are you wanting to do that you can't do in CL?

In a recent thread of the ll1-discuss mailing list, Avi Bryant has given 
an intriguing example. See http://www.ai.mit.edu/~gregs/ll1-discuss-archive-html/msg02456.html


Pascal

-- 
"If I could explain it, I wouldn't be able to do it."
A.M.McKenzie
From: Duane Rettig
Subject: Re: Continuations in CL
Date: 
Message-ID: <4r89c4ay0.fsf@beta.franz.com>
Pascal Costanza <········@web.de> writes:

> In article <·············@beta.franz.com>,
>  Duane Rettig <·····@franz.com> wrote:
> 
> > ········@acm.org (Fernando Mato Mira) writes:
> > 
> > > Any CL implementors considering adding full continuations now that web
> > > programming has made them fashionable?
> > 
> > I assume you are talking specifically about the Scheme continuation-
> > passing style.
> > 
> > What kind of things are you wanting to do that you can't do in CL?
> 
> In a recent thread of the ll1-discuss mailing list, Avi Bryant has given 
> an intriguing example. See http://www.ai.mit.edu/~gregs/ll1-discuss-archive-html/msg02456.html

However, if you follow the thread and its followups, it turns out to
answer a different question.  For a good summary of the arguments from
a perspective which agrees with mine (and especially note Sundar
Narasimhan's warning about extrapolating to 100% what is really 5%), see
http://www.ai.mit.edu/~gregs/ll1-discuss-archive-html/msg02463.html

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Marco Antoniotti
Subject: Re: Continuations in CL
Date: 
Message-ID: <DGMba.27$oj7.5034@typhoon.nyu.edu>
Pascal Costanza wrote:

> In article <·············@beta.franz.com>,
>  Duane Rettig  wrote:
>
>
> >········@acm.org (Fernando Mato Mira) writes:
> >
> >
> >>Any CL implementors considering adding full continuations now that web
> >>programming has made them fashionable?
> >
> >I assume you are talking specifically about the Scheme continuation-
> >passing style.
> >
> >What kind of things are you wanting to do that you can't do in CL?
>
>
> In a recent thread of the ll1-discuss mailing list, Avi Bryant has given
> an intriguing example. See 
> http://www.ai.mit.edu/~gregs/ll1-discuss-archive-html/msg02456.html


The issue here is whether you need CALL/CC or not.  AFAIK, the example 
give in the above message does not seem to require it. If that is the 
case Common Lisp fits the bill perfectly (and obviously better than Scheme).

On top of that, the only language that has full CALL/CC, is AFAIK Scheme.

Cheers

--
Marco Antoniotti
From: Fernando Mato Mira
Subject: Re: Continuations in CL
Date: 
Message-ID: <dc2f1d1b.0303130030.1c004b0d@posting.google.com>
Marco Antoniotti <·······@cs.nyu.edu> wrote in message news:<·················@typhoon.nyu.edu>...

> 
> On top of that, the only language that has full CALL/CC, is AFAIK Scheme.

The Cocoon project, after much flamage on the Scheme syntax for its
flow language (Schecoon subproject), now uses an ECMAScript
interpreter with continuation support (BARF!!)
From: Jens Axel S�gaard
Subject: Re: Continuations in CL
Date: 
Message-ID: <3e6f9087$0$148$edfadb0f@dread11.news.tele.dk>
Duane Rettig wrote:
> ········@acm.org (Fernando Mato Mira) writes:
>
>> Any CL implementors considering adding full continuations now that
>> web programming has made them fashionable?
>
> I assume you are talking specifically about the Scheme continuation-
> passing style.

Perhaps it the following he is thinking about:

  Paul Graunke, Shriram Krishnamurthi, Van der Hoeven and Matthias Felleisen.
  "Programming the Web with High-Level Programming Languages".
  Proceedings of ESOP 2001. 2001.
  http://www.ccs.neu.edu/scheme/pubs/esop2001-gkvf.ps.gz

I have tries it in small scale and like it.

More articles on:

  http://library.readscheme.org/pagexml.html

--
Jens Axel S�gaard
From: Kent M Pitman
Subject: Re: Continuations in CL
Date: 
Message-ID: <sfwptowl9q4.fsf@shell01.TheWorld.com>
········@acm.org (Fernando Mato Mira) writes:

> Any CL implementors considering adding full continuations now that web
> programming has made them fashionable?
> 
> [I am disqualifying CL in favor of Scheme just because of this]

[I recommend reconsidering the bracketed position. Here's why...]

Have you actually done tests to find if "fashionable" means "good to use"?

I won't claim to have been ultra-scientific about this, but a few years
ago when I was working in a shop that had mixed CL/Scheme I got excited
about the idea of using continuations to manage transitions among web
pages.  Is this what you are doing?

I eventually concluded that these, while programmatically simple, were 
quite heavyweight because they closed over all kinds of junk that was
needed to run the function but that was really constant over the 
conversation.  To do things really right, one had to be careful not
to close over certain things that might vary between pages since one
has to re-fetch info from a db on a page process anyway, and one cannot
just assume it stayed constant while the continuation was asleep.  So
you end up writing things in a very stilted style, and ultimately you
end up externalizing the stuff to a DB, which is persistent and which
already manages locking in the way you need it to.  And when you get all
done with it, all you have to save is pretty much a database key and
a conversation ID and not all the unmanaged junk that would be in
a continuation.

My personal conclusion was that continuations didn't work for my situation
even though I had been excited going in that they might be fun and that
I might have found a good reason to use them. (Mostly I don't find
"implementing multiprocessing" and other stuff like that to be a very
good reason, since there existing multiprocessing systems for doing this.
Those are even more heavyweight though, and would not have been good
for this and I thought continuations might be lightweight enough, but
I later concluded no.)

I didn't document the details and this is just to be taken as anecdotal.
But I wonder if the use of the term "fashionable" is based on hard experience
or if it's just a hope that is guiding you to choose Scheme on the basis
of warm fuzzies (which are always its strong suit) rather than demonstrated
superiority.

At worst, I recommend a pilot project to test whether continuations per se
are the right tool.  I think you might find they are not.

The other thing about continuations is that they contain procedurally
imbedded information.  They are easier to write than the equivalent
database-manipulation code for the ordinary step-to-step transition,
but they are opaque to other kinds of inquiries like "where is the person
in the process?", "can I take this a different way?", "can I speed it
ahead by allowing additional information acquired from another source to
improve the process ahead".  To the extent that the state is explicit as
data, you can do these things.  To the extent that it is buried in 
opaque continuation objects, you can't.

Plus there are some issues of garbage collection with continuations that 
I didn't resolve in my little project.  One has to decide when to discard
the continuations, and that's a pain.  And if the server goes down and you
haven't evacuated them to an external store anyway, you're going to lose
them, which won't happen with a database.
From: Fernando Mato Mira
Subject: Re: Continuations in CL
Date: 
Message-ID: <dc2f1d1b.0303130047.47bb48ce@posting.google.com>
Kent M Pitman <······@world.std.com> wrote in message news:<···············@shell01.TheWorld.com>...

> I won't claim to have been ultra-scientific about this, but a few years
> ago when I was working in a shop that had mixed CL/Scheme I got excited
> about the idea of using continuations to manage transitions among web
> pages.  Is this what you are doing?

Yes. web continuations. This is what I'd like to use.

> I eventually concluded that these, while programmatically simple, were 
> quite heavyweight because they closed over all kinds of junk that was

I'm also concerned about this. The alternative is having a context
management system and put the stuff by hand. That's what we do now (in
C++).

> But I wonder if the use of the term "fashionable" is based on hard experience

It's fashionable in the Scheme world, and now the Cocoon people have
discovered them [I was concerned about the speed of a Scheme
interpreter for Java. Hey, normal Cocoon is *SLOW*].
From: Kaz Kylheku
Subject: Re: Continuations in CL
Date: 
Message-ID: <cf333042.0303121426.cd13f6c@posting.google.com>
········@acm.org (Fernando Mato Mira) wrote in message news:<····························@posting.google.com>...
> Any CL implementors considering adding full continuations now that web
> programming has made them fashionable?

I would rather see standard *threads* in the language! As in, entities
that:

- can be preempted
- can be prioritized
- can be scheduled on multiple processors
- save and restore all their relevant context implicitly and
automatically

> [I am disqualifying CL in favor of Scheme just because of this]

Are you disqualifying CL-with-extensions in favor of
Scheme-with-extensions? Or are you doing all your development purely
in ANSI CL, or R5RS Scheme?

If you allow use of extensions and add-on libraries in conjunction
with Scheme, then to be fair you should also consider use of
extensions with CL---such as a vendor's multithreading primitives!
From: Espen Vestre
Subject: Re: Continuations in CL
Date: 
Message-ID: <kwvfyo4o1c.fsf@merced.netfonds.no>
········@acm.org (Fernando Mato Mira) writes:

> Any CL implementors considering adding full continuations now that web
> programming has made them fashionable?

Although a colleague of mine once made a neat use of continuations
in a web application we co-developed (in CL), I somewhat doubt that 
full continuations is really that useful in web applications. 

What would be the advantage over running a lightweight process for
each session? Would full continuations be significantly less expensive 
than (lisp-internal) processes?
-- 
  (espen)
From: Russell Wallace
Subject: Re: Continuations in CL
Date: 
Message-ID: <3e6f794b.639141015@news.eircom.net>
On 12 Mar 2003 07:01:13 -0800, ········@acm.org (Fernando Mato Mira)
wrote:

>Any CL implementors considering adding full continuations now that web
>programming has made them fashionable?

I'm not privy to the plans of CL implementors, but I find it
improbable that continuations are fashionable, being a good candidate
for the most hideously intractable language feature ever invented [1],
and almost impossible for either humans or compilers to handle
correctly.

>[I am disqualifying CL in favor of Scheme just because of this]

No you aren't. Be honest here: you're disqualifying CL because you
don't like it, but you think "I don't like it" sounds weak, so you're
looking for a rationalization that will make your decision sound
objective.

Given that programming is a branch of psychology, "I don't like it" is
in fact one of the best reasons for disqualifying a programming tool,
and an awful lot of wasted energy would be saved if people would just
realize this and stop arguing about spurious rationalizations.

[1] I'm sure someone will come up with a counterexample, but I
actually find Intercal and Brainfuck lucid compared to call/cc. I'll
admit Malbolge outdoes it, but last I heard its Turing-completeness
was undecided so I'll disqualify it from this competition until that
changes.

-- 
"Mercy to the guilty is treachery to the innocent."
Remove killer rodent from address to reply.
http://www.esatclear.ie/~rwallace
From: Fernando Mato Mira
Subject: Re: Continuations in CL
Date: 
Message-ID: <dc2f1d1b.0303130024.3507702@posting.google.com>
··@vorpalbunnyeircom.net (Russell Wallace) wrote in message news:<··················@news.eircom.net>...
> On 12 Mar 2003 07:01:13 -0800, ········@acm.org (Fernando Mato Mira)
> wrote:
> 

> >[I am disqualifying CL in favor of Scheme just because of this]
> 
> No you aren't. Be honest here: you're disqualifying CL because you
> don't like it, but you think "I don't like it" sounds weak, so you're

If I didn't like it, or preferred to use Scheme, why would I ask?
From: Russell Wallace
Subject: Re: Continuations in CL
Date: 
Message-ID: <3e7084b6.707609339@news.eircom.net>
On 13 Mar 2003 00:24:25 -0800, ········@acm.org (Fernando Mato Mira)
wrote:

>··@vorpalbunnyeircom.net (Russell Wallace) wrote in message news:<··················@news.eircom.net>...
>> On 12 Mar 2003 07:01:13 -0800, ········@acm.org (Fernando Mato Mira)
>> wrote:
>> 
>> No you aren't. Be honest here: you're disqualifying CL because you
>> don't like it, but you think "I don't like it" sounds weak, so you're
>
>If I didn't like it, or preferred to use Scheme, why would I ask?

Because you're trying to reinforce your image of yourself as a person
who only does things for "rational" reasons, and this is the reason
you've come up with to justify your decision in this case.

Stop and think about it for ten seconds. I disqualify Visual Basic
because it inhales beach balls through drinking straws. Do you see me
informing the people on the VB newsgroup of this? You do not - because
I'm confident enough of my decision that I don't need to start an
argument in an attempt to validate it in my own mind.

-- 
"Mercy to the guilty is treachery to the innocent."
Remove killer rodent from address to reply.
http://www.esatclear.ie/~rwallace
From: Andreas Hinze
Subject: Re: Continuations in CL
Date: 
Message-ID: <3E6F883E.B8AF2F8C@smi.de>
Fernando Mato Mira wrote:
> 
> Any CL implementors considering adding full continuations now that web
> programming has made them fashionable?
> 
> [I am disqualifying CL in favor of Scheme just because of this]

Do it yourself. Have a look at 
  http://lib1.store.vip.sc5.yahoo.com/lib/paulgraham/cint.lisp

Hope that helps
AHz

P.S.: [I am disqualifying Scheme in favor of CL due to all the other 
       goodies in CL that are missed in Scheme] ;-)