Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-09 Thread Eric Gourgoulhon
Thank you all for the discussion and recommendations ! (it's nice to develop within such a responsive community) I've updated the ticket #18529 accordingly, removing UniqueRepresentation for manifolds and charts and letting them inherit directly from Wit

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-08 Thread Eric Gourgoulhon
Hi, Le dimanche 8 novembre 2015 07:32:48 UTC+1, David Roe a écrit : > > > > I think Nils' point about the downsides of having a cache is one reason > not to use UniqueRepresentation, both because it can generate references to > objects you might want to forget, and because sometimes you just wan

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-07 Thread David Roe
On Sat, Nov 7, 2015 at 6:28 PM, Travis Scrimshaw wrote: > Hey Simon, > > >> >I would then be advocating for using UniqueRepresentation if that >> was >> >> > the only issue. >> >> >> >> It really depends whether in comparing manifolds you would prefer to >> do >> >> *some* >> >> heuristics to

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-06 Thread mmarco
But the random number generator suffers from the same issues: how random it really is deppends on the platform. I would suggest joining both ideas: random number plus time stamp. El jueves, 5 de noviembre de 2015, 17:08:11 (UTC+1), Jeroen Demeyer escribió: > > On 2015-11-05 16:27, Travis Scrims

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Jeroen Demeyer
On 2015-11-05 16:27, Travis Scrimshaw wrote: I'm guessing a random large number is better because it won't stop working in 2038? Mostly, it's better because there is a much smaller chance of collisions: there is a hidden assumption that there will not be 2 manifolds created with the same time

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Travis Scrimshaw
On Thursday, November 5, 2015 at 5:08:15 AM UTC-6, Jeroen Demeyer wrote: > > On 2015-11-05 01:26, Travis Scrimshaw wrote: > > So we > > add an additional unique identifier to the cache key, the time from the > > epoch the object was created. > > That's an extremely ugly hack. If you absolutely

Re: [sage-devel] Re: Manifold equality and UniqueRepresentation

2015-11-05 Thread Jeroen Demeyer
On 2015-11-05 01:26, Travis Scrimshaw wrote: So we add an additional unique identifier to the cache key, the time from the epoch the object was created. That's an extremely ugly hack. If you absolutely must use a unique identifier, generate a sufficiently large random number. -- You received