autoloading messages, was: Maxima 5.12.0 rc1 in cvs & SF download
Subject: autoloading messages, was: Maxima 5.12.0 rc1 in cvs & SF download
From: Viktor T. Toth
Date: Mon, 16 Apr 2007 17:50:35 -0400
Volker,
Okay, if I understand the problem correctly, you're trying to set the
autoload of printf using the correct full pathname, but at the time of
compilation, when this expression is evaluated, file_search_lisp is not yet
known, and your call to file_search therefore fails.
It seems to me that it is not possible to set autoload to a function call
that is evaluated at runtime. Setting autoload to "stringproc" with no path
produces another error: Maxima complains that stringproc is not found in
file_search_maxima.
However, this suggests a solution! Well, two solutions, as a matter of fact,
but the obvious one doesn't work: setting autoload to "stringproc.lisp"
doesn't do the trick. But setting it to "stringproc" does, so long as you
add a new file to the stringproc directory named stringproc.mac, containing
just the single line,
load("stringproc.lisp");
as this allows Maxima to find "stringproc" (i.e., stringproc.mac) using
default search settings.
To sum up, three changes are needed to make all this work:
1. Use
#-gcl (setf (get '$printf 'autoload) "stringproc")
in max_ext.lisp;
2. Create stringproc.mac in share/contrib/stringproc; and
3. Make sure stringproc.mac is installed by make install.
I don't know if this is the "right" way of doing it, as I am just hacking my
way through the autoloading mechanism, but it does appear to work. I've
tested it with SBCL/CLISP/CMUCL using maxima-local; I also installed Maxima
with SBCL/CLISP on a clean test virtual machine, and tested that the
mechanism works in the installed configuration as well.
If you wish, I can make and commit the necessary changes, just let me know
what you prefer.
Viktor
-----Original Message-----
From: van Nek [mailto:van.nek at arcor.de]
Sent: Monday, April 16, 2007 11:39 AM
To: Viktor T. Toth
Cc: Maxima at math.utexas.edu
Subject: Re: [Maxima] autoloading messages, was: Maxima 5.12.0 rc1 in cvs &
SF download
Am 15 Apr 2007 um 17:16 hat Viktor T. Toth geschrieben:
> > But before I completely undo my changes please give them
> > one more try by commenting out line 176
>
> Done that, and it compiles cleanly.
Good news!
What gets broken when this line is
> removed?
This line is independend from the others and if it is removed, this doesn't
break anything.
This just means, that at the moment I do not find a way to autoload the
macro function
$printf from stringproc.lisp for any other Lisp than GCL. Ideas?
Viktor, thanks for testing my commits on Linux
Best
Volker