From: John Spragg
Subject: Pipe streams in LWW version 4.1
Date: 
Message-ID: <390FF1B8.4453F86A@bt.com>
Folks,

The lack of useful documentation with Harlequin's/Xanalys' Lispworks for
Windows is really beginning to annoy me.

Can anybody help me by providing insights into how you
can use the stream which is returned by win32::open-pipe?

For example,  if I create a communication pipe between
lispworks and wish80.exe (say), how can I get the two
systems exchanging data?  I wish I had time to play around
with these things, but I don't.

Thanks for any help.

\ john

From: David Bakhash
Subject: Re: Pipe streams in LWW version 4.1
Date: 
Message-ID: <m3g0rz96ah.fsf@alum.mit.edu>
John Spragg <···········@bt.com> writes:

> The lack of useful documentation with Harlequin's/Xanalys' Lispworks for
> Windows is really beginning to annoy me.

they're very good about support, though, and I'm sure if you asked
they'd eventually answer (also, provided you have a support pack.
they were very good to me).

> Can anybody help me by providing insights into how you
> can use the stream which is returned by win32::open-pipe?

open-pipe?  I recall win32 as being the DDE (dynamic data exchange)
stuff that I so disliked.

OHHH.  you're trying to use an unexported symbol.  oops.  sorry.
anyway, you shouldn't do that.  They don't want you to, and they won't 
want to support your using it, and you are taking a reasonably greater 
risk using that function, as they won't have a problem in the future
changing its behavior without documenting it.  It can be dropped,
renamed, modified, and could cause severe bugs in your programs that
would be, at the very least, hard to find.

> For example,  if I create a communication pipe between
> lispworks and wish80.exe (say), how can I get the two
> systems exchanging data?

There are many ways that programs can exchange data.  If you're
writing both applications, and want them to talk to each other, then
try to stick to TCP socket streams.  That's probably the most portable 
thing across lisp implementations and operating systems, and it's also 
a simple stream interface, once you've established connection.  Of
course, I don't think it's as fast as pipes, but I'm not too sure
here.

In general, the CL spec says nothing about inter-process
communication, and does not address how it is done these days.  It's
really up to LW to do it, if they're what you're using.

You may consider using the FLI (foreign language interface) and either 
writing or getting the appropriate C code to do what you want.  Then
you *know* it will work, and that code won't change (unless you change 
it).  With the FLI, you can ostensibly do just about anything.

My suggestion:

find the library you want to use in C++, get the header file, figure
out which function(s) and possibly data structures you'll need to
interface with, and dive into the FLI.  Chances are that's it's just a 
couple of functions, and it's a useful to be able to call out to
anything.

dave
From: Pekka P. Pirinen
Subject: Re: Pipe streams in LWW version 4.1
Date: 
Message-ID: <ix7lda8lhn.fsf@harlequin.co.uk>
David Bakhash <·····@alum.mit.edu> writes:
> > Can anybody help me by providing insights into how you
> > can use the stream which is returned by win32::open-pipe?
> 
> open-pipe?  I recall win32 as being the DDE (dynamic data exchange)
> stuff that I so disliked.

The package contains all the Win32 interfaces.

> OHHH.  you're trying to use an unexported symbol.  oops.  sorry.
> anyway, you shouldn't do that.  They don't want you to, and they
> won't want to support your using it, and you are taking a reasonably
> greater risk

That's right in general, but OPEN-PIPE has actually been given to
customers now: There's a knowledge base entry on the Xanalys web site
<URL:http://services.harlequin.com/support/lisp/kbase.ns4/51fe6e1cdfe7
48a180256639005a2ba9/684307783d6f15a18525670f00014203?OpenDocument>
(note that it's not the same as the Unix-style SYS:OPEN-PIPE).

> > For example,  if I create a communication pipe between
> > lispworks and wish80.exe (say), how can I get the two
> > systems exchanging data?

Basically, you just read and write on the pipe stream.  You might need
to do LISTEN, FINISH-OUTPUT, etc. at times.
-- 
Pekka P. Pirinen
Adaptive Memory Management Team, Harlequin Limited
  Hell is other posters.
    - Nancy Lebovitz  (nancyL_universe.digex.net)
From: David Bakhash
Subject: Re: Pipe streams in LWW version 4.1
Date: 
Message-ID: <c29bt2k5xjx.fsf@mint-square.mit.edu>
·····@harlequin.co.uk (Pekka P. Pirinen) writes:

> David Bakhash <·····@alum.mit.edu> writes:
> > > Can anybody help me by providing insights into how you
> > > can use the stream which is returned by win32::open-pipe?
> > 
> > open-pipe?  I recall win32 as being the DDE (dynamic data exchange)
> > stuff that I so disliked.
> 
> The package contains all the Win32 interfaces.
> 
> > OHHH.  you're trying to use an unexported symbol.  oops.  sorry.
> > anyway, you shouldn't do that.  They don't want you to, and they
> > won't want to support your using it, and you are taking a reasonably
> > greater risk
> 
> That's right in general, but OPEN-PIPE has actually been given to
> customers now: There's a knowledge base entry on the Xanalys web site
> <URL:http://services.harlequin.com/support/lisp/kbase.ns4/51fe6e1cdfe7
> 48a180256639005a2ba9/684307783d6f15a18525670f00014203?OpenDocument>
> (note that it's not the same as the Unix-style SYS:OPEN-PIPE).
> 
> > > For example,  if I create a communication pipe between
> > > lispworks and wish80.exe (say), how can I get the two
> > > systems exchanging data?
> 
> Basically, you just read and write on the pipe stream.  You might need
> to do LISTEN, FINISH-OUTPUT, etc. at times.

I didn't know about this, as I havn't used LW in a while.  This should
certainly be checked out.  Of course, if Xanalys wants poeple to use
this symbol, then they should export it, IMO (as I'm sure it will be
in the next release).

dave