From gwking at metabang.com Thu Dec 4 17:44:00 2008 From: gwking at metabang.com (Gary King) Date: Thu, 4 Dec 2008 12:44:00 -0500 Subject: [Metatilities-devel] One more bug In-Reply-To: <4be8713d0811251753q6253af10lfaf9cc5ab99606ac@mail.gmail.com> References: <4be8713d0811251651i4571fe52h751868899cf918@mail.gmail.com> <8C87BD2A-4364-40DD-95F7-34733DB98B50@metabang.com> <4be8713d0811251753q6253af10lfaf9cc5ab99606ac@mail.gmail.com> Message-ID: <6F3756A8-EECC-4F58-ABE2-9E6A8B47CDC1@metabang.com> Hi Gustavo, I just updated metatilities to 0.6.17 with the fix for this problem. Sorry it took so long and please do keep sending me problem reports and suggestions. thanks, On Nov 25, 2008, at 8:53 PM, Gustavo wrote: > Oh, a long time, I see. :) > > I use your stuff a lot, so it is likelly that I find bugs in it. > > 2008/11/25 Gary King > Hi Gustavo > > Thanks for the detailed report. I haven't looked at (or even used!) > this code for a _long_ time so it wouldn't surprise me if its > broken. I'll see what I can do over the Thanksgiving break. > > regards, > > On Nov 25, 2008, at 7:51 PM, Gustavo wrote: > >> The compiler macros for functions disjoin and conjoin are broken. >> For debugging purposes, I copied the code to a macro to see what >> was happening. >> >> cl-user> (in-package :metatilities) >> # >> utilities> (defmacro disjoin* (&whole form &rest fns) >> (cond ((every #'(lambda (x) (or (symbolp x) (function-expression- >> p x))) fns) >> (with-unique-names (args) >> `#'(lambda (,args) >> (or ,@(mapcar #'(lambda (x) >> `(apply ,(extract-head-form x) >> ,args)) >> fns))))) >> (t form))) >> disjoin* >> utilities> (macroexpand-1 '(disjoin* #'macro-char-p #'whitespace-p)) >> #'(lambda (#:|args/1399|) >> (or (apply macro-char-p #:|args/1399|) (apply whitespace-p #:| >> args/1399|))) >> t >> >> I realized this bug trying to compile a function - sbcl complained >> about the variables macro-char-p and whitespace-p not to be >> defined. That makes me wonder: what is "extract-head-form" doing? >> It should be usefull only if you did something like: >> >> (define-compiler-macro disjoin (fn &rest fns) >> ... >> `(,(extract-head-form x) , at args) >> ... >> ) >> >> I.e., eliminating the funcalls (I saw that somewhere on cliki.net >> some time ago).And, by the way, I guess that, the way the function >> disjoin is being defined, I guess there is no way to do this (the >> argument list is only known in execution time). > > -- > Gary Warren King, metabang.com > Cell: (413) 559 8738 > Fax: (206) 338-4052 > gwkkwg on Skype * garethsan on AIM > > > > > -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM -------------- next part -------------- An HTML attachment was scrubbed... URL: