[trivial-gray-streams-devel] [cl-plus-ssl-devel] trivial-gray-streams becomes a separate project

Anton Vodonosov avodonosov at yandex.ru
Thu Jul 14 23:44:40 UTC 2011


Hello, 

Chun Tian, what do you think about all this?

Best regards,
- Anton

25.06.2011, 16:51, "Anton Vodonosov" <avodonosov at yandex.ru>:
> Hello.
>
> BTW, there is a trivial-gray-streams-devel list...
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/trivial-gray-streams-devel
>
> What I understand:
>
> This code provides Gray streams implementation for MCL and SCL
> (these project do not implement the Gray streams proposal)
>
> So far trivial-gray-streams only provided compatibility layer between
> different Gray streams implementations (all the Lisps supported have
> Gray streams). trivial-gray-streams only re-export the gray stream function
> provided by exisging Lisps from trivial-gray-streams package and make
> some fixes/unifications as in case of stream-read-sequence, which is
> absent in Gray streams proposal and therefore sometimes is implemented differently
> in different lisps.
>
> If we commit this code, trivial-gray-streams will get somewhat
> different purpose - in addition to be a compatibility layer on top
> of Gray streams, it will also provide the Gray streams for MCL and SCL.
>
> Maybe it's better to commit the Gray streams to MCL and SCL...
> But if it's problematic, why not commit it to trivial-gray-streams...
> at least there will be no incompatibilities between trivial-gray-stream
> and MCL/SCL Gray streams (but we will need to care about
> compatibility between MCL/SCL Gray streams and MCL/SCL internals
> used in the Gray streams implementation).
>
> Have you tried to suggest the Gray streams implementation to MCL and SCL?
>
> I don't have MCL (and mac to run it), and I can't say I read and understood every line
> of the code, but if you say the code works...
>
> Could you explain the issue pointed by Daniel, when the gray stream function calls a
> function from CCL package, and the function in the CCL package calls the Gray streams
> function? How it is resolved? By inheriting from fundamental-stream and redefining
> one of the functions or how?
>
> (defmethod stream-file-position ((stream fundamental-stream))
>   (ccl:stream-position stream))
>
> (defmethod (setf stream-file-position) (position (stream fundamental-stream))
>   (ccl:stream-position stream position))
>
> (defmethod ccl:stream-position ((stream fundamental-stream) &optional position)
>   (if position
>     (setf (stream-file-position stream) position)
>     (stream-file-position stream)))
>
> Best regards,
> - Anton
>
> 25.06.2011, 15:58, "Chun Tian (binghe)" <binghe.lisp at gmail.com>;:
>
>>  A updated version of mcl-gray-streams.lisp which could make chunga work on MCL, it replaces CLOSE and OPEN-STREAM-P into generic functions.
>>
>>  在 2011-6-25,13:53, Chun Tian (binghe) 写道:
>>>   Hi, David
>>>
>>>   I'm not sure, but I think it's possible to change MCL's any behavior by just loading new code into it, to make it looking like having native support of Gray Streams.
>>>
>>>   And I think the whole purpose is just to make those packages which depends on trivial-gray-streams running well on MCL, and I'll try to analyze any issue in this process and figure out a solution to fix it.
>>>
>>>   For example, today, when I can try to load Chunga (depend by Hunchentoot) into MCL, I found it try to define a method on OPEN-STREAM-P, which is a standard CL ordinary function but generic function in MCL:
>>>
>>>   (defmethod open-stream-p ((stream chunked-stream))
>>>    "A chunked stream is open if its underlying stream is open."
>>>    (open-stream-p (chunked-stream-stream stream)))
>>>
>>>   To make above code runs on MCL, MCL's own function OPEN-STREAM-P need to be overridden, and this is quite possible and I'm just working on it.
>>>
>>>   Any way, I hope my initial work being merged first to have a base point, and then people like you and me could have more patches to fix any rest issue in it.
>>>
>>>   --binghe
>>>
>>>   在 2011-6-25,00:18, David Lichteblau 写道:
>>>>   Quoting Chun Tian (binghe) (binghe.lisp at gmail.com):
>>>>>   The MCL support code was written by Terje Norderhaug with my little
>>>>>   modifications, it's partly confirmed by my own projects which depend on
>>>>>   trivial-gray-streams and running on MCL;  the SCL support code is from IOlib
>>>>>   project, untested (because I don't have a valid license), but I believe it
>>>>>   should work, at least no harm to other platforms.
>>>>   Cool, thanks.  Quick feedback:
>>>>
>>>>   It looks to me like many definitions are recursive, i.e. the gray
>>>>   streams methods call MCL internals, which call gray steams methods.
>>>>
>>>>   trivial-gray-streams does not attempt to offer user code the ability to
>>>>   call low-level STREAM-foo functions.  Rather, it aims to allows stream
>>>>   implementors to define STREAM-foo methods such that the CL stream system
>>>>   will end up calling that implementation.
>>>>
>>>>   I.e. the method CCL:STREAM-POSITION seems correct in calling
>>>>   STREAM-FILE-POSITION, but the reverse method on STREAM-FILE-POSITION
>>>>   that calls CCL:STREAM-POSITION is meaningless and should either say
>>>>   (error "not implemented")
>>>>   or the method could be left out entirely, leaving it to the Lisp to
>>>>   signal the condition that no method is applicable.
>>>>
>>>>   (If I'm reading the code right.)
>>>>
>>>>   d.
>>>>
>>>>   _______________________________________________
>>>>   cl-plus-ssl-devel mailing list
>>>>   cl-plus-ssl-devel at common-lisp.net
>>>>   http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-plus-ssl-devel
>>  _______________________________________________
>>  cl-plus-ssl-devel mailing list
>>  cl-plus-ssl-devel at common-lisp.net
>>  http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cl-plus-ssl-devel
>
> _______________________________________________
> trivial-gray-streams-devel mailing list
> trivial-gray-streams-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/trivial-gray-streams-devel




More information about the trivial-gray-streams-devel mailing list