a question sbcl integration

james anderson james.anderson at setf.de
Mon Jan 27 17:00:41 UTC 2014


good evening;

On 27 Jan 2014, at 4:52 PM, David Lichteblau wrote:

> Quoting james anderson (james.anderson at setf.de):
>>> Note, that it works other way around, from sb-gray to trivial-gray-streams:
>>> 
>>> cl:file-position calls sb-gray:stream-file-position.
>>> We define a method for it on our stream class;
>>> and this method calls trivial-gray-streams:stream-file-position.
>> 
>> i would understand this to require that, in order to have a complete
>> interface, the application is supposed to use some symbols from
>> sb-gray and some from trivial-gray-streams.
>> is that the intent?
> 
> The idea is that if given a stream of an arbitrary class, its position
> can be queried or set using cl:file-position, and when implementing a
> stream, the mixin allows the author to merely specialize
> tgs:stream-file-position and (setf tgs:stream-file-position) on that
> class.

ok. this asymmetry was not clear to me. i tend to use stream- operators directly, which led to the problem with stream-file-position.
my patch was to add a delegating default method from the t-g-s operator to that of the base implementation, in this case sbcl, but at least i now understand what you intended.

> 
> Neither user nor stream implementor should have to be aware of the call
> site in sb-gray.
> 
> This trivial-gray-streams way of doing things never felt absolutely ideal
> and clean to me, but was the best compromise I could come up with.

best regards, from berlin,




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