[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread William Stein

On Wed, Jun 4, 2008 at 10:16 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 4, 2008 at 11:06 PM, William Stein wrote:
>>
>> On Wed, Jun 4, 2008 at 7:35 PM, Bill Page wrote:
>>>
>>> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:

 David's explanation of this is right on. We need parent() to work
 in some sensible way on non-Elements (e.g. Python ints, objects
 from outside Sage) to be able do some kind of coercion reasoning
 on them. Python is a dynamically typed language, ever object has
 a type.
>>>
>>> So is this essentially an admission that the concept of 'parent' is
>>> superfluous and could have in fact been implemented just as
>>> Python 'type'?
>>
>> That is not the case, except that of course *anything* that can
>> be implemented, can be implemented in any turing complete
>> language.
>>
>
> I did not mean to pose this question in a trivial way. I meant to
> suggest that the concept of type in the Python programming language,
> i.e. classes, could directly implement the concept of "parent" as used
> in Sage without abusing either concept at all. Can you suggest an
> example that demonstrates that this is not the case?

I think Robert's example of the integers modulo n is an excellent example
of precisely this.  I'm confused about why you don't see this.

>
>> ...
>> There are infinitely many different parents, one of each value
>> of n.   For a given n, the ring Z/nZ is a specific mathematical
>> object, which is itself for many many reasons worth modeling
>> in a computer.  If nothing else, it is the place on which to hang
>> functions like "multiplicative_generator()".
>
> Python classes can also take parameters.

I didn't know that.  I thought the only way to create a Python class
is for the Python interpreter to execute Python code that looks like this:

class Foo(...):
 ...

That makes a new class called Foo.  How are you going to make, at
runtime, new classes for each of Z/nZ say, for 1 <= n < 10^5, i.e.,
something like this in Sage:

  v = [Integers(n) for n in range(1,10^5)]

I do not think it is possible to concisely create a hundred thousand
separate Python classes like that.

>> Any computer algebra system that doesn't have first class
>> actual objects that represent basic mathematical structures
>> such as rings, fields, etc., feels extremely barren if one has
>> used Magma for a sufficient amount of time.
>>
>
> Sure. Rings and fields are categories.

I meant "Rings" and "fields" not as categories but specific rings
and specified fields as mathematical objects in their own right.
In Magma and Sage there is virtually no difference between
"a polynomial ring over the rational numbers" and a specific
polynomial over the rationals -- both are first class instances
in exactly the same way.

> Magma was not the first system
> to represent these mathematical structures in a computer.

I believe Magma was the first to very systematically represent
the objects of the categories as first class objects systematically
throughout the system.  I know of no other system that does this
(except Sage).

>
>> Specific rings, fields, vector spaces, etc., are all basic objects of
>> mathematics, that are just as important to fully implement and
>> model in a CAS as polynomials, rational numbers, vectors, etc.
>> I firmly believe Magma was the first ever system to really get this
>> right, and Sage merely copies this.   I really greatly appreciate
>> what Cannon et al. did...
>>
>
> I am sure Magma is an interesting system - everything I have been
> reading about it confirms that - but I do not think it was the first.
> I am also not yet convinced that it has implemented these general
> mathematically concepts in any substantially better way then, for
> example Axiom.

I think Magma is brilliant.   Disclaimer: I used to be one of the
biggest Magma zealots on the planet, so take that with a grain of salt!
It is also not my intention here to make any negative comments
at all about Axiom (say) -- only positive comments about Magma.

> Some things it does seem peculiar and ad hoc to me.
> These are the things that standout in my mind when I think about in
> what ways Sage resembles Magma. Of course there are some specific
> computations that Magma does much more efficiently than any other
> system. But that is not the point. We are talking here about general
> design issues.

Yet efficiency and design are closely linked.   When I first started using
Magma after years and years of C++, I was amazed how they were able
to unify so many ideas and bring such a vast amount of quality code
together in a way that worked pretty well.  I soon started writing, in the
Magma interpreter, vastly more efficient code than I could ever write in C++,
and code that accomplished a lot more.  Much of this was for me directly
a result of the excellent design ideas that went into Magma.  This was
a real eye opener for me.

>> ...
>>> "SymbolicRing" is another thing that worries me a li

[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread Bill Page

On Wed, Jun 4, 2008 at 11:06 PM, William Stein wrote:
>
> On Wed, Jun 4, 2008 at 7:35 PM, Bill Page wrote:
>>
>> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>>>
>>> David's explanation of this is right on. We need parent() to work
>>> in some sensible way on non-Elements (e.g. Python ints, objects
>>> from outside Sage) to be able do some kind of coercion reasoning
>>> on them. Python is a dynamically typed language, ever object has
>>> a type.
>>
>> So is this essentially an admission that the concept of 'parent' is
>> superfluous and could have in fact been implemented just as
>> Python 'type'?
>
> That is not the case, except that of course *anything* that can
> be implemented, can be implemented in any turing complete
> language.
>

I did not mean to pose this question in a trivial way. I meant to
suggest that the concept of type in the Python programming language,
i.e. classes, could directly implement the concept of "parent" as used
in Sage without abusing either concept at all. Can you suggest an
example that demonstrates that this is not the case?

> ...
> There are infinitely many different parents, one of each value
> of n.   For a given n, the ring Z/nZ is a specific mathematical
> object, which is itself for many many reasons worth modeling
> in a computer.  If nothing else, it is the place on which to hang
> functions like "multiplicative_generator()".

Python classes can also take parameters.

> Any computer algebra system that doesn't have first class
> actual objects that represent basic mathematical structures
> such as rings, fields, etc., feels extremely barren if one has
> used Magma for a sufficient amount of time.
>

Sure. Rings and fields are categories. Magma was not the first system
to represent these mathematical structures in a computer.

> Specific rings, fields, vector spaces, etc., are all basic objects of
> mathematics, that are just as important to fully implement and
> model in a CAS as polynomials, rational numbers, vectors, etc.
> I firmly believe Magma was the first ever system to really get this
> right, and Sage merely copies this.   I really greatly appreciate
> what Cannon et al. did...
>

I am sure Magma is an interesting system - everything I have been
reading about it confirms that - but I do not think it was the first.
I am also not yet convinced that it has implemented these general
mathematically concepts in any substantially better way then, for
example Axiom. Some things it does seem peculiar and ad hoc to me.
These are the things that standout in my mind when I think about in
what ways Sage resembles Magma. Of course there are some specific
computations that Magma does much more efficiently than any other
system. But that is not the point. We are talking here about general
design issues.

> ...
>> "SymbolicRing" is another thing that worries me a little. Exactly
>> what (mathematically) is a symbolic ring? E.g. Why is it a ring
>> and not a field? Operations like 'sin(sin(sin(x))).parent()' doesn't
>> look much like a ring to me. Probably most other computer algebra
>> systems would just call this an "expression tree" or AST or
>> something like that.
> ...
> To me, the SymbolicRing is the mathematical structure in which
> calculus teachers, engineers, etc., are kept happy.  In Sage
> that was 100% its purpose.  Ask Marshall Hampton, who is teaching
> calculus right now using Sage, about what he needs to make
> teaching calculus easy, and the answer is "The Symbolic Ring",
> plus graphics and interact.
>

I don't doubt that doing symbolic mathematics by computer is very
useful for teaching calculus - after all that is what is normally
meant by the term "calculus", i.e. a method of calculation based on
the symbolic manipulation of expressions. The name "Symbolic Ring"
however makes it sound more "algebraic",i.e. concerned with structure,
relation and quantity. So I was looking for a more formal mathematical
definition of this sort. I did not expect it was a name intended just
to keep certain people happy. :-(

> ...

Regards,
Bill Page.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread William Stein

On Wed, Jun 4, 2008 at 7:35 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>>
>> On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
>> ...
>>>
>>> These seem consistent to me, albeit rather complex. However I am
>>> not sure I understand the following:
>>>
>>> sage: parent(IntegerRing())
>>> 
>>> sage: parent(RealField())
>>> 
>>>
>>> Could you explain why the parent of an object of some category is a
>>> type?
>>
>> David's explanation of this is right on. We need parent() to work in
>> some sensible way on non-Elements (e.g. Python ints, objects from
>> outside Sage) to be able do some kind of coercion reasoning on them.
>> Python is a dynamically typed language, ever object has a type.
>>
>
> So is this essentially an admission that the concept of 'parent' is
> superfluous and could have in fact been implemented just at Python
> 'type'?

That is not the case, except that of course *anything* that can be
implemented, can be implemented in any turing complete language.

> I am not sure that I would actually advocate this now, but for
> argument's sake: Why not do it this way all of the time? Python
> classes all end up as (potential) parents. I think that this more or
> less is what at least some Magma developers had in mind. E.g. We read
> in the preface to the Magma HTML Help Document:
>
> http://magma.maths.usyd.edu.au/magma/htmlhelp/preface.htm
>
> "Every object created during the course of a computation is associated
> with a unique parent algebraic structure. The type of an object is
> then simply its parent structure."
>

You took that quote out of context.  The full quote is: "The
theoretical basis for the design
of Magma is founded on the concepts and methodology of modern algebra.
The central notion is that of an algebraic structure. Every object
created during
the course of a computation is associated with a unique parent
algebraic structure.
The type of an object is then simply its parent structure."

The word "type" is being used in a formal sense as defined in the excellent
paper  "The Magma Algebra System I: The User Language" by Bosma, Cannon,
and Playoust.


>> ...
>> One should think of the type of an object as what specifies its
>> implementation (including its internal representation). In this sense
>> it is like a class in Java, C++, or any other programming language.
>> (In Python there is a subtle (and mostly historical) difference
>> between types and classes depending on whether or not it's written
>> in C, but for the most part they can be used interchangeably).
>> Python has multiple inheritance, but Cython does not (the C
>> format of a compiled Python class is a C struct, so this is not so
>> much a Cython limitation as a Python/C API limitation.)
>>
>
> The lack of multiple inheritance in Cython seems to be a major design
> obstacle. Although a C struct is not a real class, it is not clear to
> me why this is not adequate in compiled code. Wouldn't it be
> sufficient to merge (flatten) the components of the multiple ancesters
> into one struct? If not (e.g. if it is necessary to retain some
> knowledge of their origins), why not provide nested structs? But I
> suppose that this is quite off-topic...
>
>> Most of the time there is a 1-to-1 correspondence between Parents
>> and the types of its Elements. For example, and element of the Parent
>> RR (= RealField(53) is represented by sage.rings.real_mpfr.RealNumber.
>> If I do RR(3) I get back an object of type sage.rings.real_mpfr.RealNumber
>> representing the floating point number 3 to 53 bits of precision, and it's
>> Parent is RR. RealField (100) is a new Parent, whose elements are
>> again of type sage.rings.real_mpfr.RealNumber but to 100 bits of
>> precision.
>>
>> Sometimes, however, the same type is used for multiple parents.
>> There are several integer mod types (depending on whether or not
>> the modulus fits in a single word) and they are used for both generic
>> Z/nZ and prime-order finite fields. Thus we have
>>
>> sage: [type(mod(-1, 100^k)) for k in [2..5]]
>> [,
>>  ,
>>  ,
>>  ]
>>
>> sage: [parent(mod(-1, 100^k)) for k in [2..5]]
>> [Ring of integers modulo 1,
>>  Ring of integers modulo 100,
>>  Ring of integers modulo 1,
>>  Ring of integers modulo 100]
>>
>
> Hmmm... what I think I see here is multiple Python types (_int,
> _int64, _gmp) being used for the *same* parent, i.e. "Ring of integers
> modulo n" (for some parameter n). Simple inheritance should make this
> easy, no?

There are infinitely many different parents, one of each value
of n.   For a given n, the ring Z/nZ is a specific mathematical
object, which is itself for many many reasons worth modeling
in a computer.  If nothing else, it is the place on which to hang
functions like "multiplicative_generator()".   Any computer algebra
system that doesn't have first class actual objects that represent
basic mathematical structures such as rings, fields, etc., feels
extremely ba

[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread Bill Page

On Wed, Jun 4, 2008 at 1:54 PM, Robert Bradshaw wrote:
>
> On Jun 4, 2008, at 4:07 AM, Bill Page wrote:
> ...
>>
>> These seem consistent to me, albeit rather complex. However I am
>> not sure I understand the following:
>>
>> sage: parent(IntegerRing())
>> 
>> sage: parent(RealField())
>> 
>>
>> Could you explain why the parent of an object of some category is a
>> type?
>
> David's explanation of this is right on. We need parent() to work in
> some sensible way on non-Elements (e.g. Python ints, objects from
> outside Sage) to be able do some kind of coercion reasoning on them.
> Python is a dynamically typed language, ever object has a type.
>

So is this essentially an admission that the concept of 'parent' is
superfluous and could have in fact been implemented just at Python
'type'? I am not sure that I would actually advocate this now, but for
argument's sake: Why not do it this way all of the time? Python
classes all end up as (potential) parents. I think that this more or
less is what at least some Magma developers had in mind. E.g. We read
in the preface to the Magma HTML Help Document:

http://magma.maths.usyd.edu.au/magma/htmlhelp/preface.htm

"Every object created during the course of a computation is associated
with a unique parent algebraic structure. The type of an object is
then simply its parent structure."

> ...
> One should think of the type of an object as what specifies its
> implementation (including its internal representation). In this sense
> it is like a class in Java, C++, or any other programming language.
> (In Python there is a subtle (and mostly historical) difference
> between types and classes depending on whether or not it's written
> in C, but for the most part they can be used interchangeably).
> Python has multiple inheritance, but Cython does not (the C
> format of a compiled Python class is a C struct, so this is not so
> much a Cython limitation as a Python/C API limitation.)
>

The lack of multiple inheritance in Cython seems to be a major design
obstacle. Although a C struct is not a real class, it is not clear to
me why this is not adequate in compiled code. Wouldn't it be
sufficient to merge (flatten) the components of the multiple ancesters
into one struct? If not (e.g. if it is necessary to retain some
knowledge of their origins), why not provide nested structs? But I
suppose that this is quite off-topic...

> Most of the time there is a 1-to-1 correspondence between Parents
> and the types of its Elements. For example, and element of the Parent
> RR (= RealField(53) is represented by sage.rings.real_mpfr.RealNumber.
> If I do RR(3) I get back an object of type sage.rings.real_mpfr.RealNumber
> representing the floating point number 3 to 53 bits of precision, and it's
> Parent is RR. RealField (100) is a new Parent, whose elements are
> again of type sage.rings.real_mpfr.RealNumber but to 100 bits of
> precision.
>
> Sometimes, however, the same type is used for multiple parents.
> There are several integer mod types (depending on whether or not
> the modulus fits in a single word) and they are used for both generic
> Z/nZ and prime-order finite fields. Thus we have
>
> sage: [type(mod(-1, 100^k)) for k in [2..5]]
> [,
>  ,
>  ,
>  ]
>
> sage: [parent(mod(-1, 100^k)) for k in [2..5]]
> [Ring of integers modulo 1,
>  Ring of integers modulo 100,
>  Ring of integers modulo 1,
>  Ring of integers modulo 100]
>

Hmmm... what I think I see here is multiple Python types (_int,
_int64, _gmp) being used for the *same* parent, i.e. "Ring of integers
modulo n" (for some parameter n). Simple inheritance should make this
easy, no?

> On the other hand, some parents may have elements of several
> types. The "SymbolicRing" is one such example.
>
> sage: [type(a) for a in v]
> [,
>  ,
>  ,
>  ]
>
> sage: [parent(a) for a in v]
> [Symbolic Ring, Symbolic Ring, Symbolic Ring, Symbolic Ring]
>

"SymbolicRing" is another thing that worries me a little. Exactly what
(mathematically) is a symbolic ring? E.g. Why is it a ring and not a
field? Operations like 'sin(sin(sin(x))).parent()' doesn't look much
like a ring to me. Probably most other computer algebra systems would
just call this an "expression tree" or AST or something like that. Why
do we need different types (sub-classes)?

>> From my experience with Axiom I am sympathetic to the separation of
>> implementation and specification but in Axiom "domains" are both
>> parents and types. A domain can inherit it's implementation from
>> another domain (via add). A domain can also serve as the
>> representation for some other domain (via Rep). For example
>> IntegerMod(5) is the representation of PrimeField(5). IntegerMod(5) in
>> turn is represented by SingleInteger, etc.
> ...
> This sounds like the correct analogy. In Sage as well elements of
> prime finite fields are the same type as elements of Z/nZ for
> composite n, but they have different parents.
>

To the best of my knowledge, the formal concept

[sage-devel] Re: new website

2008-06-04 Thread David Harvey


On Jun 4, 2008, at 6:09 PM, Harald Schilly wrote:

>> Also, under "Library", I don't know what "works" means.
>
> This was already a problem mentioned somewhere else. Very interesting.
> I looked it up in a dictionary and it is the correct translation.
> Maybe it is used differently? Or is the word "workings" better? You
> used it in "...and the previous (and ongoing) work of many authors of
> included components". I think, in German it has a broader meaning but
> is still the same word.

I think the word must be used differently in english. There is a  
subtle distinction for example between "the works of Gauss" and "the  
work of Gauss". The former is perhaps more like the German meaning  
(I'm not speaking with any knowledge of German here); it refers to  
the specific texts that Gauss wrote. The latter refers more generally  
to the activities and research in which Gauss engaged. You can also  
say "works of art" or "mathematical works of the 19th century", but  
it sounds very strange to say "works" by itself without any further  
context. I'm not completely sure why. It's just one of those weird  
things.

("Workings" is much much worse.)

>
> What I mean is written (digital) text that has been done for, about
> and with Sage excluding development (howto's, papers, examples, ...) -
> that ends up in a collection, called library.

How is this different from the "Help" section?

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Another Solaris NTL problem

2008-06-04 Thread Dr. David Kirkby



On Jun 5, 2:32 am, "Dr. David Kirkby" <[EMAIL PROTECTED]> wrote:
> I set up a Sun Ultra 60 for testing of sage and have mailed a couple
> of people passwords. I just checked this, and found another issue with
> NTL on the Ultra 60 which I did not notice on the Blade 2000.
>
> It appears to fail with:
>
> "make: Fatal error in reader: makefile, line 522: Macro assignment on
> dependency line"
>
> see below.
>
> This happens with both /usr/ccs/bin/make and gnu make. Not sure how
> this differrs much from the other Sun. As far as I know, they have the
> same compilers and make programs!
>
> x ntl-5.4.2.p3/src/src/RemoveProg, 51 bytes, 1 tape blocks
> x ntl-5.4.2.p3/src/src/cfile, 15983 bytes, 32 tape blocks
> x ntl-5.4.2.p3/src/src/CharPolyTest.c, 213 bytes, 1 tape blocks
> x ntl-5.4.2.p3/src/src/pair_GF2EX_long.c, 385 bytes, 1 tape blocks
> x ntl-5.4.2.p3/src/src/DispSettings.c, 2197 bytes, 5 tape blocks
> x ntl-5.4.2.p3/src/src/pair_lzz_pX_long.c, 386 bytes, 1 tape blocks
> Finished extraction
> 
> Host system
> uname -a:
> SunOS main-webserver 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-60
> 
> 
> GCC Version
> gcc -v
> Reading specs from /opt/csw/gcc4/lib/gcc/sparc-sun-solaris2.8/4.0.2/
> specs
> Target: sparc-sun-solaris2.8
> Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
> --with-local-prefix=/opt/csw --without-gnu-as --with-as=/usr/ccs/bin/
> as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --
> enable-shared --enable-multilib --enable-nls --with-included-gettext --
> with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-
> system-zlib --enable-languages=c,c++,f95,java,objc,ada
> Thread model: posix
> gcc version 4.0.2
> 
> writing makefile
> writing ../include/NTL/config.h
> Building and install NTL
> make: Fatal error in reader: makefile, line 522: Macro assignment on
> dependency line
> Current working directory /export/home0/mabshoff/sage-3.0.2/spkg/build/
> ntl-5.4.2.p3/src/src
> Error creating ntl shared library.
>
> real0m0.307s
> user0m0.122s
> sys 0m0.171s
> sage: An error occurred while installing ntl-5.4.2.p3
> Please email sage-develhttp://groups.google.com/group/sage-devel
> explaining the problem and send the relevant part of
> of /export/home0/mabshoff/sage-3.0.2/install.log.  Describe your
> computer, operating system, etc.
> If you want to try to fix the problem, yourself *don't* just cd to
> /export/home0/mabshoff/sage-3.0.2/spkg/build/ntl-5.4.2.p3 and type
> 'make'.
> Instead type "/export/home0/mabshoff/sage-3.0.2/sage -sh"
> in order to set all environment variables correctly, then cd to
> /export/home0/mabshoff/sage-3.0.2/spkg/build/ntl-5.4.2.p3
> (When you are done debugging, you can type "exit" to leave the
> subshell.)
> *** Error code 1
> make: Fatal error: Command failed for target `installed/ntl-5.4.2.p3'
> Current working directory /export/home0/mabshoff/sage-3.0.2/spkg
>
> real26:55.5
> user17:33.1
> sys  2:34.1

For what it is worth, this is line 522:

shobj: FPICFLAG = -fPIC

Perhaps I should have built it from scratch with gnu make. Anyway, I
hope I've found a few things that hopefully someone has some idea how
to fix!!!

Dave


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Another Solaris NTL problem

2008-06-04 Thread Dr. David Kirkby

I set up a Sun Ultra 60 for testing of sage and have mailed a couple
of people passwords. I just checked this, and found another issue with
NTL on the Ultra 60 which I did not notice on the Blade 2000.


It appears to fail with:

"make: Fatal error in reader: makefile, line 522: Macro assignment on
dependency line"

see below.

This happens with both /usr/ccs/bin/make and gnu make. Not sure how
this differrs much from the other Sun. As far as I know, they have the
same compilers and make programs!





x ntl-5.4.2.p3/src/src/RemoveProg, 51 bytes, 1 tape blocks
x ntl-5.4.2.p3/src/src/cfile, 15983 bytes, 32 tape blocks
x ntl-5.4.2.p3/src/src/CharPolyTest.c, 213 bytes, 1 tape blocks
x ntl-5.4.2.p3/src/src/pair_GF2EX_long.c, 385 bytes, 1 tape blocks
x ntl-5.4.2.p3/src/src/DispSettings.c, 2197 bytes, 5 tape blocks
x ntl-5.4.2.p3/src/src/pair_lzz_pX_long.c, 386 bytes, 1 tape blocks
Finished extraction

Host system
uname -a:
SunOS main-webserver 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-60


GCC Version
gcc -v
Reading specs from /opt/csw/gcc4/lib/gcc/sparc-sun-solaris2.8/4.0.2/
specs
Target: sparc-sun-solaris2.8
Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
--with-local-prefix=/opt/csw --without-gnu-as --with-as=/usr/ccs/bin/
as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --
enable-shared --enable-multilib --enable-nls --with-included-gettext --
with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-
system-zlib --enable-languages=c,c++,f95,java,objc,ada
Thread model: posix
gcc version 4.0.2

writing makefile
writing ../include/NTL/config.h
Building and install NTL
make: Fatal error in reader: makefile, line 522: Macro assignment on
dependency line
Current working directory /export/home0/mabshoff/sage-3.0.2/spkg/build/
ntl-5.4.2.p3/src/src
Error creating ntl shared library.

real0m0.307s
user0m0.122s
sys 0m0.171s
sage: An error occurred while installing ntl-5.4.2.p3
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /export/home0/mabshoff/sage-3.0.2/install.log.  Describe your
computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/export/home0/mabshoff/sage-3.0.2/spkg/build/ntl-5.4.2.p3 and type
'make'.
Instead type "/export/home0/mabshoff/sage-3.0.2/sage -sh"
in order to set all environment variables correctly, then cd to
/export/home0/mabshoff/sage-3.0.2/spkg/build/ntl-5.4.2.p3
(When you are done debugging, you can type "exit" to leave the
subshell.)
*** Error code 1
make: Fatal error: Command failed for target `installed/ntl-5.4.2.p3'
Current working directory /export/home0/mabshoff/sage-3.0.2/spkg

real26:55.5
user17:33.1
sys  2:34.1

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Dr. David Kirkby

On Jun 5, 12:36 am, Francois <[EMAIL PROTECTED]> wrote:

> Spot on Michael. gcc config is given at the beginning of the
> compilation and says: --without-gnu-ld --with-ld=/usr/ccs/bin/ld
>
> OK back to square one to put together a better patch.
> It's at time like this that you start wishing everything was
> auto/lib-tooled.
>
> Cheers,
> Francois

Feel free to log in and test your patch.


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Dr. David Kirkby



On Jun 5, 12:05 am, mabshoff <[EMAIL PROTECTED]> wrote:

> > g++ -I../include -I.  -O2 -g  -fPIC  -fPIC -shared -Wl,-soname,lib`cat
> > DIRNAME`.so -o lib`cat DIRNAME`.so FFT.o FacVec.o GF2.o GF2E.o GF2EX.o
> > GF2EXFactoring.o GF2X.o GF2X1.o GF2XFactoring.o GF2XVec.o GetTime.o
> > HNF.o ctools.o LLL.o LLL_FP.o LLL_QP.o LLL_RR.o LLL_XD.o RR.o
> > WordVector.o ZZ.o ZZVec.o ZZX.o ZZX1.o ZZXCharPoly.o ZZXFactoring.o
> > ZZ_p.o ZZ_pE.o ZZ_pEX.o ZZ_pEXFactoring.o ZZ_pX.o ZZ_pX1.o
> > ZZ_pXCharPoly.o ZZ_pXFactoring.o fileio.o lip.o lzz_p.o lzz_pE.o
> > lzz_pEX.o lzz_pEXFactoring.o lzz_pX.o lzz_pX1.o lzz_pXCharPoly.o
> > lzz_pXFactoring.o mat_GF2.o mat_GF2E.o mat_RR.o mat_ZZ.o mat_ZZ_p.o
> > mat_ZZ_pE.o mat_lzz_p.o mat_lzz_pE.o mat_poly_ZZ.o mat_poly_ZZ_p.o
> > mat_poly_lzz_p.o pair_GF2EX_long.o pair_GF2X_long.o pair_ZZX_long.o
> > pair_ZZ_pEX_long.o pair_ZZ_pX_long.o pair_lzz_pEX_long.o
> > pair_lzz_pX_long.o quad_float.o tools.o vec_GF2.o vec_GF2E.o
> > vec_GF2XVec.o vec_RR.o vec_ZZ.o vec_ZZVec.o vec_ZZ_p.o vec_ZZ_pE.o
> > vec_double.o vec_long.o vec_lzz_p.o vec_lzz_pE.o vec_quad_float.o
> > vec_vec_GF2.o vec_vec_GF2E.o vec_vec_RR.o vec_vec_ZZ.o vec_vec_ZZ_p.o
> > vec_vec_ZZ_pE.o vec_vec_long.o vec_vec_lzz_p.o vec_vec_lzz_pE.o
> > vec_xdouble.o xdouble.o G_LLL_FP.o G_LLL_QP.o G_LLL_XD.o G_LLL_RR.o
> > vec_ulong.o vec_vec_ulong.o -L/export/home/drkirkby/sage-3.0.2/local/
> > lib -lgmp
> > ld: warning: option -o appears more than once, first setting taken
> > ld: fatal: file libntl-5.4.2.so: unknown file type
> > ld: fatal: File processing errors. No output written to
>
> This rings a bell: Any chance your gcc was build using the Sun ld and
> not the GNU ld? I would change
>
>  -Wl,-soname,lib`cat  DIRNAME`.so -o lib`cat DIRNAME`.so
>
> to
>
>  -o libntl.so
>
> since the that does not work with the Sun ld IIRC.

Yes, it was built with Sun's linker, not GNU's. Both Sunfeeware and
Blastwave build it with that, and it's generally reckoned to work
better than with the GNU linker.

Hence it would be prefereable if you could avoid the GNU isms here.

It's 1:35 am here, and time I sent to bed, so I am not going to look
at this any more - time for bed. I doubt I'll get much chance tommorow
later today either, as I am going out for the day and night. (But will
have access via ssh during the day).

I've set up another Sun (dual processor U;tra 60) and have emailed
Francois some login details.

> By now I am
> actually thinking that we should not add "-Kl,-soname $FOO" & friends
> to the default makefiles since those are GNU ld specific.

GNU isms are the pain in the life of Solaris users!!!


Dave
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Francois



On Jun 5, 11:05 am, mabshoff <[EMAIL PROTECTED]> wrote:
> On Jun 5, 12:56 am, "Dr. David Kirkby" <[EMAIL PROTECTED]>
> wrote:
>
> > On Jun 4, 8:35 pm, mabshoff <[EMAIL PROTECTED]> wrote:
>
> 
>
> Hi David,
>
> > I don't believe the problem I was experiencing is anything to do with
> > the shell, or how it is called. As Is said, I'm not using csh or tcsh
> > as a login shell, but bash.
>
> Ok, but that bug also exists ;)
>

I am sure it does :)


> > ld: warning: option -o appears more than once, first setting taken
> > ld: fatal: file libntl-5.4.2.so: unknown file type
> > ld: fatal: File processing errors. No output written to
>
> This rings a bell: Any chance your gcc was build using the Sun ld and
> not the GNU ld? I would change
>
>  -Wl,-soname,lib`cat  DIRNAME`.so -o lib`cat DIRNAME`.so
>
> to
>
>  -o libntl.so
>
> since the that does not work with the Sun ld IIRC. By now I am
> actually thinking that we should not add "-Kl,-soname $FOO" & friends
> to the default makefiles since those are GNU ld specific.
>
Spot on Michael. gcc config is given at the beginning of the
compilation and says: --without-gnu-ld --with-ld=/usr/ccs/bin/ld

OK back to square one to put together a better patch.
It's at time like this that you start wishing everything was
auto/lib-tooled.

Cheers,
Francois

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: parent of component of CartesianProduct

2008-06-04 Thread Bill Page

On Wed, Jun 4, 2008 at 6:07 PM, William Stein wrote:
>
> On Wed, Jun 4, 2008 at 3:03 PM, Bill Page wrote:
>>
>> Is there any interest in also implementing the Co-product constructor?
>
> Yes.
>
>> What about Record and Union constructors?
>>
>
> I don't know what those are (at least what Record is).
>

Records and Unions are products and co-products with named projections
and injections. Records are like struct in C. Unions are sometimes
called "tagged-unions" but that suggests a particular implementation
detail rather than an essential feature. Union is also sometimes
called a "variant-record". But in my opinion the semantics is best
described in more categorical terms.

http://en.wikipedia.org/wiki/Record_(computer_science)
http://en.wikipedia.org/wiki/Coproduct
http://en.wikipedia.org/wiki/Product_(category_theory)

Regards,
Bill Page.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread mabshoff



On Jun 5, 12:56 am, "Dr. David Kirkby" <[EMAIL PROTECTED]>
wrote:
> On Jun 4, 8:35 pm, mabshoff <[EMAIL PROTECTED]> wrote:



Hi David,

> I don't believe the problem I was experiencing is anything to do with
> the shell, or how it is called. As Is said, I'm not using csh or tcsh
> as a login shell, but bash.

Ok, but that bug also exists ;)

> I believe Francois is much closer to the solution myself. I took out
> the test for SunOs, so do_make setup1, do_make setup2, do_make setup3
> and do_make setup4 were all run. i.e. I changed the do_tune() code to:
>
> do_tune()
> {
>     do_make setup1
>     do_make setup2
>     do_make setup3
>     do_make setup4
>
> }
>
> That works a LOT better, but it still fails to build, but that is a
> different issue. So I'm not convinced there is a need to exclude the
> setup routines on Solaris - whether they are useful or a waste of time
> is another matter, but they don't stop it building.
>
> I can't make any sence of the what is causing this to fail. The error
> message from the compiler says the -o option is given twice (which it
> is not)! It then says it does not know the file type for
> libntl-5.4.2.so. It seems to me the options to the compiler look
> sensible, so I don't understand its objection. It could be a compiler
> bug.
>
> Would anyone be in a better position to fix this if I made a Solaris
> (SPARC) machine available? This is my private machine and I don't wish
> to share it, but if it will be any help I could set up another SPARC
> with similar software on it.
>
> Dave



> g++ -I../include -I.  -O2 -g  -fPIC  -fPIC -shared -Wl,-soname,lib`cat
> DIRNAME`.so -o lib`cat DIRNAME`.so FFT.o FacVec.o GF2.o GF2E.o GF2EX.o
> GF2EXFactoring.o GF2X.o GF2X1.o GF2XFactoring.o GF2XVec.o GetTime.o
> HNF.o ctools.o LLL.o LLL_FP.o LLL_QP.o LLL_RR.o LLL_XD.o RR.o
> WordVector.o ZZ.o ZZVec.o ZZX.o ZZX1.o ZZXCharPoly.o ZZXFactoring.o
> ZZ_p.o ZZ_pE.o ZZ_pEX.o ZZ_pEXFactoring.o ZZ_pX.o ZZ_pX1.o
> ZZ_pXCharPoly.o ZZ_pXFactoring.o fileio.o lip.o lzz_p.o lzz_pE.o
> lzz_pEX.o lzz_pEXFactoring.o lzz_pX.o lzz_pX1.o lzz_pXCharPoly.o
> lzz_pXFactoring.o mat_GF2.o mat_GF2E.o mat_RR.o mat_ZZ.o mat_ZZ_p.o
> mat_ZZ_pE.o mat_lzz_p.o mat_lzz_pE.o mat_poly_ZZ.o mat_poly_ZZ_p.o
> mat_poly_lzz_p.o pair_GF2EX_long.o pair_GF2X_long.o pair_ZZX_long.o
> pair_ZZ_pEX_long.o pair_ZZ_pX_long.o pair_lzz_pEX_long.o
> pair_lzz_pX_long.o quad_float.o tools.o vec_GF2.o vec_GF2E.o
> vec_GF2XVec.o vec_RR.o vec_ZZ.o vec_ZZVec.o vec_ZZ_p.o vec_ZZ_pE.o
> vec_double.o vec_long.o vec_lzz_p.o vec_lzz_pE.o vec_quad_float.o
> vec_vec_GF2.o vec_vec_GF2E.o vec_vec_RR.o vec_vec_ZZ.o vec_vec_ZZ_p.o
> vec_vec_ZZ_pE.o vec_vec_long.o vec_vec_lzz_p.o vec_vec_lzz_pE.o
> vec_xdouble.o xdouble.o G_LLL_FP.o G_LLL_QP.o G_LLL_XD.o G_LLL_RR.o
> vec_ulong.o vec_vec_ulong.o -L/export/home/drkirkby/sage-3.0.2/local/
> lib -lgmp
> ld: warning: option -o appears more than once, first setting taken
> ld: fatal: file libntl-5.4.2.so: unknown file type
> ld: fatal: File processing errors. No output written to

This rings a bell: Any chance your gcc was build using the Sun ld and
not the GNU ld? I would change

 -Wl,-soname,lib`cat  DIRNAME`.so -o lib`cat DIRNAME`.so

to

 -o libntl.so

since the that does not work with the Sun ld IIRC. By now I am
actually thinking that we should not add "-Kl,-soname $FOO" & friends
to the default makefiles since those are GNU ld specific.



Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Dr. David Kirkby



On Jun 4, 8:35 pm, mabshoff <[EMAIL PROTECTED]> wrote:
> On Jun 4, 9:30 pm, Francois <[EMAIL PROTECTED]> wrote:
>
> > On Jun 5, 1:10 am, mabshoff <[EMAIL PROTECTED]> wrote:
>
> 
>
> > > gmp_aux.h exists without the tuning, but I am not sure why we skip the
> > > tuning on Solaris. I will certainly see if I cannot reactivate that.
> > > As I mentioned in the other email when you use a csh as login shell
> > > the current build does not work. I believe it is due to some scripts
> > > being called from the makefile as
>
> > >   sh foo
>
> > > while foo does not have a shebang. Then things seem to also go bad on
> > > Linux for example, so this is not a Solaris specific problem, but
> > > shell related. I have build the NTL.spkg numerous times on Solaris
> > > with either a sh or bash login shell, so it does work some times ;)
>
> Hi Francois,
>
> > Could be a contributin factor.
>
> Probably since I have had it reported to me off list on a Linux box.
>
> > However before the mfile patch from
> > Tim and I, the call to "make lib" was calling "make setup1" to "make
> > setup3"
> > a behavior we didn't reproduce in our target. So if you have an older
> > sage
> > setup3 would be called anyway but not in a recent one.
> > I also checked the spkg (and the upstream tarball) gmp_aux.h is
> > definitely not there.
> > Technically the tunning is setup4 so yes it would exist without the
> > tunning :)
> > In retrospect we should probably should have included some
> > of those make setup calls in our patch.
>
> I am 100% certain that the NTL.spkg as is can be build on Solaris
> because I have build this spkg and its predecessors dozens of times on
> Solaris 9 and 10 in all kinds of configurations. Obviously there is a
> bug or two in here, but it isn't the setup routines that are at fault
> here.
>
> > Francois
>
> Cheers,
>
> Michael


I don't believe the problem I was experiencing is anything to do with
the shell, or how it is called. As Is said, I'm not using csh or tcsh
as a login shell, but bash.

I believe Francois is much closer to the solution myself. I took out
the test for SunOs, so do_make setup1, do_make setup2, do_make setup3
and do_make setup4 were all run. i.e. I changed the do_tune() code to:



do_tune()
{
do_make setup1
do_make setup2
do_make setup3
do_make setup4
}

That works a LOT better, but it still fails to build, but that is a
different issue. So I'm not convinced there is a need to exclude the
setup routines on Solaris - whether they are useful or a waste of time
is another matter, but they don't stop it building.

I can't make any sence of the what is causing this to fail. The error
message from the compiler says the -o option is given twice (which it
is not)! It then says it does not know the file type for
libntl-5.4.2.so. It seems to me the options to the compiler look
sensible, so I don't understand its objection. It could be a compiler
bug.

Would anyone be in a better position to fix this if I made a Solaris
(SPARC) machine available? This is my private machine and I don't wish
to share it, but if it will be any help I could set up another SPARC
with similar software on it.


Dave

[EMAIL PROTECTED]:[~/sage-3.0.2] $ make
cd spkg && ./install all 2>&1 | tee -a ../install.log
make[1]: Entering directory `/export/home/drkirkby/sage-3.0.2/spkg'
sage-spkg ntl-5.4.2.p3 2>&1
You must set the SAGE_ROOT environment variable or
run this script from the SAGE_ROOT or
SAGE_ROOT/local/bin/ directory.
ntl-5.4.2.p3
Machine:
SunOS kestrel 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000
Deleting directories from past builds of previous/current versions of
ntl-5.4.2.p3
Extracting package /export/home/drkirkby/sage-3.0.2/spkg/standard/
ntl-5.4.2.p3.spkg ...
-rw-r--r--   1 drkirkby animals   573992 Jun  4 23:10 /export/home/
drkirkby/sage-3.0.2/spkg/standard/ntl-5.4.2.p3.spkg
x ntl-5.4.2.p3, 0 bytes, 0 tape blocks
x ntl-5.4.2.p3/.hgignore, 4 bytes, 1 tape blocks

x ntl-5.4.2.p3/src/src/DispSettings.c, 2197 bytes, 5 tape blocks
x ntl-5.4.2.p3/src/src/pair_lzz_pX_long.c, 386 bytes, 1 tape blocks
Finished extraction

Host system
uname -a:
SunOS kestrel 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000


GCC Version
gcc -v
Reading specs from /usr/local/opt/csw/gcc4/bin/../lib/gcc/sparc-sun-
solaris2.8/4.0.2/specs
Target: sparc-sun-solaris2.8
Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
--with-local-prefix=/opt/csw --without-gnu-as --with-as=/usr/ccs/bin/
as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --
enable-shared --enable-multilib --enable-nls --with-included-gettext --
with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-
system-zlib --enable-languages=c,c++,f95,java,objc,ada
Thread model: posix
gcc version 4.0.2
*

[sage-devel] Re: parent of component of CartesianProduct

2008-06-04 Thread Mike Hansen

>>
>> Notice that the parent of t[1] is incorrect in the 2nd case.
>
> This is a bug.   I've opened a ticket here:
>
>http://trac.sagemath.org/sage_trac/ticket/3368
>
> and assigned it to Mike Hansen :-)

This was never the intended functionality of CartesianProduct? -- it
is different than the CartesianProduct? of Magma. It was mainly
intended to iterator over the cartesian product of a bunch of
iterables in Python. Maybe the name should be changed.

--Mike

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: new website

2008-06-04 Thread Harald Schilly

Thanks, just went through your remarks, very good comments. I used
about 90% of them ...

On Jun 4, 8:19 pm, David Harvey <[EMAIL PROTECTED]> wrote:
> On the main page, why not put the mission *first*, and then  
> afterwards put "Sage is..."

This "first page first sentence problem" will never be solved.
Personally, I finally know how I like it, but I'm open for any input.
IMHO the definition is more important and don't forget,
overemphasizing an already very strong statement looks "amateurish" ;)

>
> Also, under "Library", I don't know what "works" means.

This was already a problem mentioned somewhere else. Very interesting.
I looked it up in a dictionary and it is the correct translation.
Maybe it is used differently? Or is the word "workings" better? You
used it in "...and the previous (and ongoing) work of many authors of
included components". I think, in German it has a broader meaning but
is still the same word.
What I mean is written (digital) text that has been done for, about
and with Sage excluding development (howto's, papers, examples, ...) -
> that ends up in a collection, called library.

H
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: parent of component of CartesianProduct

2008-06-04 Thread William Stein

On Wed, Jun 4, 2008 at 3:03 PM, Bill Page <[EMAIL PROTECTED]> wrote:
>
> In: http://modular.math.washington.edu/msri06/work/kohel/msri_magma.pdf
>
>  "A Brief Magma Tutorial" by David R. Kohel gives this example:
>
> --
>
> The parent structure of a tuple is more important than in the case
> of sequences or sets.
>> C := CartesianProduct(Integers(),RationalField());
>> t := C!<1,1>;
>> Parent(t[2]);
> Rational Field
>
> --
>
> The analogous computation in Sage 3.0.2 yields:
>
> sage: C = CartesianProduct(Integers(),RationalField())
>
> # case 1
> sage: t=C([1,1/2])
> sage: parent(t[0])
> Integer Ring
> sage: parent(t[1])
> Rational Field
>
> # case 2
> sage: t=C([1,1])
> sage: parent(t[0])
> Integer Ring
> sage: parent(t[1])
> Integer Ring
>
> -
>
> Notice that the parent of t[1] is incorrect in the 2nd case.

This is a bug.   I've opened a ticket here:

http://trac.sagemath.org/sage_trac/ticket/3368

and assigned it to Mike Hansen :-)

>
> Is there any interest in also implementing the Co-product constructor?

Yes.

> What about Record and Union constructors?
>

I don't know what those are (at least what Record is).

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] parent of component of CartesianProduct

2008-06-04 Thread Bill Page

In: http://modular.math.washington.edu/msri06/work/kohel/msri_magma.pdf

 "A Brief Magma Tutorial" by David R. Kohel gives this example:

--

The parent structure of a tuple is more important than in the case
of sequences or sets.
> C := CartesianProduct(Integers(),RationalField());
> t := C!<1,1>;
> Parent(t[2]);
Rational Field

--

The analogous computation in Sage 3.0.2 yields:

sage: C = CartesianProduct(Integers(),RationalField())

# case 1
sage: t=C([1,1/2])
sage: parent(t[0])
Integer Ring
sage: parent(t[1])
Rational Field

# case 2
sage: t=C([1,1])
sage: parent(t[0])
Integer Ring
sage: parent(t[1])
Integer Ring

-

Notice that the parent of t[1] is incorrect in the 2nd case.

Is there any interest in also implementing the Co-product constructor?
What about Record and Union constructors?

Regards,
Bill Page.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread mabshoff



On Jun 4, 9:39 pm, Robert Bradshaw <[EMAIL PROTECTED]>
wrote:
> On Jun 4, 2008, at 9:02 AM, mabshoff wrote:



> > Aside from that it would be good with somebody with deeper Solaris-
> > internals fu than me could enlighten me if /dev/random is the
> > preferred source of randomness. On linux at least /dev/urandom is
> > supposed to be a "better" source of entropy, but I could be wrong
> > about that.

Hi Robert,

> /dev/urandom is not as good a source of entropy in the sense that is  
> is a pseudo-random number generator (as opposed to /dev/random which  
> will block until more "true" entropy is fed into it. If all you need  
> is pseduo-randomness, then /dev/urandom is find and fast, but for  
> cryptographic algorithms may not be as secure. In our case (for  
> session keys) it should be fine, but it'd be bad to use for public  
> key generation.

I agree with you and thanks for clearing that up since I was wrong.

Anyway, as it turned out the non-secure notebook has another problem



**
* Open your web browser to http://localhost:8000 *
**

^Cselect() error: Interrupted system call

That box has some odd network issues, so it might be totally unrelated
to /dev/random. I will test on a machine without such a restricted
network and see if that improves the problem. I mentioned in IRC that
the problem was solved, but as it turned out I was wrong since the
default mode of the notebook changed from SSL to insecure :(

You win some, you lose some.

Cheers,

Michael

> - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread Robert Bradshaw

On Jun 4, 2008, at 9:02 AM, mabshoff wrote:

> On Jun 4, 5:29 pm, Martin Albrecht <[EMAIL PROTECTED]>
> wrote:
>> On Wednesday 04 June 2008, mabshoff wrote:
>
> 
>
>>> Yes, what could go wrong? ;)
>>
>>> Seriously: What I meant above is that we ought to see on Solaris  
>>> only
>>> if switching to /dev/urandom as an entropy source does fix the
>>> infinite startup time of the notebook. I had similar problems  
>>> with the
>>> Sage notebook with the 64 bit OSX version initially due a non- 
>>> compiled
>>> _ctypes extension, but in that case it failed outright. I am well
>>> aware of the dangers of hacking on the random source for  
>>> anything, but
>>> I promise that I will use more than PID to seed ;)
>
> Hi Martin,
>
>> Still, make sure you get absolutely crystal clear confirmation  
>> from upstream
>> that what you're doing is tolerable. Anything else is not  
>> acceptable IMHO.
>
> certainly, I don't want to be the idiot that weeks after the OpenSSL
> +Debian debacle does something equally stupid and hence will be know
> in Slashdot lore as "that GNUTLS idiot" ;). It might in the end be a
> config problem since on Solaris with Sage 3.0.1 upon the start of sage
> the process just sits there polling /dev/random for well over two
> minutes and nothing happens, i.e. I always killed it. I will now let
> it sit there for a while and see if it comes up. Aside from that there
> is a problem on that box due to some background jobs being way too
> high in priority so that I only get a small default slice of the CPU.
> I will pause the background processes now and see if that makes a
> difference.
>
> Aside from that it would be good with somebody with deeper Solaris-
> internals fu than me could enlighten me if /dev/random is the
> preferred source of randomness. On linux at least /dev/urandom is
> supposed to be a "better" source of entropy, but I could be wrong
> about that.

/dev/urandom is not as good a source of entropy in the sense that is  
is a pseudo-random number generator (as opposed to /dev/random which  
will block until more "true" entropy is fed into it. If all you need  
is pseduo-randomness, then /dev/urandom is find and fast, but for  
cryptographic algorithms may not be as secure. In our case (for  
session keys) it should be fine, but it'd be bad to use for public  
key generation.

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread mabshoff



On Jun 4, 9:30 pm, Francois <[EMAIL PROTECTED]> wrote:
> On Jun 5, 1:10 am, mabshoff <[EMAIL PROTECTED]> wrote:



> > gmp_aux.h exists without the tuning, but I am not sure why we skip the
> > tuning on Solaris. I will certainly see if I cannot reactivate that.
> > As I mentioned in the other email when you use a csh as login shell
> > the current build does not work. I believe it is due to some scripts
> > being called from the makefile as
>
> >   sh foo
>
> > while foo does not have a shebang. Then things seem to also go bad on
> > Linux for example, so this is not a Solaris specific problem, but
> > shell related. I have build the NTL.spkg numerous times on Solaris
> > with either a sh or bash login shell, so it does work some times ;)

Hi Francois,

> Could be a contributin factor.

Probably since I have had it reported to me off list on a Linux box.

> However before the mfile patch from
> Tim and I, the call to "make lib" was calling "make setup1" to "make
> setup3"
> a behavior we didn't reproduce in our target. So if you have an older
> sage
> setup3 would be called anyway but not in a recent one.
> I also checked the spkg (and the upstream tarball) gmp_aux.h is
> definitely not there.
> Technically the tunning is setup4 so yes it would exist without the
> tunning :)
> In retrospect we should probably should have included some
> of those make setup calls in our patch.

I am 100% certain that the NTL.spkg as is can be build on Solaris
because I have build this spkg and its predecessors dozens of times on
Solaris 9 and 10 in all kinds of configurations. Obviously there is a
bug or two in here, but it isn't the setup routines that are at fault
here.

> Francois

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Francois



On Jun 5, 1:10 am, mabshoff <[EMAIL PROTECTED]> wrote:
> On Jun 4, 2:56 pm, Francois <[EMAIL PROTECTED]> wrote:
> 
>
>
>
> > Hi,
>
> Hi Francois,
>
> > It looks like gmp_aux.h is generated during "make setup3" which is
> > completely skipped on sun, from the skpg-install script:
> > do_tune()
> > {
> > if [ $UNAME = "SunOS" ]; then
> > return
> > fi
> > do_make setup1
> > do_make setup2
> > do_make setup3
> > do_make setup4}
>
> > -
> > May be you could try to insert "do_make setup3" before ...
>
> gmp_aux.h exists without the tuning, but I am not sure why we skip the
> tuning on Solaris. I will certainly see if I cannot reactivate that.
> As I mentioned in the other email when you use a csh as login shell
> the current build does not work. I believe it is due to some scripts
> being called from the makefile as
>
>   sh foo
>
> while foo does not have a shebang. Then things seem to also go bad on
> Linux for example, so this is not a Solaris specific problem, but
> shell related. I have build the NTL.spkg numerous times on Solaris
> with either a sh or bash login shell, so it does work some times ;)
>
Could be a contributin factor. However before the mfile patch from
Tim and I, the call to "make lib" was calling "make setup1" to "make
setup3"
a behavior we didn't reproduce in our target. So if you have an older
sage
setup3 would be called anyway but not in a recent one.
I also checked the spkg (and the upstream tarball) gmp_aux.h is
definitely not there.
Technically the tunning is setup4 so yes it would exist without the
tunning :)
In retrospect we should probably should have included some
of those make setup calls in our patch.

Francois
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: new website

2008-06-04 Thread David Harvey

On the main page, why not put the mission *first*, and then  
afterwards put "Sage is..."

Also, under "Library", I don't know what "works" means. Maybe that  
"works" in deutsch, but it doesn't work in english :-). Do you mean  
like projects that use Sage, or tools built on top of Sage, or  
something along those lines?

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: new website

2008-06-04 Thread David Harvey
Some more.

"Development" page:

"The proclaimed mission is" => "Our mission is"

Let's be consistent with "create" vs "creating". It's different here  
from the main page. I think "creating" is better.

In the enumerated list, I would prefer n-dashes (–) instead of  
hyphens.

"There is the IRC channel" => "There is an IRC channel"

"Sage uses several techniques to continually improve overall software  
quality:" => "We take code quality seriously:"

On the search page, I find the list of examples a bit confusing. It  
looks like a list of headings for different types of searches you can  
perform.

"Acknowledgements" page:

"Developing Sage benefited from financial support of numerous  
institutions and the work of many developers of included components."  
=> "Sage development has benefited from the financial support of  
numerous institutions, and the previous (and ongoing) work of many  
authors of included components".

"Acknowledgment for Supporting Sage" sound weird to me.

"Financial and Infrastructure Support" => "Financial and  
infrastructure support". I'm not sure if infrastructure is the right  
word. Can't quite think of the right word now. Maybe "material". Not  
sure.

Map:

"Sage Developers around the World" => "Sage Developers around the  
world", or even "Sage developers around the world"

Back to the main page:

"search Sage related websites" => "search Sage-related websites"

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: 3 == pi

2008-06-04 Thread Robert Bradshaw

On Jun 4, 2008, at 8:40 AM, Dan Christensen wrote:

>
> "William Stein" <[EMAIL PROTECTED]> writes:
>
>> Sage Enhancement Proposal: Change comparisons that involve
>> elements of the symbolic ring to return True or False if both sides
>> of the symbolic comparison are constants and the comparison can
>> be definitely determined.
>
> I'm not sure what symbolic equations are currently used for,

Stuff like

sage: solve(x^2 == 5)
[x == -sqrt(5), x == sqrt(5)]

> but
> this kind of special casing can cause problems.  If I'm building
> up an equation using inputs that I don't control, my code may
> have unexpected problems if what it thinks is a symbolic equation
> turns into a boolean.

I agree, think we should either always (my preference) or never  
return a symbolic equation. "Can be definitely determined" could be  
expensive too.

> Maybe the heart of the matter is that we need a separate notation
> for symbolic equations vs. comparison.  E.g.
>
> sage: 3 == pi
> False
>
> sage: 3 === pi
> 3 === pi
>
> sage: 1.2 == 1.3
> False
>
> sage: 1.2 === 1.3
> 1.2 === 1.3
>
> Note that this gives you the ability to have symbolic equations
> when the components happen to not be symbolic.  (Does this even
> make sense given the current set-up?)
>
> I'm not sure what to do if the user requests a comparison that
> sage can't easily determine:
>
> sage: sqrt(3) + sqrt(8) == sqrt(5) + pi
>
> One idea would be to return a symbolic equation
>
>   sqrt(3) + sqrt(8) === sqrt(5) + pi
>
> but probably the best is to raise an exception:  if my code is
> expecting a boolean, then a symbolic equation may confuse it.
>
> So my SEP would be that == always returns a boolean or raises
> an exception, and === always returns a symbolic equation.
>
> The notation === is of course a topic for discussion.  If ===
> is chosen, it would have to use the pre-processor.  Is there
> another operator that would make sense?

This was actually one of the original proposals. One would also have  
to come up with operators for <, <=, >=, >, and !=. Also, in the  
current system, it is easy to do

sage: bool(3 == pi)
False
sage: if 3 == pi:
 print "bad"
:
sage:


- Robert

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] new website

2008-06-04 Thread David Harvey
nitpicking issues. (some are more subjective than others, feel  
free to ignore any of the suggestions below)

main page:

"Python based" => "Python-based"

Next to the download button, shouldn't be a space between "3.0.2" and  
the comma; and I don't see the need for a colon after "Version"

inconsistent capitalisation: "Quickstart - Research - Education" are  
capitalised, "documentation - support - references" are not

Download page:

"hardware platforms" => "hardware"

"announcement newsletter" => "mailing list"

[I don't think the subscribe box/button should be on that page. It  
clutters it up unnecessarily.]

Beneath "Microsoft Windows", might as well get rid of "VMWare Image".  
That's unnecessary. The process is described on the right.

"read additional instructions here" => "read these additional  
instructions"

"It is currently" => "There is currently"

"native port to" => "native port for"

"Efforts are undertaken to make a native port possible" => "We are  
currently working on a native port". [Perhaps provide a link to the  
wiki page where mabshoff is coordinating efforts for this]

"The current VMWare Image is available and provides you with an  
encapsulated and solid tested system. It contains everything and  
needs nearly no configuration." This sounds weird to me. Perhaps it  
should be a separate paragraph before the one about the native port.  
Or perhaps it shouldn't exist at all.

Under "Linux":

"by right click" => "by right clicking"

"Meanwhile, there are binary builds available" => "Binary builds are  
available".

"distribution specific" => "distribution-specific"

"Efforts are currently done for" => "Progress is being made for"

Under "source":

"complete source of Sage" => "complete source for Sage"

"It ships together with everything it needs to compile itself and  
also provides all bits and pieces to develop Sage. This includes the  
source code of Sage, all dependencies including Python and the  
complete changelog in a mercurial repository." can be simplified. How  
about just: "It ships with all dependencies including Python and the  
complete changelog in a Mercurial repository."

"read the installation guide" => "read the installation guide."

"a copy of Sage on DVD" => "a copy of Sage on DVD."

Going back up to the Linux section, for consistency, the first line  
should be a link "download Linux binaries".

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread Robert Bradshaw

On Jun 4, 2008, at 4:07 AM, Bill Page wrote:

> Robert,
>
> Thanks for the elaboration. I hope that this follow-up is not too far
> off topic and I don't want to distract you (or any of the Sage
> developers) from your main tasks. I wrote this mostly as notes and
> questions to myself  - but if you or anyone else have some time or the
> inclination to correct or comment as time permits, that would be
> great.

I'm sure a lot of other people have similar questions, and it will be  
good to put it down in writing.

>
> On Tue, Jun 3, 2008 at 10:04 PM, Robert Bradshaw wrote:
>>
>> On Jun 3, 2008, at 4:50 PM, Bill Page wrote:
>>
>>> How does it [categories in Sage] relate to the
>>> concept of "parent" - which seems equally ill-defined to me?
>>
>> A Parent is an Object in the category of Sets, though in the context
>> of coercion one usually assumes one can some kind of arithmetic
>> (binary operations) on their elements.
>> ...
>> On Jun 3, 2008, at 7:11 PM, David Harvey wrote:
>> ...
>>> Don't you mean to say something more like "a parent is an object
>>> of a concrete category", i.e. a category C with a faithful functor
>>> f : C -> Set, such that the "elements" (as understood by Sage) of
>>> the parent P are exactly the elements of f(P)?
>
> Ok (and thanks also for the clarification, David). There are of course
> two different uses of "object" here: 1) object of some category, 2)
> Python object. All Python objects have a 'type', i.e. belong to some
> Python class.
>
> So in Sage 3.0.2 I observe for example:
>
> sage: type(1)
> 
> sage: parent(1)
> Integer Ring
> sage: type(parent(1))
> 
> sage: category(parent(1))
> Category of rings
> sage: type(category(parent(1)))
> 
>
> and
>
> sage: type(1.0)
> 
> sage: parent(1.0)
> Real Field with 53 bits of precision
> sage: type(parent(1.0))
> 
> sage: category(parent(1.0))
> Category of fields
> sage: type(category(parent(1.0)))
> 
>
> These seem consistent to me, albeit rather complex. However I am not
> sure I understand the following:
>
> sage: parent(IntegerRing())
> 
> sage: parent(RealField())
> 
>
> Could you explain why the parent of an object of some category is a  
> type?

David's explanation of this is right on. We need parent() to work in  
some sensible way on non-Elements (e.g. Python ints, objects from  
outside Sage) to be able do some kind of coercion reasoning on them.  
Python is a dynamically typed language, ever object has a type.

>
>>
>>> What is the relationship to inheritance in Python? Is the intention
>>> to give all mathematical objects defined in Sage some categorical
>>> structure? What about categories themselves as mathematical
>>> structures - e.g. a category is a kind of directed graph with  
>>> additional
>>> structure?
>>
>> A big push of this model is to divorce the relationship between
>> inheritance (which primarily has to do with implementation) and
>> mathematical categorization.
>
> At first blush it still seems strange to me to distinguish between the
> parent of an object and the type of an object. The instances of a type
> are often considered elements. Is the invention of 'parent' in Sage
> due to some inherent limitation of Python classes? Do you really want
> to say more abstractly that a certain type *represents* a certain
> parent? E.g. Does 'sage.rings.real_mpfr.RealNumber' represent
> 'RealField()'? Can there be other representations of 'RealField()' in
> Sage? How can I find out for example if 'sage.rings.integer.Integer'
> represents 'IntegerRing()'?

One should think of the type of an object as what specifies its  
implementation (including its internal representation). In this sense  
it is like a class in Java, C++, or any other programming language.  
(In Python there is a subtle (and mostly historical) difference  
between types and classes depending on whether or not it's written in  
C, but for the most part they can be used interchangeably). Python  
has multiple inheritance, but Cython does not (the C format of a  
compiled Python class is a C struct, so this is not so much a Cython  
limitation as a Python/C API limitation.)

Most of the time there is a 1-to-1 correspondence between Parents and  
the types of its Elements. For example, and element of the Parent RR  
(= RealField(53) is represented by sage.rings.real_mpfr.RealNumber.  
If I do RR(3) I get back an object of type  
sage.rings.real_mpfr.RealNumber representing the floating point  
number 3 to 53 bits of precision, and it's Parent is RR. RealField 
(100) is a new Parent, whose elements are again of type  
sage.rings.real_mpfr.RealNumber but to 100 bits of precision.

Sometimes, however, the same type is used for multiple parents. There  
are several integer mod types (depending on whether or not the  
modulus fits in a single word) and they are used for both generic Z/ 
nZ and prime-order finite fields. Thus we have

sage: [type(mod(-1, 100^k)) for k in [2..5]]
[,
  ,
  ,
  ]

sage: [parent(mod(-1, 100^k)) for k in [2..5]]
[Ring of i

[sage-devel] Re: New Sage website

2008-06-04 Thread David Harvey

Everyone keeps saying they don't like the blue.

Well, I *do* like the blue!

Just my 2 cents :-)

david

On Jun 4, 2008, at 1:40 PM, Clement Pernet wrote:

>
> First, I really think this web site looks much better, and mature.  
> Great
> job!
> I asked my roomate, Alan,  to review it, since he's quite a bit  
> into web
> app. development. Here are his comments:
>
> "
> * in general: less pages, dont hide things 3 pages deep. everything on
> the site  could be edited down to 5 or 6 pages.
>
> * "you can try Sage online here" should be either the first or second
> thing on the page. this is a major hook.
>
> * the blurb and links in the feature tour page should be on the first
> page  above the icons.
>
> * search box should be on first page. get rid of separate pages.
>
> * therefore, the number of buttons reduces to 4
>
> * rss feed should have _orange_ rss icon (people looking for RRS link
> get are looking for something orange)
>
> * put the "try sage online" link in the download section too
>
> * remove second level of navigation tabs. no one expects these to be
> there. instead, put all the content in the separate sub-pages in one
> page under their own headings.
>
> * "links" pages have no context. put links where they belong. if  
> its to
> packages you use, put them under a "packages we use" heading in
> development section or sometime
> "
>
> My 2 cents to the discussion are:
> * the blue is too blue (already said),
> * in the download section: the left column is way too large ; I would
> visually prefer a 1/3 2/3 proportion.
>
> Maybe some of these comments would involve too deep modifications  
> to be
> taken into account, but I hope it will still be of any help.
>
> Cheers,
>
> Clément
>
> >


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: New Sage website

2008-06-04 Thread Clement Pernet

First, I really think this web site looks much better, and mature. Great
job!
I asked my roomate, Alan,  to review it, since he's quite a bit into web
app. development. Here are his comments:

"
* in general: less pages, dont hide things 3 pages deep. everything on
the site  could be edited down to 5 or 6 pages.

* "you can try Sage online here" should be either the first or second
thing on the page. this is a major hook.

* the blurb and links in the feature tour page should be on the first
page  above the icons.

* search box should be on first page. get rid of separate pages.

* therefore, the number of buttons reduces to 4

* rss feed should have _orange_ rss icon (people looking for RRS link
get are looking for something orange)

* put the "try sage online" link in the download section too

* remove second level of navigation tabs. no one expects these to be
there. instead, put all the content in the separate sub-pages in one
page under their own headings.

* "links" pages have no context. put links where they belong. if its to
packages you use, put them under a "packages we use" heading in
development section or sometime
"

My 2 cents to the discussion are:
* the blue is too blue (already said),
* in the download section: the left column is way too large ; I would
visually prefer a 1/3 2/3 proportion.

Maybe some of these comments would involve too deep modifications to be
taken into account, but I hope it will still be of any help.

Cheers,

Clément

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Some implementation questions (Re: sage, s-integral points, diploma thesis)

2008-06-04 Thread John Cremona

Dear Michael,

I am glad that you have made some progress.

I am copying this to sage-devel since the questions you ask are about
how to use Sage and not about this particular problem (which is to
compute integral points on elliptic curves, if anyone on sage-devel is
reading this).

2008/6/4 Michael Mardaus <[EMAIL PROTECTED]>:
> Dear John Cremona,
>
> the last weeks we were working on  the integral point computation over Q.
> After some basic problems of how to code in sage we decided to write a
> python file which uses sage via
>>from sage.all import *
> It seems like it is not the best solution because while testing the code
> we get a numerical overflow from python (at approx. 1e308 which isn't a
> problem in sage)
> How can we solve this problem? Can we force sage to run the .py file
> without python? (We also have to use ** instead of ^)

Why don't you give your file a .sage extension and load it from Sage?
Upi still have access to all of Python.  I cannot think of a reason
why doing what you are trying would be better.

> Another question is how to realize that our functionality is a built in
> function which can be accesed by .-opertator (e.g.
> E.integral_points(...) with E an elliptic Curve)
>

For that the simplest way is to insert your code into the class
definition of ell_rational_field in the Sage source tree (which
conatins .py files so you would need ** and not ^ etc).  I think there
might be another way to do it but since we want your code to be part
of Sage when it is fully writtemn and tested, and that is where it
will go, you might as well put it tere right away.

I hope this helps.  I suggest that any Sage questions you have are
asked via sage-devel, and mathematical questions about the algorithms
can be sent just to me.

> At the moment we insert the LLL-trick as last step.
> After that we are planning to test our algorithm and insert
> error-handling where it is missing.
>

Good.  Keep a list of good test cases, since it will be a requirement
before your code is incorporated into Sage the the functions are folly
documented with docstrings and doctests.

John

>
> Best wishes
> Michael & Tobias
>
>
> John Cremona schrieb:
>> Dear Michael and Tobias,
>>
>> That is a good plan.  I also think you should divide up your
>> implementation over Q into two stages:  integral points, and then
>> S-integral points.  The latter is definitely harder than the former.
>>
>> For other reading:   you should definitely look at the thesis of
>> Emmannuel Herrmann.  I have not read it since my German is weak, but I
>> suspect that will not be a problem for you!  He is the person who
>> implemented this (over Q) in Magma.  Secondly, over number fields
>> there is a paper by N.P.Smart which should be useful.  He also wrote a
>> book (called something like "A cookbook of methods for solving
>> Diophantine equations" - not his book on elliptic curve cryptogaphy!)
>> and I seem to remember that has a chapter on this, but I might be
>> wrong.  (Sorry: I am on leave this year and do not have access to most
>> of my books).
>>
>> I hope this helps.  I look forward to hearing how you get on.
>>
>> John Cremona
>>
>> 2008/4/23 Michael Mardaus <[EMAIL PROTECTED]>:
>>
>>> Dear John Cremona,
>>>
>>>   Mr. Mueller-Stach forwarded your email concerning the sage
>>>   s-integral point project.
>>>   After a meeting last week with Mr. Mueller-Stach, we decided to
>>>   first contact you and then start programming.
>>>   So far we would start with the implementation of the algorithms
>>>   presented by H.Cohen in his Book "Number Theory Vol.I Tools and
>>>   Dioph. Eq." and the paper written by Pethö.
>>>   After that, we hope it will work, we would go on with number fields.
>>>   What do you think about this plan? Do you recommend some other
>>>   papers?
>>>
>>>   Thank you for offering your assistance.
>>>   (We think there will be some questions ;) )
>>>
>>>  Best wishes
>>>  Michael and Tobias
>>>  --
>>>  Michael Mardaus
>>>  mailto:[EMAIL PROTECTED]
>>>
>>>  Tobias Nagel
>>>  mailto:[EMAIL PROTECTED]
>>>
>>>
>>>   Original Message 
>>>  Subject: Re: Projects
>>>  Date: Thu, 17 Apr 2008 09:59:09 +0200
>>>  From: John Cremona <[EMAIL PROTECTED]>
>>>  To: Mueller-Stach, Prof. Dr. Stefan <[EMAIL PROTECTED]>
>>>  CC: William Stein <[EMAIL PROTECTED]>
>>>
>>>  [I am CC'ing William since it was nto clear that your email went to him
>>>  too.]
>>>
>>>  This is great news.  No-one else is doing this and so -- as far as I
>>>  am concerned -- the problem is duly "reserved" for your students.
>>>
>>>  I would be happy for the students to ask me questions as they do this,
>>>  though I will not necessarily know the answers!
>>>
>>>  Best wishes,
>>>
>>>  John
>>>
>>>  2008/4/16 SMS <[EMAIL PROTECTED]>:
>>>  > Dear John, dear William,
>>>  >
>>>  >   you suggested to write code for students for S-integral points with
>>>  >  the algorithm outlined above mainly by John.
>>>  >  The two students I mentioned (

[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Dr. David Kirkby

> Hi Dave,
>
> I know one issue with NTL that pops up when people use either csh or
> tcsh as a login shell and I got a likely fix that will be in Sage
> 3.0.3.
>
> 
>
> Cheers,
>
> Michael

It's not that

[EMAIL PROTECTED]:[~] $ grep drkirkby /etc/passwd
drkirkby:x:100:100::/export/home/drkirkby:/bin/bash

It looks more like the thing Francois said, although I have not
checked it.



--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread Robert Bradshaw

On Jun 4, 2008, at 1:32 AM, John Cremona wrote:

> 2008/6/4 Robert Bradshaw <[EMAIL PROTECTED]>:
>
>> But right now we've already got enough on our plate trying to get the
>> changes we have pushed through. (Any help on this front would be
>> greatly appreciated.)
>
> Robert,
>
> Can you be more specific about how others can help with this?

Sure. Currently we've made all the underlying changes, and we're in  
the process of fixing doctests (mostly they're things like typos/ 
unimplemented functionality rather than deep mathematical  
peculiarities). The way to get started is:

- Download and build Sage 2.10.1  http://sagemath.org/dist/src/ 
sage-2.10.1.tar
- Install the latest Cython   http://sage.math.washington.edu/home/ 
robertwb/cython/cython-0.9.6.14.p1.spkg
- Pull from the coercion repo and build   http://cython.org/coercion/ 
hgwebdir.cgi/sage-coerce/
- Choose a (set of) file(s) from the todo list at http:// 
wiki.sagemath.org/days7/coercion/todo and try to get all doctests to  
pass there. We're using the wiki to keep track of who's doing what.

Some hints:
- __cmp__ has been changed to _cmp_ in SageObject, and __cmp__ no  
longer works due to a default __richcmp__ (that's just how Python  
works). In retrospect, this probably should not have been done on top  
of everything else, 'cause it's somewhat independent of coercion and  
the source of seemingly most failures.
- A useful command is coercion_traceback(). This will give the  
traceback of all exceptions caught during the coercion process.

Hopefully this is enough to get started, and feel free to ask questions.

- Robert

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: [debian-sage] Debian packaging status update

2008-06-04 Thread Pablo De Napoli


> > The first bunch of SAGE dependencies entered the Debian NEW queue (the
> > queue of packages waiting for review from the Debian ftpmasters before
> > they are uploaded to Debian unstable) tonight; by tomorrow I expect that
> > that the remaining SAGE dependencies will enter the Debian NEW queue.
> >
> > I am thus currently optimistic that we will be able to get SAGE 3.0.3 or
> > 3.0.4 into Debian Lenny.
>
> Thanks for the excellent work that you are doing!
>

This is indeed a great work! I think that it is important that Sage enters 
Debian lenny (and after that surely, Ubuntu universe) in order to increase
the usage of Sage
(Many end-users and newcomers to GNU/Linux don't know how to compile
something from the sources, or are afraid of that)

Pablo

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: osx, easy install, steps 4-6

2008-06-04 Thread William Stein

On Wed, Jun 4, 2008 at 9:28 AM, kcrisman <[EMAIL PROTECTED]> wrote:
>
>
>
> On Jun 4, 12:13 pm, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>> Hi
>> I just read the installation readme and built my own application to
>> start the sageserver:
>>
>> Just start the Apple-ScriptEditor and enter the following code:
>>
>> tell application "Terminal"
>> do script "/Applications/sage/sage -notebook"
>> end tell
>>
>> Well, that's all. Now only save the script as a program-bundle. After
>> that, you can assign the .app file a nice icon and put it in your
>> dock, click it, see firefox coming up and have fun.
>>
>> I'd propose that this app could be part of the sage-install
>> bundle... ;-)
>>
>> Hope, you like this tip
>>
>> greeting,
>> Kai-Philipp
>>
>> p.s.: I am absolutely new to sage, maybe someone knows some good
>> resources for doing dsp in sage? Any tips appreciated. thnx
>
> This is nice, with similar functionality to several other proposed
> ways of doing it you might find by searching the threads.  I do like
> that it makes a .app.
>
> Unfortunately, this solution still doesn't behave like a "real" .app,
> in the following senses:
> 1) Opens a Terminal window before opening the one Sage runs in (this
> assumes Terminal is not already open, I think)

Isn't that good, since then you get the server logs as the notebook runs,
and can press control-c to shut it down?

> 2) Requires one to do ^C^C in the Terminal window (and then Quit

In sage-3.0.2 it's now only a single control c.

> Terminal) to finish everything off and completely quit Sage
> Is there a way to modify the script so it would not do the first and
> automatically do the second?  Just curious, as I've tried several
> different "point-and-click" options and they all have some issue like
> this; I'm definitely not saying that a way to do this actually exists,
> or that if it exists it might not be really hard.

The server would have to decide itself when to quit.
One possibility would be that if no web browser has
been used to view the server for 1 hour (say), then the
server quits.

 - william

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: osx, easy install, steps 4-6

2008-06-04 Thread kcrisman



On Jun 4, 12:13 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi
> I just read the installation readme and built my own application to
> start the sageserver:
>
> Just start the Apple-ScriptEditor and enter the following code:
>
> tell application "Terminal"
>         do script "/Applications/sage/sage -notebook"
> end tell
>
> Well, that's all. Now only save the script as a program-bundle. After
> that, you can assign the .app file a nice icon and put it in your
> dock, click it, see firefox coming up and have fun.
>
> I'd propose that this app could be part of the sage-install
> bundle... ;-)
>
> Hope, you like this tip
>
> greeting,
> Kai-Philipp
>
> p.s.: I am absolutely new to sage, maybe someone knows some good
> resources for doing dsp in sage? Any tips appreciated. thnx

This is nice, with similar functionality to several other proposed
ways of doing it you might find by searching the threads.  I do like
that it makes a .app.

Unfortunately, this solution still doesn't behave like a "real" .app,
in the following senses:
1) Opens a Terminal window before opening the one Sage runs in (this
assumes Terminal is not already open, I think)
2) Requires one to do ^C^C in the Terminal window (and then Quit
Terminal) to finish everything off and completely quit Sage
Is there a way to modify the script so it would not do the first and
automatically do the second?  Just curious, as I've tried several
different "point-and-click" options and they all have some issue like
this; I'm definitely not saying that a way to do this actually exists,
or that if it exists it might not be really hard.

- kcrisman
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: osx, easy install, steps 4-6

2008-06-04 Thread mabshoff



On Jun 4, 6:13 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi

Hi Kai-Philipp

> I just read the installation readme and built my own application to
> start the sageserver:
>
> Just start the Apple-ScriptEditor and enter the following code:
>
> tell application "Terminal"
>         do script "/Applications/sage/sage -notebook"
> end tell
>
> Well, that's all. Now only save the script as a program-bundle. After
> that, you can assign the .app file a nice icon and put it in your
> dock, click it, see firefox coming up and have fun.
>
> I'd propose that this app could be part of the sage-install
> bundle... ;-)

Excellent, I just pasted this email at


http://trac.sagemath.org/sage_trac/ticket/3363

i.e. it is now issue #3363.

> Hope, you like this tip
>
> greeting,
> Kai-Philipp
>
> p.s.: I am absolutely new to sage, maybe someone knows some good
> resources for doing dsp in sage? Any tips appreciated. thnx

Sorry, can't help you on that one, but hopefully somebody else will.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] osx, easy install, steps 4-6

2008-06-04 Thread [EMAIL PROTECTED]

Hi
I just read the installation readme and built my own application to
start the sageserver:

Just start the Apple-ScriptEditor and enter the following code:

tell application "Terminal"
do script "/Applications/sage/sage -notebook"
end tell

Well, that's all. Now only save the script as a program-bundle. After
that, you can assign the .app file a nice icon and put it in your
dock, click it, see firefox coming up and have fun.

I'd propose that this app could be part of the sage-install
bundle... ;-)

Hope, you like this tip

greeting,
Kai-Philipp


p.s.: I am absolutely new to sage, maybe someone knows some good
resources for doing dsp in sage? Any tips appreciated. thnx

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: ohloh

2008-06-04 Thread Martin Albrecht

On Wednesday 04 June 2008, [EMAIL PROTECTED] wrote:
> Curious.  I show up as a contributor at least 3 times.  William shows up at
> least 10 times... I think I saw you (Martin) in there at least twice.  It
> seems that many of us don't configure .hgrc on every machine we use...

Yes, and sometimes we have typos in our hgrc 'Martin and Martin ... For what 
its worth you can define aliases on ohloh i.e. 'Martin == Martin == 
[EMAIL PROTECTED] == [EMAIL PROTECTED] ... I just did that.

Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread mabshoff

On Jun 4, 5:29 pm, Martin Albrecht <[EMAIL PROTECTED]>
wrote:
> On Wednesday 04 June 2008, mabshoff wrote:



> > Yes, what could go wrong? ;)
>
> > Seriously: What I meant above is that we ought to see on Solaris only
> > if switching to /dev/urandom as an entropy source does fix the
> > infinite startup time of the notebook. I had similar problems with the
> > Sage notebook with the 64 bit OSX version initially due a non-compiled
> > _ctypes extension, but in that case it failed outright. I am well
> > aware of the dangers of hacking on the random source for anything, but
> > I promise that I will use more than PID to seed ;)

Hi Martin,

> Still, make sure you get absolutely crystal clear confirmation from upstream
> that what you're doing is tolerable. Anything else is not acceptable IMHO.

certainly, I don't want to be the idiot that weeks after the OpenSSL
+Debian debacle does something equally stupid and hence will be know
in Slashdot lore as "that GNUTLS idiot" ;). It might in the end be a
config problem since on Solaris with Sage 3.0.1 upon the start of sage
the process just sits there polling /dev/random for well over two
minutes and nothing happens, i.e. I always killed it. I will now let
it sit there for a while and see if it comes up. Aside from that there
is a problem on that box due to some background jobs being way too
high in priority so that I only get a small default slice of the CPU.
I will pause the background processes now and see if that makes a
difference.

Aside from that it would be good with somebody with deeper Solaris-
internals fu than me could enlighten me if /dev/random is the
preferred source of randomness. On linux at least /dev/urandom is
supposed to be a "better" source of entropy, but I could be wrong
about that.

And a last note: I also need to remove a bad fix for libfplll that
Paul had pointed out to me a while ago as wrong, i.e. my round fix for
Solaris did stupid things for numbers smaller than zero. It isn't
needed on Solaris 10 and higher, so I plan to remove it since we as it
looks now will only support Solaris 10 and higher anyway.

> Martin

Cheers,

Michael

> --
> name: Martin Albrecht
> _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www:http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: ohloh

2008-06-04 Thread boothby

Curious.  I show up as a contributor at least 3 times.  William shows up at 
least 10 times... I think I saw you (Martin) in there at least twice.  It seems 
that many of us don't configure .hgrc on every machine we use...


On Wed, 4 Jun 2008, Martin Albrecht wrote:

>
> On Wednesday 04 June 2008, Jaap Spies wrote:
>> Just found this:
>>
>> http://www.ohloh.net/projects/sage
>>
>> Sage seems to have 5 users and 173 contributors :-)!
>>
>> Jaap
>
> Another thing (this is a funny tool to play with :-))
>
> """
> Few source code comments
> Sage: Open Source Mathematics Software is written mostly in Python.
> Across all Python projects on Ohloh, 12% of all source code lines are
> comments. For Sage: Open Source Mathematics Software, this figure is only 6%.
> This lack of comments puts Sage: Open Source Mathematics Software among the
> lowest one-third of all Python projects on Ohloh.
> A high number of comments might indicate that the code is well-documented and
> organized, and could be a sign of a helpful and disciplined development team.
> """
>
> http://www.ohloh.net/projects/sage/factoids/473512
>
> I bet they don't count docstrings as comments and this is why Sage scores so
> low.
>
> Martin
>
> --
> name: Martin Albrecht
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www: http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
>
>
> >
>



--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Debian packaging status update

2008-06-04 Thread mabshoff

On Jun 4, 9:19 am, Timothy G Abbott <[EMAIL PROTECTED]> wrote:

Hi Tim,

> The first bunch of SAGE dependencies entered the Debian NEW queue (the
> queue of packages waiting for review from the Debian ftpmasters before
> they are uploaded to Debian unstable) tonight; by tomorrow I expect that
> that the remaining SAGE dependencies will enter the Debian NEW queue.

w00t. As other have already expressed their thanks let me get in line
to thank you for a great job well done ;)

> I am thus currently optimistic that we will be able to get SAGE 3.0.3 or
> 3.0.4 into Debian Lenny.
>
> There are a few potential issues involved:
>
> - The Debian polybori package is polybori 0.4, which includes a number of
> upstream fixes that made packaging it for Debian easier.  SAGE is still at
> 0.3; I would thus greatly appreciate it if SAGE 3.03 were to be using
> polybori 0.4 as well (this is #3264).

Since malb asked: anybody can do the upgrade, but we will need to do
some testing. Please make sure to build off the latest polybori.spkg
in 3.0.2 since there are Cygwin fixes in there. Those can be partially
removed since Alexander Dreyer did suggest some fixes in custom.py
IIRC that do not require changes to the code itself. That being said
it will be quick to fix any Cygwin issue this upgrade might introduce
and given the choice between PolyBoRi 0.4 and a broken Cygwin I can
definitely live with the broken Cygwin for a week or two. It is also
important that we test if linking dynamically works again since that
is also supposed to be fixed. As is that issue is a blocker for pbuild
on OSX in 32 bit mode since linking with the static libraries foes
wrong.

> - I've also packaged guava 3.5, which contains a number of upstream fixes
> to various minor packaging problems.  I would really appreciate it if SAGE
> were to upgrade to guava 3.5 so that I can be sure things will be
> compatible (this is #3337).

Yep, that should be easy enough. rlm?

> - I've also packaged sympow 1.019 rather than sympow 1.018; that change is
> negligible and doesn't affect any APIs, so I'm not concerned about this
> breaking things.

The same here, but I do not recall if we ever attempted to upgrade or
not. The upgrade to Sympow 1.019 is now #3360.

> - At the moment, I have not uploaded a package for flintqs, because it is
> my understanding that the flintqs spkg will be replaced by the quadratic
> sieve in flint in the not-far-off future.  Correct me if this is not the
> case.  (Ideally, SAGE would do this before but I can live with this not
> being the case).

That is correct to my knowledge and there seems to be no good reason
to not switch to the current flint codebase and dump flintqs.
Volunteers?

> - At the moment, I have not uploaded a package for linbox_wrap because I
> expect it to be merged into mainline linbox in the next 10 days or so.

Clement: Any update on this?

> If there are likely to be any other dependency spkgs that are scheduled
> for updates in the 3.0.3 or 3.0.4 release cycles, I would like to hear
> about them so that I can plan accordingly.

The plan is to upgarde clisp and Maxima to the latest (2.45 and
5.15.0) releases. We need a clisp upgrade for Solaris x86-64 and might
was well do Maxima at the same time. Aside from that we might do a
couple small, incremental upgrades, i.e. ipython to 0.8.4 for example,
but nothing sweeping.

>         -Tim Abbott

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Debian packaging status update

2008-06-04 Thread Martin Albrecht

On Wednesday 04 June 2008, Timothy G Abbott wrote:
> The first bunch of SAGE dependencies entered the Debian NEW queue (the
> queue of packages waiting for review from the Debian ftpmasters before
> they are uploaded to Debian unstable) tonight; by tomorrow I expect that
> that the remaining SAGE dependencies will enter the Debian NEW queue.
>
> I am thus currently optimistic that we will be able to get SAGE 3.0.3 or
> 3.0.4 into Debian Lenny.
>
> There are a few potential issues involved:
>
> - The Debian polybori package is polybori 0.4, which includes a number of
> upstream fixes that made packaging it for Debian easier.  SAGE is still at
> 0.3; I would thus greatly appreciate it if SAGE 3.03 were to be using
> polybori 0.4 as well (this is #3264).
>
> - I've also packaged guava 3.5, which contains a number of upstream fixes
> to various minor packaging problems.  I would really appreciate it if SAGE
> were to upgrade to guava 3.5 so that I can be sure things will be
> compatible (this is #3337).
>
> - I've also packaged sympow 1.019 rather than sympow 1.018; that change is
> negligible and doesn't affect any APIs, so I'm not concerned about this
> breaking things.
>
> - At the moment, I have not uploaded a package for flintqs, because it is
> my understanding that the flintqs spkg will be replaced by the quadratic
> sieve in flint in the not-far-off future.  Correct me if this is not the
> case.  (Ideally, SAGE would do this before but I can live with this not
> being the case).
>
> - At the moment, I have not uploaded a package for linbox_wrap because I
> expect it to be merged into mainline linbox in the next 10 days or so.
>
> If there are likely to be any other dependency spkgs that are scheduled
> for updates in the 3.0.3 or 3.0.4 release cycles, I would like to hear
> about them so that I can plan accordingly.
>
>   -Tim Abbott

Indeed, great work! What is the time frame for e.g. the PolyBoRi update? How 
long do we have?

Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: [sage-support] Re: 3 == pi

2008-06-04 Thread Dan Christensen

"William Stein" <[EMAIL PROTECTED]> writes:

> Sage Enhancement Proposal: Change comparisons that involve
> elements of the symbolic ring to return True or False if both sides
> of the symbolic comparison are constants and the comparison can
> be definitely determined.

I'm not sure what symbolic equations are currently used for, but
this kind of special casing can cause problems.  If I'm building
up an equation using inputs that I don't control, my code may
have unexpected problems if what it thinks is a symbolic equation
turns into a boolean.

Maybe the heart of the matter is that we need a separate notation
for symbolic equations vs. comparison.  E.g.

sage: 3 == pi
False

sage: 3 === pi
3 === pi

sage: 1.2 == 1.3
False

sage: 1.2 === 1.3
1.2 === 1.3

Note that this gives you the ability to have symbolic equations
when the components happen to not be symbolic.  (Does this even
make sense given the current set-up?)

I'm not sure what to do if the user requests a comparison that
sage can't easily determine:

sage: sqrt(3) + sqrt(8) == sqrt(5) + pi

One idea would be to return a symbolic equation

  sqrt(3) + sqrt(8) === sqrt(5) + pi

but probably the best is to raise an exception:  if my code is
expecting a boolean, then a symbolic equation may confuse it.

So my SEP would be that == always returns a boolean or raises
an exception, and === always returns a symbolic equation.

The notation === is of course a topic for discussion.  If ===
is chosen, it would have to use the pre-processor.  Is there
another operator that would make sense?

Dan


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread Martin Albrecht

On Wednesday 04 June 2008, mabshoff wrote:
> On Jun 4, 3:08 pm, Martin Albrecht <[EMAIL PROTECTED]>
>
> wrote:
> > > Well, I have seens the same problem on other Solaris boxen and we do
> > > not explicitly  just /dev/random, but we do so via GNUTLS. We might
> > > patch GNUTLS slightly on Solaris, but up to know it isn't 100% clear
> > > to my why  this happens.
>
> Hi,
>
> > Yeah, patching the random number generation of the SSL package slightly
> > ... what could go wrong ...
>
> Yes, what could go wrong? ;)
>
> Seriously: What I meant above is that we ought to see on Solaris only
> if switching to /dev/urandom as an entropy source does fix the
> infinite startup time of the notebook. I had similar problems with the
> Sage notebook with the 64 bit OSX version initially due a non-compiled
> _ctypes extension, but in that case it failed outright. I am well
> aware of the dangers of hacking on the random source for anything, but
> I promise that I will use more than PID to seed ;)

Still, make sure you get absolutely crystal clear confirmation from upstream 
that what you're doing is tolerable. Anything else is not acceptable IMHO.

Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: [debian-sage] Debian packaging status update

2008-06-04 Thread Ondrej Certik

On Wed, Jun 4, 2008 at 9:19 AM, Timothy G Abbott <[EMAIL PROTECTED]> wrote:
>
> The first bunch of SAGE dependencies entered the Debian NEW queue (the
> queue of packages waiting for review from the Debian ftpmasters before
> they are uploaded to Debian unstable) tonight; by tomorrow I expect that
> that the remaining SAGE dependencies will enter the Debian NEW queue.
>
> I am thus currently optimistic that we will be able to get SAGE 3.0.3 or
> 3.0.4 into Debian Lenny.
>
> There are a few potential issues involved:
>
> - The Debian polybori package is polybori 0.4, which includes a number of
> upstream fixes that made packaging it for Debian easier.  SAGE is still at
> 0.3; I would thus greatly appreciate it if SAGE 3.03 were to be using
> polybori 0.4 as well (this is #3264).
>
> - I've also packaged guava 3.5, which contains a number of upstream fixes
> to various minor packaging problems.  I would really appreciate it if SAGE
> were to upgrade to guava 3.5 so that I can be sure things will be
> compatible (this is #3337).
>
> - I've also packaged sympow 1.019 rather than sympow 1.018; that change is
> negligible and doesn't affect any APIs, so I'm not concerned about this
> breaking things.
>
> - At the moment, I have not uploaded a package for flintqs, because it is
> my understanding that the flintqs spkg will be replaced by the quadratic
> sieve in flint in the not-far-off future.  Correct me if this is not the
> case.  (Ideally, SAGE would do this before but I can live with this not
> being the case).
>
> - At the moment, I have not uploaded a package for linbox_wrap because I
> expect it to be merged into mainline linbox in the next 10 days or so.
>
> If there are likely to be any other dependency spkgs that are scheduled
> for updates in the 3.0.3 or 3.0.4 release cycles, I would like to hear
> about them so that I can plan accordingly.


Thanks for the excellent work that you are doing!

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread mabshoff



On Jun 4, 3:08 pm, Martin Albrecht <[EMAIL PROTECTED]>
wrote:
> > Well, I have seens the same problem on other Solaris boxen and we do
> > not explicitly  just /dev/random, but we do so via GNUTLS. We might
> > patch GNUTLS slightly on Solaris, but up to know it isn't 100% clear
> > to my why  this happens.

Hi,

> Yeah, patching the random number generation of the SSL package slightly ...
> what could go wrong ...

Yes, what could go wrong? ;)

Seriously: What I meant above is that we ought to see on Solaris only
if switching to /dev/urandom as an entropy source does fix the
infinite startup time of the notebook. I had similar problems with the
Sage notebook with the 64 bit OSX version initially due a non-compiled
_ctypes extension, but in that case it failed outright. I am well
aware of the dangers of hacking on the random source for anything, but
I promise that I will use more than PID to seed ;)

> Martin

Cheers,

Michael

> --
> name: Martin Albrecht
> _pgp:http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
> _www:http://www.informatik.uni-bremen.de/~malb
> _jab: [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread mabshoff

On Jun 4, 2:56 pm, Francois <[EMAIL PROTECTED]> wrote:

>
> Hi,

Hi Francois,

> It looks like gmp_aux.h is generated during "make setup3" which is
> completely skipped on sun, from the skpg-install script:
> do_tune()
> {
>     if [ $UNAME = "SunOS" ]; then
>         return
>     fi
>     do_make setup1
>     do_make setup2
>     do_make setup3
>     do_make setup4}
>
> -
> May be you could try to insert "do_make setup3" before ...

gmp_aux.h exists without the tuning, but I am not sure why we skip the
tuning on Solaris. I will certainly see if I cannot reactivate that.
As I mentioned in the other email when you use a csh as login shell
the current build does not work. I believe it is due to some scripts
being called from the makefile as

  sh foo

while foo does not have a shebang. Then things seem to also go bad on
Linux for example, so this is not a Solaris specific problem, but
shell related. I have build the NTL.spkg numerous times on Solaris
with either a sh or bash login shell, so it does work some times ;)

> read more »

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread Martin Albrecht

> Well, I have seens the same problem on other Solaris boxen and we do
> not explicitly  just /dev/random, but we do so via GNUTLS. We might
> patch GNUTLS slightly on Solaris, but up to know it isn't 100% clear
> to my why  this happens.

Yeah, patching the random number generation of the SSL package slightly ... 
what could go wrong ...

Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread mabshoff



On Jun 4, 12:51 pm, "Dr. David Kirkby" <[EMAIL PROTECTED]>
wrote:
> On Jun 4, 5:13 am, mabshoff <[EMAIL PROTECTED]> wrote:
>
> > Hello folks,

Hi David,

> > with malb's libSingular fix we are down from 120+ segfaults to about
> > 100 doctest failures, none of them segfaults. While that does not look
> > like much of an improvement nearly all of those errors are caused by
> > the following few issues:
>
> >  * notebook: /dev/random's entropy too low? -> hangs/slow startup?
>
> How about changing to /dev/urandom ?

Well, I have seens the same problem on other Solaris boxen and we do
not explicitly  just /dev/random, but we do so via GNUTLS. We might
patch GNUTLS slightly on Solaris, but up to know it isn't 100% clear
to my why  this happens.

> That guarantees to not block, but obviosuly the flip side is the data
> is not as random. I assume it uses some software method, to generate
> data, completely independant of hardware when there is insufficient
> data from hardware. Only guessing, I don't really know.
>
> > The plan now is to get 3.0.3 building on a x86-64 Solaris box since I
> > have Maxima 5.15.0 + clisp 2.45.0 working on there and can dump sbcl
> > from the Sparc box. We also merged some Singular pexpect fix into
> > 3.0.1, so what we are seeing here is another Singular+pexpect bug. I
> > am sure William will track that one down.
>
> > Cheers,
>
> > Michael
>
> As I said in another post, I've currently not got my x86 laptop, but I
> still have the Sun SPARC. I will try to find time to test the latest
> code on this.

Ok. The main reason I am switching to an x86-64 build box besides
clisp is that it builds much more quickly since the Opterons in there
are better in that regard than the 1.5GHz US 3is. It is also quite
easy for people to run Solaris x86-64 in a VMWare image. Obviously
Sparc hardware should be fully supported.

Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: ohloh

2008-06-04 Thread Martin Albrecht

On Wednesday 04 June 2008, Jaap Spies wrote:
> Just found this:
>
> http://www.ohloh.net/projects/sage
>
> Sage seems to have 5 users and 173 contributors :-)!
>
> Jaap

Another thing (this is a funny tool to play with :-))

"""
Few source code comments
Sage: Open Source Mathematics Software is written mostly in Python. 
Across all Python projects on Ohloh, 12% of all source code lines are 
comments. For Sage: Open Source Mathematics Software, this figure is only 6%. 
This lack of comments puts Sage: Open Source Mathematics Software among the 
lowest one-third of all Python projects on Ohloh. 
A high number of comments might indicate that the code is well-documented and 
organized, and could be a sign of a helpful and disciplined development team.
"""

http://www.ohloh.net/projects/sage/factoids/473512

I bet they don't count docstrings as comments and this is why Sage scores so 
low.

Martin

-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread mabshoff



On Jun 4, 2:06 pm, "Dr. David Kirkby" <[EMAIL PROTECTED]> wrote:
> Here's my attempt to build sage 3.0.2 on Solaris (SPARC).
>
> The build process reports gmp_aux.h is not found, I checked and there
> is no such file. However, this in itself does not cause the build
> process to stop, but it later stops when various things are
> undefined.
>
> See below.
>
> The system in a Sun Blade 2000 running Solaris 10 update 4. gcc 4.0.2
> from Blastwave, and gnu make.
>
> I noticed gmp_aux.h exists in Singlular I have on the disk, but I'm
> not sure if that is the correct version. In any case, it needs
> fixing.
>
> Dave

Hi Dave,

I know one issue with NTL that pops up when people use either csh or
tcsh as a login shell and I got a likely fix that will be in Sage
3.0.3.



Cheers,

Michael
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: ohloh

2008-06-04 Thread Martin Albrecht

On Wednesday 04 June 2008, Jaap Spies wrote:
> Just found this:
>
> http://www.ohloh.net/projects/sage
>
> Sage seems to have 5 users and 173 contributors :-)!

Is this relevant:

   http://www.ohloh.net/projects/sage/factoids/473513

?

Martin 


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Francois

Dr. David Kirkby wrote:
> Here's my attempt to build sage 3.0.2 on Solaris (SPARC).
>
> The build process reports gmp_aux.h is not found, I checked and there
> is no such file. However, this in itself does not cause the build
> process to stop, but it later stops when various things are
> undefined.
>
> See below.
>
> The system in a Sun Blade 2000 running Solaris 10 update 4. gcc 4.0.2
> from Blastwave, and gnu make.
>
>
> I noticed gmp_aux.h exists in Singlular I have on the disk, but I'm
> not sure if that is the correct version. In any case, it needs
> fixing.
>
> Dave
>
>
> [EMAIL PROTECTED]:[~/sage-3.0.2] $ make SAGE_PORT=45
> 
> x ntl-5.4.2.p3/src/src/pair_GF2EX_long.c, 385 bytes, 1 tape blocks
> x ntl-5.4.2.p3/src/src/DispSettings.c, 2197 bytes, 5 tape blocks
> x ntl-5.4.2.p3/src/src/pair_lzz_pX_long.c, 386 bytes, 1 tape blocks
> Finished extraction
> 
> Host system
> uname -a:
> SunOS kestrel 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000
> 
> 
> GCC Version
> gcc -v
> Reading specs from /usr/local/opt/csw/gcc4/bin/../lib/gcc/sparc-sun-
> solaris2.8/4.0.2/specs
> Target: sparc-sun-solaris2.8
> Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
> --with-local-prefix=/opt/csw --without-gnu-as --with-as=/usr/ccs/bin/
> as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --
> enable-shared --enable-multilib --enable-nls --with-included-gettext --
> with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-
> system-zlib --enable-languages=c,c++,f95,java,objc,ada
> Thread model: posix
> gcc version 4.0.2
> 
> writing makefile
> writing ../include/NTL/config.h
> Building and install NTL
> make[2]: Entering directory `/export/home/drkirkby/sage-3.0.2/spkg/
> build/ntl-5.4.2.p3/src/src'
> rm -f FFT.o FacVec.o GF2.o GF2E.o GF2EX.o GF2EXFactoring.o GF2X.o
> GF2X1.o GF2XFactoring.o GF2XVec.o GetTime.o HNF.o ctools.o LLL.o
> LLL_FP.o LLL_QP.o LLL_RR.o LLL_XD.o RR.o WordVector.o ZZ.o ZZVec.o
> ZZX.o ZZX1.o ZZXCharPoly.o ZZXFactoring.o ZZ_p.o ZZ_pE.o ZZ_pEX.o
> ZZ_pEXFactoring.o ZZ_pX.o ZZ_pX1.o ZZ_pXCharPoly.o ZZ_pXFactoring.o
> fileio.o lip.o lzz_p.o lzz_pE.o lzz_pEX.o lzz_pEXFactoring.o lzz_pX.o
> lzz_pX1.o lzz_pXCharPoly.o lzz_pXFactoring.o mat_GF2.o mat_GF2E.o
> mat_RR.o mat_ZZ.o mat_ZZ_p.o mat_ZZ_pE.o mat_lzz_p.o mat_lzz_pE.o
> mat_poly_ZZ.o mat_poly_ZZ_p.o mat_poly_lzz_p.o pair_GF2EX_long.o
> pair_GF2X_long.o pair_ZZX_long.o pair_ZZ_pEX_long.o pair_ZZ_pX_long.o
> pair_lzz_pEX_long.o pair_lzz_pX_long.o quad_float.o tools.o vec_GF2.o
> vec_GF2E.o vec_GF2XVec.o vec_RR.o vec_ZZ.o vec_ZZVec.o vec_ZZ_p.o
> vec_ZZ_pE.o vec_double.o vec_long.o vec_lzz_p.o vec_lzz_pE.o
> vec_quad_float.o vec_vec_GF2.o vec_vec_GF2E.o vec_vec_RR.o
> vec_vec_ZZ.o vec_vec_ZZ_p.o vec_vec_ZZ_pE.o vec_vec_long.o
> vec_vec_lzz_p.o vec_vec_lzz_pE.o vec_xdouble.o xdouble.o G_LLL_FP.o
> G_LLL_QP.o G_LLL_XD.o G_LLL_RR.o vec_ulong.o vec_vec_ulong.o # clean,
> preserving tuning parameters
> make shobj
> make[3]: Entering directory `/export/home/drkirkby/sage-3.0.2/spkg/
> build/ntl-5.4.2.p3/src/src'
> g++ -I../include -I.  -O2 -g  -fPIC -fPIC -c FFT.c
> In file included from ../include/NTL/tools.h:5,
>  from ../include/NTL/vector.h:5,
>  from ../include/NTL/vec_long.h:5,
>  from ../include/NTL/FFT.h:6,
>  from FFT.c:3:
> ../include/NTL/ctools.h:6:27: error: NTL/mach_desc.h: No such file or
> directory
> In file included from ../include/NTL/ZZ.h:18,
>  from ../include/NTL/FFT.h:7,
>  from FFT.c:3:
> ../include/NTL/lip.h:10:25: error: NTL/gmp_aux.h: No such file or
> directory
> ../include/NTL/tools.h: In function 'void NTL::conv(int&, long int)':
> ../include/NTL/tools.h:171: error: 'NTL_BITS_PER_INT' was not declared
> in this scope
> ../include/NTL/tools.h:171: error: 'NTL_MIN_INT' was not declared in
> this scope
> ../include/NTL/tools.h: In function 'void NTL::conv(int&, unsigned
> int)':
> ../include/NTL/tools.h:176: error: 'NTL_BITS_PER_INT' was not declared
> in this scope
> ../include/NTL/tools.h:176: error: 'NTL_MIN_INT' was not declared in
> this scope
> ../include/NTL/tools.h: In function 'void NTL::conv(int&, long
> unsigned int)':
> ../include/NTL/tools.h:179: error: 'NTL_BITS_PER_INT' was not declared
> in this scope
> ../include/NTL/tools.h:179: error: 'NTL_MIN_INT' was not declared in
> this scope
> ../include/NTL/tools.h: In function 'int NTL::to_int(long int)':
> ../include/NTL/tools.h:183: error: 'NTL_BITS_PER_INT' was not declared
> in this scope
> ../include/NTL/tools.h:183: error: 'NTL_MIN_INT' was not declared in
> this scope
> ../include/NTL/tools.h: In function 'int NTL::to_int(unsigned int)':
> ../include/NTL/tools.h:188: error: 'NTL_BITS_PER_INT' was not declared

[sage-devel] ohloh

2008-06-04 Thread Jaap Spies

Just found this:

http://www.ohloh.net/projects/sage

Sage seems to have 5 users and 173 contributors :-)!

Jaap


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Problems building Sage 3.0.2 on Solaris 10 - NTL issue

2008-06-04 Thread Dr. David Kirkby

Here's my attempt to build sage 3.0.2 on Solaris (SPARC).

The build process reports gmp_aux.h is not found, I checked and there
is no such file. However, this in itself does not cause the build
process to stop, but it later stops when various things are
undefined.

See below.

The system in a Sun Blade 2000 running Solaris 10 update 4. gcc 4.0.2
from Blastwave, and gnu make.


I noticed gmp_aux.h exists in Singlular I have on the disk, but I'm
not sure if that is the correct version. In any case, it needs
fixing.

Dave


[EMAIL PROTECTED]:[~/sage-3.0.2] $ make SAGE_PORT=45

x ntl-5.4.2.p3/src/src/pair_GF2EX_long.c, 385 bytes, 1 tape blocks
x ntl-5.4.2.p3/src/src/DispSettings.c, 2197 bytes, 5 tape blocks
x ntl-5.4.2.p3/src/src/pair_lzz_pX_long.c, 386 bytes, 1 tape blocks
Finished extraction

Host system
uname -a:
SunOS kestrel 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000


GCC Version
gcc -v
Reading specs from /usr/local/opt/csw/gcc4/bin/../lib/gcc/sparc-sun-
solaris2.8/4.0.2/specs
Target: sparc-sun-solaris2.8
Configured with: ../sources/gcc-4.0.2/configure --prefix=/opt/csw/gcc4
--with-local-prefix=/opt/csw --without-gnu-as --with-as=/usr/ccs/bin/
as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --
enable-shared --enable-multilib --enable-nls --with-included-gettext --
with-libiconv-prefix=/opt/csw --with-x --enable-java-awt=xlib --with-
system-zlib --enable-languages=c,c++,f95,java,objc,ada
Thread model: posix
gcc version 4.0.2

writing makefile
writing ../include/NTL/config.h
Building and install NTL
make[2]: Entering directory `/export/home/drkirkby/sage-3.0.2/spkg/
build/ntl-5.4.2.p3/src/src'
rm -f FFT.o FacVec.o GF2.o GF2E.o GF2EX.o GF2EXFactoring.o GF2X.o
GF2X1.o GF2XFactoring.o GF2XVec.o GetTime.o HNF.o ctools.o LLL.o
LLL_FP.o LLL_QP.o LLL_RR.o LLL_XD.o RR.o WordVector.o ZZ.o ZZVec.o
ZZX.o ZZX1.o ZZXCharPoly.o ZZXFactoring.o ZZ_p.o ZZ_pE.o ZZ_pEX.o
ZZ_pEXFactoring.o ZZ_pX.o ZZ_pX1.o ZZ_pXCharPoly.o ZZ_pXFactoring.o
fileio.o lip.o lzz_p.o lzz_pE.o lzz_pEX.o lzz_pEXFactoring.o lzz_pX.o
lzz_pX1.o lzz_pXCharPoly.o lzz_pXFactoring.o mat_GF2.o mat_GF2E.o
mat_RR.o mat_ZZ.o mat_ZZ_p.o mat_ZZ_pE.o mat_lzz_p.o mat_lzz_pE.o
mat_poly_ZZ.o mat_poly_ZZ_p.o mat_poly_lzz_p.o pair_GF2EX_long.o
pair_GF2X_long.o pair_ZZX_long.o pair_ZZ_pEX_long.o pair_ZZ_pX_long.o
pair_lzz_pEX_long.o pair_lzz_pX_long.o quad_float.o tools.o vec_GF2.o
vec_GF2E.o vec_GF2XVec.o vec_RR.o vec_ZZ.o vec_ZZVec.o vec_ZZ_p.o
vec_ZZ_pE.o vec_double.o vec_long.o vec_lzz_p.o vec_lzz_pE.o
vec_quad_float.o vec_vec_GF2.o vec_vec_GF2E.o vec_vec_RR.o
vec_vec_ZZ.o vec_vec_ZZ_p.o vec_vec_ZZ_pE.o vec_vec_long.o
vec_vec_lzz_p.o vec_vec_lzz_pE.o vec_xdouble.o xdouble.o G_LLL_FP.o
G_LLL_QP.o G_LLL_XD.o G_LLL_RR.o vec_ulong.o vec_vec_ulong.o # clean,
preserving tuning parameters
make shobj
make[3]: Entering directory `/export/home/drkirkby/sage-3.0.2/spkg/
build/ntl-5.4.2.p3/src/src'
g++ -I../include -I.  -O2 -g  -fPIC -fPIC -c FFT.c
In file included from ../include/NTL/tools.h:5,
 from ../include/NTL/vector.h:5,
 from ../include/NTL/vec_long.h:5,
 from ../include/NTL/FFT.h:6,
 from FFT.c:3:
../include/NTL/ctools.h:6:27: error: NTL/mach_desc.h: No such file or
directory
In file included from ../include/NTL/ZZ.h:18,
 from ../include/NTL/FFT.h:7,
 from FFT.c:3:
../include/NTL/lip.h:10:25: error: NTL/gmp_aux.h: No such file or
directory
../include/NTL/tools.h: In function 'void NTL::conv(int&, long int)':
../include/NTL/tools.h:171: error: 'NTL_BITS_PER_INT' was not declared
in this scope
../include/NTL/tools.h:171: error: 'NTL_MIN_INT' was not declared in
this scope
../include/NTL/tools.h: In function 'void NTL::conv(int&, unsigned
int)':
../include/NTL/tools.h:176: error: 'NTL_BITS_PER_INT' was not declared
in this scope
../include/NTL/tools.h:176: error: 'NTL_MIN_INT' was not declared in
this scope
../include/NTL/tools.h: In function 'void NTL::conv(int&, long
unsigned int)':
../include/NTL/tools.h:179: error: 'NTL_BITS_PER_INT' was not declared
in this scope
../include/NTL/tools.h:179: error: 'NTL_MIN_INT' was not declared in
this scope
../include/NTL/tools.h: In function 'int NTL::to_int(long int)':
../include/NTL/tools.h:183: error: 'NTL_BITS_PER_INT' was not declared
in this scope
../include/NTL/tools.h:183: error: 'NTL_MIN_INT' was not declared in
this scope
../include/NTL/tools.h: In function 'int NTL::to_int(unsigned int)':
../include/NTL/tools.h:188: error: 'NTL_BITS_PER_INT' was not declared
in this scope
../include/NTL/tools.h:188: error: 'NTL_MIN_INT' was not declared in
this scope
../include/NTL/tools.h: In function 'int NTL::to_int(long unsigned
int)':
../include/NTL/tools.h:191: error: 'NTL_BITS_PER_INT' was not decl

[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread David Harvey


On Jun 4, 2008, at 7:07 AM, Bill Page wrote:

> Ok (and thanks also for the clarification, David). There are of course
> two different uses of "object" here: 1) object of some category, 2)
> Python object. All Python objects have a 'type', i.e. belong to some
> Python class.
>
> So in Sage 3.0.2 I observe for example:
>
> sage: type(1)
> 
> sage: parent(1)
> Integer Ring
> sage: type(parent(1))
> 
> sage: category(parent(1))
> Category of rings
> sage: type(category(parent(1)))
> 
>
> and
>
> sage: type(1.0)
> 
> sage: parent(1.0)
> Real Field with 53 bits of precision
> sage: type(parent(1.0))
> 
> sage: category(parent(1.0))
> Category of fields
> sage: type(category(parent(1.0)))
> 
>
> These seem consistent to me, albeit rather complex. However I am not
> sure I understand the following:
>
> sage: parent(IntegerRing())
> 
> sage: parent(RealField())
> 
>
> Could you explain why the parent of an object of some category is a  
> type?

I'm not an expert on these things any more, but I can tell you what  
happened back in the day (when the sage version number was slightly  
smaller):

Only "elements" have real parents. Since ZZ = IntegerRing() is not an  
"element", it doesn't have a parent. If X does not have a parent,  
then parent(X) returns the type of X instead. I'm not sure this is a  
good idea, but there it is.

Of course then you're wondering why ZZ is not an element of the  
category of the rings. That I do not know. But you can try:

sage: IntegerRing().parent()

to see that IntegerRing() simply doesn't have a parent() method,  
which is why the global version parent(IntegerRing()) returns the  
type of IntegerRing() instead.

One difficulty with ZZ being both a parent and an element is that  
Cython does not support multiple inheritance.

BTW I should mention that the whole idea of "parents" vs "types" is  
one of the main conceptual things inherited from Magma.

sorry gotta go cannot answer rest of email, hopefully someone else  
can

david


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread Bill Page

Robert,

Thanks for the elaboration. I hope that this follow-up is not too far
off topic and I don't want to distract you (or any of the Sage
developers) from your main tasks. I wrote this mostly as notes and
questions to myself  - but if you or anyone else have some time or the
inclination to correct or comment as time permits, that would be
great.

On Tue, Jun 3, 2008 at 10:04 PM, Robert Bradshaw wrote:
>
> On Jun 3, 2008, at 4:50 PM, Bill Page wrote:
>
>> How does it [categories in Sage] relate to the
>> concept of "parent" - which seems equally ill-defined to me?
>
> A Parent is an Object in the category of Sets, though in the context
> of coercion one usually assumes one can some kind of arithmetic
> (binary operations) on their elements.
> ...
> On Jun 3, 2008, at 7:11 PM, David Harvey wrote:
> ...
>> Don't you mean to say something more like "a parent is an object
>> of a concrete category", i.e. a category C with a faithful functor
>> f : C -> Set, such that the "elements" (as understood by Sage) of
>> the parent P are exactly the elements of f(P)?

Ok (and thanks also for the clarification, David). There are of course
two different uses of "object" here: 1) object of some category, 2)
Python object. All Python objects have a 'type', i.e. belong to some
Python class.

So in Sage 3.0.2 I observe for example:

sage: type(1)

sage: parent(1)
Integer Ring
sage: type(parent(1))

sage: category(parent(1))
Category of rings
sage: type(category(parent(1)))


and

sage: type(1.0)

sage: parent(1.0)
Real Field with 53 bits of precision
sage: type(parent(1.0))

sage: category(parent(1.0))
Category of fields
sage: type(category(parent(1.0)))


These seem consistent to me, albeit rather complex. However I am not
sure I understand the following:

sage: parent(IntegerRing())

sage: parent(RealField())


Could you explain why the parent of an object of some category is a type?

>
>> What is the relationship to inheritance in Python? Is the intention
>> to give all mathematical objects defined in Sage some categorical
>> structure? What about categories themselves as mathematical
>> structures - e.g. a category is a kind of directed graph with additional
>> structure?
>
> A big push of this model is to divorce the relationship between
> inheritance (which primarily has to do with implementation) and
> mathematical categorization.

At first blush it still seems strange to me to distinguish between the
parent of an object and the type of an object. The instances of a type
are often considered elements. Is the invention of 'parent' in Sage
due to some inherent limitation of Python classes? Do you really want
to say more abstractly that a certain type *represents* a certain
parent? E.g. Does 'sage.rings.real_mpfr.RealNumber' represent
'RealField()'? Can there be other representations of 'RealField()' in
Sage? How can I find out for example if 'sage.rings.integer.Integer'
represents 'IntegerRing()'?

>From my experience with Axiom I am sympathetic to the separation of
implementation and specification but in Axiom "domains" are both
parents and types. A domain can inherit it's implementation from
another domain (via add). A domain can also serve as the
representation for some other domain (via Rep). For example
IntegerMod(5) is the representation of PrimeField(5). IntegerMod(5) in
turn is represented by SingleInteger, etc. In Axiom, at the deepest
level all types are ultimately provided by Lisp. These types are not
really Axiom domains and so I suppose the situation is analogous to
Python types and Sage parents.

Axiom categories on the other hand form a lattice. Domains belong to
categories by assertion or by virtue of the subdomain relationship. In
Axiom there is an operator named 'has' which provides the same
information as 'category' in Sage so that:

  x has y

is just 'y == category(x)'. For example 'Float has Field' is equivalent to:

sage: Fields() == category(RealField())
True

Although in Axiom a domain may satisfy more than one category. Will
this be possible in Sage in the future?

What information does Sage actually have about a given category? For
example, what does Sage know about the relationship between Rings()
and Fields()? E.g. functors?

None of this has much to do with "category theory" as such. Categories
in Axiom are only vaguely related to categories in Mathematics. So I
suppose from your description that categories in Sage will play a
similar role but will be more strongly related to the mathematical
concept?

> This will allow categories to play a larger role (though work in that
> area can be done after the merge as it is not disruptive). For
> example, Z/nZ[x] is implemented the same whether or not p is
> a prime, but the category it lives in (and hence the methods one
> can do on it) vary.

Are you suggesting that Z/pZ should be considered a field just because
p is prime?

sage: category(Zmod(7))
Category of rings

sage: Zmod(7).is_field()
True

Perhaps an alternative would be to provide a c

[sage-devel] Re: Solaris porting porting progress report on Sage 3.0.x

2008-06-04 Thread Dr. David Kirkby



On Jun 4, 5:13 am, mabshoff <[EMAIL PROTECTED]> wrote:
> Hello folks,
>
> with malb's libSingular fix we are down from 120+ segfaults to about
> 100 doctest failures, none of them segfaults. While that does not look
> like much of an improvement nearly all of those errors are caused by
> the following few issues:
>
>  * notebook: /dev/random's entropy too low? -> hangs/slow startup?

How about changing to /dev/urandom ?

That guarantees to not block, but obviosuly the flip side is the data
is not as random. I assume it uses some software method, to generate
data, completely independant of hardware when there is insufficient
data from hardware. Only guessing, I don't really know.


> The plan now is to get 3.0.3 building on a x86-64 Solaris box since I
> have Maxima 5.15.0 + clisp 2.45.0 working on there and can dump sbcl
> from the Sparc box. We also merged some Singular pexpect fix into
> 3.0.1, so what we are seeing here is another Singular+pexpect bug. I
> am sure William will track that one down.
>
> Cheers,
>
> Michael

As I said in another post, I've currently not got my x86 laptop, but I
still have the Sun SPARC. I will try to find time to test the latest
code on this.



--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Early failure of 3.0.3.alpha0 on Solaris Express on x86

2008-06-04 Thread Dr. David Kirkby



On May 30, 10:03 am, mabshoff <[EMAIL PROTECTED]> wrote:
> On May 30, 10:06 am, "Dr. David Kirkby" <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > I managed to get quite a way building 3.0.2 on my Solaris laptop
> > before there were any issues at all, but with 3.0.3.alpha0 things have
> > not gone so smoothly. However, I have very recently updated the
> > software on the laptop, so perhaps it is not Sage at fault.


> I would suggest you change the shebang of spkg-install to "#!/usr/bin/
> env bash". I didn't try this myself, but I suspect it will fix the
> issue and I am not sure why this didn't happen when the spkg was
> upgraded.
>
> Cheers,
>
> Michael


I do not currently have access to the laptop, having loaned it to my
father while his is being repaired. But when I get it back, I will try
this.

I might have a try on my Sun Blade 2000 though, as I've still got that
here.


--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: Lattice Boltzmann method

2008-06-04 Thread David Joyner

According to http://en.wikipedia.org/wiki/Lattice_Boltzmann_methods
the packages
http://www.lbmethod.org/openlb/
and
http://www.physics.ndsu.nodak.edu/people/wagner/LB.html
are GPL'd. The first is GPLv2 but SAGE is licensed GPLv2+,
and the second is licenced under the "GPL" but doesn't say which
version. The second requires some graphics libraries though.

In either case, neither have a SAGE interface but if you interested in
writing one,
chap 6 in the Programming manual
http://www.sagemath.org/doc/html/prog/index.html
might help.


On Tue, Jun 3, 2008 at 11:49 PM, Owen Densmore <[EMAIL PROTECTED]> wrote:
>
> Is there a Sage package for LB method modeling?
>
>   -- Owen
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: more licensing discussion - Blender

2008-06-04 Thread Harald Schilly



On Jun 4, 1:32 am, "David Joyner" <[EMAIL PROTECTED]> wrote:
> I would like to learn a bit about Blender too. If you have a book you'd
> recommend, please let me know.

I've played around with blender and it's amazingly cool if you
understand how it works (the UI), but this takes some time. I don't
think a book will do it, because you need to learn the movements
(hands, eyes, ...) to interact. So, my strong advice, search for
screencasts! There are a lot of them and after you learned the keys
g,r,space,s and some more you are ready to start with them. A book
(even written tutorials) is too static.

H
--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Re: coercing of sqrt(2)

2008-06-04 Thread John Cremona

2008/6/4 Robert Bradshaw <[EMAIL PROTECTED]>:

> But right now we've already got enough on our plate trying to get the
> changes we have pushed through. (Any help on this front would be
> greatly appreciated.)

Robert,

Can you be more specific about how others can help with this?

John

> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-devel] Debian packaging status update

2008-06-04 Thread Timothy G Abbott

The first bunch of SAGE dependencies entered the Debian NEW queue (the 
queue of packages waiting for review from the Debian ftpmasters before 
they are uploaded to Debian unstable) tonight; by tomorrow I expect that 
that the remaining SAGE dependencies will enter the Debian NEW queue.

I am thus currently optimistic that we will be able to get SAGE 3.0.3 or 
3.0.4 into Debian Lenny.

There are a few potential issues involved:

- The Debian polybori package is polybori 0.4, which includes a number of 
upstream fixes that made packaging it for Debian easier.  SAGE is still at 
0.3; I would thus greatly appreciate it if SAGE 3.03 were to be using 
polybori 0.4 as well (this is #3264).

- I've also packaged guava 3.5, which contains a number of upstream fixes 
to various minor packaging problems.  I would really appreciate it if SAGE 
were to upgrade to guava 3.5 so that I can be sure things will be 
compatible (this is #3337).

- I've also packaged sympow 1.019 rather than sympow 1.018; that change is 
negligible and doesn't affect any APIs, so I'm not concerned about this 
breaking things.

- At the moment, I have not uploaded a package for flintqs, because it is 
my understanding that the flintqs spkg will be replaced by the quadratic 
sieve in flint in the not-far-off future.  Correct me if this is not the 
case.  (Ideally, SAGE would do this before but I can live with this not 
being the case).

- At the moment, I have not uploaded a package for linbox_wrap because I 
expect it to be merged into mainline linbox in the next 10 days or so.

If there are likely to be any other dependency spkgs that are scheduled 
for updates in the 3.0.3 or 3.0.4 release cycles, I would like to hear 
about them so that I can plan accordingly.

-Tim Abbott

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---