From ralf at hemmecke.de  Mon Aug  8 12:39:20 2005
From: ralf at hemmecke.de (Ralf Hemmecke)
Date: Mon, 08 Aug 2005 18:39:20 +0200
Subject: [Aldor-l] Re: Aldor program: Assistance requested.
In-Reply-To: <05080815491324.01565@zeta>
References: <0507011334002Q.19698@zeta> <0508061158011V.01565@zeta> <42F72568.5030902@hemmecke.de> <05080815491324.01565@zeta>
Message-ID: <42F78AB8.2000003@hemmecke.de>

Hello Constantine,

let me post your question to aldor-l since there might be others who 
could help better than me.

The program is attached (matex.as).

It compiles on my Debian Linux machine without a problem.

aldor -grun -lalgebra -laldor matex.as
(Note that "aldor -grun -laldor -lalgebra matex.as" does NOT work.)

On my machine the output starts with

vector [1.20000004,2.08999991e+1,1.47000002e+1]
vector [-1.10000002,4.80000019,-3.70000004]
vector [1.00029993e+3,-2.5,7.5]

and

vector [1.19999999999999996,2.08999999999999985e+1,1.46999999999999992e+1]
vector [-1.10000000000000008,4.79999999999999982,-3.70000000000000017]
vector [1.00029999999999996e+3,-2.5,7.5]

in case of DoubleFloat.

So we see some rounding error which I find quite annoying, but it comes 
from the output routine not the internal representation.

The reason why you get such big numbers is totally unclear to me. Looks 
like a bug somewhere.

What are the parameters of your machine? Which Aldor version do you run 
which library?

Type
aldor -gloop -lalgebra -laldor
#include "algebra"
#include "aldorinterp"
version$AldorLibraryInformation
version$AlgebraLibraryInformation

What do you get?

Ralf

C. Frangos wrote:
> Hi Ralf,
> 
> Yes, it compiles without error messages if I put the -lalgebra first  as 
> suggested - thanks.
> 
> However, there seems to be an error with the way the floating point numbers 
> inside the vectors and matrices are represented or printed. I saved the 
> results to a file and have pasted the very first section below.
> 
> Any assistance with this will be appreciated - thanks again for all your 
> time. 
> 
> With my best regards,
> 
> C. Frangos.
> 
> 
> 
> #include "algebra"
> #include "aldorio"
> 
> macro {
> 	V == Vector R;
> 	M == DenseMatrix R;
> 	print x == stdout << x << newline << newline;
> }
> matrixTest(R: Join(FloatType, ExpressionType)): () == {
> 	import from R, V, M;
> --	import from Float, MachineInteger;
> 	import from MachineInteger;
> 
> 	u: V := [   1.2, 20.9, 14.7];
> 	v: V := [  -1.1,  4.8, -3.7];
> 	w: V := [1000.3, -2.5,  7.5];
> 	print "The vectors";
> 	print u;
> 	print v;
> 	print w;
> 	
> 	print "Two matrices";
> 	m23 := [u,v];
> 	m33 := [u,v,w];
> 	
> 	print m23;
> 	print numberOfRows m23;
> 	print numberOfColumns m23;
> 
> 	print transpose m23;
> 	print m33;
> 
> 	print(m23 * transpose m23);
> 	m := transpose m23 * m23;
> 
> 
> -- The part of the program above produces the following results:
> 
> 
> The vectors
> 
> vector 
> [1.20000004,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1]
> 
> vector [-1.10000002,4.80000019,-3.70000004]
> 
> vector [340282366920938463463374607431768211456e+3,-2.5,7.5]
> 
> Two matrices
> 
> matrix 
> [[1.20000004,-1.10000002],[340282366920938463463374607431768211456e+1,4.80000019],[340282366920938463463374607431768211456e+1,-3.70000004]]
> 
> 3
> 
> 2
> 
> matrix 
> [[1.20000004,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1],[-1.10000002,4.80000019,-3.70000004]]
> 
> matrix 
> [[1.20000004,-1.10000002,340282366920938463463374607431768211456e+3],[340282366920938463463374607431768211456e+1,4.80000019,-2.5],[340282366920938463463374607431768211456e+1,-3.70000004,7.5]]
> 
> matrix 
> [[2.65000009,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1],[340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+2,340282366920938463463374607431768211456e+2],[340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+2,340282366920938463463374607431768211456e+2]]
> 
> 
> 
> On Monday 08 August 2005 11:27, C. Frangos wrote:
> 
>>>Thanks for the detailed instructions and please excuse the delay in
>>>responding due to work overload.
>>>
>>>As you suggested I commented out the line with Float in matex.as :
>>>
>>>--	import from Float, MachineInteger;
>>>	import from MachineInteger;
>>>
>>>I am using the following command to compile matex.as:
>>>
>>>aldor -Fx -laldor -lalgebra matex.as
>>
>>This command is the problem. I actually have no real explanation of it
>>but that is why in the mail where I sent you matex.as gave also the
>>command to compile it.
>>
>>aldor -grun -lalgebra -laldor matex.as
>>
>>You can, of course, replace -grun by -fx, but (also for future
>>development) always put the higher library first.
>>
>>An explanation why the order of the libraries on the command line is not
>>arbitrary, could be the following.
>>
>>Aldor has the concept of extending a domain (so called post-facto
>>extensions, Aldor User Guide, p. 120). And there are quite a number of
>>domains originally defined in libaldor which are extended in libalgebra.
>>MachineInteger is just one example.
>>
>>I hope that helps.
>>
>>Don't hesitate to ask more questions if you cannot go on.
>>
>>Best regards
>>Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matex.as
Type: application/x-applix-spreadsheet
Size: 1864 bytes
Desc: not available
Url : http://aldor.org/pipermail/aldor-l_aldor.org/attachments/20050808/5ff503f0/attachment.bin 

From ralf at hemmecke.de  Mon Aug 15 17:07:07 2005
From: ralf at hemmecke.de (Ralf Hemmecke)
Date: Mon, 15 Aug 2005 23:07:07 +0200
Subject: [Aldor-l] reflection about aldor domains
Message-ID: <430103FB.3020101@hemmecke.de>

I'd like to implement a function that returns the names and (pointers 
to) functions provided by some domain.

For example, for

Dom(T: Type): with {
   foo: T -> T;
   bar: T -> T;
} == add {
   foo(t: T): T == ...;
   bar(t: T): T == ...;
   baz(t: T): T == ...;
}

How can a function

exportedFunctions(D: Type): List Cross(String, Type) == ...

be implemented that returns [("foo", foo), ("bar", bar)] for 
exportedFunctions(Dom String)?

Is there a chance to get such information out of a domain? Of course, it 
would be even better to get also the type of the function so that it 
would not be necessary to "pretend" something later.

Ralf



From bill.page1 at sympatico.ca  Mon Aug 29 20:48:13 2005
From: bill.page1 at sympatico.ca (Bill Page)
Date: Mon, 29 Aug 2005 20:48:13 -0400
Subject: [Aldor-l] Axiom/aldor interface code
In-Reply-To: <42F78AB8.2000003@hemmecke.de>
Message-ID: <001001c5acfc$85b365f0$6400a8c0@asus>

Thanks to the efforts of Peter Broadbery it is now possible to use
Aldor as the library compiler for the open source version of Axiom
again - just like the original commercial version. For examples and
instructions on how to setup Axiom see:

http://www.axiom-developer.org/zope/mathaction/AldorForAxiom





From daly at axiom-developer.org  Mon Aug 29 21:52:14 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 21:52:14 -0400
Subject: [Aldor-l] aldor for axiom
Message-ID: <200508300152.j7U1qEC13551@localhost.localdomain>

Bill, Peter,

As a practical matter we can't expect axiom users to upgrade both make
and java just to build Axiom. I'm following the directions you put on
the AldorForAxiom page just to verify that I understand the process.

I need to rebuild the machinery so it works with any version of make
and doesn't require java. It's been a standing goal (so far achieved)
that you can build axiom on a reasonable linux distro by just typing
'make'. Virtually all of the distros I have distribute pre 3.8 makes
it seems.

And since it seems we can't distribute the aldor binaries with Axiom
the whole aldor install is going to require the user to fetch aldor
(probably into the zips directory) and then 
  make aldor


Comments? Complaints?

t


From daly at axiom-developer.org  Mon Aug 29 21:53:40 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 21:53:40 -0400
Subject: [Aldor-l] aldor for axiom
Message-ID: <200508300153.j7U1req13555@localhost.localdomain>

Bill, Peter,

Also, I have javac 1.5.0_04. Can I assume you don't actually REQUIRE
javac 1.5.0_03?

t


From bill.page1 at sympatico.ca  Mon Aug 29 22:11:47 2005
From: bill.page1 at sympatico.ca (bill.page1 at sympatico.ca)
Date: Mon, 29 Aug 2005 22:11:47 -0400
Subject: [Aldor-l] RE: aldor for axiom
In-Reply-To: <200508300153.j7U1req13555@localhost.localdomain>
Message-ID: <002201c5ad08$3394caa0$6400a8c0@asus>

> Also, I have javac 1.5.0_04. Can I assume you don't actually REQUIRE
> javac 1.5.0_03?

Yes. In fact I am not 100% sure that it is Sun's JDK 1.5.x that is
required but I have verified that it works. Peter never said exactly
what java compiler he is using.

It would be nice if one could use the GNU gcj compiler. But my first
attempt to do that failed so I assumed he was talking about Sun's java.




From daly at axiom-developer.org  Mon Aug 29 22:16:22 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 22:16:22 -0400
Subject: [Aldor-l] patches
Message-ID: <200508300216.j7U2GM213605@localhost.localdomain>

Peter,

I don't see any obvious reason why your patches can't be permanently
applied to the axiom sources. Did I miss something that would break
if aldor is not around?


Tim


From bill.page1 at sympatico.ca  Mon Aug 29 22:21:30 2005
From: bill.page1 at sympatico.ca (bill.page1 at sympatico.ca)
Date: Mon, 29 Aug 2005 22:21:30 -0400
Subject: [Aldor-l] aldor for axiom
In-Reply-To: <200508300152.j7U1qEC13551@localhost.localdomain>
Message-ID: <002301c5ad09$8fc8ce60$6400a8c0@asus>

Tim wrote:

> 
> As a practical matter we can't expect axiom users to upgrade
> both make and java just to build Axiom. I'm following the
> directions you put on the AldorForAxiom page just to verify
> that I understand the process.

Great.

> 
> I need to rebuild the machinery so it works with any version of
> make and doesn't require java. It's been a standing goal (so far
> achieved) that you can build axiom on a reasonable linux distro by
> just typing 'make'. Virtually all of the distros I have distribute
> pre 3.8 makes it seems.

make 3.8 was released in 2002. I wonder why 3.79.x is still so
common?

Upgrading to make 3.8 seems to be as simple as download, configure,
make ...

Since Peter claims his java code is "simple" perhaps it is possible to
use GNU java (gcj). That is easily available on most linux distros.

Another possibility would be to use Peter's java program to create
a static list of dependencies which we can then just include in
the axiom build files.

> 
> And since it seems we can't distribute the aldor binaries with Axiom
> the whole aldor install is going to require the user to fetch aldor
> (probably into the zips directory) and then 
>   make aldor
> 

That makes sense.

Bill Page.




From ralf at hemmecke.de  Mon Aug  8 12:39:20 2005
From: ralf at hemmecke.de (Ralf Hemmecke)
Date: Mon, 08 Aug 2005 18:39:20 +0200
Subject: [Aldor-l] Re: Aldor program: Assistance requested.
In-Reply-To: <05080815491324.01565@zeta>
References: <0507011334002Q.19698@zeta> <0508061158011V.01565@zeta> <42F72568.5030902@hemmecke.de> <05080815491324.01565@zeta>
Message-ID: <42F78AB8.2000003@hemmecke.de>

Hello Constantine,

let me post your question to aldor-l since there might be others who 
could help better than me.

The program is attached (matex.as).

It compiles on my Debian Linux machine without a problem.

aldor -grun -lalgebra -laldor matex.as
(Note that "aldor -grun -laldor -lalgebra matex.as" does NOT work.)

On my machine the output starts with

vector [1.20000004,2.08999991e+1,1.47000002e+1]
vector [-1.10000002,4.80000019,-3.70000004]
vector [1.00029993e+3,-2.5,7.5]

and

vector [1.19999999999999996,2.08999999999999985e+1,1.46999999999999992e+1]
vector [-1.10000000000000008,4.79999999999999982,-3.70000000000000017]
vector [1.00029999999999996e+3,-2.5,7.5]

in case of DoubleFloat.

So we see some rounding error which I find quite annoying, but it comes 
from the output routine not the internal representation.

The reason why you get such big numbers is totally unclear to me. Looks 
like a bug somewhere.

What are the parameters of your machine? Which Aldor version do you run 
which library?

Type
aldor -gloop -lalgebra -laldor
#include "algebra"
#include "aldorinterp"
version$AldorLibraryInformation
version$AlgebraLibraryInformation

What do you get?

Ralf

C. Frangos wrote:
> Hi Ralf,
> 
> Yes, it compiles without error messages if I put the -lalgebra first  as 
> suggested - thanks.
> 
> However, there seems to be an error with the way the floating point numbers 
> inside the vectors and matrices are represented or printed. I saved the 
> results to a file and have pasted the very first section below.
> 
> Any assistance with this will be appreciated - thanks again for all your 
> time. 
> 
> With my best regards,
> 
> C. Frangos.
> 
> 
> 
> #include "algebra"
> #include "aldorio"
> 
> macro {
> 	V == Vector R;
> 	M == DenseMatrix R;
> 	print x == stdout << x << newline << newline;
> }
> matrixTest(R: Join(FloatType, ExpressionType)): () == {
> 	import from R, V, M;
> --	import from Float, MachineInteger;
> 	import from MachineInteger;
> 
> 	u: V := [   1.2, 20.9, 14.7];
> 	v: V := [  -1.1,  4.8, -3.7];
> 	w: V := [1000.3, -2.5,  7.5];
> 	print "The vectors";
> 	print u;
> 	print v;
> 	print w;
> 	
> 	print "Two matrices";
> 	m23 := [u,v];
> 	m33 := [u,v,w];
> 	
> 	print m23;
> 	print numberOfRows m23;
> 	print numberOfColumns m23;
> 
> 	print transpose m23;
> 	print m33;
> 
> 	print(m23 * transpose m23);
> 	m := transpose m23 * m23;
> 
> 
> -- The part of the program above produces the following results:
> 
> 
> The vectors
> 
> vector 
> [1.20000004,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1]
> 
> vector [-1.10000002,4.80000019,-3.70000004]
> 
> vector [340282366920938463463374607431768211456e+3,-2.5,7.5]
> 
> Two matrices
> 
> matrix 
> [[1.20000004,-1.10000002],[340282366920938463463374607431768211456e+1,4.80000019],[340282366920938463463374607431768211456e+1,-3.70000004]]
> 
> 3
> 
> 2
> 
> matrix 
> [[1.20000004,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1],[-1.10000002,4.80000019,-3.70000004]]
> 
> matrix 
> [[1.20000004,-1.10000002,340282366920938463463374607431768211456e+3],[340282366920938463463374607431768211456e+1,4.80000019,-2.5],[340282366920938463463374607431768211456e+1,-3.70000004,7.5]]
> 
> matrix 
> [[2.65000009,340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+1],[340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+2,340282366920938463463374607431768211456e+2],[340282366920938463463374607431768211456e+1,340282366920938463463374607431768211456e+2,340282366920938463463374607431768211456e+2]]
> 
> 
> 
> On Monday 08 August 2005 11:27, C. Frangos wrote:
> 
>>>Thanks for the detailed instructions and please excuse the delay in
>>>responding due to work overload.
>>>
>>>As you suggested I commented out the line with Float in matex.as :
>>>
>>>--	import from Float, MachineInteger;
>>>	import from MachineInteger;
>>>
>>>I am using the following command to compile matex.as:
>>>
>>>aldor -Fx -laldor -lalgebra matex.as
>>
>>This command is the problem. I actually have no real explanation of it
>>but that is why in the mail where I sent you matex.as gave also the
>>command to compile it.
>>
>>aldor -grun -lalgebra -laldor matex.as
>>
>>You can, of course, replace -grun by -fx, but (also for future
>>development) always put the higher library first.
>>
>>An explanation why the order of the libraries on the command line is not
>>arbitrary, could be the following.
>>
>>Aldor has the concept of extending a domain (so called post-facto
>>extensions, Aldor User Guide, p. 120). And there are quite a number of
>>domains originally defined in libaldor which are extended in libalgebra.
>>MachineInteger is just one example.
>>
>>I hope that helps.
>>
>>Don't hesitate to ask more questions if you cannot go on.
>>
>>Best regards
>>Ralf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matex.as
Type: application/x-applix-spreadsheet
Size: 1864 bytes
Desc: not available
URL: <http://mail.aldor.org/pipermail/aldor-l_aldor.org/attachments/20050808/5ff503f0/attachment-0001.bin>

From ralf at hemmecke.de  Mon Aug 15 17:07:07 2005
From: ralf at hemmecke.de (Ralf Hemmecke)
Date: Mon, 15 Aug 2005 23:07:07 +0200
Subject: [Aldor-l] reflection about aldor domains
Message-ID: <430103FB.3020101@hemmecke.de>

I'd like to implement a function that returns the names and (pointers 
to) functions provided by some domain.

For example, for

Dom(T: Type): with {
   foo: T -> T;
   bar: T -> T;
} == add {
   foo(t: T): T == ...;
   bar(t: T): T == ...;
   baz(t: T): T == ...;
}

How can a function

exportedFunctions(D: Type): List Cross(String, Type) == ...

be implemented that returns [("foo", foo), ("bar", bar)] for 
exportedFunctions(Dom String)?

Is there a chance to get such information out of a domain? Of course, it 
would be even better to get also the type of the function so that it 
would not be necessary to "pretend" something later.

Ralf



From bill.page1 at sympatico.ca  Mon Aug 29 20:48:13 2005
From: bill.page1 at sympatico.ca (Bill Page)
Date: Mon, 29 Aug 2005 20:48:13 -0400
Subject: [Aldor-l] Axiom/aldor interface code
In-Reply-To: <42F78AB8.2000003@hemmecke.de>
Message-ID: <001001c5acfc$85b365f0$6400a8c0@asus>

Thanks to the efforts of Peter Broadbery it is now possible to use
Aldor as the library compiler for the open source version of Axiom
again - just like the original commercial version. For examples and
instructions on how to setup Axiom see:

http://www.axiom-developer.org/zope/mathaction/AldorForAxiom





From daly at axiom-developer.org  Mon Aug 29 21:52:14 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 21:52:14 -0400
Subject: [Aldor-l] aldor for axiom
Message-ID: <200508300152.j7U1qEC13551@localhost.localdomain>

Bill, Peter,

As a practical matter we can't expect axiom users to upgrade both make
and java just to build Axiom. I'm following the directions you put on
the AldorForAxiom page just to verify that I understand the process.

I need to rebuild the machinery so it works with any version of make
and doesn't require java. It's been a standing goal (so far achieved)
that you can build axiom on a reasonable linux distro by just typing
'make'. Virtually all of the distros I have distribute pre 3.8 makes
it seems.

And since it seems we can't distribute the aldor binaries with Axiom
the whole aldor install is going to require the user to fetch aldor
(probably into the zips directory) and then 
  make aldor


Comments? Complaints?

t


From daly at axiom-developer.org  Mon Aug 29 21:53:40 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 21:53:40 -0400
Subject: [Aldor-l] aldor for axiom
Message-ID: <200508300153.j7U1req13555@localhost.localdomain>

Bill, Peter,

Also, I have javac 1.5.0_04. Can I assume you don't actually REQUIRE
javac 1.5.0_03?

t


From bill.page1 at sympatico.ca  Mon Aug 29 22:11:47 2005
From: bill.page1 at sympatico.ca (bill.page1 at sympatico.ca)
Date: Mon, 29 Aug 2005 22:11:47 -0400
Subject: [Aldor-l] RE: aldor for axiom
In-Reply-To: <200508300153.j7U1req13555@localhost.localdomain>
Message-ID: <002201c5ad08$3394caa0$6400a8c0@asus>

> Also, I have javac 1.5.0_04. Can I assume you don't actually REQUIRE
> javac 1.5.0_03?

Yes. In fact I am not 100% sure that it is Sun's JDK 1.5.x that is
required but I have verified that it works. Peter never said exactly
what java compiler he is using.

It would be nice if one could use the GNU gcj compiler. But my first
attempt to do that failed so I assumed he was talking about Sun's java.




From daly at axiom-developer.org  Mon Aug 29 22:16:22 2005
From: daly at axiom-developer.org (root)
Date: Mon, 29 Aug 2005 22:16:22 -0400
Subject: [Aldor-l] patches
Message-ID: <200508300216.j7U2GM213605@localhost.localdomain>

Peter,

I don't see any obvious reason why your patches can't be permanently
applied to the axiom sources. Did I miss something that would break
if aldor is not around?


Tim


From bill.page1 at sympatico.ca  Mon Aug 29 22:21:30 2005
From: bill.page1 at sympatico.ca (bill.page1 at sympatico.ca)
Date: Mon, 29 Aug 2005 22:21:30 -0400
Subject: [Aldor-l] aldor for axiom
In-Reply-To: <200508300152.j7U1qEC13551@localhost.localdomain>
Message-ID: <002301c5ad09$8fc8ce60$6400a8c0@asus>

Tim wrote:

> 
> As a practical matter we can't expect axiom users to upgrade
> both make and java just to build Axiom. I'm following the
> directions you put on the AldorForAxiom page just to verify
> that I understand the process.

Great.

> 
> I need to rebuild the machinery so it works with any version of
> make and doesn't require java. It's been a standing goal (so far
> achieved) that you can build axiom on a reasonable linux distro by
> just typing 'make'. Virtually all of the distros I have distribute
> pre 3.8 makes it seems.

make 3.8 was released in 2002. I wonder why 3.79.x is still so
common?

Upgrading to make 3.8 seems to be as simple as download, configure,
make ...

Since Peter claims his java code is "simple" perhaps it is possible to
use GNU java (gcj). That is easily available on most linux distros.

Another possibility would be to use Peter's java program to create
a static list of dependencies which we can then just include in
the axiom build files.

> 
> And since it seems we can't distribute the aldor binaries with Axiom
> the whole aldor install is going to require the user to fetch aldor
> (probably into the zips directory) and then 
>   make aldor
> 

That makes sense.

Bill Page.




