Advertisement
jeosol

Starting remote SBCL repl

Dec 2nd, 2020
1,336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.52 KB | None | 0 0
  1. (defun launch-remote-lisp (&optional (port 10003))
  2.   (let* ((cmd (format nil
  3.                       "sbcl --eval \"(ql:quickload :channel-40x40x1)\" --eval \"(in-package :channel-40x40x1)\" --eval \"(swank:create-server :port ~d :dont-close t)\" " port)))
  4.     (bt:make-thread
  5.      (lambda ()
  6.        (let ((exit-code (uiop:wait-process
  7.                          (uiop:launch-program cmd))))
  8.          (if (zerop exit-code)
  9.              (print :success)
  10.              (print :failure))))
  11.      :name "Waiting for sbcl-port 10003")))
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement