[Openmcl-devel] remote repl

Andrew Shalit alms at clozure.com
Wed Mar 11 13:43:19 PDT 2009


Swank?

On Mar 11, 2009, at 4:40 PM, Chris Dean wrote:

>
> 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)))
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list