[flexi-streams-devel] Re: note on flexi-streams

Edi Weitz edi at agharta.de
Mon Jun 12 23:43:06 UTC 2006


Hi!

So, I'm back from vacation now... :)

I'm Ccing the mailing list and I'd prefer if we could continue the
discussion there.  Thanks.

On Thu, 1 Jun 2006 14:35:26 -0500, "Robert P. Goldman" <rpgoldman at sift.info> wrote:

> I just pulled a copy of flexi-streams, using asdf-install, and had a
> couple of minor problems:
>
> 1.  The files have emacs mode lines which give a package name that
> seems like it might be an old nickname for flexi-streams (effbf).
> The in-package forms have the real package name.  I don't know what
> this does to slime, but it badly confuses ACL's emacs-lisp
> interface, which attends to the mode line in preference to the
> in-package form.

Thanks, I've fixed that and made a new release (0.5.6).

> 2.  Making a flexible stream with an external format blows up for me
> on ACL.  E.g., cl-irc tries to make a flexi-io-stream with external
> format (:utf-8 :eof-type :crlf)
>
> This value is stuffed into the flexi-stream slot EXTERNAL-FORMAT.
> Unfortunately, IIUC, this also triggers an Allegro-specific method
> as follows:
>
> (METHOD (SETF STREAM-EXTERNAL-FORMAT) :BEFORE (T STREAM))
>
> This method checks to make sure that the value you are setting as a
> stream-external-format is an excl:external-format object.  In this
> case, it clearly isn't, so the :before method hurls an error.
>
> I believe that this error is triggered because a flexi-io-stream ISA
> fundamental-binary-input-stream which ISA stream.
>
> I confess I'm not really sure what to do about this problem....

Hmm, at first glance I'd say that this is either an AllegroCL bug or
it is not related to FLEXI-STREAMS at all.  The slot you're talking
about above is called FLEXI-STREAMS::EXTERNAL-FORMAT, its name is not
exported from the package.  I can't see why setting the value of this
slot should trigger an Allegro-specific method.

(Note that on AllegroCL EXCL:EXTERNAL-FORMAT is accessible in various
packages, including CL-USER.  Maybe you're seeing a package conflict?)

It'd be nice if you could provide a simple test case which provokes
this error message, so we can see what's really going on.

> Here's an error backtrace:
>
> [1c] IRC(100): (setf str
> 	           (flexi-streams:make-flexi-stream
>                          network-stream
>                          :element-type 'character
>                          :external-format
> 					 (external-format-fixup
> 					 *default-outgoing-external-format*)
> 							 ))
> Error: `:EOL-STYLE' does not name an external-format.
>   [condition type: NO-EXTERNAL-FORMAT-ERROR]
>
> Restart actions (select using :continue):
>  0: Return to Debug Level 1 (an "abort" restart).
>  1: Try calling it again
>  2: Return to Top Level (an "abort" restart).
>  3: Abort entirely from this (lisp) process.
> [2] IRC(101): :bt
> Evaluation stack:
>
> (METHOD (SETF STREAM-EXTERNAL-FORMAT) :BEFORE ...) <-
>   (:INTERNAL (:EFFECTIVE-METHOD 2 NIL ...) 0) <-
>   (:INTERNAL (:EFFECTIVE-METHOD 2 T ...) 0) <-
>   (METHOD INITIALIZE-INSTANCE (STANDARD-OBJECT)) <-
>   (:INTERNAL (:EFFECTIVE-METHOD 1 T ...) 0) <- (METHOD MAKE-INSTANCE
>   (CLASS)) <-
>   (METHOD MAKE-INSTANCE (SYMBOL)) <- FLEX:MAKE-FLEXI-STREAM <- LET* <-
>   [... EXCL::%EVAL ] <- EVAL <- CERROR <- (METHOD NO-APPLICABLE-METHOD
>   (T)) <-
>   FLEX::TRANSLATE-CHAR <-
>   (METHOD EXCL:STREAM-WRITE-CHAR (FLEX:FLEXI-OUTPUT-STREAM T)) <-
>   (METHOD TRIVIAL-GRAY-STREAMS:STREAM-WRITE-SEQUENCE
>    (FLEX:FLEXI-OUTPUT-STREAM T T ...)) <-
>   [... TRIVIAL-GRAY-STREAMS:STREAM-WRITE-SEQUENCE ] <-
>   (METHOD EXCL:STREAM-WRITE-SEQUENCE
>    (TRIVIAL-GRAY-STREAMS:TRIVIAL-GRAY-STREAM-MIXIN T)) <-
>   (METHOD SEND-IRC-MESSAGE (CONNECTION T)) <- [... SEND-IRC-MESSAGE ]
>   <-
>   (METHOD NICK (CONNECTION STRING)) <- CONNECT <- BEIRC::COM-CONNECT
>   <-
>   (METHOD CLIM:EXECUTE-FRAME-COMMAND (CLIM:APPLICATION-FRAME T)) <-
>   (METHOD CLIM:ADOPT-FRAME :AFTER ...) <-
>   (:INTERNAL (:EFFECTIVE-METHOD 2 NIL ...) 0) <-
>   (METHOD CLIM:RUN-FRAME-TOP-LEVEL :AROUND ...) <-
>   (:INTERNAL (:EFFECTIVE-METHOD 1 T ...) 0) <-
>   [... CLIM:RUN-FRAME-TOP-LEVEL ] <-
>   (:INTERNAL BEIRC:BEIRC 0) <- BEIRC:BEIRC <- [... EXCL::%EVAL ] <-
>   EVAL <-
>   TPL:TOP-LEVEL-READ-EVAL-PRINT-LOOP <-
>   TPL:START-INTERACTIVE-TOP-LEVEL

Cheers,
Edi.



More information about the Flexi-streams-devel mailing list