[Openmcl-devel] remote repl

Chris Dean ctdean at sokitomi.com
Thu Mar 12 02:30:20 UTC 2009


Gary Byers <gb at clozure.com> writes:
> So, the general idea would be something like:
> (defun run-listener (tcp-stream)
>   (let* ((*terminal-io* tcp-stream))
>     (ccl::listener-function)))

That worked great, thanks again.  I ended up setting *standard-output*
and friends along with *debugger-hook*.  (I was developing this while
using Slime and may not need them in a non-Slime environment.)

Here's run-listener:

  (defun run-listener (base-stream)
    "Run a top-level listener"
    (unwind-protect
         (let ((stream (ccl::make-echoing-two-way-stream base-stream 
                                                         base-stream)))
           (let ((*terminal-io* stream)
                 (*standard-output* stream)
                 (*standard-input* stream)
                 (*error-output* stream)
                 (*query-io* stream)
                 (*debug-io* stream)
                 (*trace-output* stream)
                 (*debugger-hook* nil))
             (ccl::listener-function))
        (format *terminal-io* "Closing stream, ending process.~%"))
      (close base-stream)))

Cheers,
Chris Dean




More information about the Openmcl-devel mailing list