From: Andreas Thiele
Subject: printing from LW process?
Date: 
Message-ID: <ddsbg0$lf$00$1@news.t-online.com>
Hi,

for debugging I'd like to print some output to the LispWorks listener from a running (mp) process.
Googling didn't help me and GMAME search on lisp-hug group doesn't work at the moment. I can't
remember how to do this a the moment.

Does anybody know an answer or a reference?

Andreas

From: Wade Humeniuk
Subject: Re: printing from LW process?
Date: 
Message-ID: <UTnMe.181805$9A2.124650@edtnps89>
Andreas Thiele wrote:
> Hi,
> 
> for debugging I'd like to print some output to the LispWorks listener from a running (mp) process.
> Googling didn't help me and GMAME search on lisp-hug group doesn't work at the moment. I can't
> remember how to do this a the moment.
> 
> Does anybody know an answer or a reference?
> 

No reference, but one way is to create a var bound to
*standard-output* of the listener, then write all output
to this stream.

In the listener do,

CL-USER 1 > *standard-output*
#<EDITOR::RUBBER-STREAM #<EDITOR:BUFFER CAPI interactive-pane 2>>

CL-USER 2 > (defvar *process-output* *standard-output*)
*PROCESS-OUTPUT*

CL-USER 3 > *process-output*
#<EDITOR::RUBBER-STREAM #<EDITOR:BUFFER CAPI interactive-pane 2>>

CL-USER 4 >

In your process do either

(write <some-output> :stream cl-user::*process-output*)

or within the process somewhere on the stack

(let ((*standard-output* cl-user::*process-output*))
    continuing code....
    (write <some-output>))

Wade
From: Edi Weitz
Subject: Re: printing from LW process?
Date: 
Message-ID: <umznh50yu.fsf@agharta.de>
On Tue, 16 Aug 2005 11:26:24 +0200, "Andreas Thiele" <··········@nospam.com> wrote:

> for debugging I'd like to print some output to the LispWorks
> listener from a running (mp) process.  Googling didn't help me and
> GMAME search on lisp-hug group doesn't work at the moment. I can't
> remember how to do this a the moment.
>
> Does anybody know an answer or a reference?

In addition to Wade's reply see Nick Levine's chapter about threads in
the CL cookbook, especially this part:

  <http://cl-cookbook.sourceforge.net/process.html#output>

Note that #. trick which is nifty for debugging but of course not
usable for production code.

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Andreas Thiele
Subject: Re: printing from LW process?
Date: 
Message-ID: <dduv44$7fl$05$1@news.t-online.com>
Thanks for your hints Wade & Edi. Works great - really handy :)

Andreas
From: Francis Leboutte
Subject: Re: printing from LW process?
Date: 
Message-ID: <cr4oh191ati00qhtf8j23qfmna418cbp5b@4ax.com>
"Andreas Thiele" <··········@nospam.com> wrote:

>Hi,
>
>for debugging I'd like to print some output to the LispWorks listener from a running (mp) process.
>Googling didn't help me and GMAME search on lisp-hug group doesn't work at the moment. I can't
>remember how to do this a the moment.

You could put the following somewhere in your code and print to
*listener-output*:

(mp:process-send 
 (mp:find-process-from-name "CAPI Execution Listener 1")
 `(,(lambda ()
      (setf *listener-output* *standard-output*))))

Francis

>
>Does anybody know an answer or a reference?
>
>Andreas
>