Upload

Loading...

Lisp - Recompiling a game as it runs

10,598

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on May 22, 2013

I had a comment on another video asking how to recompile functions as a program is running. This is the answer.

The code follows:
(defun update-swank ()
"Called from within the main loop, this keep the lisp repl
working while cepl runs"
(continuable (let ((connection (or swank::*emacs-connection* (swank::default-connection)))) (when connection
(swank::handle-requests connection t)))))

(defmacro continuable (&body body)
"Helper macro that we can use to allow us to continue from an
error. Remember to hit C in slime or pick the restart so errors don't kill the app."
`(restart-case (progn ,@body) (continue () :report "Continue")))

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...