a question sbcl integration

Anton Vodonosov avodonosov at yandex.ru
Mon Jan 27 15:58:09 UTC 2014


27.01.2014, 19:41, "james anderson" <james.anderson at setf.de>:
> 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?

No, only trivial-gray-streams package is used by stream implementors.

For example, you want to create your own stream:

  (declass my-stream (trivial-gray-streams:fundamental-character-output-stream) (…))
  
  (defmethod trivial-gray-streams:stream-write-char ((stream my-stream) ...) …)
  (defmethod trivial-gray-streams:stream-start-line-p ((stream my-stream) ...)…)
  (defmethod trivial-gray-streams:stream-write-string ((stream my-stream) ...)…)
  ;; and all other methods


Then my-stream may be passed to any code using standard CL functions:

  (let ((s (make-instance 'my-stream …)))
    (cl:format s "hello ~A~%" "world"))  

What are you trying to do? Do you have specific problem with SBCL?

Best regards,
- Anton



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