/* GP INIT FILE. * * Customize (by uncommenting and modifying the relevant lines) and put in * $HOME/.gprc (or $GPRC) or /etc/gprc. Syntax is explained at the end. */ /* Read ~/.gprc.gp (GP script) before gp prompts you for commands. */ \\ read "~/.gprc.gp" /* Read lib/gpalias BEFORE gp prompts you for commands. * The file contains some standard abbreviations (correct the path first !) */ read "~/.gpalias" /* CAUTION: scripts written in the old (1.x) syntax WILL NOT WORK AS BEFORE. * If compatible>1, the OLD functions are the ONLY ONES known to gp, save * for default() itself */ \\ compatible = 0 /* Critical options */ \\ Limit PARI stack size to 900 Mbytes = 9*10^8 bytes parisizemax = 900M \\ Set PARI typical stack size to 40 Mbytes = 4*10^7 bytes (will grow as \\ needed, up to parisizemax) parisize = 40M /* Parallelism */ \\ number of threads: (0: use all available CPU threads) \\nbthreads = 0 \\ Limit PARI threads stack size to 100 Mbytes = 10^8 bytes threadsizemax = 100M \\ Set PARI typical threads stack size to 10 Mbytes = 10^7 bytes (will grow as \\ needed, up to threadsizemax). Beware that the memory usage is multiplied \\ by the number of threads. threadsize = 10M /* Important options */ \\ Save a history of all input commands in this file, and load it in each \\ new session's history histfile = ~/.gp_history \\ Limit output of results to 40 lines lines = 40 /* Colors. * If your terminal supports color. These are suggested values that don't * look too bad with the colormap provided with the distribution (under * emacs you can customize colors using the Menu Bar). */ /* clear background (first line is old): */ \\ #ifnot EMACS colors = "9, 5, no, no, 4, 1, 2" \\ #ifnot EMACS colors = "lightbg" /* dark background (first line is old): */ \\ #ifnot EMACS colors = "9, 1, no, no, 6, 1, 2" #ifnot EMACS colors = "darkbg" /* Set gp prompt. % is used for macros related to the time of day [back to * the shell prompt, try "man strftime"]. Example: %H:%M = time of day in the * form HH:MM. Characters can be escaped UNIX-style using '\', e.g \e = * * Above, the first escape sequence sets a bold font, the second restores * the original (so we get a bold "gp"), and we prefix by the time of day * * CAUTION1: If you have escape sequences in your prompt (as above) and use * readline, you will get display bugs. With a recent enough readline, you * can work around those by bracing non-visible characters between ^A/^B * pairs (see manual), like this: * * #if READL prompt = "(%H:%M) \e[1mgp\e[m > " * ^^_____^^ brace the "set bold" sequence \e[1m * * CAUTION2: If you plan to use gp under emacs, do not tamper with the prompt * variable UNLESS you also set correctly the gp-prompt-pattern regexp in * your .emacs. For instance, if to use: * * #if EMACS prompt = "(%H:%M) gp > " * * add the following two lines in your .emacs (see emacs/pariemacs.txt) * * (setq gp-prompt-pattern * (concat "^([0-9][0-9]:[0-9][0-9]) gp > [\C-j\t ]*\\|" gp-prompt-pattern)) */ prompt = "(%H:%M) \e[1mgp\e[m > " #if READL prompt = "(%H:%M) \e[1mgp\e[m > " #if EMACS prompt = "? " \\ Set timer on \\ timer = 1 \\ Path: directories where gp will look for scripts /* List of directories where gp will look for scripts (separated by ':', * use "\:" to insert a real ":"). The ~ notation may not be available on * your system */ path = ".:~:~/gp:~/gpdir:~/Dropbox/gpdir" \\ Use an alternate prettyprinter prettyprinter = "/usr/local/bin/tex2mail -TeX -noindent -ragged -by_par" \\ Extended help options (does not interact well with emacs): \\ Don't use TeX + xdvi, but outputs formatted help in GP window: \\ #ifnot EMACS help = "gphelp -detex" \\ Same, using colors: #ifnot EMACS help = "gphelp -detex -ch 12 -cb 16 -cu 14" /* Some less important options */ \\ Biggest precomputed prime (= precprime(10^6)) primelimit = 1M \\ Set logfile name and enable logging. \\ Uncommenting the next two lines produces a different logfile each day: logfile = "~/tmp/pari-%d.%m" log = 1 \\ Output for postscript-producing gp commands. psfile = "~/tmp/pari.ps" secure = 1 \\ Disable commands system() and extern() which allow scripts to execute \\ arbitrary Unix commands \\********************** FORMAT OF THIS FILE : *************************** \\ Lines starting with '\\' and between '/*' '*/' pairs are comments \\ Blank lines are ignored \\ Line starting with #if BOOLEAN is read iff BOOLEAN is TRUE \\ Currently recognized booleans: \\ EMACS are we running under Emacs? \\ READL is readline available? \\ VERSION {<,>,<=,>=} a.b.c does version number satisfy the inequality? \\ \\ This file should be put in $HOME/.gprc or /etc/gprc and contains: \\ * references to gp scripts that are to be run BEFORE the first gp prompt. \\ \\ Syntax: read "filename" (quotes mandatory; ~ syntax for homedir allowed) \\ \\ * options settings \\ \\ Syntax: option_name = value \\ \\ Options which are not set here assume default values in gp. The command \\ default() under GP lists available options and their default values. \\ \\ Options settings are overriden by command line switches. For instance \\ gp --default parisizemax=1G \\ sets parisize to 1 GByte, regardless of what is in .gprc \\ They can also be changed under GP using default(), e.g. \\ default(parisize,"10M")