I found the following in the PARI-manual
~ Michael Stoll has integrated PARI into CLISP,
~ which is a CommonLisp implementation.
~ [..] the CLISP one being still based on
~ version 1.39 [of PARI]
Where can I find any information about
the CLISP-interface to PARI?
I tried to get in contact to Michael Stoll, but
he did'nt answer.
Anyone, who can help?
Thanks in advance
Martin
I noticed the same sentence in the PARI manual when I was trying to
call PARI from some of my own (non-C) code. I found a solution in
Java, though it's not particularly elegant. It just starts PARI in a
separate process and sends strings back and forth. It's in
PariProcess.java under the link to the source code at
http://geocities.com/mmcconnell17704/repthy.html
Gurus: in Lisp, how do you fork off a new process like with Java's
Runtime.exec(String)? Is there any portable way in ANSI CL?
Apparently not, so you'd have to rely on your specific Lisp
implementation.
> Gurus: in Lisp, how do you fork off a new process like with Java's
> Runtime.exec(String)? Is there any portable way in ANSI CL?
CLOCC/PORT/shell.lisp
···············@yahoo.com writes:
> I noticed the same sentence in the PARI manual when I was trying to
> call PARI from some of my own (non-C) code. I found a solution in
> Java, though it's not particularly elegant. It just starts PARI in a
> separate process and sends strings back and forth. It's in
> PariProcess.java under the link to the source code at
> http://geocities.com/mmcconnell17704/repthy.html
>
> Gurus: in Lisp, how do you fork off a new process like with Java's
> Runtime.exec(String)? Is there any portable way in ANSI CL?
> Apparently not, so you'd have to rely on your specific Lisp
> implementation.
If it's unix processes you want, in clisp it's: (LINUX:|fork|)
If it's threads, some implementations provide a PROCESS (MP) package
that allows you to create lisp threads.
There is no standard/portable way. clocc/ports have functions which
hide implementation dependancies for threads.
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.
> I noticed the same sentence in the PARI manual when I was trying to
> call PARI from some of my own (non-C) code.
Maybe you noticed another possibility?
I don't like C too much.
> I found a solution in
> Java, though it's not particularly elegant.
Nice idea, anyway.
I will go in the souce-code next time.
Thanks and regards
Martin
> Maybe you noticed another possibility?
> don't like C too much.
see pari/src/headers/paridecl.h:
(defvar *pari-dll* "/path/to/PARI/dll")
(def-c-type GEN c-pointer)
(def-call-out Fl_to_Flx (:name "Fl_to_Flx") (:library *pari-dll*)
(:arguments (x ulong) (u ulong))
(:return-type GEN))
see clisp/modules/netrica/netica.lisp for inspiration.