#75 reset() broken

closed
nobody
None
5
2002-07-15
2002-06-29
No

The reset function is broken:

Maxima 5.6 Fri Mar 1 22:05:34 CST 2002 (with enhancements by William Schelter).
Licensed under the GNU Public License (see file COPYING)
Loading maxima-init.lisp
Finished loading maxima-init.lisp
(C1) reset();
Error: MACSYMA-TOP-LEVEL [or a callee] requires more than zero arguments.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by MACSYMA-TOP-LEVEL.
Broken at MACSYMA-TOP-LEVEL. Type :H for Help.
MAXIMA>>:q

/* Let's try again after setting fpprec to 28. */
(C2) fpprec : 28$
(C3) reset();
Error: $FPPREC is invalid as a function.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by MACSYMA-TOP-LEVEL.
Broken at MACSYMA-TOP-LEVEL. Type :H for Help.
MAXIMA>>:q

Here is my fix:

1. I rewrote $reset, found in inmis.lisp, as

#+cl
(defun $reset ( )
(setq *print-base* 10)
(setq *read-base* 10)
(setq modulus nil)
(setq $debugmode nil)
(setq $fpprec 16)
(load (concatenate 'string *maxima-directory* "src/" "init_max1.lisp")))

For Common Lisp, I eliminated the old $reset.

2. The files initialization files autol.lisp, init_max1.lisp, init_max2.lisp,
version.lisp, and max_ext.lisp weren't anywhere Maxima could find them,
so I copied them from my source directory to *maxima-directory*/src.
In init_max1.lisp I changed all

(load file-name)
to
(load (concatenate 'string *maxima-directory* "src/" file-name))

Without this change, load wasn't able to find the files.

Notes:

1. I re-wrote $reset; alternatively, the old version could be repaired.

2. If something like my fix is adopted, somebody will need to change Maxima's
installation routines to copy the initialization files to maxima's src
directory.

3. Somebody needs to check that the initialization files init_max1.lisp,
init_max2.lisp, and max_ext.lisp do the right things. There is
file init_max0.lisp that also loads maxima-package.lisp that
I didn't use.

4. Under maxima-5.9, init_max1.lisp, and etc will most likely need to
be modified. Specifically, the paths for maxima_search_lisp and
etc. will need to be fixed.

5. reset() doesn't reset the values of listconstvars, polyfactor, listdummyvars,
ratfac, radexand, and ... to their defaults. Has anybody collected a list of
all option variables and their defaults?

Regards,
Barton Willis

Discussion

  • Raymond Toy

    Raymond Toy - 2002-07-01

    Logged In: YES
    user_id=28849

    I think we can solve this problem by expanding on defmvar
    (in commac.lisp). There's some support there already.

    My idea: have defmvar keep a hash table of all variables
    defined by defmvar and the corresponding initial values.
    Then reset can run through the entries in the hash table and
    set the desired initial values.

    How's that?

     
  • Raymond Toy

    Raymond Toy - 2002-07-15

    Logged In: YES
    user_id=28849

    Barton says that the hash-table idea works. Changes committed.

     
  • Raymond Toy

    Raymond Toy - 2002-07-15
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks