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

Chun Tian (binghe) binghe.lisp at gmail.com
Sat Jun 25 11:58:51 UTC 2011


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcl-gray-streams.lisp
Type: application/octet-stream
Size: 5817 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-plus-ssl-devel/attachments/20110625/d9df242b/attachment.obj>
-------------- next part --------------

? 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
> 



More information about the cl-plus-ssl-devel mailing list