Bill Allombert on Sun, 26 May 2024 14:52:04 +0200


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

Re: Making use of "GP in your browser" questions


On Sun, May 26, 2024 at 02:37:01PM +0200, hermann@stamm-wilbrandt.de wrote:
> On 2024-05-26 00:46, hermann@stamm-wilbrandt.de wrote:
> > 
> > 
> > Not with "https:" either ...
> > ...
> > Some hints on the web tell me to use ".mjs" suffix.
> > While I cannot try that on your website, I will test whether that
> > works on mine ...
> > 
> There is a catch22 situation here.
> I am forced to use https.
> Doing so with import fails because
> https://pari.math.u-bordeaux.fr/gpjswasm/gp-sta.js
> contains three "require()"s that do not work in that situation.
> So currently it seems impossible to use above gp-sta.js from
> that website as is with node ...
> 
> Below node session shows how to really evaluate a GP input in node with
> local gp-sta.js:

Note that 

echo "Pi^2" | node gp-sta.js

works:

        GP/PARI CALCULATOR Version 2.15.5 (development 28239-6c020b568b)
      wasm running emscripten (portable C/GMP-6.2.1 kernel) 32-bit version
compiled: Feb 17 2024, clang version 19.0.0git (https://github.com/llvm/llvm-project e769fb8699e3fa8e40623764f7713bfc783b0330)
                            threading engine: single
               (readline not compiled in, extended help enabled)

                     Copyright (C) 2000-2022 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?18 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500000
? %1 = 9.869604401089358618834491000
? Goodbye!

Cheers,
Bill