Hoehle, Joerg-Cyril | 1 Oct 2004 09:15
Favicon

fwd: bug in clsql MOP usage?

Hi,

can the user expect that known(?) MOP slots have known names?

-----Ursprungliche Nachricht-----
Von: Kevin Rosenberg [mailto:kevin <at> rosenberg.net]
Gesendet: Donnerstag, 30. September 2004 19:05
An: Hohle, Jorg-Cyril
Cc: clsql-devel <at> b9.com
Betreff: Re: bug in clsql MOP usage?

Hoehle, Joerg-Cyril wrote:
> CLISP's MOP support should be complete now. Nevertheless, it errors
> out in clsql's sql/ooddl.lisp claiming that there's no slot named
> TYPE.

The attribute TYPE is inherited from standard-direct-slot-definition.
In testing with CLISP, I've found that CLISP names this attribute
differently than AllegoCL, CMUCL, Lispworks, OpenMCL, and SBCL. CLISP
names this slot $TYPE. I've worked around this in my CLSQL development
tree, but this compatibility update is not in the last public release
of CLSQL (3.0.6).

FYI, the TYPE slot is used to extract the CLSQL type information of
the view class slot. In CLSQL's compute-effective-slot-definition, a
more generic Lisp type is stored back in the TYPE attribute after the
CLSQL-specific TYPE information is extracted from the direct slot
definition.

> To me naive user, it looks like there once was a slot of that name?!?
(Continue reading)

Bruno Haible | 1 Oct 2004 13:58

MAP.48 and MAKE-SEQUENCE.ERROR.15, MAP.ERROR.10, CONCATENATE.ERROR.6

Hi Paul,

In MAP.48 you assumed that the implementation has advanced capabilities
for determining the element type of a sequence type specifier.

Now I've improved this area in CLISP, and see that in
  MAKE-SEQUENCE.ERROR.15, MAP.ERROR.10, CONCATENATE.ERROR.6
you assume that the implementation has _no_ advanced capabilities in this area!!

More specifically, since ANSI CL says that
  - when a STRING result is requested, a (VECTOR CHARACTER) is returned,
    although STRING means
    (OR (VECTOR CHARACTER) (VECTOR BASE-CHAR) ... (VECTOR NIL)),
  - when a (VECTOR *) is requested, a (VECTOR T) is returned, although (VECTOR *)
    means (OR (VECTOR T) (VECTOR BIT) (VECTOR CHARACTER) ... (VECTOR NIL)).

So CLISP now implements a general rule for determining the element type,
that comprises these two as special cases. Therefore CLISP determines that the
element type of (OR (VECTOR BIT) (VECTOR T)) is T.

The MAKE-SEQUENCE description says "Affected By: The implementation."

Could you please fix the tests so that they allow an element type determination
of (OR (VECTOR BIT) (VECTOR T)) ?

Bruno

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
(Continue reading)

Bruno Haible | 1 Oct 2004 14:20

Re: MAP.48

Hello, Christophe,

> > Still, I get a stomach-ache when thinking about
> >
> >   (map '(or (vector character 3)
> >             (vector (unsigned-byte 8) 4)
> >             (vector (unsigned-byte 16) 4)
> >             (vector (unsigned-byte 32) 5)
> >             (vector (unsigned-byte 64) 6))
> >        #'identity '(200 300 400 500))
> >
> > Do you plan to support this in SBCL?
>
> This should signal an error, as I believe it currently does, because
> the implementation cannot determine the unique element type of the
> array for the creation.

However, the STRING type is roughly equivalent to
(OR (VECTOR CHARACTER) (VECTOR BASE-CHAR) (VECTOR NIL))
Therefore
   (map '(or (vector character) (vector base-char) (vector nil)) ...)
must do the same as
   (map 'string ...)
namely allocate a (VECTOR CHARACTER).

How can this be implemented? You cannot assume that there is a unique
element type in the type specifier. Instead, when you have several
element types in it, you probably need to take

   (upgraded-array-element-type `(OR ,eltype1 ... ,eltypeN)).
(Continue reading)

Bruno Haible | 1 Oct 2004 14:47

Re: MAP.48 and MAKE-SEQUENCE.ERROR.15, MAP.ERROR.10, CONCATENATE.ERROR.6

Paul F. Dietz wrote:
> There is no type X such that for every vector V in (OR (VECTOR BIT) (VECTOR
> T)), X is type equivalent to (ARRAY-ELEMENT-TYPE V).

The same holds for the types STRING and (VECTOR *), and for DEFTYPEd type
names that expand to them. So?

> Since the implementation cannot
> determine the element type specified by this type (since there is no unique
> answer), it must signal an error.

Wrong assumption. CLISP can determine the element type.

Bruno

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Bruno Haible | 1 Oct 2004 15:19

Re: MAP.48 and MAKE-SEQUENCE.ERROR.15, MAP.ERROR.10, CONCATENATE.ERROR.6

Paul F. Dietz wrote:
> > Wrong assumption. CLISP can determine the element type.
>
> Then CLISP is wrong -- there is no such element type.

So you think you are in possession of the complete rules how to determine
the element type of a type specifier.

What do you think, then, does the "Affected By: The implementation." in
the MAKE-SEQUENCE description mean?

Bruno

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Hoehle, Joerg-Cyril | 1 Oct 2004 15:48
Favicon

AW: confused debugger, aborts to outer break level -- repeatable

Hi again,

Here's a repeatable testcase for the previously noticed behaviour, not involving FFI, but solely
unwind-protect (FFI::exec-on-stack and with-foreign-string create an unwind-protect frame).

[59]> (break)
** - Continuable Error
Break
If you continue (by typing 'continue'): Return from BREAK loop
The following restarts are also available:
ABORT          :R1      ABORT
Break 1 [60]> (unwind-protect (error)(print"uh"))
*** - EVAL: too few arguments given to ERROR: (ERROR)
The following restarts are available:
ABORT          :R1      ABORT
ABORT          :R2      ABORT
Break 2 [61]> abort
"uh"
[62]>

Regards,
	Jorg Hohle

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Bruno Haible | 1 Oct 2004 15:57

Re: fwd: bug in clsql MOP usage?

Joerg asked:

> can the user expect that known(?) MOP slots have known names?

No. We discussed this in the thread starting at
http://article.gmane.org/gmane.lisp.clisp.devel/12188

Bruno

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
clisp-cvs-request | 2 Oct 2004 05:21
Picon

clisp-cvs digest, Vol 1 #720 - 10 msgs

Send clisp-cvs mailing list submissions to
	clisp-cvs <at> lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/clisp-cvs
or, via email, send a message with subject or body 'help' to
	clisp-cvs-request <at> lists.sourceforge.net

You can reach the person managing the list at
	clisp-cvs-admin <at> lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of clisp-cvs digest..."

CLISP CVS commits for today

Today's Topics:

   1. clisp/src defmacro.lisp,1.28,1.29 ChangeLog,1.3605,1.3606 (Bruno Haible)
   2. clisp/src genclisph.d,1.149,1.150 (Bruno Haible)
   3. clisp/src TODO,1.19,1.20 (Bruno Haible)
   4. clisp/src sequence.d,1.84,1.85 defseq.lisp,1.3,1.4 ChangeLog,1.3606,1.3607 (Bruno Haible)
   5. clisp/src sequence.d,1.85,1.86 array.d,1.93,1.94 constsym.d,1.270,1.271 type.lisp,1.63,1.64
ChangeLog,1.3607,1.3608 (Bruno Haible)
   6. clisp/src type.lisp,1.64,1.65 ChangeLog,1.3608,1.3609 (Bruno Haible)
   7. clisp/src sequence.d,1.86,1.87 (Bruno Haible)
   8. clisp/modules/bindings/glibc linux.lisp,1.11,1.12 (Jörg Höhle)
   9. clisp/src ChangeLog,1.3609,1.3610 (Jörg Höhle)
  10. clisp/src ChangeLog,1.3610,1.3611 (Sam Steingold)

(Continue reading)

clisp-cvs-request | 4 Oct 2004 12:51
Picon

clisp-cvs digest, Vol 1 #721 - 20 msgs

Send clisp-cvs mailing list submissions to
	clisp-cvs <at> lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/clisp-cvs
or, via email, send a message with subject or body 'help' to
	clisp-cvs-request <at> lists.sourceforge.net

You can reach the person managing the list at
	clisp-cvs-admin <at> lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of clisp-cvs digest..."

CLISP CVS commits for today

Today's Topics:

   1. clisp/utils clispload.lsp,1.33,1.34 (Bruno Haible)
   2. clisp/modules/syscalls calls.c,1.41,1.42 (Bruno Haible)
   3. clisp/src ChangeLog,1.3611,1.3612 (Bruno Haible)
   4. clisp/utils modprep.lisp,1.13,1.14 (Bruno Haible)
   5. clisp/utils modprep.lisp,1.14,1.15 (Bruno Haible)
   6. clisp/src ChangeLog,1.3612,1.3613 (Bruno Haible)
   7. clisp/modules/syscalls Makefile.in,1.4,1.5 calls.c,1.42,1.43 (Bruno Haible)
   8. clisp/src ChangeLog,1.3614,1.3615 (Bruno Haible)
   9. clisp/modules/syscalls calls.c,1.43,1.44 (Bruno Haible)
  10. clisp/src ChangeLog,1.3615,1.3616 (Bruno Haible)
  11. clisp/modules/syscalls calls.c,1.44,1.45 (Bruno Haible)
  12. clisp/src ChangeLog,1.3616,1.3617 (Bruno Haible)
(Continue reading)

Bruno Haible | 4 Oct 2004 12:40

use_default_dir()

Hi Sam,

I've added a FIXME to TRANSLATE-PATHNAME: use_default_dir() is being called
without checking its precondition (namely, that the device is not :WILD).

Bruno

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

Gmane