Bill Allombert on Fri, 25 Dec 2020 10:49:59 +0100


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

Re: Customizing the Online PARI/GP with Interactive GUI


On Fri, Dec 25, 2020 at 10:25:03AM +0530, Praveen Bharadhwaj wrote:
> I got it running on a test server and I'm now working on customizing it.

Excellent!

> I located the function *myevalm *that takes a string input like "sqrt(2)"
> and evaluates it to an output string.
> I am wondering if there are other ways to request numeric data (like
> arrays) from the PARI engine. For example, *myevalm* is calling
> *Module.ccall* -- maybe this would be more versatile in terms of different
> data formats and options?

The issue is that PARI/GP deals with PARI objects which of course can be
numeric, array, polynomial etc. but are not compatible with js arrays.

You can use Module.ccall to call libpari directly, but then you have to
understand the C libpari API.

> It would be great if there is some documentation on the JS API.

We use the emscripten JS API:

https://emscripten.org/docs/api_reference/module.html#module

Cheers,
Bill