Karim Belabas on Mon, 01 Jan 2024 21:45:35 +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)
|
- To: hermann@stamm-wilbrandt.de
- Subject: Re: gp_oeis_search (Search integer sequence specified by short PARI/GP script on oeis.org)
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Mon, 1 Jan 2024 21:45:12 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1704141915; c=relaxed/relaxed; bh=TPaVHB6s7rxE9DuMftFNHdnD5pdKQWfeZEip9KvpHNY=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=mgNKHEw7TrPiiK1wvJwlcwVe2Ejx1C8o5WISK95wbSBG7YfjyLJKTqTIOA8tec0sxhaDBwHsdqsKeGczXTlCVZ6MItajCCEzlbZZLkj7RlccaovOZUgbqbxl2t40MmlsACN+HcXGYc4XW3dTteoow0jXeFd/K+GvBwBmrYAnR+sL7BHhycgObjDRXCievonFKtY+SuA1765Zzn9/PxU+EIKjpgfd9bz8puGC6I7lJwwNSB9IG2894bBy7bDyJREWaNHekr1BJIZvM53NDd1kj3rOmPaVyo0Xk6ORX14DD2i5zQQaul7oVqP4RG9Sfd4xWHqU/BX3Z7Q4T6qpcyI19Uxx9Osp7Fmcs3M9AFokxOjgqpu0QvRYP0tD2L+JVlR+A58/K9NOJbKY32k83QrAjkdxe7Q2iJZm0LeZjkZfJSm23+XkFFBUv+9pmN9qj58VEDfk8RiAs22egrWO2UN5p/DqV1rPfaSE/J4jVyuFvjh5RJufT15y3Nuj5M8GmbHUp6l8nOCNh2PJ1HfUXd46DxAEV+y8vIU4JDlh1fEWzmfJssefRm80BeKebIieRWsfP1IdCkf+1gl/uuA4lxxO2i8rHC/pI1lLnlJpVOA1HiSevV+A4oGB1QZry1K9QL61aRu4Ubn1QG0P+twhDUb85DrLdfvQkQG0QAn5eMIaRxc=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1704141915; cv=none; b=reRCrhhpOytciYW7mGN22pfOXWyl0ip7DtmOJTZGC4DiPZp8/sBXtV/RN2YfSJhN3SNncq5B/Cf9hiQDhg1dmQF8Gzs9PeaKVnBdnOVavYdplfzBQuEeGWmP7cN7rmS+5jn6MmN3SipNMwUHHtxraSAoYjtiQW2dcakDgb69QH5oI7ewBBgat8ND+7566oU2CzkEQ7h7SOSAcHMG7g2WGJ48Yx1rdbelRey/VybHVt0cWdAfk//BBnQyxntBPyca4g6FeyTh2zW7lnsF6sMDazV9ZotFsTJKhG5hpRahGRYTDWKCBvpBnjRB0/jkN+6OPax018giffjsJnvtW+ks46gkfxZy28/rTyAW4pYIYXz+zMAoygiEcr0NqQElrijDZ/U0/hvSYS2iPvRl6BQTcJ+wCUbfXs4/RPEjFe22dgampKnW3emrMNqLxrWVYw6peBpi+3deY5xuL7ORJF7hPEO+FKiKwdpBgAWy2F6BToJ4ukkn4JvA/rA0V76IboBTzEfb8WRhfJADJaWAqPFhvC2Hc1SMShsD23bGtQjGVJ2HlJAoa/JKXF/sX6hLBfEbpHs47MgyU6ZLXzF2sgsiehKTXIA2jmdL+aNNne+FPah3r6Ee/YrbYyEmrLMup7ujbNmtohplNhG1PqE91ujflx5hTC6GDUueUfB4cur/CT4=
- Authentication-results: smail; arc=none
- Cc: pari-users@pari.math.u-bordeaux.fr
- Delivery-date: Mon, 01 Jan 2024 21:45:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1704141915; bh=TPaVHB6s7rxE9DuMftFNHdnD5pdKQWfeZEip9KvpHNY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nJfgSFfx9/uMwXt7/SDyGQecew8ydt38kZmOZwr2uwqEOWbzqux10gE3dhAHUXkEO z18pRpZzJDcOZJuklPMtNOkEfxDQPXjFOIIu+Tz/KzLDtTavMjvbb1gD3N8vonE1MB u3oaA7uYKgA36403xlOjqHctNJflpa8Kr9n6oEvFo6LZ2vpq/MK2rPaM8xLpTKZ1wl iF41ks3Q/cz1bgY7kzdS55yBhEu4JCQJn3Ee9kF8cgEYYqxfs0/oahrskoZyG+B3mN wUubfS2xFBzsmViZIiKdVZ7L505bpy1DZE7b32t+mjivgMosfS0XsMSPlrkqon7tMO dY5cyUZh/FYSiG9qK4LEZpMlGT72bV7Ba0yqvBgTFo9VuB5j5Gfpt0/TleKFKUBvnN d5/lIs8p1Gg0DPGK4DAuBaO/X4DtSSayPe9mEyf8Di/W+kVguuNiUI7kkXPPXuHGmB IZyMLw6u8LND8LYeWkF54F3RC8+pXN/SSYVcx9i8/PnqnPLBVv8qOpdFNEzHdYaKFR MId/RSnk/+iEomfBClIFVcag8KJ9e5yGEeggaFxHIyEFsPhDGE70hHC9oUkbm1opJ9 +doPQzLK9Az9SdezSUJqBCaXsQgQDH621l0wCNOv2SDg52JgrmfhTFX85riiPG/sEr /fOv1HDgujJPBla4ZbJUoFAU=
- In-reply-to: <26246a740f68696d12e39bf32b400af6@stamm-wilbrandt.de>
- Mail-followup-to: hermann@stamm-wilbrandt.de, pari-users@pari.math.u-bordeaux.fr
- References: <c993f70d496bf8608461d8c78505c945@stamm-wilbrandt.de> <ZZLI32mJuNvkcVJq@math.u-bordeaux.fr> <bb6af425a0b26bda5e0b45107ed90ee6@stamm-wilbrandt.de> <ZZMCpFLfg6PLGvXM@math.u-bordeaux.fr> <d0b9badb35819350b2cb2e129f4119db@stamm-wilbrandt.de> <ZZMIdbKa9wuoi9Ex@math.u-bordeaux.fr> <26246a740f68696d12e39bf32b400af6@stamm-wilbrandt.de>
* hermann@stamm-wilbrandt.de [2024-01-01 19:59]:
> On 2024-01-01 19:46, Karim Belabas wrote:
> > * 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.
> >
> Thanks, that works, browser gets started in background.
> Only quirk is the GP prompt occurs before the warning messages.
> But either pressing ENTER, or just entering next GP command as below is
> fine.
>
> pi@raspberrypi5:~ $ BROWSER=firefox gp -q oeis.gp
> ? [GFX1-]: glxtest: DRM render node not clearly detectable. Falling back to
> using the only one that was found.
> [GFX1-]: vaapitest: ERROR
> [GFX1-]: vaapitest: VA-API test failed: failed to initialise VAAPI
> connection.
A final (brutal) possibility is to get rid of standard output and error:
oeis(v)=
{ my(s = ""); for (i=1, #v, s = concat(s, Str(v[i]",")));
system(Str("$BROWSER https://oeis.org/search?q=", s, ">/dev/null 2>&1 &"))
}
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/