Re: Sbcl-help Digest, Vol 230, Issue 1

Andrew Wolven <[email protected]> Wed, 1 Apr 2026 10:32:13 -0500
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CANhGVvT=uGPNELF1mF-=Syo_8YoKi_8h7QRV_goX1YX4zGLYDA@mail.gmail.com>
--===============5606071925378694634==
Content-Type: multipart/alternative; boundary="0000000000009a874d064e67ca5b"

--0000000000009a874d064e67ca5b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I have had my share of bizarre behavior from Lisps including SBCL.  99% of
the time if I choose to investigate what is going on thoroughly enough, I
find some kind of "gotcha" where I was doing something, or even another
system unbeknownst to me was doing something to cause the unexpected
behavior.  1% of the time I find an actual bug.  Several times in complex
programs I have modified the hash table during a maphash, and gotten the
integer 0 for a value of a gethash.  But it turned out I was wrong.  Then
after discovery I note these "gotchas" and become a better Lisp programmer
for it.  In the case of the hash table it would have been nice if SBCL
issued a warning that I was doing undefined behavior.

Probably in your case something simple is happening.  Perhaps you forgot to
put an (in-package :mypackage) at the top of your file, and it is creating
a new generic function with these methods in another package, and when you
compile with C-c C-c it is inheriting the package from the REPL or
something which is the correct package.  If you suspect ASDF is a problem,
try writing a "load.lisp" file which compiles and loads the files in
question "manually" and see if the behavior is still there.  I doubt this
could be another system, but what systems are asdf/quicklisp loading?
Things like that to check.  Use mop, use apropos, track down the issue and
note it for your toolbelt.

-AKW

On Wed, Apr 1, 2026 at 8:27=E2=80=AFAM <[email protected]=
.net>
wrote:

> Send Sbcl-help mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sourceforge.net/lists/listinfo/sbcl-help
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Sbcl-help digest..."
>
>
> Today's Topics:
>
>    1. Re: missing methods (Christopher Stacy)
>    2. missing methods (Christopher Stacy)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 1 Apr 2026 04:37:54 -0400
> From: Christopher Stacy <[email protected]>
> To: SBCL help <[email protected]>
> Subject: Re: [Sbcl-help] missing methods
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed
>
> Same issue happens on sbcl 2.4.7 on Linux x86.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 1 Apr 2026 04:24:51 -0400
> From: Christopher Stacy <[email protected]>
> To: SBCL help <[email protected]>
> Cc: Christopher Stacy <[email protected]>
> Subject: [Sbcl-help] missing methods
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=3D"utf-8"; Format=3D"flowed"
>
> SBCL 2.4.6 on Mac x86.
>
> I defined some methods, and ASDF appears to be compiling and loading
> that file just fine. Everything else in there appears to be working. But
> when I call the gf, I get a No Applicable Method error. If I then go
> into slime and manually recompile the defmethod, it is fixed and works
> from then on.
>
> These are ordinary methods. One is just the class, the other specializes
> on CONSP. They both are missing, but compiling them with
> slime-compile-region-or-defun brings them into existence.
>
> At no point are there any compilation errors.
>
> I tried moving the definitions into other files in other orders in the
> system, but that didn't do anything.
>
> What could I possibly be doing wrong here?
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Sbcl-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sbcl-help
>
>
> ------------------------------
>
> End of Sbcl-help Digest, Vol 230, Issue 1
> *****************************************
>

--0000000000009a874d064e67ca5b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I have had my share of bizarre=C2=A0behavior from Lisps in=
cluding SBCL.=C2=A0 99% of the time if I choose to investigate what is goin=
g on thoroughly enough, I find some kind of &quot;gotcha&quot; where I was =
doing something, or even another system unbeknownst to me was doing somethi=
ng to cause the unexpected behavior.=C2=A0 1% of the time I find an actual =
bug.=C2=A0 Several times in complex programs I have modified the hash table=
 during=C2=A0a maphash, and gotten the integer 0 for a value of a gethash.=
=C2=A0 But it turned out I was wrong.=C2=A0 Then after discovery I note the=
se &quot;gotchas&quot; and become a better Lisp programmer for it.=C2=A0 In=
 the case of the hash table it would have been nice if SBCL issued a warnin=
g that I was doing undefined behavior.<div><br></div><div>Probably in your =
case something simple is happening.=C2=A0 Perhaps you forgot to put an (in-=
package :mypackage) at the top of your file, and it is creating a new gener=
ic function with these methods in another package, and when you compile wit=
h C-c C-c it is inheriting the package from the REPL or something which is =
the correct package.=C2=A0 If you suspect ASDF is a problem, try writing a =
&quot;load.lisp&quot; file which compiles and loads the files in question &=
quot;manually&quot; and see if the behavior is still there.=C2=A0 I doubt t=
his could be another system, but what systems=C2=A0are asdf/quicklisp loadi=
ng?=C2=A0 Things like that to check.=C2=A0 Use mop, use apropos, track down=
 the issue and note it for your toolbelt.</div><div><br></div><div>-AKW=C2=
=A0</div></div><br><div class=3D"gmail_quote gmail_quote_container"><div di=
r=3D"ltr" class=3D"gmail_attr">On Wed, Apr 1, 2026 at 8:27=E2=80=AFAM &lt;<=
a href=3D"mailto:[email protected]">sbcl-help-request=
@lists.sourceforge.net</a>&gt; wrote:<br></div><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex">Send Sbcl-help mailing list submissions to<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]=
et" target=3D"_blank">[email protected]</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"https://lists.sourceforge.net/lists/=
listinfo/sbcl-help" rel=3D"noreferrer" target=3D"_blank">https://lists.sour=
ceforge.net/lists/listinfo/sbcl-help</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]=
eforge.net" target=3D"_blank">[email protected]</a><b=
r>
<br>
You can reach the person managing the list at<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <a href=3D"mailto:[email protected]=
orge.net" target=3D"_blank">[email protected]</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Sbcl-help digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
=C2=A0 =C2=A01. Re: missing methods (Christopher Stacy)<br>
=C2=A0 =C2=A02. missing methods (Christopher Stacy)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 1 Apr 2026 04:37:54 -0400<br>
From: Christopher Stacy &lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;<br>
To: SBCL help &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;<br>
Subject: Re: [Sbcl-help] missing methods<br>
Message-ID: &lt;<a href=3D"mailto:4f9f86c4-847a-4906-98cf-270bcd2c4e03@dtpq=
.com" target=3D"_blank">[email protected]</a>&g=
t;<br>
Content-Type: text/plain; charset=3DUTF-8; format=3Dflowed<br>
<br>
Same issue happens on sbcl 2.4.7 on Linux x86.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 1 Apr 2026 04:24:51 -0400<br>
From: Christopher Stacy &lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;<br>
To: SBCL help &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;<br>
Cc: Christopher Stacy &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;<br>
Subject: [Sbcl-help] missing methods<br>
Message-ID: &lt;<a href=3D"mailto:3adcd84e-eede-4cab-870e-eddac9713675@dtpq=
.com" target=3D"_blank">[email protected]</a>&g=
t;<br>
Content-Type: text/plain; charset=3D&quot;utf-8&quot;; Format=3D&quot;flowe=
d&quot;<br>
<br>
SBCL 2.4.6 on Mac x86.<br>
<br>
I defined some methods, and ASDF appears to be compiling and loading <br>
that file just fine. Everything else in there appears to be working. But <b=
r>
when I call the gf, I get a No Applicable Method error. If I then go <br>
into slime and manually recompile the defmethod, it is fixed and works <br>
from then on.<br>
<br>
These are ordinary methods. One is just the class, the other specializes <b=
r>
on CONSP. They both are missing, but compiling them with <br>
slime-compile-region-or-defun brings them into existence.<br>
<br>
At no point are there any compilation errors.<br>
<br>
I tried moving the definitions into other files in other orders in the <br>
system, but that didn&#39;t do anything.<br>
<br>
What could I possibly be doing wrong here?<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
<br>
------------------------------<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Sbcl-help mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Sbcl-h=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/sbcl-help" rel=3D"n=
oreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/s=
bcl-help</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Sbcl-help Digest, Vol 230, Issue 1<br>
*****************************************<br>
</blockquote></div>

--0000000000009a874d064e67ca5b--


--===============5606071925378694634==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5606071925378694634==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help

--===============5606071925378694634==--