Karim Belabas on Sun, 10 Dec 2023 19:48:31 +0100


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

Re: The GP command “?”


* John Cremona [2023-12-10 16:58]:
> I do use ? as I still don't know the section numbers.  I wouldn't mind
> having something like ?sections, but surely*noone* uses ?? to display
> users.dvi !?

I do ...

Also ?? opens the general documention in a platform-adapted way: a PDF
document on Windows or Mac, the HTML docs in a browser (emscripten) or a
Jupyter notebook, etc. I've seen quite a few Windows or Mac users rely
on it: most don't know where the manuals are installed, or how to find
them on the web.

I do like the idea of including the texts proposed by Ilya, though !

Cheers,

    K.B.

> So we could make ?? do what ? does now (or at least the top
> part).
> 
> John
> 
> On Sun, 10 Dec 2023, 11:12 Bill Allombert, <
> Bill.Allombert@math.u-bordeaux.fr> wrote:
> 
> > On Sat, Dec 09, 2023 at 07:49:50PM -0800, Ilya Zakharevich wrote:
> > > Are people ACTUALLY using “the sections” in the results of the GP command
> > >      ?
> > > ?  Myself, I use only “the tail” of its output.  I do not ever recall
> > > finding what ?1 outputs useful in the slightest…
> >
> > The start of the list is more for beginner, the end more for advanced
> > users.
> >
> > > (However, the output of ?19, ?20, ?21 is quite useful (although
> >  these is
> > > NOT LISTED in the output of
> > >       ?
> >
> > ?19, ?20, ?21 list functions that are private to the GP interpreter and
> > cannot
> > be called normally.
> >
> > For example,
> >
> > ? _factor_Aurifeuille(5,5)
> >   ***   syntax error, unexpected invalid token, expecting end of file:
> > _factor_Aurifeuille(5,5)
> > ? _*_(5,5)
> >   ***   syntax error, unexpected invalid token, expecting end of file:
> > _*_(5,5)
> >
> > Though it is possible to call them using alias:
> > ? alias("mul","_*_")
> > ? mul(5,5)
> > %4 = 25
> > ? fold(mul,[1..100])==100!
> > %5 = 1
> >
> > Cheers,
> > Bill.
> >
> >

    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/