Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Liam Healy <lnp@he...>  20090201 03:45:03

I am seeing a style warning when I call a method using a particular key argument, :divideddifference. I don't understand why. It doesn't happen in CCL. (defgeneric evaluate (object point &key) (:documentation "Evaluate the GSL object.")) ;; This is the macro expansion of my method definition: (DEFMETHOD EVALUATE ((COEFFICIENTS VECTORDOUBLEFLOAT) (X FLOAT) &KEY DIVIDEDDIFFERENCE) (DECLARE) (IF DIVIDEDDIFFERENCE (SBSYS:WITHPINNEDOBJECTS ((ORIGINALARRAY COEFFICIENTS) (ORIGINALARRAY DIVIDEDDIFFERENCE)) (LET ((#:CRETURN (FOREIGNFUNCALL "gsl_poly_dd_eval" :POINTER (CPOINTER DIVIDEDDIFFERENCE) :POINTER (CPOINTER COEFFICIENTS) SIZET (DIM0 COEFFICIENTS) :DOUBLE X :DOUBLE))) (VALUES #:CRETURN))) (SBSYS:WITHPINNEDOBJECTS ((ORIGINALARRAY COEFFICIENTS)) (LET ((#:CRETURN (FOREIGNFUNCALL "gsl_poly_eval" :POINTER (CPOINTER COEFFICIENTS) SIZET (DIM0 COEFFICIENTS) :DOUBLE X :DOUBLE))) (VALUES #:CRETURN))))) ;;; Here is a sample call that triggers the warnings (let ((xa #m(0.0d0 1.0d0 2.0d0 3.0d0)) (ya #m(2.5d0 7.2d0 32.7d0 91.0d0)) (dd (makemarray 'doublefloat :dimensions 4))) (divideddifference dd xa ya) (list (evaluate xa 0.0d0 :divideddifference dd) (evaluate xa 1.0d0 :divideddifference dd) (evaluate xa 2.0d0 :divideddifference dd) (evaluate xa 3.0d0 :divideddifference dd))) ; in: LAMBDA NIL ; (GSLL:EVALUATE GSLL::XA 0.0d0 :DIVIDEDDIFFERENCE GSLL::DD) ; ; caught STYLEWARNING: ; :DIVIDEDDIFFERENCE is not a known argument keyword. ; (GSLL:EVALUATE GSLL::XA 1.0d0 :DIVIDEDDIFFERENCE GSLL::DD) ; ; caught STYLEWARNING: ; :DIVIDEDDIFFERENCE is not a known argument keyword. ; (GSLL:EVALUATE GSLL::XA 2.0d0 :DIVIDEDDIFFERENCE GSLL::DD) ; ; caught STYLEWARNING: ; :DIVIDEDDIFFERENCE is not a known argument keyword. ; (GSLL:EVALUATE GSLL::XA 3.0d0 :DIVIDEDDIFFERENCE GSLL::DD) ; ; caught STYLEWARNING: ; :DIVIDEDDIFFERENCE is not a known argument keyword. ; ; compilation unit finished ; caught 4 STYLEWARNING conditions (2.5d0 7.2d0 32.7d0 91.0d0) ;; another method with a different key arg that gives no warning (DEFMETHOD EVALUATE ((OBJECT CHEBYSHEV) X &KEY ORDER) (DECLARE) (IF ORDER (LET ((#:CRETURN (FOREIGNFUNCALL "gsl_cheb_eval_n" :POINTER (MPOINTER OBJECT) SIZET ORDER :DOUBLE X :DOUBLE))) (VALUES #:CRETURN)) (LET ((#:CRETURN (FOREIGNFUNCALL "gsl_cheb_eval" :POINTER (MPOINTER OBJECT) :DOUBLE X :DOUBLE))) (VALUES #:CRETURN)))) (lispimplementationversion) "1.0.18.debian" uname a Linux thinkpad 2.6.261amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64 GNU/Linux Thanks for any insight. Liam 
From: Tobias C. Rittweiler <tcr@fr...>  20090201 09:41:27

Liam Healy <lnp@...> writes: > I am seeing a style warning when I call a method using a particular > key argument, :divideddifference. > I don't understand why. It doesn't happen in CCL. > > (defgeneric evaluate (object point &key) > (:documentation "Evaluate the GSL object.")) > > ;; This is the macro expansion of my method definition: > (DEFMETHOD EVALUATE > ((COEFFICIENTS VECTORDOUBLEFLOAT) (X FLOAT) &KEY > DIVIDEDDIFFERENCE) What is VECTORDOUBLEFLOAT? > ;;; Here is a sample call that triggers the warnings > (let ((xa #m(0.0d0 1.0d0 2.0d0 3.0d0)) > (ya #m(2.5d0 7.2d0 32.7d0 91.0d0)) > (dd (makemarray 'doublefloat :dimensions 4))) > (divideddifference dd xa ya) > (list > (evaluate xa 0.0d0 :divideddifference dd) > (evaluate xa 1.0d0 :divideddifference dd) > (evaluate xa 2.0d0 :divideddifference dd) > (evaluate xa 3.0d0 :divideddifference dd))) > ; in: LAMBDA NIL > ; (GSLL:EVALUATE GSLL::XA 0.0d0 :DIVIDEDDIFFERENCE GSLL::DD) Is XA really of class VECTORDOUBLEFLOAT? Are you sure that the above method is invoked by these forms, and not another method (without the :DIVIDEDDIFFERENCE keywordexplaining the stylewarnings)? T. 
From: Liam Healy <lnp@he...>  20090201 15:41:08

On Sun, Feb 1, 2009 at 4:40 AM, Tobias C. Rittweiler <tcr@...> wrote: > Liam Healy <lnp@...> writes: > >> I am seeing a style warning when I call a method using a particular >> key argument, :divideddifference. >> I don't understand why. It doesn't happen in CCL. >> >> (defgeneric evaluate (object point &key) >> (:documentation "Evaluate the GSL object.")) >> >> ;; This is the macro expansion of my method definition: >> (DEFMETHOD EVALUATE >> ((COEFFICIENTS VECTORDOUBLEFLOAT) (X FLOAT) &KEY >> DIVIDEDDIFFERENCE) > > What is VECTORDOUBLEFLOAT? It is a class I have defined. > >> ;;; Here is a sample call that triggers the warnings >> (let ((xa #m(0.0d0 1.0d0 2.0d0 3.0d0)) >> (ya #m(2.5d0 7.2d0 32.7d0 91.0d0)) >> (dd (makemarray 'doublefloat :dimensions 4))) >> (divideddifference dd xa ya) >> (list >> (evaluate xa 0.0d0 :divideddifference dd) >> (evaluate xa 1.0d0 :divideddifference dd) >> (evaluate xa 2.0d0 :divideddifference dd) >> (evaluate xa 3.0d0 :divideddifference dd))) >> ; in: LAMBDA NIL >> ; (GSLL:EVALUATE GSLL::XA 0.0d0 :DIVIDEDDIFFERENCE GSLL::DD) > > Is XA really of class VECTORDOUBLEFLOAT? Are you sure that the above > method is invoked by these forms, and not another method (without the > :DIVIDEDDIFFERENCE keywordexplaining the stylewarnings)? Yes. #m(0.0d0 1.0d0 2.0d0 3.0d0) #<VECTORDOUBLEFLOAT #(0.0d0 1.0d0 2.0d0 3.0d0)> (classof *) #<STANDARDCLASS VECTORDOUBLEFLOAT> Here are all the methods of #'evaluate, as shown by slimeinspect Methods: (VECTORDOUBLEFLOAT FLOAT) [remove method] (BASISSPLINE T) [remove method] (CHEBYSHEV T) [remove method] (SPLINE T) [remove method] (INTERPOLATION T) [remove method] all the classes shown as the first argument are subclasses of mobject, but they are mutually exclusive (so a vectordoublefloat is not also any of the other classes named). Liam > > T. > 
From: Gary King <gwking@me...>  20090201 15:55:59

Just to be extra sure, you might want to try computeapplicable methods... On Feb 1, 2009, at 10:41 AM, Liam Healy wrote: > On Sun, Feb 1, 2009 at 4:40 AM, Tobias C. Rittweiler > <tcr@...> wrote: >> Liam Healy <lnp@...> writes: >> >>> I am seeing a style warning when I call a method using a particular >>> key argument, :divideddifference. >>> I don't understand why. It doesn't happen in CCL. >>> >>> (defgeneric evaluate (object point &key) >>> (:documentation "Evaluate the GSL object.")) >>> >>> ;; This is the macro expansion of my method definition: >>> (DEFMETHOD EVALUATE >>> ((COEFFICIENTS VECTORDOUBLEFLOAT) (X FLOAT) &KEY >>> DIVIDEDDIFFERENCE) >> >> What is VECTORDOUBLEFLOAT? > > It is a class I have defined. > >> >>> ;;; Here is a sample call that triggers the warnings >>> (let ((xa #m(0.0d0 1.0d0 2.0d0 3.0d0)) >>> (ya #m(2.5d0 7.2d0 32.7d0 91.0d0)) >>> (dd (makemarray 'doublefloat :dimensions 4))) >>> (divideddifference dd xa ya) >>> (list >>> (evaluate xa 0.0d0 :divideddifference dd) >>> (evaluate xa 1.0d0 :divideddifference dd) >>> (evaluate xa 2.0d0 :divideddifference dd) >>> (evaluate xa 3.0d0 :divideddifference dd))) >>> ; in: LAMBDA NIL >>> ; (GSLL:EVALUATE GSLL::XA 0.0d0 :DIVIDEDDIFFERENCE GSLL::DD) >> >> Is XA really of class VECTORDOUBLEFLOAT? Are you sure that the >> above >> method is invoked by these forms, and not another method (without the >> :DIVIDEDDIFFERENCE keywordexplaining the stylewarnings)? > > Yes. > #m(0.0d0 1.0d0 2.0d0 3.0d0) > #<VECTORDOUBLEFLOAT #(0.0d0 1.0d0 2.0d0 3.0d0)> > (classof *) > #<STANDARDCLASS VECTORDOUBLEFLOAT> > > Here are all the methods of #'evaluate, as shown by slimeinspect > > Methods: > (VECTORDOUBLEFLOAT FLOAT) [remove method] > (BASISSPLINE T) [remove method] > (CHEBYSHEV T) [remove method] > (SPLINE T) [remove method] > (INTERPOLATION T) [remove method] > > all the classes shown as the first argument are subclasses of mobject, > but they are mutually exclusive (so a vectordoublefloat is not also > any of the other classes named). > > Liam > >> >> T. >> > >  > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sfspreadtheword > _______________________________________________ > Sbcldevel mailing list > Sbcldevel@... > https://lists.sourceforge.net/lists/listinfo/sbcldevel  Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 3384052 gwkkwg on Skype * garethsan on AIM * gwking on twitter 
From: Richard M Kreuter <kreuter@pr...>  20090201 18:10:02

Liam Healy writes: > I am seeing a style warning when I call a method using a particular > key argument, :divideddifference. > I don't understand why. It doesn't happen in CCL. Indeed. >(lispimplementationversion) > "1.0.18.debian" The details behavior changed some months ago (probably around 1.0.21 or '.22), though possibly not in a manner that will help you. The short story is that if you've executed the relevant DEFMETHODs before compiling the function call, no warning will be signaled; if you're compiling the call before adding any method that takes the keyword, you will still see the warning. (See [1] for a more precise explanation and rationale for the current behavior.) If you can't reasonably execute the DEFMETHODs before compiling the call, you could alternatively add the explicit keywords or &ALLOWOTHERKEYS to the DEFGENERIC's lambda list. [1] http://thread.gmane.org/gmane.lisp.steelbank.devel/11712  Richard 
From: Liam Healy <lnp@he...>  20090201 22:25:56

On Sun, Feb 1, 2009 at 12:06 PM, Richard M Kreuter <kreuter@...> wrote: > Liam Healy writes: >> I am seeing a style warning when I call a method using a particular >> key argument, :divideddifference. >> I don't understand why. It doesn't happen in CCL. > > Indeed. > >>(lispimplementationversion) >> "1.0.18.debian" > > The details behavior changed some months ago (probably around 1.0.21 or > '.22), though possibly not in a manner that will help you. The short > story is that if you've executed the relevant DEFMETHODs before > compiling the function call, no warning will be signaled; if you're > compiling the call before adding any method that takes the keyword, you > will still see the warning. (See [1] for a more precise explanation and > rationale for the current behavior.) > > If you can't reasonably execute the DEFMETHODs before compiling the > call, you could alternatively add the explicit keywords or > &ALLOWOTHERKEYS to the DEFGENERIC's lambda list. > > [1] http://thread.gmane.org/gmane.lisp.steelbank.devel/11712 > >  > Richard > The email link you've provided describes exactly what I am experiencing, so it sounds like an SBCL upgrade will cure the problem. I don't know what you mean by "executed the relevant defmethods before compiling the function call"; at the top of the file is the defmethod, the usage is further down in an example/test, and I get this warning whenever I run the tests or just simply cut and paste the example into a listener after everything is loaded, in any case certainly after the defmethod has been compiled and loaded. This is what I do for some of the other examples (like chebyshev) for which I see no warning. Liam 
Sign up for the SourceForge newsletter:
No, thanks