[sage-devel] Re: porting sage to OS X 10.7

2011-09-10 Thread Dima Pasechnik
is sqrt5.cs.washington.edu down? -- 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.sagemat

[sage-devel] Re: status on lion and xcode 4

2011-09-10 Thread john.hoebing
What would be a good way for a new mac mini owner to help fix the Xcode 4 build problems for Sage? Those of us who just bought our first macs after the Lion release have Xcode 4 by default. I don't see any reason to back off to Xcode 3, as the Sage (4.7.2.alpha2) config urges. There's no specifi

[sage-devel] should duals of closed (polyhedral?) things be closed? #11759

2011-09-10 Thread Dima Pasechnik
There is trac #11759. It fixes plotting of the two platonic solids that are created as duals. I posted there a minimal patch, which just adds the right properties to these two; however, the question is whether the dual of a closed "thing" (I don't know how generic the corresponding code really i

[sage-devel] Re: Singular and Symmetric don't build on Ubuntu Oneiric (11.10)

2011-09-10 Thread john.hoebing
On Sep 2, 12:52 am, Dan Drake wrote: > I can confirm that by using the LDFLAGS workaround and fiddling with the > Symmetrica makefile, both spkgs compile, and the resulting Sage build > passes all tests on my Oneiric VM. > > ---  Dan Drake > -  http://mathsci.kaist.ac.kr/~drake I too can con

[sage-devel] Re: small problem with polyhedra.py

2011-09-10 Thread Volker Braun
I agree that there are some issues if you want to change options in the plot. I've recently reorganized the polyhedron class (and added a PPL backend next to cddlib) in #11634, #11763 but I haven't touched the plotting code. -- To post to this group, send an email to sage-devel@googlegroups.co

[sage-devel] Re: Finding the exact camera position in Jmol

2011-09-10 Thread Nils Bruin
On Sep 10, 11:11 am, Jonathan wrote: > If you are doing everything through Sage, would having Jmol print the > rotation information to the web page be enough? Possibly. That would result in essentially the same work-flow as Sébastien's solution, but with less effort. If I were new to Sage I would

[sage-devel] small problem with polyhedra.py

2011-09-10 Thread davidp
Lines 1483 and 1484 in polyhedra.py are projection.render_vertices_3d(width=3, color='green', **kwds) + \ projection.render_wireframe_3d(width=3, color='green', **kwds) + \ Setting the color and width here prevents the user from doing this at the command line (see example below).

Re: [sage-devel] Re: python ints vs sage ints with respect to powers

2011-09-10 Thread William Stein
On Sat, Sep 10, 2011 at 11:45 AM, Dima Pasechnik wrote: >  well, on #11779 I am in minority, as some people refuse to acknowledge that > exponentiation is often > a binary operation (say, on positive reals)... > If anyone is still willing to review this ticket, and not just demonstrate > how stubb

Re: [sage-devel] Re: python ints vs sage ints with respect to powers

2011-09-10 Thread Dima Pasechnik
well, on #11779 I am in minority, as some people refuse to acknowledge that exponentiation is often a binary operation (say, on positive reals)... If anyone is still willing to review this ticket, and not just demonstrate how stubborn they can be, this will be appreciated. -- To post to this

[sage-devel] Re: Finding the exact camera position in Jmol

2011-09-10 Thread Jonathan
If you are doing everything through Sage, would having Jmol print the rotation information to the web page be enough? Then the user could do a cut and paste to use with the renderer they want. Completely automating things would require more fiddling. Jonathan On Sep 9, 12:04 pm, Nils Bruin wro

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Simon King
Hi! I think I have solved the main problem!! I am now able to do: sage: class Foo: : __metaclass__ = FastHash : def __hash__(self): : print "computing hash" : return id(self) : sage: f = Foo() When calling the hash for the first time, it

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Simon King
Hi Maarten, On 10 Sep., 15:32, Maarten Derickx wrote: > You should really learn about metaclasses. The basically allow you to change > the way classes are created. Normally this is done by type. I.e. the > following are equivalent. > > sage: class Foo(object): > :     def a(self): > :    

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Maarten Derickx
You should really learn about metaclasses. The basically allow you to change the way classes are created. Normally this is done by type. I.e. the following are equivalent. sage: class Foo(object): : def a(self): : return 1 : sage: f=Foo() sage: f.a() 1 sage: Foo=typ

[sage-devel] Re: What happens when the hash value of an element is computed?

2011-09-10 Thread Maarten Derickx
By the way, if we really start using multiple inheritance a lot, we should also make a list in the documentation somewhere about the order in wich you should inherit. Just always prepending is a really stupid idea since it will lead to errors all the time! The same goes for just always postpendi

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Maarten Derickx
By the way, if we really start using multiple inheritance a lot, we should also make a list in the documentation somewhere about the order in wich you should inherit. Just always prepending is a really stupid idea since it will lead to errors all the time! The same goes for just always postpendi

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Simon King
Hi Maarten, On 10 Sep., 13:17, Maarten Derickx wrote: > But maybe you could explain why you want to override the __hash__ of > particular instances It's because I am currently collecting ideas of how to conveniently add a fast hash to existing stuff in Sage. One idea was to add a fast __hash__ d

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Maarten Derickx
Oh, and there is of course also a workaround without hacking the python source code. That would be by implementing the default __hash__ of a class to first look up wether the instance.__dict__.has_key('__hash__') and if so then call the instance method. But maybe you could explain why you want

[sage-devel] Re: Customizing hash for an instance of ?

2011-09-10 Thread Maarten Derickx
The reason for this is that the c source code wich is executed when the build in function Hash is executed on a python object wich has as C type PyObject then following code is executed (in the latest python 2.6). PyObject_Hash(PyObject *v) { PyTypeObject *tp = v->ob_type; if (tp->tp_ha

[sage-devel] Re: What happens when the hash value of an element is computed?

2011-09-10 Thread Maarten Derickx
By the way, if we really start using multiple inheritance a lot, we should also make a list in the documentation somewhere about the order in wich you should inherit. Just always prepending is a really stupid idea since it will lead to errors all the time! The same goes for just always postpendi

[sage-devel] Re: What happens when the hash value of an element is computed?

2011-09-10 Thread Maarten Derickx
Hi Simon, When I read your post I had a hard time believing that your simple example actually caused trouble with inheritance. After playing around with it, it became clear this is a cython issue: This works: sage: cython("cdef class FastHash(object):\nxyz_blaha=1") sage: class Foo(FastHas

[sage-devel] Customizing hash for an instance of ?

2011-09-10 Thread Simon King
Hi! I am trying to change the hash function of an instance after it is created. I tried to override the __hash__ attribute of the instance with a bound method created from a custom hash function. It worked for , but not for instances of : sage: def my_hash(self): : print "custom hash"

[sage-devel] Re: How to detect a regression in the doc tests?

2011-09-10 Thread Simon King
Hi Leif, On 9 Sep., 22:14, leif wrote: > For the record: Found "some"; mailed you off-list. What you sent me off-list looks very promising, with an of something like [00394 0.000s] E = EllipticCurve('198b') [00395 1.440s] E.prove_BSD(verbosity=Integer(1), secs_hi=Integer(1)) [00403 0.00