Can someone suggest some reasonable code (e.g., shareable C library) that
can be invoked from Allegro Lisp? I need to connect a Perl client with a
Lisp server over TCP/IP
Any ideas?
Drago
--
Dragomir R. Radev Graduate Research Assistant
Natural Language Processing Group Columbia University CS Department
Home: 212-749-9770 Office: 212-939-7121 http://www.cs.columbia.edu/~radev
Dragomir R. Radev wrote:
>
> Can someone suggest some reasonable code (e.g., shareable C library) that
> can be invoked from Allegro Lisp? I need to connect a Perl client with a
> Lisp server over TCP/IP
>
> Any ideas?
>
> Drago
>
> --
> Dragomir R. Radev Graduate Research Assistant
> Natural Language Processing Group Columbia University CS Department
> Home: 212-749-9770 Office: 212-939-7121 http://www.cs.columbia.edu/~radev
You just have to look at
"ipc.cl"
which must be in the source code distributed with ACL.
for more info contact me.
Frederique
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\ Fr�d�rique PINSON [······@lannion.cnet.fr]
)\
) \ France Telecom - CNET - LAA/EIA/AIA
)< \ 2, rte de Tr�gastel
)___\ 22307 LANNION, FRANCE
,------ Tel : (33) 96-05-30-85
Fax : (33) 96-05-19-56
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You might try my current approach: wrap the Lisp executable with a
small dispatcher program written in C or the language of your choice
that connects standard output/input/error of the Lisp executable to
the socket.
Advantages include:
o The C program (in your case, another language) is simple and
small and uses available expertise and libraries.
o FFI and sockets are not ANSI standard. Fewer problems
switching Lisp implementations.
o Complex dispatching can occur without requiring processes in
Lisp, which are not ANSI standard.
Disadvantages include:
o Have to be certain of standard input/output/error behavior
and blocking in the Lisp implementation.
o Have to handle standard error (1) with a second socket, (2)
by folding it with standard output, or (3) by using a
protocol to switch between them (you would have to handle
standard error anyway, but in this approach I think you are
at the mercy of the implementation's mapping of error output
to Unix standard error as above).
o Have to use another language than Lisp (you would have to do
that anyway unless you use a Lisp that has the equivalent of
Allegro's open-network-stream).
I'm interested in comments on this approach, as I have not implemented
it yet. It seems less troublesome than dealing with making a server
out of Lisp nonstandardly.
I'm somewhat surprised not to hear of freeware that takes an
executable and a socket address and connect them to each other. Seems
like such a useful task. You can almost implement it in a few lines
of sh using telnet (the problem is the lack of a two-way pipe).
If you post a followup to this article, I would appreciate a courtesy
verbatim copy by email to help work around potentially unreliable feeds.
---
···@ptolemy.arc.nasa.gov. AI, multidisciplinary neuroethology, info filtering.
Noone's feared, detested, shunned, or molested like the man who might be right.