Karim BELABAS on Thu, 5 Sep 2002 12:03:03 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
mnemonics |
On Mon, 19 Aug 2002, Karim Belabas wrote: [answering to myself:] > * Ilya's mneumonic patch --> fixed a typo (no-xxx didn't work) + commited and > documented [ cf ploth, log, and the beginning of Chapter 3. ] I've committed Ilya's tentative patch for testing purposes. As far as I can see, it works as documented in the code and the manual. Please check the manual and see whether this looks satisfactory. I still have 2 major problems, and 2 minor ones: 1) no interface to library programming. PARI already has mnemonic flags corresponding to the GP ones (actually often more general, for internal purposes): there are a number of #define's scattered in a few header files (parinf.h is the prominent one), but it would be quite easy to unify everything (and use enum's). In particular, a GP2C interface needs to be designed: we don't want GP2C to duplicate and maintain privately the data necessary for litterate translations (from GP mnemonics to PARI mnemonics, as opposed to integer litterals). 2) As I see them, mnemonics have a threefold interest: (a) clearer code, (b) robustness (wrt to errors or typos), (c) portability/flexibility, esp. we'd avoid many backward compatibility problems. Currently we provide (a) and (b) in an optional way, since users are free to type explicit integers if they wish. But we have lost (c). OTOH, it is a major burden to have to type complicated explicit flags, instead of simple integer constants [at least when you know the correct constant]. So I'm afraid we will have to leave it at that. 3) [minor]: it would be nice to have readline's completion known about the mnemonics specific to a given function. This is relatively easy to implement [the hardest part by far is to get the name of the function from the line to be completed, need to call the GP parser to skip previous arguments]. 4) [minor]: a lot of functions need to be instrumented in this way. Once we agree on the general mechanism, it will be quite easy to do, though. Cheers, Karim. -- Karim Belabas Tel: (+33) (0)1 69 15 57 48 Dép. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19 Université Paris-Sud Email: Karim.Belabas@math.u-psud.fr F-91405 Orsay (France) http://www.math.u-psud.fr/~belabas/ -- PARI/GP Home Page: http://www.parigp-home.de/