Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

@Robert Israel 

Exactly, but it is the error message that should be informative about all the required conditions and say something like: "Error, (in geom3d:-plane) unable to determine if A, B and C are not colinear"

@Robert Israel 

Exactly, but it is the error message that should be informative about all the required conditions and say something like: "Error, (in geom3d:-plane) unable to determine if A, B and C are not colinear"

Even when recognized as distinct, something else is not working:

with(geom3d):
assume(a<>e,a<>h,e<>h);
    point(A, [a,b,c]):
    point(B, [e,f,g]):
    point(C, [h,i,j]):
AreDistinct({A,B,C});

                                 true

plane(p1,[A,B,C]);

Error, (in geom3d:-plane) unable to define the plane

Even when recognized as distinct, something else is not working:

with(geom3d):
assume(a<>e,a<>h,e<>h);
    point(A, [a,b,c]):
    point(B, [e,f,g]):
    point(C, [h,i,j]):
AreDistinct({A,B,C});

                                 true

plane(p1,[A,B,C]);

Error, (in geom3d:-plane) unable to define the plane

@Joe Riel 

The problem was actually in the target of the copy operation: it assumes that a /maple/lib subdirectory exists under the user directory kernelopts(homedir). As I had none (and it was not checked or created), an error message was issued by FileTools:-Copy. The problem is actually the same of the previous example: the error message is misleading by making reference to the source file, even when the problem is with the target.

So, after creating this subdirectory, and including it in libname, the example worked fine.

@Will 

But you could have an auxiliary site with "bare" pages (stripped from sidebar, etc), and make Google mini spider it instead, improving the signal to noise ratio. This arrangement could have the additional advantage of providing printer friendly and text only versions of the threads.

@acer 

After ?Compiler:-Compile, the location where the library is placed can be (partially) controled with the environment variable MAPLE_TEMPDIR. I have not checked it lately, but I did in Maple 10.

@Joe Riel 

OK. This is working also:

p1:=getenv("TEMP");
p2:=kernelopts(homedir);
b:=kernelopts(dirsep);

              p1 := "C:\DOCUME~1\Usuario\CONFIG~1\Temp"

              p2 := "C:\Documents and Settings\Usuario"

                               b := "\"

sqr := proc(x) x^2 end proc:
sqr := Compiler:-Compile(sqr);

  sqr := proc()
option call_external, define_external(
_m4fa7f349fa8b242dec87f5b731cbf23e, MAPLE, LIB = "C:\\DOCUME~1\\Usuario\\CONFIG~1\\Temp\\
Usuario-2096\\_m4fa7f349fa8b242dec87f5b731cbf23eU1yYq2xV.dll"); call_external(0, 102764576, true, false, args) end proc FileTools:-Copy(cat(p1,b,"Usuario-2096",b,"_m4fa7f349fa8b242dec87f5b731cbf23eU1yYq2xV.dll"),
cat(p2,b,"_m4fa7f349fa8b242dec87f5b731cbf23eU1yYq2xV.dll")); 33792

After ?Compiler:-Compile, if I understand it correctly, what is creating the file here is the OpenWatcom C compiler. I do not know how it handles file names.

@Joe Riel 

I have not got what you meant. What do you think of this test?:

p1:=getenv("TEMP");
p2:=kernelopts(homedir);
b:=kernelopts(dirsep);

              p1 := "C:\DOCUME~1\Usuario\CONFIG~1\Temp"

              p2 := "C:\Documents and Settings\Usuario"

                               b := "\"

FileTools[Text][WriteString]( cat(p1,b,"file"), "data" );
FileTools[Text][Close]( cat(p1,b,"file") );

                                  4

FileTools:-Copy(cat(p1,b,"file"),cat(p2,b,"file"));

                                  4

@Joe Riel 

It seems working. E.g. copying the readme.txt file to the local subdirectory works here:

p:=kernelopts(mapledir);
b:=kernelopts(dirsep);

p := "C:\math\Maple14"

b := "\"

FileTools:-Copy(cat(p,b,"readme.txt"),cat(p,b,"local",b,"readme.txt"));

7384

On the other hand, I get a similar error message when the target string is not "fine":

FileTools:-Copy(cat(p,b,"readme.txt"),cat(p,"\local\\readme.txt"));
Error, (in FileTools:-Copy) source file does not exist: C:\math\Maple14\readme.txt

I think that FileTools:-Exist does not exist. So, presumably, the line:

if not FileTools:-Exist(tmpfile) then

in the procedure CompileTools should be

if not FileTools:-Exists(tmpfile) then

With this change, the package is created. But I observe that a problem occurs, under Win XP, when executing CompileTools:-Copy as in the example. I get this error message:

sqr := CompileTools:-Copy(sqr);
Error, (in FileTools:-Copy) source file does not exist: 
C:\DOCUME~1\Usuario\CONFIG~1\Temp\Usuario-3148\_m4fa7f349fa8b242dec87f5b731cbf23eU1yYq2xV.dll

The path is apparently correct, compare:

 sqr := proc(x) x^2 end proc:
 sqr := Compiler:-Compile(sqr);

  sqr := proc()
option call_external, define_external(
_m4fa7f349fa8b242dec87f5b731cbf23e, MAPLE, LIB = "C:\\DOCUME~1\\Usuario\\CONFIG~1\\Temp\\Usuario-3148\\_m4fa7f349fa8\
b242dec87f5b731cbf23eU1yYq2xV.dll");
    call_external(0, 103026720, true, false, args)
end proc

But, presumably, the problem is that backslashes are not doubled or it is a name instead of a string.

@afeddersen 

The usage of local assumptions via assuming for every command that needs assumptions, with those that work best for each case, is, generically, a more flexible, hence more powerful, technique than using global assumptions via assume.

@afeddersen 

The usage of local assumptions via assuming for every command that needs assumptions, with those that work best for each case, is, generically, a more flexible, hence more powerful, technique than using global assumptions via assume.

First 103 104 105 106 107 108 109 Page 105 of 109