From binghe.lisp at gmail.com Fri Jun 24 15:56:01 2011 From: binghe.lisp at gmail.com (Chun Tian (binghe)) Date: Fri, 24 Jun 2011 23:56:01 +0800 Subject: [trivial-gray-streams-devel] Fwd: MCL and SCL patches References: Message-ID: > > (re-sent from cl+ssl mailling list) > > Attach is the MCL and SCL support patches, please merge them. > > 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. > > P. S. Why not give this project a real "version" from now on, say, 1.0, by writing a (:version "1.0") in .asd file. > > Regards, > > Chun Tian (binghe) > -------------- next part -------------- A non-text attachment was scrubbed... Name: mcl-and-scl.diff Type: application/octet-stream Size: 1652 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mcl-gray-streams.lisp Type: application/octet-stream Size: 5158 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: scl-gray-streams.lisp Type: application/octet-stream Size: 4924 bytes Desc: not available URL: -------------- next part -------------- > From binghe.lisp at gmail.com Fri Jun 24 15:53:48 2011 From: binghe.lisp at gmail.com (Chun Tian (binghe)) Date: Fri, 24 Jun 2011 23:53:48 +0800 Subject: [trivial-gray-streams-devel] MCL and SCL patches Message-ID: (re-sent from cl+ssl mailling list) Attach is the MCL and SCL support patches, please merge them. 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. P. S. Why not give this project a real "version" from now on, say, 1.0, by writing a (:version "1.0") in .asd file. Regards, Chun Tian (binghe) -------------- next part -------------- A non-text attachment was scrubbed... Name: mcl-and-scl.diff Type: application/octet-stream Size: 1652 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mcl-gray-streams.lisp Type: application/octet-stream Size: 5158 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: scl-gray-streams.lisp Type: application/applefile Size: 81 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: scl-gray-streams.lisp Type: application/octet-stream Size: 4924 bytes Desc: not available URL: From avodonosov at yandex.ru Sat Jun 25 12:51:18 2011 From: avodonosov at yandex.ru (Anton Vodonosov) Date: Sat, 25 Jun 2011 16:51:18 +0400 Subject: [trivial-gray-streams-devel] [cl-plus-ssl-devel] trivial-gray-streams becomes a separate project In-Reply-To: <6486E29B-F30F-4083-8B02-31F90C402EBC@gmail.com> References: <20110615121750.GH7188@radon> <435121308140691@web125.yandex.ru> <20110615205528.GI7188@radon> <943921308650676@web113.yandex.ru> <20110624161834.GA30157@radon> <6486E29B-F30F-4083-8B02-31F90C402EBC@gmail.com> Message-ID: <154771309006279@web41.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)" : > 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