Lisp HUG Maillist Archive

Gray streams and STREAM-FILE-POSITION (?)

Hi!

I was wondering how, if one uses Gray streams, the standard function
FILE-POSITION is implemented.  It seems this isn't mentioned in the
original proposal[1], but LispWorks has a generic function
STREAM-FILE-POSITION which is exported from the STREAM package, but
not documented.  Can one assume that it is OK to use and specialize
this undocumented function (like for example in the editor source code
in streams.lisp)?  And what about calls to FILE-POSITION with two
arguments?  STREAM-FILE-POSITION seems to accept only one argument.

Thanks,
Edi.

[1] <http://www.nhplace.com/kent/CL/Issues/stream-definition-by-user.html>


Re: Gray streams and STREAM-FILE-POSITION (?)

Unable to parse email body. Email id is 5870

Re: Gray streams and STREAM-FILE-POSITION (?)

On Wed, 13 Sep 2006 12:07:57 +0200, Edi Weitz <edi@agharta.de> wrote:

> And what about calls to FILE-POSITION with two arguments?
> STREAM-FILE-POSITION seems to accept only one argument.

Ah, wait...

  CL-USER 15 > (find-method #'(setf stream:stream-file-position) '() (mapcar #'find-class '(t t)))
  #<STANDARD-METHOD (SETF STREAM:STREAM-FILE-POSITION) NIL (T T) 2090C673>

At least that one seems to be clear now.

So, I think I'll just specialize these for my Gray streams unless
someone from LispWorks tells me that this is dangerous and/or
forbidden.

Cheers,
Edi.


Updated at: 2020-12-10 08:47 UTC