From: Martin Fuchs
Subject: [CLISP] Interface to PARI
Date: 
Message-ID: <31mtcdF3c1a1kU1@individual.net>
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

From: ···············@yahoo.com
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <1102530360.329471.294550@c13g2000cwb.googlegroups.com>
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.
From: ···@gnu.org
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <1102531661.495797.254840@z14g2000cwz.googlegroups.com>
> 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
From: Pascal Bourguignon
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <87pt1kvc1p.fsf@thalassa.informatimago.com>
···············@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.
From: Martin Fuchs
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <31p65aF3ds5eaU1@individual.net>
> 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
From: ···@gnu.org
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <1102546641.357997.59440@f14g2000cwb.googlegroups.com>
> 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.
From: sds
Subject: Re: [CLISP] Interface to PARI
Date: 
Message-ID: <1103155371.826422.76440@f14g2000cwb.googlegroups.com>
CLISP CVS head now contains a PARI module
based on the original one from Stoll.
WFM, YMMV, PTC.