Re: [sage-devel] Differential forms

2010-05-11 Thread Martin Rubey
jvkersch  writes:

> Last but not least, I noticed that there was some discussion on this
> mailing list on adding support for differential forms and exterior
> algebra using FriCAS and/or Reduce.  

In case you are interested in using FriCAS to extend Sage, I'd be glad
to actively work on that (and thus, as a side effect, join sage).

I don't know what exactly you have in mind, so what follows is a rather
random list of related topics.

Already built into FriCAS are several domains for differential
polynomials etc.  Feel free to ask for details.

FriCAS has a rather elaborate implementation of the Risch algorithm, and
is thus quite good at solving linear differential equations.  Waldek
told me once he is working on improving support for algebraic
differential equations.

I have a private package for computing with algebraic equations as well
as linear differential and algebraic differential equations.  Many
interesting operations like addition, product, inverse, substitution,
etc. work, most embarassing omission is a zero test.

One other thing built into FriCAS which I'm quite proud of is the
guessing package, see http://arxiv.org/abs/math/0702086 .  This might
also be helpful for some applications in the area.

I'd be too glad,

Martin

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Robert Miller
> Nonon, it is just that if you now type g.complement() on a Bipartite
> Graph in Sage, you will raise an exception ! My function fails only
> when I call it on a bipartite Graph !

I guess my point is that a graph should be a BipartiteGraph when it
makes sense. It certainly seems right to me to have
graphs.CompleteBipartiteGraph(n) for example to give a BipartiteGraph.
The error message should indicate clearly and easily how to change
this, i.e. get a non-B.G. copy of the object, which is a normal graph.

> ticket about edge addition, but there is no way for a normal user to
> think of it as something else than a bug in Sage, or a very bad idea
> of class design... :-/

This *is* a bug in complement! It should either check for the
Bipartite case or (in my preference) BipartiteGraph should have its
own version. Maybe this is a case for bringing the coercion model into
Sage's graph infrastructure (not it :).

-- 
Robert L. Miller
http://www.rlmiller.org/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Nathann Cohen
> Maybe the problem is that somewhere in the depths of is_perfect, a
> BipartiteGraph is being created without the intention to use it that
> way. Perhaps it is in self.complement(), or some other function that
> is implicitly assuming to use the current class to make a copy, when
> it should be making a copy as a different class. Maybe we just need to
> assume less when creating derived objects...

Nonon, it is just that if you now type g.complement() on a Bipartite
Graph in Sage, you will raise an exception ! My function fails only
when I call it on a bipartite Graph !

sage: g = graphs.CompleteBipartiteGraph(10,10)
sage: g.complement()
---
RuntimeError  Traceback (most recent call last)

/home/ncohen/ in ()

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.py
in complement(self)
   8497 for v in self:
   8498 if not self.has_edge(u,v):
-> 8499 G.add_edge(u,v)
   8500 return G
   8501

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/bipartite_graph.py
in add_edge(self, u, v, label)
690 # check for endpoints in different partitions
691 if self.left.issuperset((u,v)) or self.right.issuperset((u,v)):
--> 692 raise RuntimeError('Edge vertices must lie in
different partitions.')
693
694 # add the edge

RuntimeError: Edge vertices must lie in different partitions.
sage:

Obviously, we can not expect the function .complement() in
BipartiteGraph to return a BipartiteGraph (well, I know, if you graph
is the disjoint union of two edges, or a P_4, or ... ). I never
intended my message as a bug report, of course something needs to be
fixed there but the question is rather : what is to be done of this
BipartiteGraph class, and should it be a default one that users could
instantiate without knowing it ? I know where the bug comes from, but
I begin to know Sage's code for graphs, and I reviewed myself the
ticket about edge addition, but there is no way for a normal user to
think of it as something else than a bug in Sage, or a very bad idea
of class design... :-/

Nathann

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] BipartiteGraphs

2010-05-11 Thread Robert Miller
Maybe the problem is that somewhere in the depths of is_perfect, a
BipartiteGraph is being created without the intention to use it that
way. Perhaps it is in self.complement(), or some other function that
is implicitly assuming to use the current class to make a copy, when
it should be making a copy as a different class. Maybe we just need to
assume less when creating derived objects...

On Tue, May 11, 2010 at 5:48 PM, Nathann Cohen  wrote:
> Hello Everybody
>
> I was working on a function is_perfect, which tests whether a given graph is
> perfect. This function has the bad idea to compute the complement of a
> graph.
>
> Writing the docstrings, I wrote that Bipartite Graphs are obviously perfect,
> which is perfectly true.
>
> Here is what happens in Sage :
>
> sage: g =
> graphs.RandomBipartite(8,4,.5)
> sage: g.is_perfect()
> ---
> RuntimeError  Traceback (most recent call last)
>
> /home/ncohen/ in ()
>
> /home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/graph.pyc
> in is_perfect(self, certificate)
>    1443 """
>    1444
> -> 1445 self_complement = self.complement()
>    1446
>    1447 start_complement = self_complement.girth()
>
> /home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
> in complement(self)
>    8497 for v in self:
>    8498 if not self.has_edge(u,v):
> -> 8499 G.add_edge(u,v)
>    8500 return G
>    8501
>
> /home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/bipartite_graph.pyc
> in add_edge(self, u, v, label)
>     690 # check for endpoints in different partitions
>     691 if self.left.issuperset((u,v)) or
> self.right.issuperset((u,v)):
> --> 692 raise RuntimeError('Edge vertices must lie in different
> partitions.')
>     693
>     694 # add the edge
>
> RuntimeError: Edge vertices must lie in different partitions.
>
> This comes from that fact that BipartiteGraphs are not graphs like others,
> that some functions are forbidden, others are modified to prevent the graph
> from becoming non-biapartite, etc, etc... I know all this. Meanwhile, I do
> not like to see such a code fail for this reason.
>
> As there are people around working on this BipartiteGraph class : what would
> you think of having the constructors returning regular graphs instead of
> these constrained versions of it ? This way, the users will only use this
> class if they means to, and not have several functions (and even code that
> should - not - be uncompatible ) disabled by default because of the
> constructor ? If you have any other ideas, they are welcome !
>
> Nathann
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>



-- 
Robert L. Miller
http://www.rlmiller.org/

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Rule based programming in Sage/Python?

2010-05-11 Thread Alasdair
Some years ago I started writing a z-transform routine for Maxima,
based on the following work for REDUCE:

http://www.zib.de/Symbolik/reduce/moredocs/ztrans.pdf

I'd be happy to rewrite it for Sage, except that I don't know how to
implement rule-based programs.  Can anybody provide me with a pointer?

Thanks,
Alasdair

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] BipartiteGraphs

2010-05-11 Thread Nathann Cohen
Hello Everybody

I was working on a function is_perfect, which tests whether a given graph is
perfect. This function has the bad idea to compute the complement of a
graph.

Writing the docstrings, I wrote that Bipartite Graphs are obviously perfect,
which is perfectly true.

Here is what happens in Sage :

sage: g =
graphs.RandomBipartite(8,4,.5)

sage: g.is_perfect()
---
RuntimeError  Traceback (most recent call last)

/home/ncohen/ in ()

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/graph.pyc
in is_perfect(self, certificate)
   1443 """
   1444
-> 1445 self_complement = self.complement()
   1446
   1447 start_complement = self_complement.girth()

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/generic_graph.pyc
in complement(self)
   8497 for v in self:
   8498 if not self.has_edge(u,v):
-> 8499 G.add_edge(u,v)
   8500 return G
   8501

/home/ncohen/.Sage/local/lib/python2.6/site-packages/sage/graphs/bipartite_graph.pyc
in add_edge(self, u, v, label)
690 # check for endpoints in different partitions
691 if self.left.issuperset((u,v)) or
self.right.issuperset((u,v)):
--> 692 raise RuntimeError('Edge vertices must lie in different
partitions.')
693
694 # add the edge

RuntimeError: Edge vertices must lie in different partitions.

This comes from that fact that BipartiteGraphs are not graphs like others,
that some functions are forbidden, others are modified to prevent the graph
from becoming non-biapartite, etc, etc... I know all this. Meanwhile, I do
not like to see such a code fail for this reason.

As there are people around working on this BipartiteGraph class : what would
you think of having the constructors returning regular graphs instead of
these constrained versions of it ? This way, the users will only use this
class if they means to, and not have several functions (and even code that
should - not - be uncompatible ) disabled by default because of the
constructor ? If you have any other ideas, they are welcome !

Nathann

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Fwd: Interested in learning to do an MPIR release?

2010-05-11 Thread Minh Nguyen
Hi Bill,

On Wed, May 12, 2010 at 10:34 AM, Bill Hart  wrote:
> Excellent! Thanks Minh.
>
> Below if a VERY rough first draft of the procedure. I'll fill each
> step in with more detail as the release proceeds.

Thank you for detailing the release procedure.


> Probably best to
> coordinate this via email and perhaps we'll make an html page on the
> MPIR website detailing all the steps so that anyone can do this by
> following the steps we come up with.

OK.

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Fwd: Interested in learning to do an MPIR release?

2010-05-11 Thread Bill Hart
Excellent! Thanks Minh.

Below if a VERY rough first draft of the procedure. I'll fill each
step in with more detail as the release proceeds. Probably best to
coordinate this via email and perhaps we'll make an html page on the
MPIR website detailing all the steps so that anyone can do this by
following the steps we come up with.

1. Tuning
=

If any new tuning needs to be done, cd tune and make tune on each of the

available platforms. Copy the result into the top level file gmp-mparam.h

*must be done on the relevant machine* and commit to svn. Do NOT remove

or overwrite the very long FFT_TABLE2 type parameters at the end of the

gmp-mparam.h if they exist.

Let Brian Gladman know once this is done so he can copy the tuning

parameters over for Windows (tuning is currently broken on Windows).

2. Preliminary testing
==

check out svn trunk and test on a handful of platforms and make sure it

isn't completely broken.

Let Brian Gladman know to test it on his Windows.

3. Make a Release Candidate (must be done on boxen.math)
===

Check out svn trunk into an appropriately named directory mpir-x.y.z on

boxen.math
edit the setversion script to correctly set the MPIR version number and

the library sonames
run setversion
commit to svn trunk
./configure
make dist (MUST be done on boxen.math)
cd doc
make pdf
rename pdf to mpir-x.y.z.pdf
sftp the mpir-x.y.z tarball and pdf doc to the www directory on

m...@sagemath on boxen but name the tarball mpir-x.y.z-rc1.tar.gz
update the website with the announcement (m...@sagemath:www/index.html)
Include details of new features in the announcement
List any known problems and remove any problems known to be fixed
Update changes.html with a list of new features for the release

4. Make a call for testing on mpir-devel


Let everyone know that the RC is available for testing

5. Testing
==

Test on SkyNet (all machines)
Test on Windows machines (Jeff Gilchrist often helps with this)
Test on sage.math, cuda1, ...
Update testing matrix in index.html as machines pass
ask others to do testing if you don't have access to suitable machines

6. Fix problems
===

Announce any problems on mpir-devel and get them fixed in svn
Iterate the above from 2 until everything works, changing the name of the

rc each iteration and updating link on website (index.html).

7. Paperwork


When the release cycle looks pretty stable, or when you find time:
Edit NEWS file with all new features and improvements
Edit ChangeLog file with new release date
Edit AUTHORS file with their new contributions
Update contributors and references in documentation doc/mpir.texi
make the pdf doc again and upload to website
makeinfo mpir.texi
check everything in to svn

7. Final Release


When an rc finally exists with no reported bugs:
Close fixed trac tickets on trac server
List any relevant papers of contributors on the changes.html page and

link from the features announced on index.html
Update contributors on index.html
generally check through website for errors, perhaps move some old release

announcements from the main page (index.html) to past.html
change name of final rc to mpir-x.y.z.tar.gz and update link on website
make announcement of final release on mpir-devel and perhaps sage-devel,
(give link to website in announcement)

Bill.

On 12 May 2010 00:52, Minh Nguyen  wrote:
> Hi Bill,
>
> On Wed, May 12, 2010 at 9:48 AM, Bill Hart  
> wrote:
>> Is anyone interested in learning how to do an MPIR release?
>
> Yes, I'm *very* interested in learning how to manage an MPIR release.
>
>
>> I can teach you how to do it, step-by-step from tuning, to making a
>> tarball, through testing to paperwork to announcement. No specific
>> prior experience with MPIR is required (some facility with the linux
>> command line will help).
>
> Thank you very much for your generous offer. I'm all ears.
>
> --
> Regards
> Minh Van Nguyen
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Fwd: Interested in learning to do an MPIR release?

2010-05-11 Thread Minh Nguyen
Hi Bill,

On Wed, May 12, 2010 at 9:48 AM, Bill Hart  wrote:
> Is anyone interested in learning how to do an MPIR release?

Yes, I'm *very* interested in learning how to manage an MPIR release.


> I can teach you how to do it, step-by-step from tuning, to making a
> tarball, through testing to paperwork to announcement. No specific
> prior experience with MPIR is required (some facility with the linux
> command line will help).

Thank you very much for your generous offer. I'm all ears.

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Fwd: Interested in learning to do an MPIR release?

2010-05-11 Thread Bill Hart
Is anyone interested in learning how to do an MPIR release? No
experience required!

I've just committed some changes to MPIR to fix the extended GCD
normalisation in MPIR for Sage and Pari and this is enough for a mini
MPIR 2.0.1 release.

I can teach you how to do it, step-by-step from tuning, to making a
tarball, through testing to paperwork to announcement. No specific
prior experience with MPIR is required (some facility with the linux
command line will help).

I'm not going to be doing this release myself, as I want to encourage
some others to learn to do it, so that MPIR is not always reliant on
one or two individuals to keep going.

Bill.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Differential forms

2010-05-11 Thread Jason Grout

On 05/11/2010 04:18 PM, jvkersch wrote:

Dear mailing list,

I was wondering if there is any interest in a Sage package to compute
with differential forms.  Right now, I have the rudiments of a
differential form class with the obvious operations (wedge product,
exterior differential, Hodge star, ...) but I want to take this
somewhat further: my goal is to be able to deal with Cartan's
structure equation, exterior differential systems, point symmetries
for ODEs, ...   These are all very algorithmic procedures, so they
would be relatively easy to implement.



I am interested.  I'm particularly interested in applications to 
teaching multivariable calculus.



Secondly, a more detailed question: while my class works well from a
Python point of view, I don't really know how to incorporate it into
the Sage hierarchy.  More specifically: the set of all differential
forms is a module over the ring of functions on R^n -- how would I
incorporate this algebraic structure in Sage?  Is there a parent
representing a function ring on R^n?

Since the result of "f = function(...); f.parent()" is "Symbolic
Ring", and I want to be able to coerce functions into 0-forms, should
I start with a module over the Symbolic Ring, or is another ring more
appropriate?



Maybe a module over callable symbolic expressions would be more 
appropriate starting point?  I've been doing some work on these in the 
past week.  With the patch up at 
http://trac.sagemath.org/sage_trac/ticket/8947 (needs review) and the 
patch http://trac.sagemath.org/sage_trac/ticket/8866 (already merged in 
4.4.2.alpha0), we have:



sage: f(x,y)=[3*x,e^x,2*x*y]
sage: f
(x, y) |--> (3*x, e^x, 2*x*y)
sage: f.parent()
Vector space of dimension 3 over Callable function ring with arguments 
(x, y)


This sort of gives us functions over modules (sort of a function from 
SR^2 --> SR^3 in this example).  However, Sage doesn't treat f as a 
function as much as it treats f as a vector of functions (though you can 
still call f, take its derivative, etc.).


Thanks,

Jason

--
Jason Grout

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Differential forms

2010-05-11 Thread William Stein
On Tue, May 11, 2010 at 4:18 PM, jvkersch  wrote:
> Dear mailing list,
>
> I was wondering if there is any interest in a Sage package to compute
> with differential forms.  Right now, I have the rudiments of a
> differential form class with the obvious operations (wedge product,
> exterior differential, Hodge star, ...) but I want to take this
> somewhat further: my goal is to be able to deal with Cartan's
> structure equation, exterior differential systems, point symmetries
> for ODEs, ...   These are all very algorithmic procedures, so they
> would be relatively easy to implement.
>
> Secondly, a more detailed question: while my class works well from a
> Python point of view, I don't really know how to incorporate it into
> the Sage hierarchy.  More specifically: the set of all differential
> forms is a module over the ring of functions on R^n -- how would I
> incorporate this algebraic structure in Sage?  Is there a parent
> representing a function ring on R^n?
>
> Since the result of "f = function(...); f.parent()" is "Symbolic
> Ring", and I want to be able to coerce functions into 0-forms, should
> I start with a module over the Symbolic Ring, or is another ring more
> appropriate?

Have you got anywhere reading the Sage developers guide?

http://sagemath.org/doc/developer/index.html

I can understand if you write back and say "I read it, and it doesn't
answer any of these questions".

>
> Last but not least, I noticed that there was some discussion on this
> mailing list on adding support for differential forms and exterior
> algebra using FriCAS and/or Reduce.  There is also a Maxima package
> that looks interesting.  Would this kind of solution be preferred over
> writing something from scratch?  Either way, I would be really
> interested in developing Sage support for differential forms.
>
> Please let me know what you think.  Sorry if I've overlooked anything!

I personally think what you're doing is great.  I definitely prefer
something built from scratch like you're doing instead of something
built on top of FriCAS/Maxima/Reduce.

William

>
> Sincerely,
> Joris
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Differential forms

2010-05-11 Thread jvkersch
Dear mailing list,

I was wondering if there is any interest in a Sage package to compute
with differential forms.  Right now, I have the rudiments of a
differential form class with the obvious operations (wedge product,
exterior differential, Hodge star, ...) but I want to take this
somewhat further: my goal is to be able to deal with Cartan's
structure equation, exterior differential systems, point symmetries
for ODEs, ...   These are all very algorithmic procedures, so they
would be relatively easy to implement.

Secondly, a more detailed question: while my class works well from a
Python point of view, I don't really know how to incorporate it into
the Sage hierarchy.  More specifically: the set of all differential
forms is a module over the ring of functions on R^n -- how would I
incorporate this algebraic structure in Sage?  Is there a parent
representing a function ring on R^n?

Since the result of "f = function(...); f.parent()" is "Symbolic
Ring", and I want to be able to coerce functions into 0-forms, should
I start with a module over the Symbolic Ring, or is another ring more
appropriate?

Last but not least, I noticed that there was some discussion on this
mailing list on adding support for differential forms and exterior
algebra using FriCAS and/or Reduce.  There is also a Maxima package
that looks interesting.  Would this kind of solution be preferred over
writing something from scratch?  Either way, I would be really
interested in developing Sage support for differential forms.

Please let me know what you think.  Sorry if I've overlooked anything!

Sincerely,
Joris

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Random matrices over Finite Fields

2010-05-11 Thread Roberto Nóbrega
As a note,

MatrixSpace(GF(2), nrows, ncols).random_element()

works as expected.

Regards,

Roberto.


On May 11, 5:39 pm, Roberto Nóbrega  wrote:
> Hello, all!
>
> After running
>
> random_matrix(GF(2), 2, 1)
>
> I always get the same matrix, [[1][1]].
>
> Also, the following code
>
> freq = {}
> for _ in range(1000):
>     M = random_matrix(GF(2), 2, 2)
>     M.set_immutable()
>     if M not in freq:
>         freq[M] = 1
>     else:
>         freq[M] += 1
> show(freq)
>
> gives a very different result from the uniform distribution that I was
> expecting. For example, the all-ones 2x2 matrix is the more probable,
> and matrices with a full-zero-row does not appear, although matrices
> with a full-zero-column does. In general, I noticed that the more
> "1's" the matrix has, the more probable it is.
>
> Am I missing something?
>
> Regards,
>
> Roberto.
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/sage-devel
> URL:http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] t2.math binary for Sage 4.4.2.alpha0

2010-05-11 Thread Minh Nguyen
Hi folks,

I have wrapped up a t2.math binary of Sage 4.4.2.alpha0. You can find it at

http://sage.math.washington.edu/home/release/sage-4.4.2.alpha0/sage-4.4.2.alpha0-t2.math.tar.gz

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Callable Symbolic Ring and the category framework

2010-05-11 Thread Jason Grout

On 05/11/2010 03:20 PM, Mike Hansen wrote:

On Tue, May 11, 2010 at 12:48 PM, Jason Grout
  wrote:

f(x)=x^2 (SR -->  SR)

f(x,y,z)=x*y (SR^3 -->  SR)

f(x,y,z)=[x*y,y+z]  (SR^3 -->  SR^2)

using the category framework?


What would you want to do once you have those maps?



Good question.  First, of course, call them, differentiate them, etc.

A special case would be linear maps, and functions might include the 
things up at http://trac.sagemath.org/sage_trac/ticket/2549.  As was 
just mentioned on sage-devel, you might also ask for various other 
matrix properties that really are determined by the transformation.


Another nice thing you could do is compose them with a function that 
takes things to RR^3, for example, so you can get a function which takes 
in a vector and gives back a transformed vector in RR^3.


Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: maxima-5.20.1.p0 fails to build on t2.math with Sage 4.4.2.alpha0

2010-05-11 Thread William Stein
On Tue, May 11, 2010 at 3:42 PM, Dr. David Kirkby
 wrote:
> On 05/11/10 07:56 AM, Juan Jose Garcia-Ripoll wrote:
>>
>> On Tue, May 11, 2010 at 6:17 AM, Dr. David Kirkby
>> mailto:david.kir...@onetel.net>> wrote:
>>
>>    Has the version of ECL been updated recently?
>>
>>
>> I insist that this is not a regression, it is just a misinterpretation
>> on our side of how mkstemp() should work (adding characters other than
>> letters seems stupid but it is specified as a possibility), so reverting
>> wouldn't help
>>
>>    3) A long term solution is to fix the bug in ECL.
>>
>>
>> I can produce a patch but it will take me some time.
>>
>> Could you please confirm that you received these emails, because some of
>> my answers do not seem to permeate into your responses.
>>
>> Juanjo
>
> I got one other email from you - with a link to the bug report on
> sourceforge. If there was another, then I did not see it.
>
> I understand ECL assumes there is something special about the dot in a
> filename. You have assume it is an extension, when in fact it need not be,
> as POSIX does not prohibit the use of a . in a temp file.
>
> I think a short term solution is the ecl install script is sage is modified
> to remove the /tmp/ECL files once the build has finished. Of course, that
> will fail if two people building ECL at the same time, but it *may* be ok if
> there is only one person building it, though I'm not sure from your
> description.

Two people at the same time wouldn't be a problem because of file
permissions, unless one of those people is root.

 -- William

> If the issue is the name of the file, not just that it is
> there, then it seems we can't even assume that. But I think deleting
> /tmp/ECL* is worthwhile. Doing it via cron has allowed Minh to build ECL, so
> hopefully it will work in most cases. I think you are implying we can't
> guarantee this, but working
>
> I've created
>
> http://trac.sagemath.org/sage_trac/ticket/8951
>
> I'll create a patch for that.
>
> It should be quite easy.
>
> Dave
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: maxima-5.20.1.p0 fails to build on t2.math with Sage 4.4.2.alpha0

2010-05-11 Thread Dr. David Kirkby

On 05/11/10 07:56 AM, Juan Jose Garcia-Ripoll wrote:

On Tue, May 11, 2010 at 6:17 AM, Dr. David Kirkby
mailto:david.kir...@onetel.net>> wrote:

Has the version of ECL been updated recently?


I insist that this is not a regression, it is just a misinterpretation
on our side of how mkstemp() should work (adding characters other than
letters seems stupid but it is specified as a possibility), so reverting
wouldn't help

3) A long term solution is to fix the bug in ECL.


I can produce a patch but it will take me some time.

Could you please confirm that you received these emails, because some of
my answers do not seem to permeate into your responses.

Juanjo


I got one other email from you - with a link to the bug report on sourceforge. 
If there was another, then I did not see it.


I understand ECL assumes there is something special about the dot in a filename. 
You have assume it is an extension, when in fact it need not be, as POSIX does 
not prohibit the use of a . in a temp file.


I think a short term solution is the ecl install script is sage is modified to 
remove the /tmp/ECL files once the build has finished. Of course, that will fail 
if two people building ECL at the same time, but it *may* be ok if there is only 
one person building it, though I'm not sure from your description. If the issue 
is the name of the file, not just that it is there, then it seems we can't even 
assume that. But I think deleting /tmp/ECL* is worthwhile. Doing it via cron has 
allowed Minh to build ECL, so hopefully it will work in most cases. I think you 
are implying we can't guarantee this, but working


I've created

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

I'll create a patch for that.

It should be quite easy.

Dave

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Ubuntu 10.04, JMOL, Java

2010-05-11 Thread Paulo César Pereira de Andrade
2010/5/11 Jan Groenewald :
> Hi

  Hi,

> On Fri, May 07, 2010 at 09:55:02AM -0700, Rob Beezer wrote:
>> Sounds like Dan Drake has a simple test working on a clean 10.04
>> install (thanks, Dan!), so that is good news, I believe.  If you want
>> to test your setup, in the notebook, try something simple like just
>>
>> var('x y')
>> plot3d(x^2+y^2, (x,-2,2), (y,-2,2))
>> and that should be good enough for openers.
>
> Maybe something to do with either
> 1) my crappy graphics card
> a...@numsha:~$ lspci|grep VGA
> 01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility 
> Radeon 9600 M10], (using open source drivers, I always found fglrx 
> proprietary ATI drivers buggy), or
> 2) that I had sun-java6 installed and purged it again (and confirmed 
> /etc/alternatives pointed at openjdk)
>
> But then above plot does not work for me :(
>
> The plot is just black, clicking Get Image opens
> a separate window which shows another black plot,
> which when attempting to drag to the desktop says
> error getting information about "=9k" and fails to copy.
> When you right clikc you can copy, but "paste" is disabled
> (greyed out) in the context menu when attempting to put this
> on the desktop. Also right click on the image and save as
> gives a black square window when opened in the default viewer,
> eog (eye of gnome).
>
> During this firefox at "about:plugins" (in the address bar)
> says: IcedTea NPR Web Browser Plugin (using IcedTea6 1.8 (6b18-1.8-0ubuntu1))
>    File: IcedTeaPlugin.so
>    Version:
>    The IcedTea NPR Web Browser Plugin (using IcedTea6 1.8 
> (6b18-1.8-0ubuntu1)) executes Java applets.
> and then lists versions from 1.1 to 1.6.0_18 all enabled.
>
> The terminal where sage was launched says:
>
> 2010-05-11 09:39:00+0200 [-] Starting factory 
> 
> java version "1.6.0_18"
> OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
> OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
> java.io.FileNotFoundException: /home/jan/.icedteaplugin/java.stderr (No such 
> file or directory)
>        at java.io.FileOutputStream.open(Native Method)
>        at java.io.FileOutputStream.(FileOutputStream.java:209)
>        at java.io.FileOutputStream.(FileOutputStream.java:160)
>        at sun.applet.PluginMain.(PluginMain.java:130)
>        at sun.applet.PluginMain.main(PluginMain.java:116)
> 2010-05-11 09:42:12+0200 [HTTPChannel,6,127.0.0.1] Request error: Connection 
> to the other side was lost in a non-clean fashion.
> script compiler ERROR: command expected
> line 1 command 1 of /home/admin/0/cells/2/sage0-size500.jmol?1273563709:
>            
> script ERROR: script compiler ERROR: command expected
> line 1 command 1 of /home/admin/0/cells/2/sage0-size500.jmol?1273563709:
>            
> eval ERROR:
> line 1 command 1:
>         script >> "/home/admin/0/cells/2/sage0-size500.jmol?1273563709" <<

  Does jmol work from the command line?

> So I close sage and install sun-java6 from the partner repositories:
>
> aptitude install sun-java6-jdk sun-java6-jre sun-java6-bin sun-java6-fonts 
> sun-java6-plugin (and agree to the licenses)
>
> It seems alternatives are now updated for me, and I do not need to.
>
> 
> The following NEW packages will be installed:
>  sun-java6-bin sun-java6-fonts sun-java6-jdk sun-java6-jre sun-java6-plugin
> 0 packages upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
> Need to get 56.6MB of archives. After unpacking 165MB will be used.
> Writing extended state information... Done
> Get:1 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
> lucid/partner sun-java6-jre 6.20dlj-1ubuntu3 [6,410kB]
> Get:2 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
> lucid/partner sun-java6-bin 6.20dlj-1ubuntu3 [29.4MB]
> Get:3 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
> lucid/partner sun-java6-jdk 6.20dlj-1ubuntu3 [20.7MB]
> Get:4 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
> lucid/partner sun-java6-fonts 6.20dlj-1ubuntu3 [1,876B]
> Get:5 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
> lucid/partner sun-java6-plugin 6.20dlj-1ubuntu3 [1,850B]
> Fetched 56.6MB in 8s (6,917kB/s)
> Preconfiguring packages ...
> Selecting previously deselected package sun-java6-jre.
> (Reading database ... 55%
> (Reading database ... 238600 files and directories currently installed.)
> Unpacking sun-java6-jre (from .../sun-java6-jre_6.20dlj-1ubuntu3_all.deb) ...
> Selecting previously deselected package sun-java6-bin.
> Unpacking sun-java6-bin (from .../sun-java6-bin_6.20dlj-1ubuntu3_i386.deb) ...
> sun-dlj-v1-1 license has already been accepted
> Selecting previously deselected package sun-java6-jdk.
> Unpacking sun-java6-jdk (from .../sun-java6-jdk_6.20dlj-1ubuntu3_i386.deb) ...
> sun-dlj-v1-1 license has already been accepted
> Selecting previously deselected package sun-java6-fonts.
> Unpacking sun-java6-fonts (from .../sun-java6-fonts_6.20dlj-1ubuntu3_al

[sage-devel] Random matrices over Finite Fields

2010-05-11 Thread Roberto Nóbrega
Hello, all!

After running

random_matrix(GF(2), 2, 1)

I always get the same matrix, [[1][1]].

Also, the following code

freq = {}
for _ in range(1000):
M = random_matrix(GF(2), 2, 2)
M.set_immutable()
if M not in freq:
freq[M] = 1
else:
freq[M] += 1
show(freq)

gives a very different result from the uniform distribution that I was
expecting. For example, the all-ones 2x2 matrix is the more probable,
and matrices with a full-zero-row does not appear, although matrices
with a full-zero-column does. In general, I noticed that the more
"1's" the matrix has, the more probable it is.

Am I missing something?

Regards,

Roberto.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Callable Symbolic Ring and the category framework

2010-05-11 Thread Mike Hansen
On Tue, May 11, 2010 at 12:48 PM, Jason Grout
 wrote:
> f(x)=x^2 (SR --> SR)
>
> f(x,y,z)=x*y (SR^3 --> SR)
>
> f(x,y,z)=[x*y,y+z]  (SR^3 --> SR^2)
>
> using the category framework?

What would you want to do once you have those maps?

--Mike

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Callable Symbolic Ring and the category framework

2010-05-11 Thread Jason Grout

This might be opening a can of worms, but...

Currently the callable symbolic ring (i.e., what we get when we do 
something like f(x)=x^2) blissfully ignores the infrastructure in Sage 
for defining maps.  Instead, (to the best of my knowledge) callable 
symbolic elements are just simple sugar over a symbolic expressions 
which prints a bit differently and makes __call__ invocations have a 
default variable order.  This is nice and simple, but it isn't really 
"pure", in the sense that Sage has functionality for defining maps 
between rings or vector spaces of rings.


So for those of you that did all of that hard, long, tedious, 
under-appreciated work on the category system: is there a 
straightforward way to represent functions like:


f(x)=x^2 (SR --> SR)

f(x,y,z)=x*y (SR^3 --> SR)

f(x,y,z)=[x*y,y+z]  (SR^3 --> SR^2)

using the category framework?

Thanks,

Jason


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Call for votes on Sage for Mac OS X

2010-05-11 Thread Georg S. Weber
 > > 2.) Having done this (or even not), shall we deliver the Mac OS X
> > binary distributions in one and the same directory, i.e. discard the
> > distinction (see E above) between "intel" and "powerpc" binary
> > directories? (This would imply that we should add some mechanism(s) in
> > the Sage binaries to detect whether they "want to" run on the
> > architecture/CPU/bitlength/OS version/environment they are started
> > on.)
>
> I don't understand this.  Do you want to double the size of the
> distribution?  If so, then I vote "no".
>
> William
>

Sorry for any confusion, let me clarify what I mean with my call for
votes no. 2. Currently we have, see e.g. 
http://www.sagemath.org/mirror/metalinks.html
:

osx/powerpc sage-4.4-OSX-32bit-10.4-PowerPC_G4-Darwin.dmg
osx/powerpc sage-4.4.1-OSX-32bit-10.5-PowerMacintosh-Darwin.dmg
osx/intel   sage-4.4.1-OSX-64bit-10.6-i386-Darwin.dmg
osx/intel   sage-4.4.1-OSX-32bit-10.4-i386-Darwin.dmg


and my proposal is to change this to:

osx  sage-x.y.z-OSX-64bit-10.6-i386-Darwin.dmg
osx  sage-x.y.z-OSX-32bit-10.6-i386-Darwin.dmg
osx  sage-x.y.z-OSX-32bit-10.5-PowerPC_G5-Darwin.dmg
osx  sage-x.y.z-OSX-32bit-10.4-i386-Darwin.dmg
osx  sage-x.y.z-OSX-32bit-10.4-PowerPC_G4-Darwin.dmg

i.e. not altering the binary distributions in size or content, but
simply provide them together in one directory, instead of the two
distinct former directories "(osx/)intel" and "(osx/)powerpc".

Cheers,
Georg


P.S.:
I think it would be great to have in the Sage build farm a CoreDuo
32bit OS X 10.6 machine, where Sage is built on regularly, for every
release. This certainly will help certain Sage users, see e.g. the
report at that post:

http://groups.google.com/group/sage-devel/browse_thread/thread/c7ee51a4e12ec5e0#
which *might* be a problem of the user's configuration/setup of
course, but it also might be the case that Sage 4.4 / Sage 4.4.1 /
Sage 4.4.2 does not even build currently on "CoreDuo 32bit OS X 10.6".
I can't test/work on this myself (having neither a CoreDuo 32bit
machine, nor any OS X version but 10.4), but I felt uncomfortable,
when responding in the just mentioned thread.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Call for votes on Sage for Mac OS X

2010-05-11 Thread William Stein
On Tue, May 11, 2010 at 12:02 PM, Dima Pasechnik  wrote:
>
> On May 11, 1:53 pm, Roman Pearce  wrote:
>> For what it's worth, PowerPC is totally obsolete and there were not
>> that many 32-bit only Intel Macs shipped before they switched to the
>> Core2.  I think you would do fine supporting only 64-bit x86 on 10.5
>> and 10.6.  That should cover everything back to Fall 2006, i.e. 0-4
>> year old machines, and at least 2/3 of all Macs in use.  Remember that
>> many old machines will simply *never die*.  They will be used for ssh
>> and browsing the web until their components fail.  Anyone doing
>> computations will probably have a newer machine.
>
> I am writing this on 17" Powerbook PPC G4, with Sage installed...
> Don't think I am going to buy a new Mac any time soon...

We are *definitely* not going to stop supporting PPC OS X anytime in
the near future.
If nothing else, it is a great platform to test on due to the
different endianess.

 -- William

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: How can I get and modify Notebook source?

2010-05-11 Thread kcrisman

> There is a pynac hg repo in the pynac spkg.

Which is not unpacked by default in a source distribution, and which
(presumably) would require someone to make an spkg and sage -f it each
time, though I may just be ignorant of an easier way to do that.  But
sage -b wouldn't do it, correct?

>
> Anyway, best is a more supported way to automate the 3 lines Tim posted 
> above, e.g.,
>
>    sage -i --devel pkg_name
>
> would install and setup the given package in a way for doing development.

That sounds wonderful.  I'm sorry if I sounded pugnacious, I am just
realizing that although I wanted to try to implement something like
this myself, I don't have the needed knowledge to do so in a
reasonable amount of time, so I'm trying to goad things into action,
if possible :)

- kcrisman

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Call for votes on Sage for Mac OS X

2010-05-11 Thread Dima Pasechnik

On May 11, 1:53 pm, Roman Pearce  wrote:
> For what it's worth, PowerPC is totally obsolete and there were not
> that many 32-bit only Intel Macs shipped before they switched to the
> Core2.  I think you would do fine supporting only 64-bit x86 on 10.5
> and 10.6.  That should cover everything back to Fall 2006, i.e. 0-4
> year old machines, and at least 2/3 of all Macs in use.  Remember that
> many old machines will simply *never die*.  They will be used for ssh
> and browsing the web until their components fail.  Anyone doing
> computations will probably have a newer machine.

I am writing this on 17" Powerbook PPC G4, with Sage installed...
Don't think I am going to buy a new Mac any time soon...

>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group athttp://groups.google.com/group/sage-devel
> URL:http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: How can I get and modify Notebook source?

2010-05-11 Thread William A. Stein




On May 11, 2010, at 10:56 AM, kcrisman  wrote:

> 
> 
> On May 11, 11:22 am, Jason Grout  wrote:
>> On 05/11/2010 01:45 AM, Tim Joseph Dumol wrote:
>> 
>> 
>> 
>> 
>> 
>>> On Tue, May 11, 2010 at 5:47 AM, Jason Grout
>>> mailto:jason-s...@creativetrax.com>> wrote:
>> 
>>> On 05/10/2010 01:27 PM, Tim Joseph Dumol wrote:
>> 
>>> Hi,
>> 
>>> The latest sagenb package is included in Sage 4.4.1
>>> (sagenb-0.8.p0.spkg). Then, extract and install it, then develop
>>> as usual.
>> 
>>> $ tar -xvf sagenb-0.8.p0.splg
>>> $ cd sagenb-0.8.p0/src/sagenb/
>>> $ sage -python setup.py install && sage -python setup.py develop
>> 
>>> `setup.py develop` allows you to develop on the package without
>>> needing
>>> to reinstall the package or rebuild Sage.
>> 
>>> What is the possibility of just copying the repository to the
>>> site-packages/sagenb directory?  Then someone could just go into
>>> that directory ($SAGE_ROOT/local/lib/python2.6/site-packages/...)
>>> and start making changes, check the log, etc.
>> 
>>> It's rather non-standard to do work directly in site-packages/*. I'd be
>>> much more comfortable with copying the repository to something like
>>> $SAGE_ROOT/devel/sagenb/ or something like that, and running `$sage
>>> -python setup.py install && sage -python setup.py develop` on package
>>> install. It would be trivial to create an hg_sagenb class wrapper once
>>> that's done. I'd love to hear other people's opinion on this.
>> 
>> +1 to making a directory in devel that contains the notebook code so
>> that the development process is much more standardized (e.g., go to a
>> directory in devel and work with normal mercurial commands).
>> 
> 
> Yes, this is exactly the kind of thing I had in mind.  Things that are
> really just for Sage should be part of the standard Sage devel
> process.  (Now we just need an hg_pynac to make it complete...)
> Thanks for considering it!
> 
> - kcrisman


The notebook is *not* just for sage.   

There is a pynac hg repo in the pynac spkg.

Anyway, best is a more supported way to automate the 3 lines Tim posted above, 
e.g.,

   sage -i --devel pkg_name

would install and setup the given package in a way for doing development.


 


> 
> -- 
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: How can I get and modify Notebook source?

2010-05-11 Thread kcrisman


On May 11, 11:22 am, Jason Grout  wrote:
> On 05/11/2010 01:45 AM, Tim Joseph Dumol wrote:
>
>
>
>
>
> > On Tue, May 11, 2010 at 5:47 AM, Jason Grout
> > mailto:jason-s...@creativetrax.com>> wrote:
>
> >     On 05/10/2010 01:27 PM, Tim Joseph Dumol wrote:
>
> >         Hi,
>
> >         The latest sagenb package is included in Sage 4.4.1
> >         (sagenb-0.8.p0.spkg). Then, extract and install it, then develop
> >         as usual.
>
> >         $ tar -xvf sagenb-0.8.p0.splg
> >         $ cd sagenb-0.8.p0/src/sagenb/
> >         $ sage -python setup.py install && sage -python setup.py develop
>
> >         `setup.py develop` allows you to develop on the package without
> >         needing
> >         to reinstall the package or rebuild Sage.
>
> >     What is the possibility of just copying the repository to the
> >     site-packages/sagenb directory?  Then someone could just go into
> >     that directory ($SAGE_ROOT/local/lib/python2.6/site-packages/...)
> >     and start making changes, check the log, etc.
>
> > It's rather non-standard to do work directly in site-packages/*. I'd be
> > much more comfortable with copying the repository to something like
> > $SAGE_ROOT/devel/sagenb/ or something like that, and running `$sage
> > -python setup.py install && sage -python setup.py develop` on package
> > install. It would be trivial to create an hg_sagenb class wrapper once
> > that's done. I'd love to hear other people's opinion on this.
>
> +1 to making a directory in devel that contains the notebook code so
> that the development process is much more standardized (e.g., go to a
> directory in devel and work with normal mercurial commands).
>

Yes, this is exactly the kind of thing I had in mind.  Things that are
really just for Sage should be part of the standard Sage devel
process.  (Now we just need an hg_pynac to make it complete...)
Thanks for considering it!

- kcrisman

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: How can I get and modify Notebook source?

2010-05-11 Thread Jason Grout

On 05/11/2010 01:45 AM, Tim Joseph Dumol wrote:

On Tue, May 11, 2010 at 5:47 AM, Jason Grout
mailto:jason-s...@creativetrax.com>> wrote:

On 05/10/2010 01:27 PM, Tim Joseph Dumol wrote:

Hi,

The latest sagenb package is included in Sage 4.4.1
(sagenb-0.8.p0.spkg). Then, extract and install it, then develop
as usual.

$ tar -xvf sagenb-0.8.p0.splg
$ cd sagenb-0.8.p0/src/sagenb/
$ sage -python setup.py install && sage -python setup.py develop

`setup.py develop` allows you to develop on the package without
needing
to reinstall the package or rebuild Sage.


What is the possibility of just copying the repository to the
site-packages/sagenb directory?  Then someone could just go into
that directory ($SAGE_ROOT/local/lib/python2.6/site-packages/...)
and start making changes, check the log, etc.


It's rather non-standard to do work directly in site-packages/*. I'd be
much more comfortable with copying the repository to something like
$SAGE_ROOT/devel/sagenb/ or something like that, and running `$sage
-python setup.py install && sage -python setup.py develop` on package
install. It would be trivial to create an hg_sagenb class wrapper once
that's done. I'd love to hear other people's opinion on this.




+1 to making a directory in devel that contains the notebook code so 
that the development process is much more standardized (e.g., go to a 
directory in devel and work with normal mercurial commands).


Thanks,

Jason

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Eigenspaces of vector spaces endomorphisms.

2010-05-11 Thread William Stein
On Tuesday, May 11, 2010, mmarco  wrote:
> While preparing a linear algebra class with sage, i found that the
> functions related to eigenvectors, eigenspaces and eigenvalues are not
> function of the endomorphism objects (which would be the
> mathematically correct deffinition), but of the matrix objects.
>
> Wouldn't it make sense to add these functions to the morphism class?
> It can be confusing to the students if we emphasize in class that
> these objects are intrinsecal of the endomorpshism, but when we
> present them in the computer, they are actually properties not of the
> endomorphism itself, but of the matrix that represents it.
>
> The same thing can be said about other functions such as the minimal
> polynomial, that can be defined after the endomorphism itself,
> forgetting about the representation.
>
> A similar thing can be said about inner products: if we have a vector
> space with an inner product defined, it would make sense to define
> functions such as the orthonormal basis of the space itself.
>
> What do you think.

Implement it and post a patch.

>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Eigenspaces of vector spaces endomorphisms.

2010-05-11 Thread mmarco
While preparing a linear algebra class with sage, i found that the
functions related to eigenvectors, eigenspaces and eigenvalues are not
function of the endomorphism objects (which would be the
mathematically correct deffinition), but of the matrix objects.

Wouldn't it make sense to add these functions to the morphism class?
It can be confusing to the students if we emphasize in class that
these objects are intrinsecal of the endomorpshism, but when we
present them in the computer, they are actually properties not of the
endomorphism itself, but of the matrix that represents it.

The same thing can be said about other functions such as the minimal
polynomial, that can be defined after the endomorphism itself,
forgetting about the representation.

A similar thing can be said about inner products: if we have a vector
space with an inner product defined, it would make sense to define
functions such as the orthonormal basis of the space itself.

What do you think.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] calling reviewers for Sage 4.4.2

2010-05-11 Thread John Cremona
On 11 May 2010 05:14, Minh Nguyen  wrote:
> Hi folks,
>
> Is anyone interested, or has some time to spare, to review various
> tickets for the upcoming rc release of Sage 4.4.2 or the final
> release? The following are necessary for any upcoming release of Sage
> 4.4.2, whether it be an rc or final release:
>
> * http://trac.sagemath.org/sage_trac/ticket/8944 --- 32 vs. 64 bit
> issues in matrix1.pyx
>

This one now has a positive review.

John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Sage 4.4.2.alpha0: numpy support for basic functions gives doctest failures in riemann.pyx

2010-05-11 Thread Wilfried Huss

Minh Nguyen schrieb:

Hi folks,

As reported on sage-devel [1], Sage 4.4.2.alpha0 mostly has the
following doctest failures:

* 32- vs. 64-bit issue in matrix/matrix1.pyx --- this is tracked at
ticket #8944 [2] and a patch is awaiting review.

* doctest failures in misc/sagedoc.py --- this can be fixed by
replacing the following line in makefile

all: build

with this line

all: build doc

* failures in calculus/riemann.pyx --- This is due to ticket #8479
[3]. The issue is now tracked at ticket #8946 [4]. Does anyone know
how to resolve the failures in riemann.pyx?
  

I posted a patch for this one.

[1] 
http://groups.google.com/group/sage-devel/browse_thread/thread/d1090e0af57adcf0

[2] http://trac.sagemath.org/sage_trac/ticket/8944

[3] http://trac.sagemath.org/sage_trac/ticket/8479

[4] http://trac.sagemath.org/sage_trac/ticket/8946

  


--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


Re: [sage-devel] Re: Ubuntu 10.04, JMOL, Java

2010-05-11 Thread Jan Groenewald
Hi

On Fri, May 07, 2010 at 09:55:02AM -0700, Rob Beezer wrote:
> Sounds like Dan Drake has a simple test working on a clean 10.04
> install (thanks, Dan!), so that is good news, I believe.  If you want
> to test your setup, in the notebook, try something simple like just
> 
> var('x y')
> plot3d(x^2+y^2, (x,-2,2), (y,-2,2))
> and that should be good enough for openers.

Maybe something to do with either 
1) my crappy graphics card
a...@numsha:~$ lspci|grep VGA
01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 
9600 M10], (using open source drivers, I always found fglrx proprietary ATI 
drivers buggy), or
2) that I had sun-java6 installed and purged it again (and confirmed 
/etc/alternatives pointed at openjdk)

But then above plot does not work for me :(

The plot is just black, clicking Get Image opens 
a separate window which shows another black plot,
which when attempting to drag to the desktop says
error getting information about "=9k" and fails to copy.
When you right clikc you can copy, but "paste" is disabled
(greyed out) in the context menu when attempting to put this
on the desktop. Also right click on the image and save as
gives a black square window when opened in the default viewer, 
eog (eye of gnome).

During this firefox at "about:plugins" (in the address bar)
says: IcedTea NPR Web Browser Plugin (using IcedTea6 1.8 (6b18-1.8-0ubuntu1))
File: IcedTeaPlugin.so
Version: 
The IcedTea NPR Web Browser Plugin (using IcedTea6 1.8 (6b18-1.8-0ubuntu1)) 
executes Java applets.
and then lists versions from 1.1 to 1.6.0_18 all enabled.

The terminal where sage was launched says:

2010-05-11 09:39:00+0200 [-] Starting factory 

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
java.io.FileNotFoundException: /home/jan/.icedteaplugin/java.stderr (No such 
file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:209)
at java.io.FileOutputStream.(FileOutputStream.java:160)
at sun.applet.PluginMain.(PluginMain.java:130)
at sun.applet.PluginMain.main(PluginMain.java:116)
2010-05-11 09:42:12+0200 [HTTPChannel,6,127.0.0.1] Request error: Connection to 
the other side was lost in a non-clean fashion.
script compiler ERROR: command expected
line 1 command 1 of /home/admin/0/cells/2/sage0-size500.jmol?1273563709:
    
script ERROR: script compiler ERROR: command expected
line 1 command 1 of /home/admin/0/cells/2/sage0-size500.jmol?1273563709:
    
eval ERROR: 
line 1 command 1:
 script >> "/home/admin/0/cells/2/sage0-size500.jmol?1273563709" <<


So I close sage and install sun-java6 from the partner repositories:

aptitude install sun-java6-jdk sun-java6-jre sun-java6-bin sun-java6-fonts 
sun-java6-plugin (and agree to the licenses)

It seems alternatives are now updated for me, and I do not need to.


The following NEW packages will be installed:
  sun-java6-bin sun-java6-fonts sun-java6-jdk sun-java6-jre sun-java6-plugin 
0 packages upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
Need to get 56.6MB of archives. After unpacking 165MB will be used.
Writing extended state information... Done
Get:1 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
lucid/partner sun-java6-jre 6.20dlj-1ubuntu3 [6,410kB]
Get:2 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
lucid/partner sun-java6-bin 6.20dlj-1ubuntu3 [29.4MB]
Get:3 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
lucid/partner sun-java6-jdk 6.20dlj-1ubuntu3 [20.7MB]
Get:4 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
lucid/partner sun-java6-fonts 6.20dlj-1ubuntu3 [1,876B] 
Get:5 http://proxy.aims.ac.za/apt-cacher/archive.canonical.com/ubuntu/ 
lucid/partner sun-java6-plugin 6.20dlj-1ubuntu3 [1,850B]
Fetched 56.6MB in 8s (6,917kB/s)
   
Preconfiguring packages ...
Selecting previously deselected package sun-java6-jre.
(Reading database ... 55%
(Reading database ... 238600 files and directories currently installed.)
Unpacking sun-java6-jre (from .../sun-java6-jre_6.20dlj-1ubuntu3_all.deb) ...
Selecting previously deselected package sun-java6-bin.
Unpacking sun-java6-bin (from .../sun-java6-bin_6.20dlj-1ubuntu3_i386.deb) ...
sun-dlj-v1-1 license has already been accepted
Selecting previously deselected package sun-java6-jdk.
Unpacking sun-java6-jdk (from .../sun-java6-jdk_6.20dlj-1ubuntu3_i386.deb) ...
sun-dlj-v1-1 license has already been accepted
Selecting previously deselected package sun-java6-fonts.
Unpacking sun-java6-fonts (from .../sun-java6-fonts_6.20dlj-1ubuntu3_all.deb) 
...
Selecting previously deselected package sun-java6-plugin.
Unpacking sun-java6-plugin (from 
.../sun-java6-plugin_6.20dlj

[sage-devel] Re: maxima-5.20.1.p0 fails to build on t2.math with Sage 4.4.2.alpha0

2010-05-11 Thread Minh Nguyen
Hi David,

On Tue, May 11, 2010 at 2:17 PM, Dr. David Kirkby
 wrote:



> As a short temp hack, I've set up a cron job to clear out /tmp/ECL* every
> two hours (midnight, 2am, 4am etc). This can't guarantee a build, but I
> think it is the only short term option.

Thank you for this. I have resumed my build. This time the build went
OK and has just finished.

-- 
Regards
Minh Van Nguyen

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org


[sage-devel] Re: Call for votes on Sage for Mac OS X

2010-05-11 Thread curious
I have the honor of owning a CoreDuo MacMini, and iBook G4, and a
Core2Duo
MacBook Pro. All of these machines are in good health and produce very
adequate
performance. That said, to keep Sage current on all three machines I
need
OS10.4 32bit PowerPC G4, OS10.6 32bit CoreDuo, and OS10.6 64bit
Core2Duo
versions of Sage. Obsolete does not correspond to incapable. I would
like to point out
that the "least capable" of these machines the iBook G4 roughly
compares in floating
point performance to a Cray computer of the late 1980 variety.

On May 10, 12:32 pm, "Georg S. Weber" 
wrote:
> Hi sage-devel,
>
> currently, there are several issues. I've got a bit spare time right
> now to work on them, but can't do that alone. Help, and helpful
> comments, are appreciated.
>
> Some technicalities: Mac OS X runs on PowerPC and Intel CPUs (iPhone
> OS runs also on ARM, but that does not matter for us for the time
> being), and on those CPUs either in 32bit mode or/and 64bit mode. In
> principle, there is the possibility of "universal" binaries, but for
> the Sage distribution, we did not achieve this yet. So in terms of
> Sage binary distributions, there are four possible combinations of CPU
> type and bit length, and one and the same binary distribution is built
> for only one of these four combinations. But fixing the combination of
> CPU type and bitlength sometimes is not enough. E.g., there are Macs
> with (32bit) PowerPC G5 CPUs and Macs with (32bit) PowerPC G4 CPUs,
> and Sage binary distributions built on the former won't run on the
> latter. We don't have much experience with Intel CoreDuo vs. Core2Duo
> vs. i5 vs. i7 yet, but fun might await us there, too. Then, there is
> Mac OS X 10.4, as well as 10.5, and 10.6. Still reading this post?
> Good. :-) Let me try to summarize the current state of affairs for
> Sage w.r.t. these combinations, especially Sage binary distributions.
>
> A) Sage is supported under Mac OS X 10.4 only for 32bit-versions (not
> 64-bit), on CPU architectures PowerPC G4, PowerPC G5, and Intel.
> (Note: 64-bit support under Mac OS X 10.4 is existent, but hardly
> usable.).
>
> B) Sage is supported under Mac OS X 10.5 only for 32bit-versions (not
> 64-bit), on CPU architectures PowerPC G5, and Intel. (Notes: OS X 10.5
> does not work on all Macs with PowerPC G4 CPUs. 64-bit support under
> Mac OS X 10.5 still seems not to be satisfactory enough).
>
> C) Sage is supported under Mac OS X 10.6 only for 64bit-versions (not
> 32-bit) and only on Intel CPUs. (Notes: OS X 10.6 does not run on
> PowerPC CPUs at all, Apple simply does not support that. 64-bit is the
> default bitlength for OS X 10.6. However, on certain Macs with CoreDuo
> CPUs, which seem to be "32bit only", there is at least one unresolved
> recent user report of building Sage currently being broken --- it
> seems the Sage 4.4 MPIR spkg won't build in this 32bit/10.6 setting.)
>
> D) Sage binary distributions for Mac OS X are in general "upwards
> compatible", but almost always not "downwards compatible". I.e. a Sage
> binary distribution built on OS X 10.4 will work on OS X 10.5, one
> built on a PowerPC G4 CPU will work on a PowerPC G5 CPU, a 32-bit
> version will work on a 64-bit OS, but in each of these cases not the
> other way around. (Note: There have been user reports in the past that
> the PowerPC G4 version works on their Macs with a PowerPC G3 CPU, but
> to my knowledge, that is the only case of a kind of "downwards
> compatibility". AFAIK, Sage binary distributions built on a 32-bit OS
> run on a 64-bit OS, but e.g. sage-clone might be broken, as well as
> sage-update --- there is at least one recent user report hinting at
> this, but I don't know for sure.)
>
> E) Currently, the Sage download page for Mac OS X binaries is divided
> into "intel" and "powerpc". Under "intel", there are usually two
> bdists: one for "32bit-10.4-i386", and one for "64bit-10.6-i386".
> Especially, for MacIntel OS X 10.5, as of late there is no regular
> genuine sage bdist (but the 10.4 one can be used under OS X 10.5
> without problems, AFAIK). Under "powerpc", there are usually also two
> bdists: one for "32bit-10.4-PowerPC_G4", and one for "32bit-10.5-
> PowerMacintosh" (the latter is a "G5 CPU" one, and probably should be
> named "...PowerPC_G5" instead).
>
> F) Information on this is scattered around in certain Readme's, and
> not always complete (or even correct --- e.g. with respect to OS X
> 10.6 on PowerPC).
>
> Now the calls for votes:
>
> 1.) Shall we "set in stone" the above A) through D)? (This would imply
> adjusting the documentation and certain Readme's, see F.)
>
> 2.) Having done this (or even not), shall we deliver the Mac OS X
> binary distributions in one and the same directory, i.e. discard the
> distinction (see E above) between "intel" and "powerpc" binary
> directories? (This would imply that we should add some mechanism(s) in
> the Sage binaries to detect whether they "want to" run on the
> architecture/CPU/bitlength/