Re: [sage-combinat-devel] sage-5.0.beta14 is out...

2012-05-02 Thread Nicolas M. Thiery
On Tue, May 01, 2012 at 09:14:08PM -0400, Franco Saliola wrote:
 I compiled sage-4.8 from scratch today, but the queue does not apply
 for me. The problem is with trac12215_weak_cached_function.patch.

Shoot, sorry! I had fixed that, but forgot to push. It should be good now.

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] sage-5.0.beta14 is out...

2012-05-02 Thread Franco Saliola
Hello Nicolas,

On Wed, May 2, 2012 at 3:50 AM, Nicolas M. Thiery
nicolas.thi...@u-psud.fr wrote:
 On Tue, May 01, 2012 at 09:14:08PM -0400, Franco Saliola wrote:
 I compiled sage-4.8 from scratch today, but the queue does not apply
 for me. The problem is with trac12215_weak_cached_function.patch.

 Shoot, sorry! I had fixed that, but forgot to push. It should be good now.

Good news, bad news and good news.

The good news is that with your fix, the queue applies cleanly on 4.8.

The bad news is there is an import error on startup: No module named
non_unital_algebras. Indeed, there is no such file. Maybe you forgot
to push the file? Or did you guard the patch containing it?

The good news is that if I comment out the corresponding import line
in finite_dimensional_algebras_with_basis.py, then sage starts up
properly. So we just need to find that file.

By the way, I figure we should have sage-combinat working on 4.8 for
the Sage Days next week, which is why I keep testing this.

Franco

--

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-combinat-devel] sage-5.0.beta14 is out...

2012-05-02 Thread Nicolas M. Thiery
On Wed, May 02, 2012 at 08:53:54AM -0400, Franco Saliola wrote:
 The bad news is there is an import error on startup: No module named
 non_unital_algebras. Indeed, there is no such file. Maybe you forgot
 to push the file? Or did you guard the patch containing it?

Ok, got it now. Of course that did not happen on my machine since the
file renamed in the build directory (the worst is that I actually ran
a locate to find that file ...). Fixed and pushed. We really need a
build bot. And a build directory cleaner ...

 By the way, I figure we should have sage-combinat working on 4.8 for
 the Sage Days next week, which is why I keep testing this.

Yes. That's actually the only reason why I did not drop support for
4.8. That being said, Sage starts on 4.8, but I make no claim on how
robust the various features in the queue are.

Thanks for investigating this!

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.



Re: [sage-devel] Re: Sage 5.0.beta14 and ARM(ubuntu)

2012-05-02 Thread Julien Puydt
Le mardi 01 mai, Dima Pasechnik a écrit:
 I suppose 10 hours is still acceptable  for a build (I expect it
 actually be quicker with a HD,
 as the solid state drive in my AC100 is kind of slow, and might take
 a lot of wallclock time
 during the build).

More memory will also shorten the build time, I think : not only is the
big storage slow, but it's also used pretty heavily for the swap.

 I certainly cannot predict how often a manual intervention will be
 needed, but let's hope for the
 best. 

If it's an ubuntu box, it shouldn't need any more manual intervention
than an X86_64...

Snark on #sagemath

-- 
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: Sage 5.0.beta14 and ARM(ubuntu)

2012-05-02 Thread Jeroen Demeyer
On 2012-05-01 17:38, William Stein wrote:
 Thanks for researching this!  So I could buy a Trim-Slice H250 for
 about $350, get a name assigned to it (trim.math.washington.edu)? and
 put it in our server room.  But it will take 10 hours to build sage.
10 hours isn't so bad.  We already have 3 buildbot machines slower than
that.

-- 
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: SAT and MAXSAT in Sage

2012-05-02 Thread Dima Pasechnik
On 2012-05-01, Tom Boothby tomas.boot...@gmail.com wrote:
 At one point, Victor Miller, William Stein and I looked at interfacing
 directly to minisat, but IMO, we stopped due to a lack of a nice
 interface.  I've tried to rewrite my SAT approach every time I solve a
 new problem with SAT solvers -- forcing me to rethink it every time.

 In general, I've gotten happier with the interface every time, and I'm
 fairly satisfied with this.  In particular, it feels very similar to
 the interface for DLXCPP, the ExactCover solver in Sage.  It supports
 any hashable variables, and most SAT solvers.  I don't know anything
 about MAXSAT.

well, there you have weights on clauses, and the goal is to find an
assignment minimising the total weight of unsatisfied clauses.
It would report such an assigment, and/or the corresponding total 
weight. One can use integer linear programming for this, but this
is often sub-optimal.


 If anybody wants to use this, I'm happy to place it in the public domain.

 SATPROG = '/home/boothby/minisat'
 class SAT:
 def __init__(self,clauses):
 self.vars = {}
 self.clauses = []
 for c in clauses:
 self(*c)
 def __getitem__(self,k):
 if k in self.vars:
 return self.vars[k]
 else:
 r = self.vars[k] = len(self.vars)+1
 return r
 def __call__(self,pos = (),neg = ()):
 clause = [` self[v]` for v in pos]
 clause+= [`-self[v]` for v in neg]
 self.clauses.append(clause)
 def __str__(self):
 s = 'p cnf %s %s\n'%(len(self.vars), len(self.clauses))
 s+= ' 0\n'.join(map(' '.join, self.clauses+['']))
 return s

 def solve(self):
 fn = tmp_filename()
 open(fn+.sat,'w').write(str(self))
 os.system(%s -verb=0 %s.sat %s.sol /dev/null%(SATPROG,fn,fn))
 sol = open(fn+.sol)
 res = sol.readline()[:-1]
 if res == SAT:
 xtovar = dict((v,k) for k,v in self.vars.iteritems())
 keys = map(int,sol.readline().split(' ')[:-1])
 return [xtovar[i] for i in keys if i  0], [xtovar[-i] for
 i in keys if i  0]
 else:
 return None

 def all_sols(self):
 sol = self.solve()
 while sol is not None:
 pos,neg = sol
 yield pos,neg
 self(pos=neg,neg=pos)
 sol = self.solve()

 Example:

 sage: a,b,c,d = var('a,b,c,d')
 sage: clauses = [
 ...[ [a,b],[c] ], # a or b or not c
 ...[ [a,c],[b] ], # a or c or not b
 ...[ [c,d],[]   ], # c or d
 ...
 sage: ]
 sage: for sol in SAT(clauses):
 ...   pos,neg = sol
 ...   print pos
 [a, d]
 [d]
 [a, c]
 [a, c, d]
 [a, b, d]
 [b, c]
 [b, c, d]
 [a, b, c]
 [a, b, c, d]

 On Tue, May 1, 2012 at 2:40 AM, Dima Pasechnik dimp...@gmail.com wrote:
 On 2012-05-01, Martin Albrecht martinralbre...@googlemail.com wrote:
 Hi,

 On Tuesday 01 May 2012, Dima Pasechnik wrote:
 Has there been any discussion and/or consensus on how to encode boolean
 formulae in Sage?

 So far the only interfaces to SAT Solvers were fire  forget interfaces for
 Boolean polynomials. There also the logic module but I never used it.

 The latter (which I was not even aware about, thanks for pointing it
 out!) is very basic. In constructs truth tables and decides
 satisfiability by searching them, which makes it pretty useless for
 real problems.
 On the other hand it can parse quite complicated expressions, so it
 seems to be a reasonable starting point for extension.
 Or maybe not...

 Dima


 I, incidentally, need to solve some MAXSAT problems from Sage-generated
 data, and am musing about writing a proper interface to akmaxsat, see
 http://www.uni-ulm.de/fileadmin/website_uni_ulm/iui.inst.190/Mitarbeiter/ku
 egel/akmaxsat_1.1.tgz which has a Sage-compatible licence, by the way...

 Dima

 Cheers,
 Martin

 --
 name: Martin Albrecht
 _pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
 _www: http://martinralbrecht.wordpress.com/
 _jab: martinralbre...@jabber.ccc.de


 --
 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


Re: [sage-devel] Re: sage-5.0.beta14 : Error building GMP-ECM

2012-05-02 Thread Jeroen Demeyer
On 2012-05-01 00:08, Volker Braun wrote:
 (like, do binutils support SSE4?)
MPIR does this.

-- 
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] sage-5.0.rc0 released

2012-05-02 Thread Jeroen Demeyer
Dear Sage lovers,

We're releasing Sage 5.0.rc0.

Source archive:

http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0.tar

Upgrade path:

http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0/

The source and upgrade path can also be found on the mirror network
(you might need to wait a while before the mirrors are synchronized):

http://www.sagemath.org/download-latest.html


Please build, test, and report!  We'd love to hear about your
experiences with this release.

== Tickets ==

* We closed 500 tickets in this release. For details, see

  http://boxen.math.washington.edu/home/release/sage-5.0.rc0/tickets.html

Closed tickets:

#2732: cython in Debian build doesn't have the right include paths
[Reviewed by Jeroen Demeyer]
#5943: Sage 3.4.2.a0: len(prime_range(2^50)) segfaults [Reviewed by
Michael Orlitzky, Keshav Kini, Volker Braun]
#11844: Race condition in building MPIR/yasm [Reviewed by Leif Leonhardy]
#12315: OS X Lion: pari fails self tests [Reviewed by John Palmieri]
#12319: OS X Lion: gsl fails self tests [Reviewed by John Palmieri]
#12424: OS X Lion: symmetrica doesn't work [Reviewed by John Palmieri]
#12765: MPIR doesn't compile with GCC-4.7.0 on ia64 [Reviewed by Jeroen
Demeyer]
#12782: When building GCC, build MPIR without the C++ interface
[Reviewed by Jeroen Demeyer]

Merged in sage-5.0.rc0:

#5859: Michael Orlitzky: sage -coverageall fails on directories with
zero tests [Reviewed by André Apitzsch]
#8119: Robert Bradshaw: Rename change the hash value of some objects
[Reviewed by Florent Hivert, Nicolas M. Thiéry, Nicolas Borie]
#11616: Leif Leonhardy, Jeroen Demeyer: Upgrade MPIR to a more recent
upstream release [Reviewed by Jeroen Demeyer, Leif Leonhardy, Volker Braun]
#12272: Jeroen Demeyer: More # long time additions [Reviewed by Georg S.
Weber]
#12812: Andrey Novoseltsev: Bug in summation of toric divisors [Reviewed
by Volker Braun]
#12830: Leif Leonhardy: Work around GCC 4.7.0 bug on ia64 and improve
the GMP-ECM spkg [Reviewed by Jeroen Demeyer]
#12833: Nathann Cohen: Crashes and doctests problems with Gurobi
[Reviewed by John Perry]
#12837: Leif Leonhardy: MPFR doesn't compile with GCC-4.7.0 on ia64
[Reviewed by Volker Braun]
#12857: Jeroen Demeyer: Split off Graphics class from plot.py [Reviewed
by Benjamin Jones, Florent Hivert]
#12888: David Coudert: Set new default parameters for RandomGNP
[Reviewed by Nathann Cohen]

-- 
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] Top level readme.txt needs updating.

2012-05-02 Thread Jeroen Demeyer
On 2012-04-29 13:32, David Kirkby wrote:
 This still says you need a fortran compiler, except on OSX, with no
 mention of the gcc package, or how one might use or disable it. I'm
 not sure of the methods myself, but clearly it needs changing before
 5.0 is released.

I made
http://trac.sagemath.org/sage_trac/ticket/12898

-- 
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] Some images are not shown in tutorial

2012-05-02 Thread Nicu Tofan
Hello!

While reading the tutorial in 4.8 I've noticed that some images are not
shown. I've since installed sage-5.0.beta14 and it shows the same
behaviour. The tutorial from online notebook shows same behaviour. The
strange thing is that the source contains required lines and the image
exists. It may be something wrong with my station and I can't test a
different one right now. Please tell me if you see the images below the
following paragraph:

http://www.sagenb.org/doc/live/tutorial/tour_algebra.html#euler-s-method-for-systems-of-differential-equations
*[Euler’s Method for Systems of Differential Equations*]
In the next example, we will illustrate Euler’s method for first and second
order ODEs. We first recall the basic idea for first order equations. Given
an initial value problem of the form
*(this is where the image is missing)*

I have tested this in Ubuntu 64-bit with Firefox, Chromium and Konqueror.

Thanks,
Nick

-- 
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] Some images are not shown in tutorial

2012-05-02 Thread Nicu Tofan
Hi, again!

I have a virtual machine running XP and Chrome shows same behaviour. It's
console does not report any error related to images (but reports *Uncaught
SyntaxError: Unexpected token * in tour_algebra.html:3912 ).

The DOM tree simply lacks the div node that contains the image.

Nick

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread John Cremona
This one example (#12893) is a good illustration of how non-trivial a
task it is to add doctests, and also how important it is to do so:
not ony was a (small) bug found in one the the newly tested functions,
but another bug was revealed somewhere else in Sage.  So adding
doctests is extremely likely to end up in identifying and (hopefully)
fixing bugs, which can be hard and time-consuming, and certainly
involves some knowledge of what the functions are really doing.

That said, there is also a use for the testing which (I think) David K
did a while back which was to fire random input at random functions to
see what happens, with somewhat embarrassing results for some function
I wrote which have not all been fixed yet.  (e.g. mwrank('0 0 0 0')
hangs forever because -- as everyone is supposed to know -- mwrank
wants 5 integers input, and it is waiting for a 5th, but will never
get it.  In this example I did write a patch which I thought solved
the problem 19 months ago, but it was not approved and nothing has
been done on that since)

John

On 2 May 2012 01:26, Dr. David Kirkby david.kir...@onetel.net wrote:
 On 05/ 1/12 10:33 PM, Benjamin Jones wrote:

 Here [1] is a patch I just wrote to increase the doctest coverage of
 one file mentioned here (linear_code.py) to 100%. Please review! I'm
 going to work on the other files in that directory as I have time.

 [1] http://trac.sagemath.org/sage_trac/ticket/12893

 --
 Benjamin Jones


 Great. I'm not able to review it, but hopefully someone else can.


 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

-- 
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] Changes to supported platforms

2012-05-02 Thread Jeroen Demeyer
I made some changes to http://wiki.sagemath.org/SupportedPlatforms

I duplicated the page into a sage-4.8 and a sage-5.0 part and made the
changes for sage-5.0.

I also introduced a new category almost fully supported.  This is for
systems on which Sage is tested by a Buildbot and it mostly works apart
from a few doctest errors.

-- 
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] Changes to supported platforms

2012-05-02 Thread David Kirkby
On 2 May 2012 09:44, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 I made some changes to http://wiki.sagemath.org/SupportedPlatforms

 I duplicated the page into a sage-4.8 and a sage-5.0 part and made the
 changes for sage-5.0.

 I also introduced a new category almost fully supported.  This is for
 systems on which Sage is tested by a Buildbot and it mostly works apart
 from a few doctest errors.

Despite the electricity costs, I can if you want make a Solaris 11 x86
box available soon. It's an X4200

http://www.etopiamedia.net/emtnn/pdfs/X4200_DS.pdf

It has two AMD CPUs, which I think are dual core, though I must admit
I'm not sure. So there will be at least 2 cores, possiblly 4. I'd need
to check the configuration. However, the machine will not be as fast
as hawk.

Since my machine hawk is used for the OpenSolaris, is it possible
for you to download the source to hawk, and copy it to the Solaris 11
machine? I'd rather you did not download the same file twice to two
sepparate machines on the same network. I can set up ssh without
passwords, so it should need no more than an scp command to copy the
file from hawk to the other machine, whose name I forget.

When 5.0 is released, I'll test that on SPARC. I did offer to William
to manage t2.math again, but I can't seem to access the management
console, and since the machine is now unbootable, I can't sort it out.

I'm not able to make the CentOS 4.7 machines available to the
buildbot, but can test on them occasionally. The last beta compiled
fine on one of them, and despite failing two doctests, they passed
when run a second time.


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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread David Kirkby
On 2 May 2012 09:43, John Cremona john.crem...@gmail.com wrote:
 This one example (#12893) is a good illustration of how non-trivial a
 task it is to add doctests, and also how important it is to do so:
 not ony was a (small) bug found in one the the newly tested functions,
 but another bug was revealed somewhere else in Sage.  So adding
 doctests is extremely likely to end up in identifying and (hopefully)
 fixing bugs, which can be hard and time-consuming,

Yes, I agree.

I wish I could convince William a bit more of the importance of this.

 and certainly
 involves some knowledge of what the functions are really doing.

That's where I can't really help. My background is not mathematics,
though I'm not totally mathematically retarded. Number theory used to
be a hobby of mine, but not any more.

 That said, there is also a use for the testing which (I think) David K
 did a while back which was to fire random input at random functions to
 see what happens, with somewhat embarrassing results for some function
 I wrote which have not all been fixed yet.  (e.g. mwrank('0 0 0 0')
 hangs forever because -- as everyone is supposed to know -- mwrank
 wants 5 integers input, and it is waiting for a 5th, but will never
 get it.

Yes, it was me who fired random data into Sage.

19 months ago I found:

sage: seed(1,2)

will crash Sage, on every platform I checked (Linux, OS X and OpenSolaris).

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

I've just checked the latest beta (only on Linux) and again it crashes
Sage. I guess it will crash on Solaris and OS X too, though I don't
have time to check.

It's possible that indicates an underlying problem, that is not
specific to calling seed incorrectly, but I just happened to find it
using seed.

If anyone else has some spare CPU cycles, they could try writing code
to crash Sage. It would be best if they did not use mine, but
developed their own, as I suspect each person would approach it a
different way, and be more likely to find bugs.

 In this example I did write a patch which I thought solved
 the problem 19 months ago, but it was not approved and nothing has
 been done on that since)
 John

I thought there was an issue with the patch John. Perhaps it did not
fully solve the problem, but at least partially solved it. Can you
give me the number, and I'll take a look again. I guess if it
partially solves a problem, but not fully solves it, the patch is
better than no patch. I don't have time to look now - I am at work.


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] Changes to supported platforms

2012-05-02 Thread Jeroen Demeyer
On 2012-05-02 11:12, David Kirkby wrote:
 Despite the electricity costs, I can if you want make a Solaris 11 x86
 box available soon. It's an X4200
 
 http://www.etopiamedia.net/emtnn/pdfs/X4200_DS.pdf
 
 It has two AMD CPUs, which I think are dual core, though I must admit
 I'm not sure. So there will be at least 2 cores, possiblly 4. I'd need
 to check the configuration. However, the machine will not be as fast
 as hawk.
 
 Since my machine hawk is used for the OpenSolaris, is it possible
 for you to download the source to hawk, and copy it to the Solaris 11
 machine? I'd rather you did not download the same file twice to two
 sepparate machines on the same network. I can set up ssh without
 passwords, so it should need no more than an scp command to copy the
 file from hawk to the other machine, whose name I forget.
Sure.  The more buildbot boxes we have, the better.

-- 
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] Top level readme.txt needs updating.

2012-05-02 Thread Jeroen Demeyer
On 2012-04-29 13:32, David Kirkby wrote:
 This still says you need a fortran compiler, except on OSX, with no
 mention of the gcc package, or how one might use or disable it. I'm
 not sure of the methods myself, but clearly it needs changing before
 5.0 is released.
 
 Dave
 

I have made a first attempt at updating the README, needs review:
http://trac.sagemath.org/sage_trac/ticket/12898

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread John Cremona
On 2 May 2012 10:36, David Kirkby david.kir...@onetel.net wrote:
 On 2 May 2012 09:43, John Cremona john.crem...@gmail.com wrote:
 This one example (#12893) is a good illustration of how non-trivial a
 task it is to add doctests, and also how important it is to do so:
 not ony was a (small) bug found in one the the newly tested functions,
 but another bug was revealed somewhere else in Sage.  So adding
 doctests is extremely likely to end up in identifying and (hopefully)
 fixing bugs, which can be hard and time-consuming,

 Yes, I agree.

 I wish I could convince William a bit more of the importance of this.

I'm sure that William agrees entirely with what I said.


 and certainly
 involves some knowledge of what the functions are really doing.

 That's where I can't really help. My background is not mathematics,
 though I'm not totally mathematically retarded. Number theory used to
 be a hobby of mine, but not any more.

 That said, there is also a use for the testing which (I think) David K
 did a while back which was to fire random input at random functions to
 see what happens, with somewhat embarrassing results for some function
 I wrote which have not all been fixed yet.  (e.g. mwrank('0 0 0 0')
 hangs forever because -- as everyone is supposed to know -- mwrank
 wants 5 integers input, and it is waiting for a 5th, but will never
 get it.

 Yes, it was me who fired random data into Sage.

 19 months ago I found:

 sage: seed(1,2)

 will crash Sage, on every platform I checked (Linux, OS X and OpenSolaris).

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

 I've just checked the latest beta (only on Linux) and again it crashes
 Sage. I guess it will crash on Solaris and OS X too, though I don't
 have time to check.

 It's possible that indicates an underlying problem, that is not
 specific to calling seed incorrectly, but I just happened to find it
 using seed.

 If anyone else has some spare CPU cycles, they could try writing code
 to crash Sage. It would be best if they did not use mine, but
 developed their own, as I suspect each person would approach it a
 different way, and be more likely to find bugs.

 In this example I did write a patch which I thought solved
 the problem 19 months ago, but it was not approved and nothing has
 been done on that since)
 John

 I thought there was an issue with the patch John. Perhaps it did not
 fully solve the problem, but at least partially solved it. Can you
 give me the number, and I'll take a look again. I guess if it
 partially solves a problem, but not fully solves it, the patch is
 better than no patch. I don't have time to look now - I am at work.

It's #10108.

If the best solution is an upstream change to mwrank's input parsing,
then I am willing to do what is needed.  We are going to upgrade the
version of eclib (which includes mwrank) in sage in the next release
anyway, as in ticket #10993.  Currently, using the default way to
input integers into C++, all whitespace including newlines is ignored,
so whenever the input is incomplete mwrank just waits for the rest,
and this never happens since Sage only ever sends one line of input.

John



 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

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Simon King
Hi David,

On 2 Mai, 11:36, David Kirkby david.kir...@onetel.net wrote:
 sage: seed(1,2)

 will crash Sage, on every platform I checked (Linux, OS X and OpenSolaris).

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

I uploaded a patch that solves the problem and needs review (and adds
seed(1,2) as doctest, of course...)

Cheers,
Simon

-- 
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-5.0.rc0 released

2012-05-02 Thread Nicu Tofan
Well, on my machine is eating all my memory (I believe is near the end,
since the log file is already 24 MB).

I have attached the tree of processes and the command used to start each
one. As it is there for a while, it may be a GCC bug .

Ubuntu 11.10 - 64-bit
 4 GB memory

 Architecture: x86_64
 CPU op-mode(s): 32-bit, 64-bit
 Byte Order: Little Endian
 CPU(s): 2
 On-line CPU(s) list: 0,1
 Thread(s) per core: 1
 Core(s) per socket: 2
 CPU socket(s): 1
 NUMA node(s): 1
 Vendor ID: GenuineIntel
 CPU family: 6
 Model: 23
 Stepping: 10
 CPU MHz: 1600.000
 BogoMIPS: 5649.14
 L1d cache: 32K
 L1i cache: 32K
 L2 cache: 3072K
 NUMA node0 CPU(s): 0,1


Nick

-- 
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
PID PPIDCommand
27632757/bin/bash
28922763make
28932892/bin/sh -c cd spkg  \?../spkg/pipestatus \??env 
SAGE_PARALLEL_SPKG_BUILD='' ./install all 21 \??tee -a ../install.log
28942893bash ../spkg/pipestatus env SAGE_PARALLEL_SPKG_BUILD='' 
./install all 21 tee -a ../install.log
28952894bash ./install all
28962894tee -a ../install.log
35982895make -j1 all
35993598/bin/sh -c $SAGE_ROOT/spkg/pipestatus sage-spkg 
${SAGE_SPKG_OPTS} ppl-0.11.2.p1 21 tee -a 
$SAGE_ROOT/spkg/logs/ppl-0.11.2.p1.log
36003599bash $SAGE_ROOT/spkg/pipestatus sage-spkg  ppl-0.11.2.p1 21 
tee -a $SAGE_ROOT/spkg/logs/ppl-0.11.2.p1.log
36013600bash $SAGE_ROOT/spkg/bin/sage-spkg ppl-0.11.2.p1
36023600tee -a $SAGE_ROOT/spkg/logs/ppl-0.11.2.p1.log
19669   3601bash ./spkg-check
19670   19669   make check
19671   19670   /bin/bash -c fail= failcom='exit 1'; \?for f in x $MAKEFLAGS; 
do \?  case $f in \?*=* | --[!k]*);; \?*k*) failcom='fail=yes';; \?  
esac; \?done; \?dot_seen=no; \?target=`echo check-recursive | sed 
s/-recursive//`; \?list='. utils src Watchdog tests interfaces demos doc m4'; 
for subdir in $list; do \?  echo Making $target in $subdir; \?  if test 
$subdir = .; then \?dot_seen=yes; \?local_target=$target-am; \?  
else \?local_target=$target; \?  fi; \?  (CDPATH=${ZSH_VERSION+.}:  
cd $subdir  make  $local_target) \?  || eval $failcom; \?done; \?if test 
$dot_seen = no; then \?  make  $target-am || exit 1; \?fi; test -z $fail
19797   19671   /bin/bash -c fail= failcom='exit 1'; \?for f in x $MAKEFLAGS; 
do \?  case $f in \?*=* | --[!k]*);; \?*k*) failcom='fail=yes';; \?  
esac; \?done; \?dot_seen=no; \?target=`echo check-recursive | sed 
s/-recursive//`; \?list='. utils src Watchdog tests interfaces demos doc m4'; 
for subdir in $list; do \?  echo Making $target in $subdir; \?  if test 
$subdir = .; then \?dot_seen=yes; \?local_target=$target-am; \?  
else \?local_target=$target; \?  fi; \?  (CDPATH=${ZSH_VERSION+.}:  
cd $subdir  make  $local_target) \?  || eval $failcom; \?done; \?if test 
$dot_seen = no; then \?  make  $target-am || exit 1; \?fi; test -z $fail
19798   19797   make check
19799   19798   /bin/bash -c fail= failcom='exit 1'; \?for f in x $MAKEFLAGS; 
do \?  case $f in \?*=* | --[!k]*);; \?*k*) failcom='fail=yes';; \?  
esac; \?done; \?dot_seen=no; \?target=`echo check-recursive | sed 
s/-recursive//`; \?list='. PIP_Problem Powerset Partially_Reduced_Product 
MIP_Problem Polyhedron Grid'; for subdir in $list; do \?  echo Making $target 
in $subdir; \?  if test $subdir = .; then \?dot_seen=yes; \?
local_target=$target-am; \?  else \?local_target=$target; \?  fi; \?  
(CDPATH=${ZSH_VERSION+.}:  cd $subdir  make  $local_target) \?  || eval 
$failcom; \?done; \?if test $dot_seen = no; then \?  make  $target-am || 
exit 1; \?fi; test -z $fail
29071   19799   /bin/bash -c fail= failcom='exit 1'; \?for f in x $MAKEFLAGS; 
do \?  case $f in \?*=* | --[!k]*);; \?*k*) failcom='fail=yes';; \?  
esac; \?done; \?dot_seen=no; \?target=`echo check-recursive | sed 
s/-recursive//`; \?list='. PIP_Problem Powerset Partially_Reduced_Product 
MIP_Problem Polyhedron Grid'; for subdir in $list; do \?  echo Making $target 
in $subdir; \?  if test $subdir = .; then \?dot_seen=yes; \?
local_target=$target-am; \?  else \?local_target=$target; \?  fi; \?  
(CDPATH=${ZSH_VERSION+.}:  cd $subdir  make  $local_target) \?  || eval 
$failcom; \?done; \?if test $dot_seen = no; then \?  make  $target-am || 
exit 1; \?fi; test -z $fail
29072   29071   make check
29073   29072   make ascii_dump_load1 exceptions1 mipproblem1 mipproblem3 
mipproblem2
29227   29073   g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src 
-I../../utils -I../../tests -DNDEBUG=1 -I$SAGE_ROOT/local/include -g -O2 
-frounding-math -I$SAGE_ROOT/local/include -W -Wall -MT mipproblem1.o -MD -MP 
-MF .deps/mipproblem1.Tpo -c -o mipproblem1.o mipproblem1.cc
29228   29227   

Re: [sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nathann Cohen
Hellooo Nick !!!

As John said it already the Cbc package was updated recently, and the 
current version (2.7.5) would not work with an old version of Sage. This 
being said, the old cbc package is still somewhere on the internet, and one 
way to fix your old Sage installation (4.8) may be to install the old 
version of Cbc. Here's how you can do that :

sage -f http://www.sagemath.org//packages/archive/cbc-2.3.p2.spkg

(using -f instead of -i forces the installation, just in case Sage would 
not like it)

It will install  compile the old version which should fit your 
installation better. Of course the best remains to use the latest Sage 
version available :-)

Tell me if it works !!

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] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nicu Tofan
2012/5/2 Nathann Cohen nathann.co...@gmail.com

 Hellooo Nick !!!


 :)

As John said it already the Cbc package was updated recently, and the
 current version (2.7.5) would not work with an old version of Sage. This
 being said, the old cbc package is still somewhere on the internet, and one
 way to fix your old Sage installation (4.8) may be to install the old
 version of Cbc. Here's how you can do that :

 sage -f http://www.sagemath.org//packages/archive/cbc-2.3.p2.spkg

 (using -f instead of -i forces the installation, just in case Sage would
 not like it)

 It will install  compile the old version which should fit your
 installation better. Of course the best remains to use the latest Sage
 version available :-)


  4.8 is not old, is the version advertised on site:
http://www.sagemath.org/. Yeah, I'm just trolling. Anyway, I was expecting
some kind of mechanism to map between sage version and package versions
that it allows.


 Tell me if it works !!

 Nathann


It fails to build just like the version that I've downloaded from trunk
(see #irc log in first message):

 In file included from CbcEventHandler.cpp:8:0:
 CbcEventHandler.hpp:137:43: error: ‘NULL’ was not declared in this scope


-- 
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: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nathann Cohen
 It fails to build just like the version that I've downloaded from trunk (see
 #irc log in first message):

 In file included from CbcEventHandler.cpp:8:0:
 CbcEventHandler.hpp:137:43: error: ‘NULL’ was not declared in this scope

From trunk ? Then do you mean that CBC (and not Sage) fails to build ?

I think you can get rid of your problem by making Sage believe that
Cbc is not installed. And you can do that by removing the cbc file
from SAGE_ROOT/spkg/installed/

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] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nicu Tofan
Quick review:
- downloaded sage 4.8
- build-ed sage
- installed all optional packages (why? to test them and because I was
having an interesting reading and poor machine was bored)
- (this is where I would have expected sage to complain that a particular
CBC package is not compatible with this version)
- ld complains on
./sage -b test
./sage -b main
- tried to solve the problem myself
- searched for the library
- surprise! the library does not have that particular component any-more
- walked the trunk back in time to find it (did not met my grandfather)
- downloaded that version; the version failed to build just like the
package that you have provided
- (unimportant steps like getting current trunk for CBC and build to see if
it does not generate the library that's missing - it does not)

The confusion may arose from a lack of apparent reason for all this
trouble, as I see. As I previously said, I was expecting (wild guess) that
I can get 4.8 and, then, retrieve the trunk. It has been explained to me
that there is no trunk. :)

I have since discovered [sage-release] and the serious debate there along
with sage-5.0.beta14 that is working and I'm happily reviewing this 2 lines
patch http://trac.sagemath.org/sage_trac/ticket/12393. :) The problem is
not mine, so to speak.

Nick

-- 
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: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nathann Cohen
Hello Nick !

Could you tell me how the second trick I gave you went ?

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


[sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread john_perry_usm
Nick

On May 2, 12:47 am, Nicu Tofan nicu.to...@gmail.com wrote:
 The problem is not me being unable to use sage...

Ah, I had misunderstood.

 I was thinking that sage 4.8, when installed and used in the way I
 presented it (which looks pretty standard to me) does not work well.

I agree that it is a bug that sage-4.8 should download the most recent
version of Cbc we have available, rather than the one appropriate to
it. And that's what's really weird, since sage itself reports a
specific version once installed.

Nathann, do you know how the distribution of the Cbc package works? It
sounds as if Sage downloads a very vaguely-named Cbc.spkg (say),
when it should look for a more specifically-named Cbc275.spkg or
Cbc23.spkg.

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


[sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nathann Cohen
Helloo !!

Nathann, do you know how the distribution of the Cbc package works? It 
 sounds as if Sage downloads a very vaguely-named Cbc.spkg (say), 
 when it should look for a more specifically-named Cbc275.spkg or 
 Cbc23.spkg. 


No clue O_o
I never heard of anything related to an association between Sage version 
and spkgs, but it may indeed be nice in this situation. Probably not on the 
client's side but rather on the server.

There may not be that many not-backward-compatible changes in Sage's spkgs. 
Anyway the 5.0 will soon be out :-)

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


[sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread john_perry_usm
Nathann

 I never heard of anything related to an association between Sage version
 and spkgs, but it may indeed be nice in this situation. Probably not on the
 client's side but rather on the server.

Yes, exactly.

 Anyway the 5.0 will soon be out :-)

While true, and while I think it's impossible to fix this, given that
4.8 is old news, I suspect this is a problem that will crop up again
if we ever upgrade Cbc  don't find some way around this. Although,
upgrading this time was hard enough that we should probably never
attempt it again. X-D

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] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nathann Cohen
 While true, and while I think it's impossible to fix this, given that
 4.8 is old news, I suspect this is a problem that will crop up again
 if we ever upgrade Cbc  don't find some way around this. Although,
 upgrading this time was hard enough that we should probably never
 attempt it again. X-D

You never know. I swore a thousand times that I would never touch this
package again. Until the day  :-D

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


[sage-devel] Re: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread john_perry_usm
Hello again

 It looks as if sage downloaded the newer Cbc package.

Oddly, I just looked in my sage-4.8 directory, and found that spkg/
optional contains cbc-2.3.p2.spkg, whereas

  sage: optional_packages()

reports

  (['cbc-2.7.5'],...

Nick, can you look in your $SAGE_ROOT/spkg/optional and tell us what
version of the cbc package was installed?

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


[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread mmarco
About doctsting, when we talk about 100% coverage, do we mean really
100% of the functions?

I mean: i am writing classes for braid groups and finitely presented
groups. This implies writing the corresponding procedures for _mul_
_pow_ _inverse_ _call_ and so on. This procedures are vastly tested in
all the other doctests of the class. There are also some auxiliary
functions which are writen only to be used by other functions (which
are apropiatelly tested). Do i have to write documentation strings,
with the corresponding doctest for all these functions? Even for
trivial ones such as _repr_ or _latex_?

-- 
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-5.0.rc0 released

2012-05-02 Thread Franco Saliola
On Wed, May 2, 2012 at 3:02 AM, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 Dear Sage lovers,

 We're releasing Sage 5.0.rc0.

 Please build, test, and report!  We'd love to hear about your
 experiences with this release.

Same doctest errors with 'make ptest' as for beta14:

$ uname -a
Darwin lacim-macpro-02 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7
16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64

For details:
https://groups.google.com/d/msg/sage-release/_wQyG4AHkB0/18l-HeIUGp0J

Franco

--

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Simon King
Hi Marco,

On 2 Mai, 16:41, mmarco mma...@unizar.es wrote:
 Do i have to write documentation strings,
 with the corresponding doctest for all these functions? Even for
 trivial ones such as _repr_ or _latex_?

Yes. In these cases, the method definition plus doc string would
likely look like

def _repr_(self):

TESTS::

sage: B = some command to create a braid
sage: B# indirect doctest
the representation of B


Note the indirect doctest, which is important, since otherwise the
coverage script will complain about the fact that the name of the to-
be-tested method (_repr_) does not occur in the test.

Cheers,
Simon

-- 
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] sage-5.0.rc0 on FreeBSD

2012-05-02 Thread Stephen Montgomery-Smith
I just built sage-5.0.rc0 on FreeBSD.  When I do make test, one of the 
test failures is puzzling me:


sage -t  -force_lib devel/sage/sage/tests/startup.py
**
File 
/usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/startup.py, 
line 13:

sage: sage0('numpy' in sys.modules)
Expected:
False
Got:
True
**

Any ideas?

If it helps, I installed a bunch of the optional packages.  Maybe one of 
these causes numpy to be installed at start-up time.


--
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: Sage 5.0.beta14 and ARM(ubuntu)

2012-05-02 Thread William Stein
On Tue, May 1, 2012 at 11:42 PM, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 On 2012-05-01 17:38, William Stein wrote:
 Thanks for researching this!  So I could buy a Trim-Slice H250 for
 about $350, get a name assigned to it (trim.math.washington.edu)? and
 put it in our server room.  But it will take 10 hours to build sage.
 10 hours isn't so bad.  We already have 3 buildbot machines slower than
 that.

Very cool.  I hereby plan to purchase a Trim-Slice for the server room
for Sage development purposes.

Question: I have an old atom N270 netbook with Linux.  Would it be
useful for me to turn this on and put on the internet for sage build
testing?

 -- 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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread kcrisman


On May 2, 11:27 am, Simon King simon.k...@uni-jena.de wrote:
 Hi Marco,

 On 2 Mai, 16:41, mmarco mma...@unizar.es wrote:

  Do i have to write documentation strings,
  with the corresponding doctest for all these functions? Even for
  trivial ones such as _repr_ or _latex_?

 Yes. In these cases, the method definition plus doc string would
 likely look like

 def _repr_(self):
     
     TESTS::

         sage: B = some command to create a braid
         sage: B    # indirect doctest
         the representation of B
     

 Note the indirect doctest, which is important, since otherwise the
 coverage script will complain about the fact that the name of the to-
 be-tested method (_repr_) does not occur in the test.


Yup, and same for things like _pow_ as you say.  On the plus side, it
can really be as trivial as that - just repeat some other doctest
where it is used.

-- 
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: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread kcrisman


On May 2, 10:00 am, Nathann Cohen nathann.co...@gmail.com wrote:
 Helloo !!

 Nathann, do you know how the distribution of the Cbc package works? It

  sounds as if Sage downloads a very vaguely-named Cbc.spkg (say),
  when it should look for a more specifically-named Cbc275.spkg or
  Cbc23.spkg.

I believe that what happens is that

sage -i X

downloads the most recent X-x.y.z.spkg.  For standard packages, this
will actually be something *older* if you are using a development
version, because that list only changes when a new Sage comes out
(this has caused me no end of trouble in the past).  But I guess for
optional ones, as soon as the list of optional spkgs changes
(somewhere?) it will download the next one.   I don't know if there is
an easy way to make those also behave correctly, assuming the
standard spkg behavior is correct.

sage -f X-x.y.z

should solve the problem, if you replace the exact X and x.y.z you are
looking for.

-- 
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: sage-5.0.rc0 on FreeBSD

2012-05-02 Thread kcrisman


On May 2, 12:01 pm, Stephen Montgomery-Smith step...@missouri.edu
wrote:
 I just built sage-5.0.rc0 on FreeBSD.  When I do make test, one of the
 test failures is puzzling me:

 sage -t  -force_lib devel/sage/sage/tests/startup.py
 **
 File
 /usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/start 
 up.py,
 line 13:
      sage: sage0('numpy' in sys.modules)
 Expected:
      False
 Got:
      True
 **

Yeah, we definitely don't want that.

 Any ideas?

 If it helps, I installed a bunch of the optional packages.  Maybe one of
 these causes numpy to be installed at start-up time.

-- 
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: Sage 5.0.beta14 and ARM(ubuntu)

2012-05-02 Thread Jeroen Demeyer
On 2012-05-02 18:50, William Stein wrote:
 Question: I have an old atom N270 netbook with Linux.  Would it be
 useful for me to turn this on and put on the internet for sage build
 testing?
Just do it, so I can play with it :-)

-- 
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: ld complains that cannot find -lOsiVol when doing ./sage -b test

2012-05-02 Thread Nicu Tofan
Hello!

Nathan,
when cbc-2.7.5 is removed from SAGE_ROOT/spkg/installed/ both main and test
fail with same (rather awkward) error message:

building 'sage.rings.complex_mpc' extension
 Executing 1 command (using 1 thread)

 gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
 -fPIC -I$SAGE_ROOT/local/include -I$SAGE_ROOT/local/include/csage
 -I$SAGE_ROOT/devel/sage/sage/ext -I$SAGE_ROOT/local/include/python2.6 -c
 sage/rings/complex_mpc.c -o
 build/temp.linux-x86_64-2.6/sage/rings/complex_mpc.o -w

 sage/rings/complex_mpc.c: In function
 ‘__pyx_pf_4sage_5rings_11complex_mpc_15MPComplexNumber_16__float__’:
 sage/rings/complex_mpc.c:9720:48: error: cast specifies array type

 error: command 'gcc' failed with exit status 1
 sage: There was an error installing modified sage library code.


The client side implementation sounds the way to me, because one may try to
install a spkg from other obscure sources, not only the server, right? (I'm
guessing here, I'm a noob to sage). By the way, I know I'm stating the
obvious here but - just to be sure:
I DID asked sage 4.8 to get cbc-2.7.5 (not cbc). And that is because ./sage
-optional reports that package with a version number attached to it. So
there are two problems to solve: the output of the -optional should be in
sync with what is capable a particular version to handle AND the server or
the client should also check and refuse to install a spkg that is not
supported.

Although, upgrading this time was hard enough that we should probably never
 attempt it again. X-D

:))

 While true, and while I think it's impossible to fix this, given that 4.8
 is old news, I ...


Wishful thinking. 4.8 is not old news. :))

John,
my sage-4.8/spkg/optional also contains cbc-2.3.p2.spkg but has
cbc-2.7.5.spkg, too. What is spooky is that cbc-2.7.5.spkg and all other
spkg's have 01 may as the last time they were modified, while
cbc-2.3.p2.spkg was last modified a few hours ago. How do these files come
into existence, again?

kcrisman,
Again, I will repeat what I said above just for clarity:
In this particular case sage -f cbc-2.3.p2.spkg fails because cbc can't be
build. I tried with both:
./sage -f http://www.sagemath.org//packages/archive/cbc-2.3.p2.spkg
and
./sage -f cbc-2.3.p2.spkg
As I said, the error is:
CbcEventHandler.hpp:137:43: error: ‘NULL’ was not declared in this scope

Nick

-- 
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: sage-5.0.rc0 on FreeBSD

2012-05-02 Thread Dima Pasechnik


On Wednesday, May 2, 2012 4:01:09 PM UTC, Stephen Montgomery-Smith wrote:

 I just built sage-5.0.rc0 on FreeBSD.  When I do make test, one of the 
 test failures is puzzling me: 

 sage -t  -force_lib devel/sage/sage/tests/startup.py 
 ** 
 File 
 /usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/startup.py,
  

 line 13: 
  sage: sage0('numpy' in sys.modules) 
 Expected: 
  False 
 Got: 
  True 
 ** 

 Any ideas? 

 If it helps, I installed a bunch of the optional packages.  Maybe one of 
 these causes numpy to be installed at start-up time. 


one should be able to trace this even in install.log, I 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] Fix detecting of linker flags in R (#12787) needs review

2012-05-02 Thread Jeroen Demeyer
May I ask again for somebody to look at this please?

On 2012-03-31 22:46, Jeroen Demeyer wrote:
 At #12787, I have a fix for the R spkg which uses -### instead of -v to
 detect the linker options used by gcc/gfortran.  Using -### is
 recommended by the GCC manual to do this.
 
 This fix allows building a 32-bit version of R on 64-bit operating systems.
 
 More information can be found on the upstream ticket
 https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14865
 
 So, please review:
 http://trac.sagemath.org/sage_trac/ticket/12787
 
 Thanks,
 Jeroen.

-- 
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: Sage 5.0.beta14 and ARM(ubuntu)

2012-05-02 Thread mmarco

 Question: I have an old atom N270 netbook with Linux.  Would it be
 useful for me to turn this on and put on the internet for sage build
 testing?

  -- William

I have one of those, and i did compile sage a couple of times there
with no problems. It shouldn't be different than any other x86
computer, except for the speed.

-- 
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] optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Stephen Montgomery-Smith

On 05/02/12 12:46, Dima Pasechnik wrote:



On Wednesday, May 2, 2012 4:01:09 PM UTC, Stephen Montgomery-Smith wrote:

I just built sage-5.0.rc0 on FreeBSD. When I do make test, one of the
test failures is puzzling me:

sage -t -force_lib devel/sage/sage/tests/startup.py
**
File

/usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/startup.py,

line 13:
sage: sage0('numpy' in sys.modules)
Expected:
False
Got:
True
**

Any ideas?

If it helps, I installed a bunch of the optional packages. Maybe one of
these causes numpy to be installed at start-up time.


one should be able to trace this even in install.log, I think...


I can confirm that not adding any optional packages makes this test 
work.  So it is the optional packages that seem to create this problem.


Would it be fair to say that the optional packages should be considered 
unreliable?  I am having other problems with sage when the optional 
packages are installed.  Unfortunately they seem inconsistent in their 
appearance, otherwise I would provide more details.


--
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: Changes to supported platforms

2012-05-02 Thread Johan Grönqvist

2012-05-02 10:44, Jeroen Demeyer skrev:

I made some changes to http://wiki.sagemath.org/SupportedPlatforms


The only debian version mentioned for sage-5.0 is Debian 5.0 on x86 
(Both 32-bit and 64-bit) which is unsupported since February.


Debian 6.0, the only released and supported version at this time, is not 
mentioned.


Is the re a reason for this, or is it a mistake?

Regards

Johan

--
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] optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Jeroen Demeyer
On 2012-05-02 21:18, Stephen Montgomery-Smith wrote:
 Would it be fair to say that the optional packages should be considered
 unreliable?
Indeed.  That could be one of the reasons they are considered optional.

-- 
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: Changes to supported platforms

2012-05-02 Thread Jeroen Demeyer
On 2012-05-02 21:40, Johan Grönqvist wrote:
 2012-05-02 10:44, Jeroen Demeyer skrev:
 I made some changes to http://wiki.sagemath.org/SupportedPlatforms
 
 The only debian version mentioned for sage-5.0 is Debian 5.0 on x86
 (Both 32-bit and 64-bit) which is unsupported since February.
 
 Debian 6.0, the only released and supported version at this time, is not
 mentioned.
 
 Is the re a reason for this, or is it a mistake?
Can you confirm that sage-5.0.rc0 builds and passes all tests on Debian
6.0?  If so, you can change the page to include Debian 6.0.

-- 
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: optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread kcrisman


On May 2, 3:43 pm, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 On 2012-05-02 21:18, Stephen Montgomery-Smith wrote: Would it be fair to say 
 that the optional packages should be considered
  unreliable?

 Indeed.  That could be one of the reasons they are considered optional.

Though some optional packages are very good.  Do you have a list of
which ones you installed?  Some would probably be pretty easy to rule
out, and this should be documented in that test or fixed.

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Michael Orlitzky
On 05/02/2012 01:00 PM, kcrisman wrote:
 

 Note the indirect doctest, which is important, since otherwise the
 coverage script will complain about the fact that the name of the to-
 be-tested method (_repr_) does not occur in the test.

 
 Yup, and same for things like _pow_ as you say.  On the plus side, it
 can really be as trivial as that - just repeat some other doctest
 where it is used.
 

You can usually call the underscore methods directly. An obvious test
for them is that they actually get used:

  sage: import sys
  sage: a = ZZ(randint(-sys.maxint, sys.maxint))
  sage: b = ZZ(randint(-sys.maxint, sys.maxint))
  sage: a.__mul__(b) == a*b
  True

-- 
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: optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Simon King
Hi Jeroen,

On 2012-05-02, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 On 2012-05-02 21:18, Stephen Montgomery-Smith wrote:
 Would it be fair to say that the optional packages should be considered
 unreliable?
 Indeed.  That could be one of the reasons they are considered optional.

Really?? I hope I am allowed to disagree.

I thought that optional packages are supposed to work on all supported
platforms and are supposed to be reliable (and peer reviewed and so on)
- which is why there are *experimental* packages, that may lack reliability.
And that is also why there is a component optional packages on trac.

I thought that there are optional packages (in contrast to standard
packages) since
 * in some cases the licence does not allow to include code as
   standard package, and
 * in some cases a package provides good stuff that, however,
   is only relevant to a small proportion of users.

Best regards,
Simon


-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Simon King
Hi Michael,

On 2012-05-02, Michael Orlitzky mich...@orlitzky.com wrote:
 You can usually call the underscore methods directly.

I thought (i.e.: I am sure that I was repeatedly told) that calling
magical methods in a doctest is strongly discouraged. The reason is
that one purpose of doctests is educational. As a reviewer, I would
not hesitate to ask for changing such an overly explicit test, when
the doctest fails to show how the method is really supposed to be
used. Of course, `_repr_` and friends is not supposed to be called
directly - hence the indirect test.

Cheers,
Simon


-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Michael Orlitzky
On 05/02/2012 05:38 PM, Simon King wrote:
 Hi Michael,
 
 On 2012-05-02, Michael Orlitzky mich...@orlitzky.com wrote:
 You can usually call the underscore methods directly.
 
 I thought (i.e.: I am sure that I was repeatedly told) that calling
 magical methods in a doctest is strongly discouraged. The reason is
 that one purpose of doctests is educational. As a reviewer, I would
 not hesitate to ask for changing such an overly explicit test, when
 the doctest fails to show how the method is really supposed to be
 used. Of course, `_repr_` and friends is not supposed to be called
 directly - hence the indirect test.

I thought that was the difference between EXAMPLES and TESTS? Anyway,
they should be tested /somewhere/, even if not in the docstring.

-- 
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-5.0.rc0 released

2012-05-02 Thread Benjamin Jones
On Wed, May 2, 2012 at 2:02 AM, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 Dear Sage lovers,

 We're releasing Sage 5.0.rc0.

 Source archive:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0.tar

 Upgrade path:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0/

 The source and upgrade path can also be found on the mirror network
 (you might need to wait a while before the mirrors are synchronized):

 http://www.sagemath.org/download-latest.html


 Please build, test, and report!  We'd love to hear about your
 experiences with this release.


Sage-5.0.rc0 builds and passes all tests (make ptestlong) on my fedora
16 x86_64 machine:

 uname -a
Linux kimchi.homenetwork 3.3.2-6.fc16.x86_64 #1 SMP Sat Apr 21
12:43:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Also, regarding #12857, I looked through the live documentation on 2D
/ 3D plotting and everything looks good, as expected.

--
Benjamin Jones

-- 
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: optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Stephen Montgomery-Smith

On 05/02/2012 04:18 PM, kcrisman wrote:



On May 2, 3:43 pm, Jeroen Demeyerjdeme...@cage.ugent.be  wrote:

On 2012-05-02 21:18, Stephen Montgomery-Smith wrote:  Would it be fair to say 
that the optional packages should be considered

unreliable?


Indeed.  That could be one of the reasons they are considered optional.


Though some optional packages are very good.  Do you have a list of
which ones you installed?  Some would probably be pretty easy to rule
out, and this should be documented in that test or fixed.



Here is the list.  Those that were not installed all had errors of one 
kind or another.  Some of them don't need to be installed, as they are 
available as ports in FreeBSD.  The only ones I thought should be 
installable which were not were ace-5.0.p0, libcocoa-0.9930, and 
phc-2.3.53.p0.  fricas, graphviz, libogg, libtheora, openmpi, openssl 
and valgrind are all ports on FreeBSD, and presumably the sage packages 
don't have any extra hooks to sage (do they?).  fricasaldor should 
probably be made into a separate port for FreeBSD (if there is any 
demand).  mpi4py should build after the FreeBSD openmpi port is 
installed, but the mpi4py package is not looking for the include and 
library files in the right places - I haven't looked into this yet.


Also some of the tests fail (i.e. response is not as expected, 
although the correct answer is given) because some tests report that the 
gmpy version is too old.


%work2/sage-5.0.rc0/sage -optional
Using SAGE Server http://www.sagemath.org/packages
 ***
***  optional Packages   ***
 ***

INSTALLED:
4ti2-1.3.2.p1
TOPCOM-0.16.2.p2
biopython-1.57
cbc-2.7.5
cunningham_tables-1.0
database_cremona_ellcurve-20120302
database_gap-4.4.12.p1
database_jones_numfield-v4
database_kohel-20060803
database_odlyzko_zeta
database_sloane_oeis-2005-12
database_stein_watkins_mini.p0
database_symbolic_data-20070206
dot2tex-2.8.7-2
extra_docs-20070208
gap_packages-4.4.12.p1
gdbm-1.8.3
ginv-1.9-20080723
git-1.7.9.4
gmpy-1.0.1
gnuplotpy-1.8
guppy-0.1.8
java3d-20070901
jsmath_image_fonts-1.4.p3
kash3-2008-07-31.p0
knoboo-20080411
lie-2.2.2.p3
lrcalc-1.1.6beta
lrs-4.2b.p1
mpc-0.8.3-dev-svn793
nauty-24
nzmath-1.1.0
p_group_cohomology-2.1.2
pycryptoplus-20100809-git
pyopenssl-0.8
pyx-0.10
qhull-2010.1
sage-mode-0.6
trac-0.11.5.p0

NOT INSTALLED:
ace-5.0.p0
fricas-1.0.9
fricasaldor-1.0.9
graphviz-2.16.1.p0
libcocoa-0.9930
libogg-1.1.4
libtheora-1.1.1
mpi4py-1.2.2
openmpi-1.4.3
openssl-1.0.0.p0
phc-2.3.53.p0
valgrind-3.7.0

Type 'sage -i package_name' to download and install a package.

--
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-5.0.rc0 released

2012-05-02 Thread R. Andrew Ohana
Ok, finished building + testing  on my Funtoo x86_64 install w/ sandy
bridge and gcc-4.6.2:

The following tests failed:

sage -t  --long -force_lib devel/sage/sage/interfaces/expect.py # 1
doctests failed
sage -t  --long -force_lib devel/sage/sage/tests/cmdline.py # 2 
doctests failed
sage -t  --long -force_lib devel/sage/sage/modular/modsym/ambient.py
# Killed/crashed
sage -t  --long -force_lib
devel/sage/sage/modular/hecke/hecke_operator.py # Killed/crashed
sage -t  --long -force_lib
devel/sage/sage/modular/hecke/ambient_module.py # Killed/crashed


I haven't really looked into the failures yet other than the cmdline
ones. IPython complains about my ipythonrc. This complaint goes away
if I let sage's copy of ipython (0.10.2) make its own dot_ipython
folder, instead of using my system one, which is generated by my
system install (0.12.1) that I frequently use. The other failure is
regarding a hg extension I have, so that is probably not the fault of
sage.


On Wed, May 2, 2012 at 2:54 PM, Benjamin Jones benjaminfjo...@gmail.com wrote:
 On Wed, May 2, 2012 at 2:02 AM, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 Dear Sage lovers,

 We're releasing Sage 5.0.rc0.

 Source archive:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0.tar

 Upgrade path:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0/

 The source and upgrade path can also be found on the mirror network
 (you might need to wait a while before the mirrors are synchronized):

 http://www.sagemath.org/download-latest.html


 Please build, test, and report!  We'd love to hear about your
 experiences with this release.


 Sage-5.0.rc0 builds and passes all tests (make ptestlong) on my fedora
 16 x86_64 machine:

 uname -a
 Linux kimchi.homenetwork 3.3.2-6.fc16.x86_64 #1 SMP Sat Apr 21
 12:43:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

 Also, regarding #12857, I looked through the live documentation on 2D
 / 3D plotting and everything looks good, as expected.

 --
 Benjamin Jones

 --
 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



-- 
Andrew

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread William Stein
On Wed, May 2, 2012 at 2:38 PM, Simon King simon.k...@uni-jena.de wrote:
 Hi Michael,

 On 2012-05-02, Michael Orlitzky mich...@orlitzky.com wrote:
 You can usually call the underscore methods directly.

 I thought (i.e.: I am sure that I was repeatedly told) that calling
 magical methods in a doctest is strongly discouraged. The reason is
 that one purpose of doctests is educational. As a reviewer, I would
 not hesitate to ask for changing such an overly explicit test, when
 the doctest fails to show how the method is really supposed to be
 used. Of course, `_repr_` and friends is not supposed to be called
 directly - hence the indirect test.

I *always* call _repr_ directly in the doctest of repr.  I only ever
make indirect doctests when there is no easy way to make a good direct
one.


 Cheers,
 Simon


 --
 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] Re: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread John H Palmieri
On Wednesday, May 2, 2012 2:38:42 PM UTC-7, Simon King wrote:

 Hi Michael, 

 On 2012-05-02, Michael Orlitzky wrote: 
  You can usually call the underscore methods directly. 

 I thought (i.e.: I am sure that I was repeatedly told) that calling 
 magical methods in a doctest is strongly discouraged. The reason is 
 that one purpose of doctests is educational. As a reviewer, I would 
 not hesitate to ask for changing such an overly explicit test, when 
 the doctest fails to show how the method is really supposed to be 
 used. Of course, `_repr_` and friends is not supposed to be called 
 directly - hence the indirect test. 


I've never heard of such a rule. I notice that the Developer's Guide needs 
to be updated: I can't find mention of indirect doctest anywhere there, 
so there is obviously no mention of how or when it should be used. Indeed, 
I can't find indirect doctest in any documentation except for the 
reference manual.

Also, I believe that the Sage coverage script doesn't require an indication 
of '# indirect doctest' for doctests for underscore methods; it is assumed 
(I guess) that in those cases, you may very well doctest those indirectly.  
For example, the file sage/homology/delta_complex.py has a method '__cmp__' 
in which the doctests don't call it explicitly, there is no '# indirect 
doctest' anywhere, and yet the file has 100% coverage. I found several 
other such examples browsing through the source code and searching for def 
_.

Anyway, as far as whether you should directly call the method, I think 
arguments can be made on both sides. An explicit call to the method is 
convincing, and since these methods aren't included in the reference manual 
(at least not right now), the educational aspect is not as great. However, 
for people browsing the code, using the methods (indirectly) in the 
intended way can be helpful. For indirect doctests, either marked 
explicitly or not, it's up to the author and the referee to make sure that 
the doctest actually calls the method being tested, obviously. Other than 
that, I personally think it's best not to have a policy one way or the 
other.

-- 
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


[sage-devel] Re: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread John H Palmieri


On Wednesday, May 2, 2012 4:15:59 PM UTC-7, John H Palmieri wrote:


 Also, I believe that the Sage coverage script doesn't require an 
 indication of '# indirect doctest' for doctests for underscore methods; it 
 is assumed (I guess) that in those cases, you may very well doctest those 
 indirectly.  


Wait, this seems to only be true for methods starting with two 
underscores...

-- 
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] optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Stephen Montgomery-Smith

On 05/02/2012 02:18 PM, Stephen Montgomery-Smith wrote:

On 05/02/12 12:46, Dima Pasechnik wrote:



On Wednesday, May 2, 2012 4:01:09 PM UTC, Stephen Montgomery-Smith wrote:

I just built sage-5.0.rc0 on FreeBSD. When I do make test, one of the
test failures is puzzling me:

sage -t -force_lib devel/sage/sage/tests/startup.py
**
File
/usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/startup.py,


line 13:
sage: sage0('numpy' in sys.modules)
Expected:
False
Got:
True
**

Any ideas?

If it helps, I installed a bunch of the optional packages. Maybe one of
these causes numpy to be installed at start-up time.


one should be able to trace this even in install.log, I think...


I can confirm that not adding any optional packages makes this test
work. So it is the optional packages that seem to create this problem.

Would it be fair to say that the optional packages should be considered
unreliable? I am having other problems with sage when the optional
packages are installed. Unfortunately they seem inconsistent in their
appearance, otherwise I would provide more details.



This seems to be the optional package that creates the problem: 
gnuplotpy-1.8


--
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] optional packages [was: sage-5.0.rc0 on FreeBSD]

2012-05-02 Thread Stephen Montgomery-Smith

On 05/02/2012 02:18 PM, Stephen Montgomery-Smith wrote:

On 05/02/12 12:46, Dima Pasechnik wrote:



On Wednesday, May 2, 2012 4:01:09 PM UTC, Stephen Montgomery-Smith wrote:

I just built sage-5.0.rc0 on FreeBSD. When I do make test, one of the
test failures is puzzling me:

sage -t -force_lib devel/sage/sage/tests/startup.py
**
File
/usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/startup.py,


line 13:
sage: sage0('numpy' in sys.modules)
Expected:
False
Got:
True
**

Any ideas?

If it helps, I installed a bunch of the optional packages. Maybe one of
these causes numpy to be installed at start-up time.


one should be able to trace this even in install.log, I think...


I can confirm that not adding any optional packages makes this test
work. So it is the optional packages that seem to create this problem.

Would it be fair to say that the optional packages should be considered
unreliable? I am having other problems with sage when the optional
packages are installed. Unfortunately they seem inconsistent in their
appearance, otherwise I would provide more details.



This is the failure that is hard to systematically reproduce.  Any 
ideas?  It comes after moving the location of the sage_root directory.


%mv work work2
%./work2/sage-5.0.rc0/sage
--
| Sage Version 5.0.rc0, Release Date: 2012-05-01 |
| Type notebook() for the GUI, and license() for information.|
--
**
**
* Warning: this is a prerelease version, and it may be unstable. *
**
**
The Sage installation tree may have moved
(from /usr/home/stephen/sage-devel/work/sage-5.0.rc0 to 
/usr/home/stephen/sage-devel/work2/sage-5.0.rc0).

Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Error: sage_location: update_pkgconfig_files():
  File coindatasample.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File coinutils.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File osi.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File osi-unittests.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File clp.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File osi-clp.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File cgl.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File cbc.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Error: sage_location: update_pkgconfig_files():
  File osi-cbc.pc doesn't contain a definition of SAGE_ROOT.
  Skipping it...
Done resetting paths.
---
ImportError   Traceback (most recent call last)

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/bin/string in 
module()


/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/preparser_ipython.py 
in module()
  6 
###

  7
 8 import sage.misc.interpreter
  9
 10 import preparser

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/interpreter.py 
in module()

100
101 import os
-- 102 import log
103 import re
104

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/log.py 
in module()

 63
 64 import interpreter
--- 65 import latex
 66 import misc
 67

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/latex.py 
in module()

 55 import types
 56
--- 57 from misc import tmp_dir, graphics_filename
 58 import sage_eval
 59 from sage.misc.sage_ostools import have_program

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/misc/misc.py 
in module()

   2156 return 0*(size-len(str(s))) + str(s)
   2157
- 2158 import sage.server.support
   2159
   2160 def embedded():

/usr/home/stephen/sage-devel/work2/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/server/support.py 

[sage-devel] gnuplot.py imports numpy on startup if gnuplotpy installed

2012-05-02 Thread kcrisman



  I just built sage-5.0.rc0 on FreeBSD. When I do make test, one of the
  test failures is puzzling me:

  sage -t -force_lib devel/sage/sage/tests/startup.py
  **
  File
  /usr/home/stephen/sage-devel/work/sage-5.0.rc0/devel/sage/sage/tests/start
   up.py,

  line 13:
  sage: sage0('numpy' in sys.modules)
  Expected:
  False
  Got:
  True
  **

  Any ideas?

  If it helps, I installed a bunch of the optional packages. Maybe one of
  these causes numpy to be installed at start-up time.

  one should be able to trace this even in install.log, I think...

  I can confirm that not adding any optional packages makes this test
  work. So it is the optional packages that seem to create this problem.

  Would it be fair to say that the optional packages should be considered
  unreliable? I am having other problems with sage when the optional
  packages are installed. Unfortunately they seem inconsistent in their
  appearance, otherwise I would provide more details.

 This seems to be the optional package that creates the problem:
 gnuplotpy-1.8

Aha!   The proof is here - great work, this is an spkg or interface
bug.

new-host-2:sage-5.0.beta14 $ ./sage -ipython
Python 2.7.2 (default, May  1 2012, 10:37:32)
Type copyright, credits or license for more information.

IPython 0.10.2 -- An enhanced Interactive Python.
? - Introduction and overview of IPython's features.
%quickref - Quick reference.
help  - Python's own help system.
object?   - Details about 'object'. ?object also works, ?? prints
more.

In [1]: import sys

In [2]: sys.modules['numpy']
---
KeyError  Traceback (most recent call
last)

/Users/.../sage-5.0.beta14/ipython console in module()

KeyError: 'numpy'

In [3]: import Gnuplot as GP

In [4]: sys.modules['numpy']
Out[4]: module 'numpy' from '/Users/.../local/lib/python2.7/site-
packages/numpy/__init__.pyc'

And since if it finds Gnuplot, Sage imports it in interfaces/
gnuplot.py, we have this once both spkgs are installed:

sage: sys.modules['numpy']
module 'numpy' from '/Users/.../sage-5.0.beta14/local/lib/python2.7/
site-packages/numpy/__init__.pyc'


So Gnuplot automatically imports numpy, and this interface is called
on startup.



By the way, this is not really optional any more, but apparently
experimental?

Well, gnuplot is experimental, but gnuplotpy is optional.  I don't get
that...

Found gnuplot-4.0.0
http://www.sagemath.org//packages/optional/gnuplot-4.0.0.spkg --
gnuplot-4.0.0.spkg
[ ]
http://www.sagemath.org//packages/standard/gnuplot-4.0.0.spkg --
gnuplot-4.0.0.spkg
[ ]
http://www.sagemath.org//packages/experimental/gnuplot-4.0.0.spkg --
gnuplot-4.0.0.spkg
[..]


So that is something that should be fixed too.  Any ideas from anyone
on a proper resolution of this?

-- 
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] A weiredness in Sage 5.0rc0

2012-05-02 Thread Kwankyu Lee
In Sage 5.0rc0, I observe a weird phenomenon. See the following code 
-
from sage.rings.ring import CommutativeAlgebra

class NA(CommutativeAlgebra):



def __init__(self, i):


CommutativeAlgebra.__init__(self, i.base_ring())
self._ideal = i
-
This has no problem
-
sage: F.a=GF(16)
sage: P.x,y,z=F[]
sage: i = P.ideal([x,y,z])
sage: NA(i)
class '__main__.NA_with_category'
-
But the following modified code results in an error. The difference is the 
addition of the method _repr_.
-
from sage.rings.ring import CommutativeAlgebra

class NA(CommutativeAlgebra):



def __init__(self, i):


CommutativeAlgebra.__init__(self, i.base_ring())
self._ideal = i

def _repr_(self):
return NA defined by %s. % self._ideal  
-
Here is the code that results in a traceback.
-
sage: F.a=GF(16)
sage: P.x,y,z=F[]
sage: i = P.ideal([x,y,z])
sage: NA(i)
---
AttributeErrorTraceback (most recent call last)

/Users/kwankyu/Workplace/sage/decoders/ipython console in module()

/Users/kwankyu/Workplace/sage/decoders/string in __init__(self, i)

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/rings/ring.so
 
in sage.rings.ring.CommutativeAlgebra.__init__ (sage/rings/ring.c:13627)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/rings/ring.so
 
in sage.rings.ring.CommutativeRing.__init__ (sage/rings/ring.c:9574)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/rings/ring.so
 
in sage.rings.ring.Ring.__init__ (sage/rings/ring.c:1902)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/structure/parent.so
 
in sage.structure.parent.Parent.__init__ (sage/structure/parent.c:4629)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/categories/algebras.pyc
 
in __init_extra__(self)
138 mor = None
139 # This could be a morphism of 
Algebras(self.base_ring()); however, e.g., QQ is not in Algebras(QQ)

-- 140 H = Hom(base_ring, self, Rings())
141 
142 # Idea: There is a generic method from_base_ring, 
that just does multiplication with


/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/categories/homset.pyc
 
in Hom(X, Y, category)
157 global _cache
158 key = (X,Y,category)
-- 159 if _cache.has_key(key):
160 H = _cache[key]()
161 # What is this test for? Why does the cache ever contain a 
0 value?


/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/structure/category_object.so
 
in sage.structure.category_object.CategoryObject.__hash__ 
(sage/structure/category_object.c:7329)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/structure/sage_object.so
 
in sage.structure.sage_object.SageObject.__repr__ 
(sage/structure/sage_object.c:1496)()

/Users/kwankyu/Workplace/sage/decoders/string in _repr_(self)

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/structure/parent.so
 
in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:6732)()

/Users/kwankyu/Sage/sage-5.0.rc0/local/lib/python2.7/site-packages/sage/structure/parent.so
 
in sage.structure.parent.getattr_from_other_class 
(sage/structure/parent.c:3248)()

AttributeError: 'NA_with_category' object has no attribute '_ideal'
sage: 
-

There is no such error in Sage 4.8 

-- 
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: Changes to supported platforms

2012-05-02 Thread Dima Pasechnik
On 2012-05-02, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 On 2012-05-02 21:40, Johan Grönqvist wrote:
 2012-05-02 10:44, Jeroen Demeyer skrev:
 I made some changes to http://wiki.sagemath.org/SupportedPlatforms
 
 The only debian version mentioned for sage-5.0 is Debian 5.0 on x86
 (Both 32-bit and 64-bit) which is unsupported since February.
 
 Debian 6.0, the only released and supported version at this time, is not
 mentioned.
 
 Is the re a reason for this, or is it a mistake?
 Can you confirm that sage-5.0.rc0 builds and passes all tests on Debian
 6.0?  If so, you can change the page to include Debian 6.0.

I can confirm this.
Debian 6.0.4 squeeze on x86_64, to be precise.

Dima



-- 
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: Changes to supported platforms

2012-05-02 Thread Dima Pasechnik
On 2012-05-03, Dima Pasechnik dimp...@gmail.com wrote:
 On 2012-05-02, Jeroen Demeyer jdeme...@cage.ugent.be wrote:
 On 2012-05-02 21:40, Johan Grönqvist wrote:
 2012-05-02 10:44, Jeroen Demeyer skrev:
 I made some changes to http://wiki.sagemath.org/SupportedPlatforms
 
 The only debian version mentioned for sage-5.0 is Debian 5.0 on x86
 (Both 32-bit and 64-bit) which is unsupported since February.
 
 Debian 6.0, the only released and supported version at this time, is not
 mentioned.
 
 Is the re a reason for this, or is it a mistake?
 Can you confirm that sage-5.0.rc0 builds and passes all tests on Debian
 6.0?  If so, you can change the page to include Debian 6.0.

 I can confirm this.
 Debian 6.0.4 squeeze on x86_64, to be precise.
Changed on the wiki, too.

Jeroen, by the way, do you want this set up as a buildbot for you?
Should not be hard.
(you could ssh via arando, for instance)


 Dima




-- 
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-5.0.rc0 released

2012-05-02 Thread Anthony David
On Wed, May 2, 2012 at 5:02 PM, Jeroen Demeyer jdeme...@cage.ugent.bewrote:

 Dear Sage lovers,

 We're releasing Sage 5.0.rc0.

 Source archive:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0.tar

 Upgrade path:

 http://boxen.math.washington.edu/home/release/sage-5.0.rc0/sage-5.0.rc0/

 The source and upgrade path can also be found on the mirror network
 (you might need to wait a while before the mirrors are synchronized):

 http://www.sagemath.org/download-latest.html


 Please build, test, and report!  We'd love to hear about your
 experiences with this release.



Build successful on Fedora 17


LSB Version::core-4.0-amd64:core-4.0-noarch
Distributor ID: Fedora
Description:Fedora release 16 (Verne)
Release:16
Codename:   Verne

Only env variables were set for parallel build

Subsequent:

./sage -testall -long

All tests passed!
Total time for all tests: 7085.3 seconds

-- 
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: A weiredness in Sage 5.0rc0

2012-05-02 Thread Simon King
Hi Kwankyu,

On 2012-05-03, Kwankyu Lee ekwan...@gmail.com wrote:
 In Sage 5.0rc0, I observe a weird phenomenon. See the following code 
 -
 But the following modified code results in an error. The difference is the 
 addition of the method _repr_.
 -
 from sage.rings.ring import CommutativeAlgebra

 class NA(CommutativeAlgebra):
 
 

 def __init__(self, i):
 
 
 CommutativeAlgebra.__init__(self, i.base_ring())
 self._ideal = i

 def _repr_(self):
 return NA defined by %s. % self._ideal  

The reason is that in sage-5.0, all rings will (should, at least) have
proper initialisation required to make the category framework work.

That means, self._init_category is indirectly called in the line
  CommutativeAlgebra.__init__(self, i.base_ring())

However, during the category initialisation, self is used as key in
some cache. Hence, it is needed that its hash value is available. By
default in sage.rings.ring.Ring, hash(self) is the self as hash(repr(self))
(which I don't like, by the way). But that happens *before* you set self._ideal,
thus, the crash.

There are two possible solutions: Either do
def __init__(self, i):
self._ideal = i
CommutativeAlgebra.__init__(self, i.base_ring())
or define a __hash__ method that does not rely on the string
representation.

The question is whether a meaningful hash is available before knowing
self._ideal. Hence, I recommend the first solution.

Cheers,
Simon

.

-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread Simon King
Hi William,

On 2012-05-02, William Stein wst...@gmail.com wrote:
 On Wed, May 2, 2012 at 2:38 PM, Simon King simon.k...@uni-jena.de wrote:
 I thought (i.e.: I am sure that I was repeatedly told) that calling
 magical methods in a doctest is strongly discouraged.

 I *always* call _repr_ directly in the doctest of repr.  I only ever
 make indirect doctests when there is no easy way to make a good direct
 one.

Really? I don't recall who was referee, but I do recall that I was asked
(and I think not just once) to better provide an indirect test, like
Only ever make a direct doctest for a magical method when there is no
easy way to make a good indirect test.

Cheers,
Simon


-- 
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: Can we develop a plan to get 100% doctest coverage?

2012-05-02 Thread William Stein
On May 2, 2012 10:10 PM, Simon King simon.k...@uni-jena.de wrote:

 Hi William,

 On 2012-05-02, William Stein wst...@gmail.com wrote:
  On Wed, May 2, 2012 at 2:38 PM, Simon King simon.k...@uni-jena.de
wrote:
  I thought (i.e.: I am sure that I was repeatedly told) that calling
  magical methods in a doctest is strongly discouraged.
 
  I *always* call _repr_ directly in the doctest of repr.  I only ever
  make indirect doctests when there is no easy way to make a good direct
  one.

 Really? I don't recall who was referee, but I do recall that I was asked
 (and I think not just once) to better provide an indirect test, like
 Only ever make a direct doctest for a magical method when there is no
 easy way to make a good indirect test.

Really.  I completely disagree with the above quote.

 Cheers,
 Simon


 --
 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: A weiredness in Sage 5.0rc0

2012-05-02 Thread Kwankyu Lee
Hi Simon,

Thank you for the explanation. 

However, during the category initialisation, self is used as key in 
 some cache. Hence, it is needed that its hash value is available. By 
 default in sage.rings.ring.Ring, hash(self) is the self as 
 hash(repr(self)) 
 (which I don't like, by the way).


I am not against using the string representation to compute the hash, as 
the last resort. 
 

 There are two possible solutions: Either do 
 def __init__(self, i): 
 self._ideal = i 
 CommutativeAlgebra.__init__(self, i.base_ring()) 
 or define a __hash__ method that does not rely on the string 
 representation. 

 The question is whether a meaningful hash is available before knowing 
 self._ideal. Hence, I recommend the first solution. 


The first solution looks ugly. 

I think the problem lies in that the hash is calculated when the object is 
not fully constructed. The hash value should be calculated as the last part 
of the initialization process, as the hash should be dependent on the data 
that defines the object. As the ..Algebra.__init__ is expected to be 
placed at the beginning of the initialization code, I think there should be 
a separate method say ..Algebra._set_hash_ that is executed manually or 
automatically at the end of the initialization process. 


-- 
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