[sage-devel] Re: Integrating GraphLab with Sage

2010-10-09 Thread Jason Grout
On 10/9/10 3:35 PM, MM.Brian wrote: I did not gather from your message whether you intend to use GraphLab with Sage for> your own needs or whether you would like to make it available in the standard Sage. we would like to integrate GraphLab with Sage similar to how Jmol does. anyway, we are

[sage-devel] Calling seed() incorrectly causes Sage to crash with SIGSEGV (Segmentation Fault)

2010-10-09 Thread Dr. David Kirkby
The title pretty much says it all. I can crash Sage on the three platforms I tested (Linux, OS X and OpenSolaris) using the command below. Whether this is a valid command or not is largely irrelevant - Sage should not crash for invalid user input. drkir...@hawk:~/sage-4.6.alpha3$ ./sage -

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 11:12 PM, Minh Nguyen wrote: Hi David, On Sun, Oct 10, 2010 at 8:37 AM, Dr. David Kirkby wrote: Point taken, but the documentation does lack some examples. A lot, if not all, of the discussion in this thread is very useful and has good potential to become documentation in the re

Re: [sage-devel] I wrote _sig_on documentation

2010-10-09 Thread Minh Nguyen
Hi Jeroen, On Sun, Oct 10, 2010 at 9:06 AM, Jeroen Demeyer wrote: > I think this is very useful, please see #10109: > http://trac.sagemath.org/sage_trac/ticket/10109 To paraphrase William Stein: That is so frickin' cool! Thank you for this. -- Regards Minh Van Nguyen -- To post to this group

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread Minh Nguyen
Hi David, On Sun, Oct 10, 2010 at 8:37 AM, Dr. David Kirkby wrote: > Point taken, but the documentation does lack some examples. A lot, if not all, of the discussion in this thread is very useful and has good potential to become documentation in the reference manual. If only people would open ti

[sage-devel] I wrote _sig_on documentation

2010-10-09 Thread Jeroen Demeyer
I think this is very useful, please see #10109: http://trac.sagemath.org/sage_trac/ticket/10109 Or read the documentation at http://sage.math.washington.edu/home/jdemeyer/sage/sage-4.6.alpha3/devel/sage/doc/output/html/en/developer/coding_in_other.html#interrupt-signal-exception-and-error-handling

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 08:21 PM, Mike Hansen wrote: On Sat, Oct 9, 2010 at 11:59 AM, David Kirkby wrote: I beg to differ ~John - to me it is *very* confusing to me, but then I've not used Sage much. It is because you aren't familiar with Python and its conventions. Point taken, but the documentation d

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 09:23 PM, Mike Hansen wrote: On Sat, Oct 9, 2010 at 1:17 PM, David Kirkby wrote: * Binomial[] in Mathematica == Good error reporting * binomial() in Sage == Sub-optimal error reporting I don't understand this -- they have basically the same error messages: sage: binomial() TypeE

[sage-devel] Re: Integrating GraphLab with Sage

2010-10-09 Thread MM.Brian
> Sage ships with a JavaScript based graph editor written by Radoslav Kirov. thanks, I'm new to sage I didn't know about this editor. well, I found it very simple offering basic edits. it is useful for modifying small graphs and it has a good performance but it's not comparable to GraphLab! Graph

[sage-devel] Re: Integrating GraphLab with Sage

2010-10-09 Thread MM.Brian
> I did not gather from your message whether you intend to use GraphLab with > Sage for > your own needs or whether you would like to make it available in > the standard Sage. we would like to integrate GraphLab with Sage similar to how Jmol does. anyway, we are not yet clear about how to achiev

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread Mike Hansen
On Sat, Oct 9, 2010 at 1:17 PM, David Kirkby wrote: > * Binomial[] in Mathematica == Good error reporting > * binomial() in Sage ==  Sub-optimal error reporting I don't understand this -- they have basically the same error messages: sage: binomial() TypeError: binomial() takes exactly 2 argument

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread David Kirkby
On 9 October 2010 21:17, David Kirkby wrote: > On 9 October 2010 17:46, John Cremona wrote: >> I am working on a patch for this.  Is there a ticket yet? > > I just created one. Could you please set the component, as I don't > know what this is. I forgot to post the URL for the ticket, though you

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread David Kirkby
On 9 October 2010 17:46, John Cremona wrote: > I am working on a patch for this.  Is there a ticket yet? I just created one. Could you please set the component, as I don't know what this is. > On the other hand, calling mwrank() does call a call method, namely > mwrank.__call__(), and that does

Re: [sage-devel] Questions about 'griesmer_upper_bound'

2010-10-09 Thread David Joyner
On Fri, Oct 8, 2010 at 9:37 PM, Dr. David Kirkby wrote: > Should the arguments to this: > > griesmer_upper_bound(n, q, d, method=None) >    Returns the Griesmer upper bound for number of elements in the >    largest code of minimum distance d in `\GF{q}^n`. >    Wraps GAP's UpperBoundGriesmer. > >

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread Mike Hansen
On Sat, Oct 9, 2010 at 11:59 AM, David Kirkby wrote: > I beg to differ ~John - to me it is *very* confusing to me, but then > I've not used Sage much. It is because you aren't familiar with Python and its conventions. > It's not obvious to me if random_prime()  is called with two > arguments, wh

Re: [sage-devel] testing integers

2010-10-09 Thread John Cremona
Thanks to both -- I'll do thatdone. And perhaps one of you can review #10105! John On Sat, Oct 9, 2010 at 7:03 PM, Justin C. Walker wrote: > > On Oct 9, 2010, at 10:56 , Martin Albrecht wrote: > >> On Saturday 09 October 2010, John Cremona wrote: >>> I have a function whose only argument, n

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread David Kirkby
On 9 October 2010 17:49, John Cremona wrote: > The help is completely clear (2 of 3 the arguments have defaults) but > there should be examples and tests with non-default values. I beg to differ ~John - to me it is *very* confusing to me, but then I've not used Sage much. It's not obvious to me

Re: [sage-devel] testing integers

2010-10-09 Thread Justin C. Walker
On Oct 9, 2010, at 10:56 , Martin Albrecht wrote: > On Saturday 09 October 2010, John Cremona wrote: >> I have a function whose only argument, n, must be an integer to be >> valid, and in the code I need n to be a python int. If I put in >> >> n = int(n) > > How about: > > if n != int(n): >

Re: [sage-devel] testing integers

2010-10-09 Thread Martin Albrecht
On Saturday 09 October 2010, John Cremona wrote: > I have a function whose only argument, n, must be an integer to be > valid, and in the code I need n to be a python int. If I put in > > n = int(n) How about: if n != int(n): raise Error n = int(n) Cheers, Martin -- name: Martin Albrecht

[sage-devel] testing integers

2010-10-09 Thread John Cremona
I have a function whose only argument, n, must be an integer to be valid, and in the code I need n to be a python int. If I put in n = int(n) at the top, then the function accepts n=3.14, which I don't want. Is there a better way than something like if type(n) in [type(int(1)), type(Integer(1)

Re: [sage-devel] pari-2.4.3 (testing, ALPHA) released

2010-10-09 Thread Jeroen Demeyer
On 2010-10-09 13:52, Dr. David Kirkby wrote: > hopefully would allow some of our patches to be removed. Certainly. I've had some email exchanges with Bill Allombert, one of the main PARI developers and he accepted several Sage patches upstream. Jeroen. -- To post to this group, send an email

Re: [sage-devel] pari-2.4.3 (testing, ALPHA) released

2010-10-09 Thread Jeroen Demeyer
On 2010-10-09 13:52, Dr. David Kirkby wrote: > IMHO that is pretty bad practice. It goes against the systems used by > most software systems (including Sage). The Linux kernel used to do that, I think that's where PARI got this idea from. Jeroen. -- To post to this group, send an email to sage-

Re: [sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread John Cremona
The help is completely clear (2 of 3 the arguments have defaults) but there should be examples and tests with non-default values. Have you made a ticket, and can you give examples of input which hangs? John On Sat, Oct 9, 2010 at 3:44 PM, Dr. David Kirkby wrote: > random_prime() is another comm

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread John Cremona
I am working on a patch for this. Is there a ticket yet? On the other hand, calling mwrank() does call a call method, namely mwrank.__call__(), and that does require exactly one non-self argument, so how does your example mwrank(1,2,3,4,5) differ from, for example, binomial() ---

Re: [sage-devel] Number of threads when testing is wrong (or reported incorrectly)

2010-10-09 Thread David Kirkby
On 9 October 2010 15:50, Mitesh Patel wrote: > On 10/09/2010 04:55 AM, Dr. David Kirkby wrote: >> I've looked at the logs from the buildbot on sage.math and see that too >> reports to be using 12 jobs in parallel. Unless the makefile was edited >> (which I can't see, but doubt very much), the numb

Re: [sage-devel] Number of threads when testing is wrong (or reported incorrectly)

2010-10-09 Thread Mitesh Patel
On 10/09/2010 04:55 AM, Dr. David Kirkby wrote: > I've looked at the logs from the buildbot on sage.math and see that too > reports to be using 12 jobs in parallel. Unless the makefile was edited > (which I can't see, but doubt very much), the number of parallel should > be limited to 8. The curre

Re: [sage-devel] Sage 4.6.alpha3 binary doesn't load cleanly

2010-10-09 Thread Mitesh Patel
On 10/09/2010 06:41 AM, Minh Nguyen wrote: > I built Sage 4.6.alpha3 from source on sage.math and wrapped up a > binary distribution for that machine. I then unpacked the binary > distribution and loaded Sage using that binary. This is what I get: > > [mv...@sage sage-4.6.alpha3-sage.math.washingt

[sage-devel] Sage hangs on random_prime(1,0,-23)

2010-10-09 Thread Dr. David Kirkby
random_prime() is another command which hangs with erroneous input. In fact, I can't even work out how to use this command myself, as the help page does not seem very good. It shows it taking 3 arguments, yet all the examples show only one. The first argument is supposed to be an integer >=2,

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 02:11 PM, John Cremona wrote: Quick prediction (from the author of mwrank C++ program): The program expects 5 integers as input; after reading one, it is waiting for more. But I'll check the python mwrank() function and improve its parsing. John This below is a bit confusing. 'm

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 01:36 PM, kcrisman wrote: Why not try the same thing under sage -gdb to see what's happening? I could do, but it's hard for me to know what to look for when I don't even know what's supposed to happen. I don't understand what its supposed to accept. But I'm pretty sure it's not do

Re: [sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread John Cremona
Quick prediction (from the author of mwrank C++ program): The program expects 5 integers as input; after reading one, it is waiting for more. But I'll check the python mwrank() function and improve its parsing. John On Sat, Oct 9, 2010 at 1:36 PM, kcrisman wrote: > Why not try the same thing

[sage-devel] Re: mwrank(-10) - sensible or not ???

2010-10-09 Thread kcrisman
Why not try the same thing under sage -gdb to see what's happening? Good work on the fuzz tests - I like the name, too. - kcrisman On Oct 9, 8:03 am, "Dr. David Kirkby" wrote: > Following some very quick hacks at using "fuzz testing" techniques, I found > that > > sage: mwrank(-10) > > just han

[sage-devel] mwrank(-10) - sensible or not ???

2010-10-09 Thread Dr. David Kirkby
Following some very quick hacks at using "fuzz testing" techniques, I found that sage: mwrank(-10) just hangs, but does not appear to be using any CPU time. Since I'm not a mathematician, I don't understand if passing -10 makes any sense mathematically. But the fact the code appear to be usin

Re: [sage-devel] pari-2.4.3 (testing, ALPHA) released

2010-10-09 Thread Dr. David Kirkby
On 10/ 9/10 08:57 AM, Jeroen Demeyer wrote: On 2010-10-09 01:07, Dr. David Kirkby wrote: So it might be worth integrating the alpha into sage sooner rather than later. It should also make updating to 2.4.3 easier when it does finally get released. This alpha *is* pari 2.4.3 (they call it 2.4.3

[sage-devel] Sage 4.6.alpha3 binary doesn't load cleanly

2010-10-09 Thread Minh Nguyen
Hi folks, I built Sage 4.6.alpha3 from source on sage.math and wrapped up a binary distribution for that machine. I then unpacked the binary distribution and loaded Sage using that binary. This is what I get: [mv...@sage sage-4.6.alpha3-sage.math.washington.edu-x86_64-Linux]$ ./sage -

Re: [sage-devel] pari-2.4.3 (testing, ALPHA) released

2010-10-09 Thread John Cremona
On Sat, Oct 9, 2010 at 8:57 AM, Jeroen Demeyer wrote: > On 2010-10-09 01:07, Dr. David Kirkby wrote: >> So it might be worth integrating the alpha into sage sooner rather than >> later. It should also make updating to 2.4.3 easier when it does finally >> get released. > This alpha *is* pari 2.4.3

Re: [sage-devel] cremona_letter_code hangs for negative integers

2010-10-09 Thread John Cremona
I have added comments to the ticket, and will not repeat them here except to say that David is quite right (and that I will fix it). John On Sat, Oct 9, 2010 at 1:12 AM, Dr. David Kirkby wrote: > On 10/ 9/10 12:46 AM, Dr. David Kirkby wrote: >> >> On 10/ 9/10 12:22 AM, Dr. David Kirkby wrote: >>

[sage-devel] Number of threads when testing is wrong (or reported incorrectly)

2010-10-09 Thread Dr. David Kirkby
In the top level makefile, there is this bit of information: # WARNING: if your machine has <= 8 cpus (according to cpu_count() and # you *don't* want to use that many threads for parallel doctesting, # change the value of NUM_THREADS to a (sensible) positive integer. If # cpu_count() reports >

Re: [sage-devel] pari-2.4.3 (testing, ALPHA) released

2010-10-09 Thread Jeroen Demeyer
On 2010-10-09 01:07, Dr. David Kirkby wrote: > So it might be worth integrating the alpha into sage sooner rather than > later. It should also make updating to 2.4.3 easier when it does finally > get released. This alpha *is* pari 2.4.3 (they call it 2.4.3 with the idea that 2.4.4 will be their bet