John Lapeyre | 7 Sep 00:11

tar compfile compile_file

If a file myarch.tar.gz exists and at the shell I
accidentally type

 tar czf myarch.tar.gz,

then I get
 tar: Cowardly refusing to create an empty archive,

which is good behavior.

If a file of Maxima functions myfuncs.mac exists and I type

compile_file("myfuncs.mac");

then the functions are compiled and loaded into my session.

But if instead, I type

compfile("myfuncs.mac");

then myfuncs.mac is overwritten by a file of length zero,
which makes a poor choice in naming functions much worse.

I suppose it wouldn't break any existing code to change the
behavior of compfile to be more like that of tar.

Below is a one-line patch for instance.  I haven't tried to
build or test Maxima, but I did try the modified function.

----------------------------------------------------------
(Continue reading)

Robert Dodier | 13 Sep 18:11

Re: tar compfile compile_file

On 9/6/08, John Lapeyre <pdl <at> johnlapeyre.com> wrote:

>  If a file of Maxima functions myfuncs.mac exists and I type
>
>  compile_file("myfuncs.mac");
>
>  then the functions are compiled and loaded into my session.
>
>  But if instead, I type
>
>  compfile("myfuncs.mac");
>
>  then myfuncs.mac is overwritten by a file of length zero,

Thanks for pointing out this problem. I have committed
r1.38 src/transs.lisp to resolve it.

>  which makes a poor choice in naming functions much worse.

Yeah, compfile is a confusing name. Probably it wouldn't hurt to
think of a better one.

best

Robert Dodier

Gmane