Karim Belabas on Mon, 01 Jan 2024 19:46:30 +0100


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

Re: gp_oeis_search (Search integer sequence specified by short PARI/GP script on oeis.org)


* hermann@stamm-wilbrandt.de [2024-01-01 19:41]:
> The behavior is different based on whether firefox is already running or
> not.
> If running, a new tab is opened with search page, and GP prompt appears on
> x86_64+aarch64.
> If firefox is not already running, x86_64+aarch64 hang after starting
> firefox, no GP prompt.

Ah, yes. If the browser is not already running, we mustRun the browser
as a background job, otherwise system() will wait for the command to
complete. Here's the (hopefully) final version:

  oeis(v)=
  { my(s = ""); for (i=1, #v, s = concat(s, Str(v[i]",")));
    system(Str("$BROWSER https://oeis.org/search?q=";, s, "&"))
  }

Cheers,

    K.B.
-- 
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/