[sage-devel] Re: NameError: global name 'sage' is not defined

2014-08-19 Thread Travis Scrimshaw
No that's correct. The difference is that my way imports the *function* as oppose to the *module* given by John. This is a python thing, see https://docs.python.org/3/reference/import.html for more details. Best, Travis On Tuesday, August 19, 2014 9:24:16 PM UTC-7, Paul Graham wrote: > > Ok i

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-19 Thread Bill Hart
Too late. Whatever succeeded Sage already included Sage in it. Anyway, that is a brilliant idea. But you should start now, not when it is too late. And I mean that with all sincerity. On Wednesday, 20 August 2014 06:19:21 UTC+2, wstein wrote: > > > > On Tuesday, August 19, 2014, Bill Hart wrote:

[sage-devel] Re: NameError: global name 'sage' is not defined

2014-08-19 Thread Paul Graham
Ok i did: from sage.misc.viewer import png_viewer at the top of the file tachyon.py, and then in my code as you suggest, in Tachyon.show, i changed it from: os.system('%s %s 2>/dev/null 1>/dev/null &'%(sage.misc.viewer.png_viewer(), filename)) to: os.system('%s %s 2>/dev/null 1>/dev/null &'%

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-19 Thread William A Stein
On Tuesday, August 19, 2014, Bill Hart wrote: > > > On Thursday, 31 July 2014 06:11:28 UTC+2, rjf wrote: >> >> >> Note that even adding 5 mod 13 and the integer 10 is potentially >> uncomfortable, >> and the rather common operation of Hensel lifting requires doing >> arithmetic in a combinati

[sage-devel] Re: NameError: global name 'sage' is not defined

2014-08-19 Thread Travis Scrimshaw
> > Interestingly, i tried doing: > > from sage.misc.viewer import png_viewer > > first, but got the same error. > In your code, you just want `png_viewer`, not `sage.misc.viewer.png_viewer` (which is what I suspect you had). Best, Travis -- You received this message because you are subscribe

Re: [sage-devel] On scientific computing, Python and Julia

2014-08-19 Thread Bill Hart
On Thursday, 31 July 2014 06:11:28 UTC+2, rjf wrote: > > > Note that even adding 5 mod 13 and the integer 10 is potentially > uncomfortable, > and the rather common operation of Hensel lifting requires doing > arithmetic in a combination > of fields (or rings) of different related sizes. >

[sage-devel] Re: RuntimeError: ECL says: Module error: Don't know how to REQUIRE MAXIMA.

2014-08-19 Thread Sébastien Labbé
Bonjour Peter, In that case, "sage -f maxima" will probably solve it. > You are right. Reinstalling maxima fixed the problem. Thanks! Sébastien -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving

[sage-devel] Re: RuntimeError: ECL says: Module error: Don't know how to REQUIRE MAXIMA.

2014-08-19 Thread Peter Bruin
Bonjour Sébastien, > I get the below regression with 6.3 (compare to 6.3.beta3). Strange > error no? This kind of error can happen when ECL is upgraded but Maxima is not reinstalled. In that case, "sage -f maxima" will probably solve it. Peter -- You received this message because you are subs

[sage-devel] RuntimeError: ECL says: Module error: Don't know how to REQUIRE MAXIMA.

2014-08-19 Thread Sébastien Labbé
Hi sage-devel, I get the below regression with 6.3 (compare to 6.3.beta3). Strange error no? Sébastien *** with 6.3.beta3 : sage: solve(x+x**2+x**3==1, x) [x == -1/2*(1/9*sqrt(11)*sqrt(3) + 17/27)^(1/3)*(I*sqrt(3) + 1) + 1/9*(-I*sqrt(3) + 1)/(1/9*sqrt(11)*sqrt(3) + 17/27)^(1/3) - 1/3, x ==

[sage-devel] Re: NameError: global name 'sage' is not defined

2014-08-19 Thread Paul Graham
Interestingly, i tried doing: from sage.misc.viewer import png_viewer first, but got the same error. But then i tried: import sage.misc.viewer and Tachyon.show works just fine now... So not sure what happened there. On Saturday, August 16, 2014 9:22:23 PM UTC-7, Travis Scrimshaw wrote: > > You

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Peter Bruin
Hi Simon, >> I'm not sure I understand correctly; do you mean that the problem is >> caused by fields comparing equal even if the implementations are >> different? I think we should in any case make FiniteField inherit >> from WithEqualityById, so two instances compare equal if and only if >> the

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
On top of that, Python3 want have cmp anymore :) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, se

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
Thanks for all the answers. It seems my issues was caused by defining the _cmp_ method with the wrong number of underscores in my cython extension classes. Do you confirm that for parents defined in a usual Python class __cmp__ with two underscores should be used and for a cython extension class

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
On Tuesday, August 19, 2014 9:05:15 PM UTC+2, Simon King wrote: > > Hi Jean-Pierre, > > On 2014-08-19, Jean-Pierre Flori > wrote: > > Though (non-prime) finite fields with the same order and defining > > polynomial are considered equal, I'd say the hashes should be different. > > Absolutely n

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Simon King
Hi Peter, On 2014-08-19, Peter Bruin wrote: > I'm not sure I understand correctly; do you mean that the problem is caused > by fields comparing equal even if the implementations are different? I > think we should in any case make FiniteField inherit from WithEqualityById, > so two instances c

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Peter Bruin
Hi Jean-Pierre, > I'm not sure I understand correctly; do you mean that the problem is > caused by fields comparing equal even if the implementations are > different? I think we should in any > > Not sure. > I seem to be able to produce things with different hashes but equal... > sage: GF(1

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Simon King
Hi Jean-Pierre, On 2014-08-19, Jean-Pierre Flori wrote: > Though (non-prime) finite fields with the same order and defining > polynomial are considered equal, I'd say the hashes should be different. Absolutely no way. If they are considered equal, then the hashes must be the same. It may, howe

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
I guess _cmp_ should be used for cython parents and __cmp__ for python ones. There is in parent.pyx: # Both are parents -- but need *not* have the same type. if HAS_DICTIONARY(left): r = left.__cmp__(right) else: r = left._cmp_(rig

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
On Tuesday, August 19, 2014 8:26:13 PM UTC+2, Jean-Pierre Flori wrote: > > I also see that some double underscore methods rather than single > underscore ones are implemented, that might be one of the problems here. > Or the other way around... -- You received this message because you are sub

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
I also see that some double underscore methods rather than single underscore ones are implemented, that might be one of the problems here. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails fr

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
On Tuesday, August 19, 2014 7:39:18 PM UTC+2, Peter Bruin wrote: > > Hi Jean-Pierre, > > I'm currently wrapping FLINT fq modules into new Sage classes for finite >> fiels and got strange coercion errors when running non trivial code. >> Indeed, the polynomial ring constructors use a dictionary a

[sage-devel] Re: Equality, hashing and polynomial rings

2014-08-19 Thread Peter Bruin
Hi Jean-Pierre, I'm currently wrapping FLINT fq modules into new Sage classes for finite > fiels and got strange coercion errors when running non trivial code. > Indeed, the polynomial ring constructors use a dictionary and so relies on > the hash of finite fields (the parents). > By some chance

[sage-devel] Re: cygwin64 build error for ppl-1.1

2014-08-19 Thread Jean-Pierre Flori
The ECL issue looks strange... The failed install should have left the build directory somewhere in Sage's tree (look under local/var/tmp/.../ecl-.../ or smtg like that). Can you cd there and check that ecl.exe is actually not present? (I'll try to give you more details later on the directory name

[sage-devel] Re: cygwin64 build error for ppl-1.1

2014-08-19 Thread Jean-Pierre Flori
As far as ATLAS is concerned, it's hellishly long and that's to be expected. You can try using a pretuned config by setting SAGE_ATLAS_ARCH=base/fast or using SAGE_ATLAS_LIB to use system-wide libraries as Dima suggested. I'll have a look at ECL issue tonight. -- You received this message becau

[sage-devel] Re: cygwin64 build error for ppl-1.1

2014-08-19 Thread Sudarsan Vasista Srinivasan Ranganathan
*Bump*. Any thoughts on my above weird "missing file" error? On Friday, August 15, 2014 2:10:22 PM UTC-7, Sudarsan Vasista Srinivasan Ranganathan wrote: > > Hi, > > I'm trying to install Sage on cygwin64 with the operating system being > Windows 8.1. I know of the persisting issues along with re

[sage-devel] Equality, hashing and polynomial rings

2014-08-19 Thread Jean-Pierre Flori
Hi, I'm currently wrapping FLINT fq modules into new Sage classes for finite fiels and got strange coercion errors when running non trivial code. Indeed, the polynomial ring constructors use a dictionary and so relies on the hash of finite fields (the parents). By some chance, the hashes of two

Re: [sage-devel] Re: SageMathCloud / closed source / GPL / Spirit of Sage??

2014-08-19 Thread Nathann Cohen
About William's blog post (*): even though I don't like you do much (but I don't like what a lot of persons do, so apparently there is nothing wrong in that), I was wondering about your plans. If you ever end up earning money with this for-profit company you have in mind, who would you hire to writ

Re: [sage-devel] Re: SageMathCloud / closed source / GPL / Spirit of Sage??

2014-08-19 Thread Nathann Cohen
> While the subject line is somewhat inflammatory, I respectfully > disagree that civil discussion about Sage's relationship to other > software projects, especially one so tightly coupled with Sage, > belongs entirely on sage-flame. +1 Nathann -- You received this message because you are subsc