Brian Mastenbrook <bmastenb@...> writes:
> 1. Don't make any.
> 2. Make the binaries without sb-unicode.
> Or, if we make the binaries with unicode, there are two options:
> 3. Touch test-passed in the sb-md5 directory and ship it, knowing that
> users who use sb-md5 will see their MD5 computed values change.
> 4. Don't touch test-passed and distribute without sb-md5.
> 5. Some combination of #3 or #4 and #2.
>
> My personal feeling is that option #3 is the right option: I'd like to
> ship with unicode to get users testing, and it doesn't make sense to
> not ship sb-md5 just because the tests haven't been fixed. However, I
> could see an argument for #2 - waiting until there are encode and
> decode to string functions before shipping binaries with unicode. #5
> would be a lot of work.
Again, speaking personally, I'd rather #4; that way, if anyone feels
that they need sb-md5 in their binaries, they have an incentive to get
down and make it happen. I see #3 as dishonest -- what is the point
of having tests for contrib modules which we have always said have a
slightly less supported status than the main body of code, if at the
least provocation we circumvent those tests? It's not just a question
of fixing the tests: the interface itself is broken, and despite two
calls for contributions remains so.
I believe Kevin has chosen option #2 for his Debian uploads -- in some
sense, I think that covers that base; it seems to me that #4 is the
option that best reflects the state of SBCL development at release
time.
Cheers,
Christophe

Hello all,
It's time to make the binaries for SBCL 0.8.17, and because of the new
sb-unicode feature, I need to decide how to make the binaries. Right
now, sb-md5 fails its tests on a sb-unicode binary. The way I see it,
there are five options for how to make the binaries:
1. Don't make any.
2. Make the binaries without sb-unicode.
Or, if we make the binaries with unicode, there are two options:
3. Touch test-passed in the sb-md5 directory and ship it, knowing that
users who use sb-md5 will see their MD5 computed values change.
4. Don't touch test-passed and distribute without sb-md5.
5. Some combination of #3 or #4 and #2.
My personal feeling is that option #3 is the right option: I'd like to
ship with unicode to get users testing, and it doesn't make sense to
not ship sb-md5 just because the tests haven't been fixed. However, I
could see an argument for #2 - waiting until there are encode and
decode to string functions before shipping binaries with unicode. #5
would be a lot of work.
Advice?
--
Brian Mastenbrook
http://www.iscblog.info/http://www.cs.indiana.edu/~bmastenb/

punchline:
..
fatal error encountered in SBCL pid 11582:
th->pid not set up right
..
details:
I build 0.8.17 on Gentoo linux from source (and by hand,
not Gentoo's emerge), following the instructions at
http://www.sbcl.org/getting.html
(but I get the same error with 0.8.15, and also when building
using Gentoo's 'emerge')
setenv GNUMAKE gmake # the page wrongly says 'gnumake' BTW
then I build with CMUCL,
sh make.sh "lisp -batch"
which builds for a long time, but ends with
...
; [GC threshold exceeded with 75,914,384 bytes in use. Commencing GC.]
; [GC completed with 63,893,960 bytes retained and 12,020,424 bytes freed.]
; [GC will next occur when at least 75,893,960 bytes are in use.]
; [GC threshold exceeded with 75,901,920 bytes in use. Commencing GC.]
; [GC completed with 64,038,760 bytes retained and 11,863,160 bytes freed.]
; [GC will next occur when at least 76,038,760 bytes are in use.]
[building initial core file in "output/cold-sbcl.core":
writing 4096 bytes [1 page] from #<SB!FASL::GSPACE :READ-ONLY>
writing 4096 bytes [1 page] from #<SB!FASL::GSPACE :STATIC>
writing 32747520 bytes [7995 pages] from #<SB!FASL::GSPACE :DYNAMIC>
/(DESCRIPTOR-BITS INITIAL-FUN)=#XA1A4F2D
done]
* //testing for consistency of first and second GENESIS passes
//header files match between first and second GENESIS -- good
real 20m9.710s
user 11m38.147s
sys 0m27.005s
//entering make-target-2.sh
//doing warm init
This is SBCL 0.8.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/&gt;.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
fatal error encountered in SBCL pid 11582:
th->pid not set up right
The system is too badly corrupted or confused to continue at the Lisp
level. If the system had been compiled with the SB-LDB feature, we'd drop
into the LDB low-level debugger now. But there's no LDB in this build, so
we can't really do anything but just exit, sorry.
real 0m0.238s
user 0m0.119s
sys 0m0.024s
common/sbcl-0.8.17>

On Wed, Nov 24, 2004 at 08:58:25PM +0000, Christophe Rhodes wrote:
> Joseph Kiniry <kiniry@...> writes:
>
> > On 24 Nov, 2004, at 17:30, Christophe Rhodes wrote:
> >
> >> Would it be appropriate to suggest SB-INT:PSXHASH? Values might not
> >> be the same across sessions, but otherwise it seems to me that hash
> >> values could generate a good approximation to a total order.
> >
> > That is actually a very interesting idea. This would only work though
> > if hash orders were guaranteed consistent across garbage collections...
>
> PSXHASH is an (SBCL-internal) function for EQUALP hashing, which must
> preserve the hash value for structures across garbage collections
> (since two structures which are EQUALP but with different addresses
> must hash to the same value, the address of the structure cannot
> affect the hash calculation). For standard-objects, there is no such
> guarantee, I think, but I'd be very surprised if any implementation
> rehashed all hash tables containing clos objects after GCs --
> certainly you're safe in SBCL's case.
If you're only hashing a modest number of instances, and you want to
avoid writing more than half a dozen lines of code, this could easily
be your best bet. (I have done it, and been satisfied.) But if you
want to get good performance on messy nested data structures, and if
you know something useful about the properties of your data
structures, it might be pretty easy to do a lot better. For example, I
have, in a program of mine, a problem which seems to be described
exactly by your question. In my version of the problem, I happen to
know that the data structure is a directed acyclic graph, so it's easy
to compute a hash effectively. (Also, as it happens, I have just put
up a preprint of a paper which could be thought of as covering more
cases.:-) I also happen to know that it's pretty common for instances
to share enough substructure that PSXHASH (which only wants to flood
to a fixed depth) could return the same value for many instances.
Thus, it was easy to write a custom hashing operation which won big
compared to PSXHASH.
--
William Harold Newman <william.newman@...>
"Smart people believe weird things because they are skilled at
defending beliefs they arrived at for nonsmart reasons."
-- Michael Shermer, Sept. 2002 Scientific American

On Nov 26, 2004, at 12:03 AM, Karel Miklav wrote:
> I'm trying to send comands from the VIM editor to the SBCL in another
> Xterm by redirecting standard io channels, but with little sucess.
> Could someone please give me a hint?
I haven't tried this. The page also says it requires CMUCL, but maybe
it can be hacked to work with SBCL or perhaps there is something
similar and more general:
http://www.lisp-p.org/htdocs/15-vim/

On Wednesday 24 November 2004 18:28, Christophe Rhodes wrote:
> Gabor Melis <mega@...> writes:
> > From this point on, all redefinition attempts of xxx fail (including
> > the original one) with the same error until fmakunbounding
> > xxx-slot. Tested with sbcl 8.15.7 and 8.16.45.
>
> I don't know -- why do you think this is a problem? It seems
> reasonable to me. (Arguably we could be slightly friendlier in
> offering one or two more restarts, but I don't see that automatically
> clobbering a perfectly valid ordinary function with an accessor method
> is a good idea.)
>
Yes, a continue restart would be nice, but the point was that evaluating a
defclass with no slot named "slot" can produce such on error. Maybe I'll
write the example in evaluation order and not how-i-bumped-into-this order:
(defclass xxx ()
((slot :reader xxx-slot)))
(defun xxx-slot (xxx)
1)
;; this will produce an error, because it cannot remove
;; the method for slot "slot"
(defclass xxx ()
())
> Cheers,
>
> Christophe

Joseph Kiniry <kiniry@...> writes:
> On 24 Nov, 2004, at 17:30, Christophe Rhodes wrote:
>
>> Would it be appropriate to suggest SB-INT:PSXHASH? Values might not
>> be the same across sessions, but otherwise it seems to me that hash
>> values could generate a good approximation to a total order.
>
> That is actually a very interesting idea. This would only work though
> if hash orders were guaranteed consistent across garbage collections...
PSXHASH is an (SBCL-internal) function for EQUALP hashing, which must
preserve the hash value for structures across garbage collections
(since two structures which are EQUALP but with different addresses
must hash to the same value, the address of the structure cannot
affect the hash calculation). For standard-objects, there is no such
guarantee, I think, but I'd be very surprised if any implementation
rehashed all hash tables containing clos objects after GCs --
certainly you're safe in SBCL's case.
Cheers,
Christophe

Joseph Kiniry writes:
> Hi Christophe,
>
> On 24 Nov, 2004, at 17:30, Christophe Rhodes wrote:
> > Would it be appropriate to suggest SB-INT:PSXHASH? Values might not
> > be the same across sessions, but otherwise it seems to me that hash
> > values could generate a good approximation to a total order.
>
> That is actually a very interesting idea. This would only work though
> if hash orders were guaranteed consistent across garbage collections...
I was going to propose SXHASH too, but that doesn't remove the need to
implement a full comparison because of the colisions.
Of course, you can use SXHASH to provide a fast comparison for
different bucket objects.
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.

Hi Christophe,
On 24 Nov, 2004, at 17:30, Christophe Rhodes wrote:
> Alexey Dejneka <adejneka@...> writes:
>
>> Hello,
>>
>> Joseph Kiniry <kiniry@...> writes:
>>
>>> I need a function that will define a total order on two arbitrary
>>> structures.
>>>
>>> In my other ports, I've used internal functions to get lists of
>>> slots,
>>> orders on them, etc.
>>>
>>> Do the CMUCL, SBCL, and CLISP developers have suggestions for
>>> implementing such a function? I've dug around the internal
>>> functionality, but have not found an obvious solution to this
>>> problem.
>>
>> Under SBCL you can get a list of slot descriptions with
>> (sb-pcl:class-slots (sb-pcl:find-class <structure-name>))
>> Then use SB-PCL:SLOT-DEFINITION-... to get slot information.
>
> Would it be appropriate to suggest SB-INT:PSXHASH? Values might not
> be the same across sessions, but otherwise it seems to me that hash
> values could generate a good approximation to a total order.
That is actually a very interesting idea. This would only work though
if hash orders were guaranteed consistent across garbage collections...
Joe

Alexey Dejneka <adejneka@...> writes:
> Hello,
>
> Joseph Kiniry <kiniry@...> writes:
>
>> I need a function that will define a total order on two arbitrary
>> structures.
>>
>> In my other ports, I've used internal functions to get lists of slots,
>> orders on them, etc.
>>
>> Do the CMUCL, SBCL, and CLISP developers have suggestions for
>> implementing such a function? I've dug around the internal
>> functionality, but have not found an obvious solution to this
>> problem.
>
> Under SBCL you can get a list of slot descriptions with
> (sb-pcl:class-slots (sb-pcl:find-class <structure-name>))
> Then use SB-PCL:SLOT-DEFINITION-... to get slot information.
Would it be appropriate to suggest SB-INT:PSXHASH? Values might not
be the same across sessions, but otherwise it seems to me that hash
values could generate a good approximation to a total order.
Cheers,
Christophe

Gabor Melis <mega@...> writes:
> From this point on, all redefinition attempts of xxx fail (including
> the original one) with the same error until fmakunbounding
> xxx-slot. Tested with sbcl 8.15.7 and 8.16.45.
I don't know -- why do you think this is a problem? It seems
reasonable to me. (Arguably we could be slightly friendlier in
offering one or two more restarts, but I don't see that automatically
clobbering a perfectly valid ordinary function with an accessor method
is a good idea.)
Cheers,
Christophe

Hello,
Joseph Kiniry <kiniry@...> writes:
> I need a function that will define a total order on two arbitrary
> structures.
>
> In my other ports, I've used internal functions to get lists of slots,
> orders on them, etc.
>
> Do the CMUCL, SBCL, and CLISP developers have suggestions for
> implementing such a function? I've dug around the internal
> functionality, but have not found an obvious solution to this
> problem.
Under SBCL you can get a list of slot descriptions with
(sb-pcl:class-slots (sb-pcl:find-class <structure-name>))
Then use SB-PCL:SLOT-DEFINITION-... to get slot information.
--
Regards,
Alexey Dejneka
"Alas, the spheres of truth are less transparent than those of
illusion." -- L.E.J. Brouwer

Joseph Kiniry writes:
> I'm porting an application (OBJ3) to CMUCL, SBCL, and CLISP.
>
> I need a function that will define a total order on two arbitrary
> structures.
>
> In my other ports, I've used internal functions to get lists of slots,
> orders on them, etc.
>
> Do the CMUCL, SBCL, and CLISP developers have suggestions for
> implementing such a function? I've dug around the internal
> functionality, but have not found an obvious solution to this problem.
Should this order be the same on all these implementations?
Should it be the same accross sessions?
In general for structures it's not possible, there's no reflectivity
of structures. Either you limit yourself to the structure defined
with one of your macros that will keep the fields arround, or you'll
have to use CLOS.
Note that some structure types may be defined to be implemented with
lists or vectors!
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.

Bruno Haible writes:
> Thomas F. Burdick wrote:
> > Your mixin should also have a metaclass of
> > funcallable-standard-class. Unless I'm forgetting something, it's not
> > guaranteed anywhere that you can mix f-s-c and standard-class.
>
> Well, I think it's not forbidden anywhere in the MOP: It says
...
> To me, 1) means that when a class is instance of FUNCALLABLE-STANDARD-CLASS,
> it can have multiple direct superclasses. 2) means that for instances of
> FUNCALLABLE-STANDARD-CLASS, inheriting from STANDARD-OBJECT and FUNCTION
> is a normal behaviour. And 3) is irrelevant because it talks only about
> the case that no direct superclasses were explicitly specified.
>
> Since every FUNCALLABLE-STANDARD-CLASS instance inherits from STANDARD-OBJECT,
> why would it have problems inheriting from a subclass of STANDARD-OBJECT ?
>
> And finally, the third case of 4) shows that I shouldn't even need to
> define a method on VALIDATE-SUPERCLASS myself:
Okay, it looks like AMOP does require mixed inheritance from
STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS to work correctly. (I
really need to either retrieve my copy of AMOP or refrain from these
discussions in the future).
> the default method should
> already return true but doesn't in SBCL.
Right, although in this case it's intentional, because PCL can't
handle the actual mixing. Which is definately a bug.
> > Your mixin should also have a metaclass of funcallable-standard-class.
>
> That's contrary to the idea of "mixin". A mixin is a collection of slots
> and behaviour that can be reused anywhere in the class hierarchy.
It would still be a mixin that could be used in the f-s-c world, but I
agree that needing to maintain two disjoint sets of mixins somewhat
defeats the purpose.

I'm porting an application (OBJ3) to CMUCL, SBCL, and CLISP.
I need a function that will define a total order on two arbitrary
structures.
In my other ports, I've used internal functions to get lists of slots,
orders on them, etc.
Do the CMUCL, SBCL, and CLISP developers have suggestions for
implementing such a function? I've dug around the internal
functionality, but have not found an obvious solution to this problem.
Thanks,
Joe
---
Joseph R. Kiniry ID 78860581 ICQ
4344804
University College Dublin / National University of Ireland, Dublin
KindSoftware, LLC
http://www.kindsoftware.com/
Board Chair: NICE
http://www.eiffel-nice.org/

Thomas F. Burdick wrote:
> Your mixin should also have a metaclass of
> funcallable-standard-class. Unless I'm forgetting something, it's not
> guaranteed anywhere that you can mix f-s-c and standard-class.
Well, I think it's not forbidden anywhere in the MOP: It says
1) "Instances of the class FUNCALLABLE-STANDARD-CLASS support
multiple inheritance and reinitialization."
2) "Direct Superclass Relationships Among The Specified Metaobject Classes
...
FUNCALLABLE-STANDARD-OBJECT - (STANDARD-OBJECT FUNCTION)"
3) "The class STANDARD-OBJECT is the default direct superclass of the
class STANDARD-CLASS. When an instance of the class STANDARD-CLASS
is created, and no direct superclasses are explicitly specified, it
defaults to the class STANDARD-OBJECT. In this way, any behavior
associated with the class STANDARD-OBJECT will be inherited, directly
or indirectly, by all instances of the class STANDARD-CLASS. A
subclass of STANDARD-CLASS may have a different class as its default
direct superclass, but that class must be a subclass of the class
STANDARD-OBJECT.
The same is true for FUNCALLABLE-STANDARD-CLASS and
FUNCALLABLE-STANDARD-OBJECT."
4) "(VALIDATE-SUPERCLASS (class CLASS) (superclass CLASS))
This method returns true in three situations:
- If the superclass argument is the class named T,
- if the class of the class argument is the same as the class of the
superclass argument, or
- if the class of one of the arguments is STANDARD-CLASS and the class
of the other is FUNCALLABLE-STANDARD-CLASS."
To me, 1) means that when a class is instance of FUNCALLABLE-STANDARD-CLASS,
it can have multiple direct superclasses. 2) means that for instances of
FUNCALLABLE-STANDARD-CLASS, inheriting from STANDARD-OBJECT and FUNCTION
is a normal behaviour. And 3) is irrelevant because it talks only about
the case that no direct superclasses were explicitly specified.
Since every FUNCALLABLE-STANDARD-CLASS instance inherits from STANDARD-OBJECT,
why would it have problems inheriting from a subclass of STANDARD-OBJECT ?
And finally, the third case of 4) shows that I shouldn't even need to
define a method on VALIDATE-SUPERCLASS myself: the default method should
already return true but doesn't in SBCL.
> Your mixin should also have a metaclass of funcallable-standard-class.
That's contrary to the idea of "mixin". A mixin is a collection of slots
and behaviour that can be reused anywhere in the class hierarchy.
Bruno

Bruno Haible writes:
> Hi,
>
> I wish to use a mixin class
>
> (defclass prioritized-dispatcher ()
> ((dependents :type list :initform nil)))
>
> on a generic-function subclass:
>
> (defclass prioritized-generic-function (prioritized-dispatcher standard-generic-function)
> ()
> (:metaclass sb-pcl:funcallable-standard-class))
That's the problem. Your mixin should also have a metaclass of
funcallable-standard-class. Unless I'm forgetting something, it's not
guaranteed anywhere that you can mix f-s-c and standard-class.
> SBCL gives me an error on this, telling me to define a method on
> SB-MOP:VALIDATE-SUPERCLASS. If I do this,
Hmm, that error message is kind of misleading, since you shouldn't be
writing methods on validate-superclass for built-in classes. Because,
well, PCL is correct when it doesn't validate them.
> So, how to make this work? In CLISP (from CVS) it works without problems.
Make your mixin of a compatible class-metaclass. PCL should really be
fixed so that it refuses to do things that will confuse it internally,
but I ain't volunteering :-)