[CM] slime printing

anders.vinjar at bek.no anders.vinjar at bek.no
Thu Apr 24 01:36:23 PDT 2014


    J> I've tried things like (print ), and (format t ...) and (message
    J> ...), and those evaluate the expression to the echo area but they
    J> don't work when I compile and run and it is beeping.  Or am I
    J> totally off base, and lisp doesn't do that very well at all?

Hi James.

Doesn't printing to stdout - ie. (format t "time: ~A" tt) - in the loop
print to your *slime-repl*-buffer?

Im not sure from your question whether this is obvious or not, but when
calling with-sound, CLM/Lisp will evaluate the intermingled
print-statements in your loop as soon as they are encountered ('REPL'),
ie. lisp won't sit and wait for the beeps in the resulting soundfile
being played out of your speakers.

Its possible to set up a separate thread to start playing and print
things at the right times, but afaik with-sound isn't setup to do any
rt-scheduling now.

Btw. if you're using slime theres a very handy shortcut "C-c,C-p" in
lisp-mode buffers which will call 'slime-pprint-eval-last-expression and
present the output pretty-printed in a separate, temporary buffer.

-anders



More information about the Cmdist mailing list