[CM] cm,clm and sbcl

Daniel Barlow dan@telent.net
Tue, 14 May 2002 13:06:38 +0100


[ I'm not yet on this list, though I intend to be by next week.
I'll check the archive for replies but please cc me anything you
particularly want me to see]

Bill Schottstaedt <bil@ccrma.Stanford.EDU> writes:

> CMN works in sbcl (with a minor change to cmn-init.lisp),
> but CLM doesn't;  I made a few hundred changes for sbcl, but
> finally stopped when I hit (in ffi.lisp):

I have CLM :just-lisp working in SBCL, at least to the extent that it
can play the synthesized violin example.  I haven't tried getting all
the stuff with the code walker going.

> debugger invoked on condition of type SB-INT:BUG:
>     full call to SB-KERNEL:%INSTANCE-REF
>   This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
[...]

I hit something very similar in clm-snd.lisp, which I reported this as
an SBCL bug, though the code that triggers it is kind of questionable
anyway:

--- clm-2.orig/clm-snd.lisp     Thu May  9 12:47:58 2002
+++ clm-2/clm-snd.lisp  Fri May 10 06:44:58 2002
@@ -141,7 +141,7 @@
 #-just-lisp
 (defmacro <send-snd> (result &optional fstr &rest args)
   (let ((lst (gethash (second result) vars)))
-    (if (or lst (varinfo-refd lst))
+    (if lst #+nil (or lst (varinfo-refd lst))
        (format *c-file* "  ~A = FALSE;~%" (lc (second result))))
     (format *c-file* "  {char *buf; buf = (char *)calloc(512,sizeof(char));~%  
 sprintf(buf,~A);~%   clm_send_snd(buf); free(buf);}~%"
            (apply #'lisp-to-C-format nil fstr args)))

I can't see what (varinfo-refd nil) is supposed to return, so I tend
to cut SBCL some slack where it doesn't either.  Is your ffi.lisp
problem likely to be similar?

> people laugh. Other things I noticed; sbcl stumbles on:
>
> (defconstant a-name "a string")

I believe that one is somehow religious, though I forget the exact
reasoning.

> claiming that I'm trying to set the value twice. And in ffi.lisp, it complains:

I haven't tried building the ffi version yet.  I'll come back to CLM
when I have my new usb audio adaptor working properly.


-dan

-- 

  http://ww.telent.net/cliki/ - Link farm for free CL-on-Unix resources