[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Question regarding interfacing lisp and a C program ?.



>I have a C program (it is basically a Motif program)
>and some lisp code. Now I want the two processes (one running the
>lisp code and the other running the C code) to talk to each other.
>I was thinking of using X events to do the message passing.

If you want them to run as two processes and if communicating 
synchronously is ok, you can have the lisp code run the C program as a 
subprocess - acl has a run-shell-command function in the excl package 
that does a command and returns a bidirectional stream that the C 
program and lisp program can use to communicate with each other.  We do 
this for some very intensive number crunching code.

If you want to use X events, or some other asynchronous method, it's 
more complicated.

> I notice
>that acl has a package called Xlib. But I could not find any 
>documentation on it. Could anyone with any experience in this kind of
>thing give me some pointers.

Xlib is CLX, the Common LISP binding of the X protocol at the Xlib level, 
i.e., the Xlib package includes more or less all the same functionality 
as Xlib for C, only much easier to use (like everything else in lisp, 
compared to C).  There is a manual for the public domain version 
available - best to ask your acl sales rep., though it is probably on 
line somewhere.

>                         -- Nayak
>email : nayak@uhunix.uhcc.hawaii.edu

Ira Kalet, University of Washington Radiation Oncology Dept.
ira@radonc.washington.edu