* Greg Bennett <4978cba5.5080...@sentex.ca> :
Wrote on Thu, 22 Jan 2009 14:40:21 -0500:

| All this exists in Quail now. However the graphics used by
| mcl/digitool and allegro_cl do not take charge of the main repl. So we
| are able to (1) run some analyses, (2) note some interesting feature,
| (3) use dialogs and menu options to explore further where those
| explorations are 'registered', (4) but if they are not, we can send
| instructions from the repl to the views to show some additional stuff,
| on the fly, in typical lisp interactions, without disturbing any of
| the available graphics processing.
|
| It is this last form of interaction which, as far as I can see, would
| not be possible using OpenGL.

The problem is that even if you used threads as indicated in the
parallel reply the thread may not get a chance to run. Against my better
judgement -- Here is the comment from (multi-processing.lisp), so you
see the BIG FAT warning first

/---
;;; Start-Sigalrm-Yield  --  Internal
;;;
;;; Start a regular interrupt to switch processes. This may not be a
;;; good idea yet as the CMUCL code is not too interrupt safe.

(defun start-sigalrm-yield (&optional (sec 0) (usec 500000))
  "Start a regular SIGALRM interrupt which calls process-yield. An optional
  time in seconds and micro seconds may be provided. Note that CMUCL code
  base is not too interrupt safe so this may cause problems."
  ... )

\----

Now in the CMUCL REPL top level if you called

* (MULTIPROCESSING::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS)
* (mp::start-sigalrm-yield)
* (mp::make-process (lambda () (cl-glut-examples:glut-teapot)))

You ought to able to interact with the process.  BUT THIS CAN NOT BE
EXPECTED TO BE RELIABLE and can break.

There are also some other knobs one can tweak ...

[This is in a vanilla lisp without slime.  In the context of slime swank
 communication style, I believe this corresponds to the
 SWANK:*COMMUNICATION-STYLE* :sigio . --- Maybe this will work for you
 immediately, I don't know. But in general, BEWARE.  SLIME may make
 other assumptions about the "multi-threading" model, and should be
 isolated when debugging failures.

 I haven't looked much at cl-opengl --- I did use kt-opengl (from Ken
 Tilton's Cello project) briefly with CMUCL, but mostly only in a
 single-threaded model of development, and I haven't gotten around to
 fixing the problems to be happy about it]

| Let me display my ignorance of one piece of shorthand, what is an 'fd'
| as in REPL fd ?

The UNIX file descriptor of the stream.

* *terminal-io*

#<Synonym Stream to SYSTEM:*TTY*>
* system:*tty*

#<Stream for the Terminal>
* (type-of *)

SYSTEM:FD-STREAM
* (system:fd-stream-fd system:*tty*)

4
* (system:fd-stream-fd system:*stdin*)

0
* (system:fd-stream-fd system:*stdout*)

1
* (system:fd-stream-fd system:*stderr*)

2
* 

--
Madhu


Reply via email to