james anderson | 3 Feb 2004 18:31
Picon
Gravatar

Re: method combinations / cl-bench / ansi-tests


On Tuesday, Feb 3, 2004, at 17:30 Europe/Berlin, Sam Steingold wrote:

>> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-03 16:28:48 +0100]:
>>
>> On Tuesday, Feb 3, 2004, at 15:06 Europe/Berlin, Paul F. Dietz wrote:
>>
>>> james anderson wrote:
>>>
>>>> define-method-combination-long-form.lsp
>>>>    a replacement for the respective ansi-tests file to exercise more
>>>
>>> Thanks!  I have been meaning to write long form tests, but hadn't
>>> gotten around to it yet.
>>>
>>> I assume this is licensable under GPL, so I can put it into
>>> gcl/ansi-tests?
>>
>> please. i didn't find any notices in the other test files proper, so i
>> added just a line with my mail address, and presumed that
>> COPYING.LIB-2.0 would apply.
>
> just a small nit pick: actually, CLISP is under GPL2, so, by default,
> everything that comes with it is GPL2.  Since you are the author, you,
> of course, are free to contribute it to CLISP under GPL2 and to GCL (of
> which ansi-tests are a part) under LGPL2.

the COPYING.LIB-2.0 reference was in response to p.dietz's above  
enquiry about the define-method-combination-long-form.lisp file, as  
that should end up among ansi-tests, which appear(s) to be under GCL's  
(Continue reading)

Sam Steingold | 3 Feb 2004 21:36
Picon

Re: method combinations / cl-bench / ansi-tests

> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-03 18:31:59 +0100]:
>
> ? if the one i noted in the message from this morning
>
> http://home.arcor.de/james_anderson/setf/clisp/20040203/clos-20040203.diff

I am sorry, I did not see this e-mail.

> is not what you need, please tell me the diff command which will
> generate something which you can use. this one was generated
> differently than the clos-20040202.diff which i mailed yesterday. this
> time, by
>
>    diff -u clos-20040202.lisp clos.lisp > clos-20040203.diff
>
> where the clos-20040202.lisp file is from yesterday's cvs.

this is _very_ good, but, unfortunately, it includes whitespace
changes, so it is too big (and thus hard to read).

could you please do

$ cvs diff -ub clos.lisp

thanks!

--

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
(Continue reading)

james anderson | 3 Feb 2004 21:54
Picon
Gravatar

Re: method combinations


On Tuesday, Feb 3, 2004, at 21:36 Europe/Berlin, Sam Steingold wrote:

>> ...
>
> could you please do
>
> $ cvs diff -ub clos.lisp
>

http://home.arcor.de/james_anderson/setf/clisp/20040203/clos- 
20040203b.diff

...

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Sam Steingold | 4 Feb 2004 00:04
Picon

Re: method combinations

> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-03 21:54:57 +0100]:
>> $ cvs diff -ub clos.lisp
> http://home.arcor.de/james_anderson/setf/clisp/20040203/clos- 
> 20040203b.diff

OK, thanks, now we are in business.

I applied this patch (with some changes, mostly formatting).

Notes:

1. you do _NOT_ need MAKE-LOAD-FORM because METHOD-COMBINATION is a
   struct and will be saved in the #S() format (faster)

2. this test still fails:

Form:
(progn
  (defun positive-integer-qualifier-p (method-qualifiers)
    (and (= (length method-qualifiers) 1)
         (typep (first method-qualifiers) '(integer 0 *))))
  (define-method-combination example-method-combination ()
    ((method-list positive-integer-qualifier-p))
    `(progn , <at> (mapcar #'(lambda (method) `(call-method ,method))
                      (stable-sort method-list #'<
                                   :key #'(lambda (method)
                                            (first (method-qualifiers
                                                    method)))))))
  (defgeneric mc-test-piq (p1 p2 s)
    (:method-combination example-method-combination)
(Continue reading)

james anderson | 4 Feb 2004 18:27
Picon
Gravatar

Re: method combinations

>
> 4. COMPUTE-EFFECTIVE-METHOD-FUNCTION: is it possible to use backquote
>    instead of (list 'function (list 'lambda ...))
>

in theory yes. the changes you had made were similar to my first 
attempt to code that passage. i find it very hard to code, or to read, 
or to debug double-back-quoted code. some people have the hang of it. i 
don't. your changes caused problems similar to my also 
double-back-quoted initial version: some of the symbols don't get 
evaluated in the intended context. i put back in the version i can read.

...

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
james anderson | 4 Feb 2004 18:22
Picon
Gravatar

Re: method combinations


On Wednesday, Feb 4, 2004, at 00:04 Europe/Berlin, Sam Steingold wrote:
>
> 2. this test still fails:
>
> Form:
> (progn
>   (defun positive-integer-qualifier-p (method-qualifiers)
>     (and (= (length method-qualifiers) 1)
>          (typep (first method-qualifiers) '(integer 0 *))))
>   (define-method-combination example-method-combination ()
>     ((method-list positive-integer-qualifier-p))
>     `(progn , <at> (mapcar #'(lambda (method) `(call-method ,method))
>                       (stable-sort method-list #'<
>                                    :key #'(lambda (method)
>                                             (first (method-qualifiers
>                                                     method)))))))
>   (defgeneric mc-test-piq (p1 p2 s)
>     (:method-combination example-method-combination)
>     (:method 1 ((p1 t) (p2 t) s) (vector-push-extend (list 1 p1 p2) s))
>     (:method 2 ((p1 t) (p2 t) s) (vector-push-extend (list 2 p1 p2) s))
>     (:method 3 ((p1 t) (p2 t) s) (vector-push-extend (list 3 p1 p2) 
> s)))
>   (let ((s (make-array 10 :adjustable t :fill-pointer 0)))
>     (mc-test-piq 1 2 s)
>     s))
> CORRECT: #((1 1 2) (2 1 2) (3 1 2))
> CLISP  : ERROR
> GET: 1 is not a SYMBOL

(Continue reading)

Sam Steingold | 5 Feb 2004 17:17
Picon

Re: method combinations

> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-04 18:22:09 +0100]:
>
> --- clos-20040203.lisp	Tue Feb  3 11:52:27 2004
> +++ clos.lisp	Wed Feb  4 18:02:55 2004
>  <at>  <at>  -1633,10 +1633,11  <at>  <at> 
>                  `(, <at> (subseq lambda-list 0 index) &ALLOW-OTHER-KEYS
>                    , <at> (subseq lambda-list index)))))
>            (let* ((self (gensym))
> -                 (wants-next-method-p
> +                 #|(wants-next-method-p
>                    (or (method-combination-object (car qualifiers)
>                                                   :if-does-not-exist nil)
> -                      (equal qualifiers '()) (equal qualifiers '(:around))))
> +                      (equal qualifiers '()) (equal qualifiers '(:around))))|#
> +                 (wants-next-method-p t)
>                   (compile nil)
>                   (lambdabody
>                     (multiple-value-bind (body-rest declarations docstring)

with this patch, the number of failed regression tests goes through the
roof.

--

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
In every non-trivial program there is at least one bug.

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
(Continue reading)

james anderson | 9 Feb 2004 21:03
Picon
Gravatar

Re: method combinations

nb. re today's patch. if one applies it in a running image, one must 
also reevaluate the next expression in clos.lisp:

(setf (method-combination-expander (method-combination-object 
'standard))
       #'standard-method-combination-expander)

in order for it to take effect.

...

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
james anderson | 9 Feb 2004 20:44
Picon
Gravatar

Re: method combinations


On Thursday, Feb 5, 2004, at 17:17 Europe/Berlin, Sam Steingold wrote:

>> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-04 18:22:09 +0100]:
>>
>> --- clos-20040203.lisp	Tue Feb  3 11:52:27 2004
>> +++ clos.lisp	Wed Feb  4 18:02:55 2004
>> ...
>
> with this patch, the number of failed regression tests goes through the
> roof.

there are two clauses in the standard combination effective method 
computation which had hard-wired the next-method handling. this changes 
them to look at the method. at the moment a next-method context is 
always required, but if one leaves the test in despite that, one could 
eventually allow defgeneric to optimize for a case when it defines the 
entire "known" function.

Attachment (clos-20040204,09.diff): application/octet-stream, 1867 bytes

james anderson | 4 Feb 2004 17:32
Picon
Gravatar

Re: method combinations


On Wednesday, Feb 4, 2004, at 00:04 Europe/Berlin, Sam Steingold wrote:

>> * james anderson <wnzrf.naqrefba <at> frgs.qr> [2004-02-03 21:54:57 +0100]:
>>> $ cvs diff -ub clos.lisp
>> http://home.arcor.de/james_anderson/setf/clisp/20040203/clos-
>> 20040203b.diff
>
> OK, thanks, now we are in business.
>
> I applied this patch (with some changes, mostly formatting).
>
> Notes:
>
> 1. you do _NOT_ need MAKE-LOAD-FORM because METHOD-COMBINATION is a
>    struct and will be saved in the #S() format (faster)

i would have thought so. until i observed that i an error was being 
signaled when i tried to compile a file which had a literal 
method-combination structure instance as part of some other value which 
the file compiler was working on.
- i didn't try to get to the bottom of the circumstance. it was easier 
to just provide the load form method.
- i recall that i had the entire clisp bullt at that point, so i don't 
think it was an issue of an incomplete runtime at that moment.
- the method-combination structure didn't really have any business 
being there and i think i've fixed that since.
- i never did try compiling them explicitly as there's no real reason 
to.

(Continue reading)


Gmane