From: Robert Monfera
Subject: Keyword arguments in series functions
Date: 
Message-ID: <38356BCB.2AAB9A46@fisec.com>
Hello again, 

Here's another question to the series gurus (Raymond, Lieven, maybe
somebody else?).

I'd like to have &key, &rest, &allow-other-keys and &aux in the lambda
list of my optimized series functions.  I do not need them to carry
series, but ordinary values like stream or filename.

Waters (CLtL2) says:

"A corollary of the last point is that when defining new optimizable
series functions, series cannot be passed into &rest arguments."

As I just want to pass series only in required and maybe optional
arguments, is there a way to enhance the series package so that it takes
any kind of lambda list?  I see no reason as to why it should not be
possible, I just need some initial guidance and insight from experts to
put it together.

Thanks,
Robert

From: Raymond Toy
Subject: Re: Keyword arguments in series functions
Date: 
Message-ID: <4nhfiii409.fsf@rtp.ericsson.se>
>>>>> "Robert" == Robert Monfera <·······@fisec.com> writes:

    Robert> I'd like to have &key, &rest, &allow-other-keys and &aux in the lambda
    Robert> list of my optimized series functions.  I do not need them to carry
    Robert> series, but ordinary values like stream or filename.

[snip]

    Robert> As I just want to pass series only in required and maybe
    Robert> optional arguments, is there a way to enhance the series
    Robert> package so that it takes any kind of lambda list?  I see
    Robert> no reason as to why it should not be possible, I just need
    Robert> some initial guidance and insight from experts to put it
    Robert> together.

I don't really understand in the least how series works, so I'm of
very limited help.

However, you can just try it and see what happens.  Take a look at 
define-optimizable-series-fn where the check is made for other
keywords.  Try changing the check to allow these keywords and see if
it works.

Ray
From: Fernando D. Mato Mira
Subject: Re: Keyword arguments in series functions
Date: 
Message-ID: <3839864A.738A99F8@iname.com>
Robert Monfera wrote:

> "A corollary of the last point is that when defining new optimizable
> series functions, series cannot be passed into &rest arguments."

Theoretically, if the &rest arg were dynamic extent, it could be possible
in some cases,
but it would be subject to implementing the same kind of static analysis
one would have to perform if one wanted to `store' series temporarily in
other data structures.

> As I just want to pass series only in required and maybe optional
> arguments, is there a way to enhance the series package so that it takes
> any kind of lambda list?  I see no reason as to why it should not be
> possible, I just need some initial guidance and insight from experts to
> put it together.

As Raymond said, the first thing to fix is
series::define-optimizable-series-fn.
For dealing with defaulting, you might want/have to check for keyword
arguments at series function expansion time.
I'm merging the LispWorks and CMUCL support I added at least 5 years ago,
because that somehow didn't get in the current branch.
[I'll be mailing it tonight to both of you, I'm almost done]

--
((( DANGER )) LISP BIGOT (( DANGER )) LISP BIGOT (( DANGER )))

Fernando D. Mato Mira
Real-Time SW Eng & Networking
Advanced Systems Engineering Division
CSEM
Jaquet-Droz 1                   email: matomira AT acm DOT org
CH-2007 Neuchatel                 tel:       +41 (32) 720-5157
Switzerland                       FAX:       +41 (32) 720-5720

www.csem.ch      www.vrai.com     ligwww.epfl.ch/matomira.html
From: Fernando D. Mato Mira
Subject: Re: Keyword arguments in series functions
Date: 
Message-ID: <383986E6.4B753F38@iname.com>
What's this (OR NULL T) stuff, BTW???

--
((( DANGER )) LISP BIGOT (( DANGER )) LISP BIGOT (( DANGER )))

Fernando D. Mato Mira
Real-Time SW Eng & Networking
Advanced Systems Engineering Division
CSEM
Jaquet-Droz 1                   email: matomira AT acm DOT org
CH-2007 Neuchatel                 tel:       +41 (32) 720-5157
Switzerland                       FAX:       +41 (32) 720-5720

www.csem.ch      www.vrai.com     ligwww.epfl.ch/matomira.html