On Thu, Feb 18, 2010 at 4:52 AM, Gustavo <gugamil...@gmail.com> wrote:
> Hello, > > I use Kubuntu Karmic and tested this here using the example > "mouse-painter". I compiled sbcl with threads, so swank:*communication- > style* is :spawn, as Elliot noted. Therefore, copying the code as the > tutorial says doesn't work. But if I remove the condition > > (not (eql swank:*communication-style* :spawn)) > > it works. But I believe that in this case it would be better to use the > thread system and, instead of invoking > > cl-user> (mouse-painter) > nil > > it is better to invoke > > cl-user> (bt:make-thread #'mouse-painter :name "Mouse Painter") > #<sb-thread:thread "Mouse Painter" running {1004D44001}> > > and leave the repl free. I think this is what Elliot meant by putting that > condition, isn't it? > Now I understand what is causing the trouble. Slime's REPL gets only a single thread, so if you evaluate a long running function (e.g. the game) at the REPL, you won't be able to use it for anything else until the function returns. But other operations like compiling files will use their own threads, so you can still use C-c C-c et al. I actually never ran into this issue myself because I was invoking slime from the command line, like so: emacs --eval "(progn (slime) (while (not (slime-connected-p)) (sleep-for 0 200)) (slime-load-file \"load.lisp\"))" It turns out that using slime-interactive-eval and slime-load-file like I do above allows the game to run in a separate thread from the REPL. Unless someone can suggest a better solution to this issue, I will post these notes on the wiki in the near future. -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay
_______________________________________________ application-builder mailing list application-builder@lispniks.com http://www.lispniks.com/mailman/listinfo/application-builder