[Openmcl-devel] remote repl

Chris Dean ctdean at sokitomi.com
Wed Mar 11 13:40:39 PDT 2009


I'm new to Clozure and trying to port some code to it.  I would like to
write my own repl that a user can telnet into for debugging purposes.

I think I can handle all the socket bookkeeping, but I was wondering if
there is an existing repl function I can hook into?  I could of course
right my own (or use swank), but I'm looking for something that already
exists and handles the debugger properly.

Thanks!  I have some sample code below to give an idea of what I'm using
now.

We're using Version 1.3-RC1-r11804M (DarwinX8632).

Cheers,
Chris Dean

 (defun run-listener (stream id)
   "Run a top-level listener"
   (unwind-protect
        (let ((*terminal-io* stream)
              ;; ...
              (*standard-output* stream)
              (*standard-input* stream))
          (format t "~&Welcome to ~a ~a~%" 
                  (lisp-implementation-type)
                  (lisp-implementation-version))
         (format t "This is remote read-eval-print loop ~d, " id)
         (MAGIC-LISTENER-FUNCTION))
     (format *terminal-io* "~&End of top level listener ~d, " id)
     (format *terminal-io* "closing stream, ending process.~%")
     (close stream)))




More information about the Openmcl-devel mailing list