Ilya Zakharevich on Tue, 24 Jan 2006 00:01:09 +0100


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

Re: Graphic support in CVS


On Mon, Jan 23, 2006 at 10:20:45AM +0100, Karim Belabas wrote:
> > > > 2.3?  Do we have all the usability stuff addressed?  E.g., can one
> > > > execute arbitrary GP code from .gprc (or at least a way to load a file
> > > > recognizing "~/foo.gp" notation)?
> > > 
> > > What's wrong with 
> > > 
> > >   read "~/foo.gp"
> > > 
> > > ?
> > 
> > Are parameters EMACS READL VERSION PATHSEPARATOR pari_datadir
> > available from the read file?

> The first 4 are not part of the GP language, but you can do conditional
> loading.
> 
> #if EMACS read "~/foo-emacs.gp";
> 
> or even
> 
> #if EMACS
> {
>   read "~/foo-emacs.gp";
>   ... other emacs-related stuff ...
> }

This (i.e., number of files to maintain) gets out of hand very quick,
especially if one needs to support combinations of several features.
IMO, it is extremely silly to have a separate language for an RC file
when a programming language is available anyway.  The current
situation, when one needs

  read "~/.real_gprc"

for any non-trivial RC stuff, is one too many files to maintain anyway.

At least, as a stopgap measure, one needs an eval statement in .gprc,
so that one can write

  #if EMACS eval: have_emacs = 1
  #if READL eval: have_readlien = 1
  etc
  read "~/.real_gprc"

> PATHSEPARATOR is not available anywhere, and never was I think (there's a
> local #define by that name in src/language/es.c)

Without it available, there is no way to write .real_gprc which works
on many architectures.  I think it is a must to have available,
probably via READ-ONLY default().

> The last is just
> 
> (10:19) gp > default(datadir)
> %1 = "/home/a2x/belabas/PARI/GP/share/pari"

This one is nice; sorry for missing it.

Yours,
Ilya