Re: [sage-devel] Re: possibly controversial question: "Can I create commercial software using SageMath?"

2016-08-19 Thread William Stein
On Fri, Aug 19, 2016 at 10:08 AM, Robert Dodier  wrote:
> On 2016-08-17, William Stein  wrote:
>
>> If you write a program that genuinely uses the Sage library in a
>> nontrivial way, then that program is a derived work of Sage
>
> Well, if there is any controversy here, it must be this statement. The
> question of what constitutes a derived work is subtle and complex, and I
> don't think any categorical statements are possible. An exploration of
> this topic that I've found useful is this "Twenty Questions about the
> GPL": https://jacobian.org/writing/gpl-questions/
>
> I know that various parties have offered their opinions about what
> constitutes a derived work, including the FSF, the institution behind
> the GPL. But even the FSF's interpretation isn't binding on anybody --
> whether some work falls under the GPL depends on copyright law, which
> can only be decided by a court, not the you, me, or the FSF, and even
> then we don't have a whole lot of court cases to guide us.
>
> Lay discussions about the GPL tend to contain a lot of wishful thinking
> alternating with the frank admission that nobody really knows and
> therefore if there's any question, one must hire a lawyer. Surely,
> though, a large group of intelligent, motivated people can formulate
> some clear guidelines. For a start, perhaps sorting out the twenty cases
> mentioned above into probably yes, probably no, and everything else.
> Just guessing here; doubtless there are better ideas.
>
> Incidentally, if ever a lawyer has weighed in on licensing issues
> related to Sage, I would be interested to hear about it. Also, I haven't
> been paying attention, so if there have been previous discussions about
> the GPL and Sage, I apologize for trotting out a tired argument.


Thanks -- that's an extremely good point.  I should amend my statement
to: "If you write a program that genuinely uses the Sage library in a
 nontrivial way, then it **may** be a derived work of Sage.  In that
case... [GPL ...]"


-- 
William (http://wstein.org)

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: TypeError: is not hashable and does not implement _cache_key()

2016-08-19 Thread Joseph Hundley
Dear Nils, 

Thanks very much for your detailed and thoughtful reply. 

Best, 

Joe

On Friday, August 19, 2016 at 5:37:21 PM UTC-4, Nils Bruin wrote:
>
> On Friday, August 19, 2016 at 1:43:30 PM UTC-7, Joseph Hundley wrote:
>>
>> There are two reasons I was planning to have AbstractAlgebraicGroup be 
>> UniqueRepresentation
>> (1) The passage in this tutorial 
>> 
>>  which 
>> reads
>>
>  
> 
>
> It really depends on what you need to do to construct the parent. In most 
> cases, you just end up storing some of the construction parameters. Reusing 
> parents that were already constructed can save some memory, but the usual 
> pattern is that you construct only a few parents, which get naturally 
> passed around anyway. Reusing a parent that is handed to you is obviously 
> much more efficient than reusing a parent by trying to get a hold of it via 
> its construction parameters.So if you need UniqueRepresentation to limit 
> the number of parents in memory, it's probably a good idea to think of ways 
> of restructuring your computation (there may be cases where you can't, 
> though).
>
> Using UniqueRepresentation does force a upfront cost, though: construction 
> parameters need to be processed so that they can be used for lookup in a 
> global dictionary to see if equivalent parameters have already been used to 
> construct such an object, and then this lookup needs to happen. In many 
> scenarios this search will come up empty, in which case you've just 
> incurred a cost without a direct gain. So whether UniqueRepresentation is a 
> performance gainer really depends on the scenario. Most of the time it is 
> not, so I'd say the rationale given in the tutorial is misleading.
>
>  UniqueRepresentation is needed in the coercion framework: If two 
> different sources produce polynomials in Q[x,y], the user would expect to 
> be able to combine them because they look indistinguishable to the user. In 
> the coercion framework it turned out to be much more efficient if the 
> parents of those two polynomials ARE indeed equal. The construction 
> parameters in this case are indeed easy to compare because it's just 
> (Q,('x','y')), where Q is a UniqueRepresentation itself, so you can 
> recognize it by identity itself.
>
> As a consequence, if you're implementing a ring type that itself is likely 
> to be used as a base ring for a polynomial ring (or matrices etc.), you 
> should probably try to make it UniqueRepresentation. But otherwise it's not 
> immediately clear you'll be getting a benefit from it.
>
> (2) It seems to me to make sense mathematically, since, mathematically 
>> speaking, the split connected reductive algebraic group with based root 
>> datum B is a unique mathematical object. 
>>
>
> Yes, but in what category? and is it unique up to unique isomorphism?
>  
>
>> I admit I don't understand the "cost" of "non-locality"? Can you point me 
>> somewhere I could read up on relevant issues? Are there rules of thumb for 
>> when parents should and should not be UniqueRepresentation?
>>
>
> A possible example of the risks you run:
>  Suppose
>
> K=NumberField()
> K.compute_classgroup( method="heuristic and conditional") #[*]
>
> 
>
> L=NumberField() #this will now get you K back!!!
> L.classgroup() #suppose this gets you the class group cached on L, i.e., 
> the one computed at [*]
>  
> alternatively, if K had been garbage collected already
>
> L=NumberField() #this is now a fresh version
> L.classgroup() #no classgroup info cached, you trigger (unconditional) 
> computation.
>
> The fact that your result is now dependent on what happened to be in 
> memory is of course very bad. It makes your system unreliable. That means 
> that this pattern of "implement a computation routine that can use several 
> heuristics" combined with "use by default whatever is cached" cannot be 
> applied to UniqueRepresentation objects, because obviously, caching 
> heuristic computation results modifies the state of your object in a 
> noticeable way. UniqueRepresentation object need to take their immutability 
> quite seriously.
>
> In a different direction: is there a good place to read about how to make 
>> something be hashable or implement _cache_key()?
>>
>
> Hashing in mathematics in general is hard, because you need a==b implies 
> hash(a)==hash(b), and at the same time you need that a!=b usually implies 
> hash(a)!=hash(b).
>
> Due to coercion we can't actually do that:
>
>
> http://www.sagemath.org/git-developer-guide/coding_in_python.html#the-hash-special-method
>
> and it depends on what you want "a==b" to mean in your category whether 
> it's easy to decide and whether you can find a function Category -> [-2^63 
> .. 2^63-1] that's not too constant and respects the "==" equivalence.
> There are categories in which we know that "a==b" in general is 
> undecidable. It may be easy for BasedRootDatum (it certainly is in your 
> re

[sage-devel] Re: possibly controversial question: "Can I create commercial software using SageMath?"

2016-08-19 Thread Robert Dodier
On 2016-08-17, William Stein  wrote:

> If you write a program that genuinely uses the Sage library in a
> nontrivial way, then that program is a derived work of Sage

Well, if there is any controversy here, it must be this statement. The
question of what constitutes a derived work is subtle and complex, and I
don't think any categorical statements are possible. An exploration of
this topic that I've found useful is this "Twenty Questions about the
GPL": https://jacobian.org/writing/gpl-questions/

I know that various parties have offered their opinions about what
constitutes a derived work, including the FSF, the institution behind
the GPL. But even the FSF's interpretation isn't binding on anybody --
whether some work falls under the GPL depends on copyright law, which
can only be decided by a court, not the you, me, or the FSF, and even
then we don't have a whole lot of court cases to guide us.

Lay discussions about the GPL tend to contain a lot of wishful thinking
alternating with the frank admission that nobody really knows and
therefore if there's any question, one must hire a lawyer. Surely,
though, a large group of intelligent, motivated people can formulate
some clear guidelines. For a start, perhaps sorting out the twenty cases
mentioned above into probably yes, probably no, and everything else.
Just guessing here; doubtless there are better ideas.

Incidentally, if ever a lawyer has weighed in on licensing issues
related to Sage, I would be interested to hear about it. Also, I haven't
been paying attention, so if there have been previous discussions about
the GPL and Sage, I apologize for trotting out a tired argument.

FWIW

Robert Dodier

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: ExpressionNice

2016-08-19 Thread Bill Page
On 19 August 2016 at 14:24, Nils Bruin  wrote:
> On Friday, August 19, 2016 at 9:45:12 AM UTC-7, Bill Page wrote:
>>
>> My main question is whether we should try to replicate what is done
>> by ExpressionNice and thereby render it obsolete or should we try
>> to reach some other compromise?
>
> Well, as is pointed out in the ExpressionNice documentation already,
> it produces some representations that just don't express the meaning
> of the underlying expression, so we definitely don't want to replicate
> that.
>

I think it is wrong to say that this notation does not express the
meaning of the underlying expression - at most you might claim that it
is ambiguous in some cases. My understanding is that this is a
notational preference (at least for the designers of SageManifolds)
and for them the meaning is clear enough as well as sufficiently
brief, although even SageManifolds provides an option to display
derivatives in Pynac form if desired.

> ...
> I think this covers the most important cases. Comments welcome on what
> styles people would prefer.
>

Probably the only way to make a sufficient number of people happy
enough to get a positive review on this ticket would be to implement
several major alternative notations for derivatives and an easy way to
switch between them. Then the only thing there is to argue about is
which one should be the default. :)

Bill.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: TypeError: is not hashable and does not implement _cache_key()

2016-08-19 Thread Nils Bruin
On Friday, August 19, 2016 at 1:43:30 PM UTC-7, Joseph Hundley wrote:
>
> There are two reasons I was planning to have AbstractAlgebraicGroup be 
> UniqueRepresentation
> (1) The passage in this tutorial 
> 
>  which 
> reads
>
 


It really depends on what you need to do to construct the parent. In most 
cases, you just end up storing some of the construction parameters. Reusing 
parents that were already constructed can save some memory, but the usual 
pattern is that you construct only a few parents, which get naturally 
passed around anyway. Reusing a parent that is handed to you is obviously 
much more efficient than reusing a parent by trying to get a hold of it via 
its construction parameters.So if you need UniqueRepresentation to limit 
the number of parents in memory, it's probably a good idea to think of ways 
of restructuring your computation (there may be cases where you can't, 
though).

Using UniqueRepresentation does force a upfront cost, though: construction 
parameters need to be processed so that they can be used for lookup in a 
global dictionary to see if equivalent parameters have already been used to 
construct such an object, and then this lookup needs to happen. In many 
scenarios this search will come up empty, in which case you've just 
incurred a cost without a direct gain. So whether UniqueRepresentation is a 
performance gainer really depends on the scenario. Most of the time it is 
not, so I'd say the rationale given in the tutorial is misleading.

 UniqueRepresentation is needed in the coercion framework: If two different 
sources produce polynomials in Q[x,y], the user would expect to be able to 
combine them because they look indistinguishable to the user. In the 
coercion framework it turned out to be much more efficient if the parents 
of those two polynomials ARE indeed equal. The construction parameters in 
this case are indeed easy to compare because it's just (Q,('x','y')), where 
Q is a UniqueRepresentation itself, so you can recognize it by identity 
itself.

As a consequence, if you're implementing a ring type that itself is likely 
to be used as a base ring for a polynomial ring (or matrices etc.), you 
should probably try to make it UniqueRepresentation. But otherwise it's not 
immediately clear you'll be getting a benefit from it.

(2) It seems to me to make sense mathematically, since, mathematically 
> speaking, the split connected reductive algebraic group with based root 
> datum B is a unique mathematical object. 
>

Yes, but in what category? and is it unique up to unique isomorphism?
 

> I admit I don't understand the "cost" of "non-locality"? Can you point me 
> somewhere I could read up on relevant issues? Are there rules of thumb for 
> when parents should and should not be UniqueRepresentation?
>

A possible example of the risks you run:
 Suppose

K=NumberField()
K.compute_classgroup( method="heuristic and conditional") #[*]



L=NumberField() #this will now get you K back!!!
L.classgroup() #suppose this gets you the class group cached on L, i.e., 
the one computed at [*]
 
alternatively, if K had been garbage collected already

L=NumberField() #this is now a fresh version
L.classgroup() #no classgroup info cached, you trigger (unconditional) 
computation.

The fact that your result is now dependent on what happened to be in memory 
is of course very bad. It makes your system unreliable. That means that 
this pattern of "implement a computation routine that can use several 
heuristics" combined with "use by default whatever is cached" cannot be 
applied to UniqueRepresentation objects, because obviously, caching 
heuristic computation results modifies the state of your object in a 
noticeable way. UniqueRepresentation object need to take their immutability 
quite seriously.

In a different direction: is there a good place to read about how to make 
> something be hashable or implement _cache_key()?
>

Hashing in mathematics in general is hard, because you need a==b implies 
hash(a)==hash(b), and at the same time you need that a!=b usually implies 
hash(a)!=hash(b).

Due to coercion we can't actually do that:

http://www.sagemath.org/git-developer-guide/coding_in_python.html#the-hash-special-method

and it depends on what you want "a==b" to mean in your category whether 
it's easy to decide and whether you can find a function Category -> [-2^63 
.. 2^63-1] that's not too constant and respects the "==" equivalence.
There are categories in which we know that "a==b" in general is 
undecidable. It may be easy for BasedRootDatum (it certainly is in your 
reference implementation :-)).

-- 
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, send email to sage-devel@googlegroups.com.
Visit th

[sage-devel] Re: TypeError: is not hashable and does not implement _cache_key()

2016-08-19 Thread Joseph Hundley
There are two reasons I was planning to have AbstractAlgebraicGroup be 
UniqueRepresentation
(1) The passage in this tutorial 
 
which 
reads 

You are encouraged to *make your parent “unique”*. That’s to say, parents 
should only evaluate equal if they are identical. Sage provides frameworks 
to create unique parents. We use here the most easy one: Inheriting from 
the class sage.structure.unique_representation.UniqueRepresentation 

 is 
enough. Making parents unique can be quite important for an efficient 
implementation, because the repeated creation of “the same” parent would 
take a lot of time.

(2) It seems to me to make sense mathematically, since, mathematically 
speaking, the split connected reductive algebraic group with based root 
datum B is a unique mathematical object. 

I admit I don't understand the "cost" of "non-locality"? Can you point me 
somewhere I could read up on relevant issues? Are there rules of thumb for 
when parents should and should not be UniqueRepresentation? 

In a different direction: is there a good place to read about how to make 
something be hashable or implement _cache_key()?

Thanks for your time.

Best, 

JH

On Friday, August 19, 2016 at 3:03:23 PM UTC-4, Nils Bruin wrote:
>
> On Friday, August 19, 2016 at 11:20:44 AM UTC-7, Joseph Hundley wrote:
>>
>> Context: I am playing around with implementing abstract algebraic groups 
>> which are recovered from based root data. 
>> So, one should eventually be able to say
>> b = BasedRootDatum( suitable input )
>> g = AbstractAlgebraicGroup( b )
>>
>
> TypeError:  
> is not hashable and does not implement _cache_key()
>
> Do you need your AbstractAlgebraicGroup to be UniqueRepresentation? In 
> that case you should probably put it first in inheritance (that is 
> independent of your error, though)
>
> Because AbstractAlgebraicGroup is UniqueRepresentation, it needs to store 
> its construction parameters (that's b) somehow in order to ensure that the 
> next time you call AbstractAlgebraicGroup, it knows to return the 
> identically same object if it still exists. That means that "b" needs to be 
> hashable (or at least implement _cache_key).
>
> UniqueRepresentation comes at a considerable cost. It introduces serious 
> non-locality in the code (someone else can grab the identical object 
> without weven meaning to!), so that UniqueRepresentation object must take 
> great care in how they behave. UniqueRepresentation is basically required 
> for parents that occur as "base" for other structures that have elements 
> that participate non-trivially in the coercion framework, because the 
> coercion framework assumes in some places that "==" means "is" in order to 
> operate faster. If you don't need that, it's worth considering not 
> declaring your parent UniqueRepresentation.
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: TypeError: is not hashable and does not implement _cache_key()

2016-08-19 Thread Nils Bruin
On Friday, August 19, 2016 at 11:20:44 AM UTC-7, Joseph Hundley wrote:
>
> Context: I am playing around with implementing abstract algebraic groups 
> which are recovered from based root data. 
> So, one should eventually be able to say
> b = BasedRootDatum( suitable input )
> g = AbstractAlgebraicGroup( b )
>

TypeError:  is 
not hashable and does not implement _cache_key()

Do you need your AbstractAlgebraicGroup to be UniqueRepresentation? In that 
case you should probably put it first in inheritance (that is independent 
of your error, though)

Because AbstractAlgebraicGroup is UniqueRepresentation, it needs to store 
its construction parameters (that's b) somehow in order to ensure that the 
next time you call AbstractAlgebraicGroup, it knows to return the 
identically same object if it still exists. That means that "b" needs to be 
hashable (or at least implement _cache_key).

UniqueRepresentation comes at a considerable cost. It introduces serious 
non-locality in the code (someone else can grab the identical object 
without weven meaning to!), so that UniqueRepresentation object must take 
great care in how they behave. UniqueRepresentation is basically required 
for parents that occur as "base" for other structures that have elements 
that participate non-trivially in the coercion framework, because the 
coercion framework assumes in some places that "==" means "is" in order to 
operate faster. If you don't need that, it's worth considering not 
declaring your parent UniqueRepresentation.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: ExpressionNice

2016-08-19 Thread Nils Bruin
On Friday, August 19, 2016 at 9:45:12 AM UTC-7, Bill Page wrote:
>
> On the contrary after reading the code for ExpressionNice carefully it 
> is clear that it does not do post-processing as such


class ExpressionNice(Expression):

def _repr_(self):
 
d = self._parent._repr_element_(self)

d = d.replace(o, res)

return d

It's manipulating strings. Unless this code is only used on very simple 
expressions, people will start to find it's making false string 
replacements at some point. Anyway, we've found the proper way of doing 
this (thanks for digging that up out of Pynac!) and I'm sure that even if 
ExpressionNice is still felt to be needed, the authors will prefer to 
generate their representations in the same way.
 

> My main question is whether we should try to replicate what is done by 
> ExpressionNice and thereby render it obsolete or should we try to 
> reach some other compromise? 
>

Well, as is pointed out in the ExpressionNice documentation already, it 
produces some representations that just don't express the meaning of the 
underlying expression, so we definitely don't want to replicate that.

Personally, I'm comfortable with the basic representation choices made in 
https://trac.sagemath.org/ticket/21286 . I'd be hesitant to go any further. 
Using leibnitz notation in general requires temporary variables, e.g.

D[0,1](f)(x+y,x-y) = diff(f(t1,t2),t1,t2) |_[t1=x+y,t2=x-y]

I don't think the RHS is more readable than the LHS after the small hurdle 
of understanding what D[0,1] means.

This leaves general printing style. The latex side of things here is 
simple. D[0,1](f)(x,y) should just be typeset as

\frac{\partial^2}{\partial  x\partial y} f(x,y)

(we can do \partial x\partial x -> (\partial x)^2 or more ambiguously 
\partial x^2 )

If the function is univariate we could replace \partial with "d".

I'd be a little hesitant to use this notation in "repr" because the use of 
"d" as a variable is not so far fetched and would lead to a horrible 
representation

repr( diff(f(d1,d2),d1,d2) ) = "(d^2/dd1 dd2)f(d1,d2)"

and in general it leads to an uncomfortable number of parentheses in 
unfortunate places. So I'd probably gravitate towards producing "parsable" 
representations, i.e., just

diff(f(d1,d2),d1,d2)

perhaps not elegant, but certainly understandable and unsurprising, since 
it's what the user probably typed in.

[we could check the symbol names for the presence of "d"s, but that would 
probably lead to code that's trying to be too smart for its own good. It 
would still leave us with an uncomfortable number of parentheses, since the 
operator (written as a fraction) would need parentheses to be delimited 
properly]

First and second derivatives of univariate functions could easily be 
printed as f'(x) and f''(x) [or perhaps f"(x) ]. It does make it more 
tricky to cut/paste these into programming environments, though, because 
the quotes might need quoting.

I think this covers the most important cases. Comments welcome on what 
styles peope would prefer.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Quickest way to find a class definition?

2016-08-19 Thread Joseph Hundley
Awesome! Thanks!

On Friday, August 19, 2016 at 2:07:07 PM UTC-4, vdelecroix wrote:
>
> sage: import_statements(Permutation) 
> from sage.combinat.permutation import Permutation 
>
> And if there is an ambiguity it does show up 
>
> sage: import_statements('ZZ') 
> # **Warning**: distinct objects with name 'ZZ' in: 
> #   - sage.rings.integer_ring 
> #   - sage.libs.ntl.ntl_ZZ 
> from sage.rings.integer_ring import ZZ 
>
> Vincent 
>
>
> On 19/08/16 15:05, Joseph Hundley wrote: 
> > Hi, 
> > 
> > Suppose I have something which I know I need to import and have 
> forgotten 
> > where it's found. What is the best way to recover that information? The 
> > best method I know is to type ??ThingIWantToImport and scroll and scroll 
> > and scroll until at the very end it tells me which file I want. Is there 
> a 
> > better approach? 
> > 
> > Thanks, 
> > 
> > JH 
> > 
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] TypeError: is not hashable and does not implement _cache_key()

2016-08-19 Thread Joseph Hundley
Context: I am playing around with implementing abstract algebraic groups 
which are recovered from based root data. 
So, one should eventually be able to say
b = BasedRootDatum( suitable input )
g = AbstractAlgebraicGroup( b )
Running into an issue which seems to be triggered by the passing of a BRD 
object to the AAG constructor. 

Full error message below. Having stripped away everything that does not 
seem to have a role in producing the error, 
I get the error with just the following: 

based_root_datum.py reads: 

*from sage.structure.sage_object import SageObject*


*class BasedRootDatum(SageObject):*

*def __init__(self):*

*one = 1 # placeholder*



*def __repr__(self):*

*return "Based root datum"*



while abstract_algebraic_group.py reads 


*from sage.structure.parent import Parent*

*from sage.structure.unique_representation import UniqueRepresentation*


*class AbstractAlgebraicGroup(Parent,  UniqueRepresentation):*


*def __init__(self, BRD, base_ring, system):*

*two = 2 #placeholder*



*def __repr__(self):*


*return "Abstract Algebraic Group"*



Here's the full error message.


---

TypeError Traceback (most recent call last)

 in ()

> 1 g=AbstractAlgebraicGroup(b)


/Users/jahundle/sage/src/sage/misc/lazy_import.pyx in 
sage.misc.lazy_import.LazyImport.__call__ 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/lazy_import.c:3636)()

*384* True

*385* """

--> 386 return self._get_object()(*args, **kwds)

*387* 

*388* def __repr__(self):


/Users/jahundle/sage/src/sage/misc/classcall_metaclass.pyx in 
sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/classcall_metaclass.c:1251)
()

*328* """

*329* if cls.classcall is not None:

--> 330 return cls.classcall(cls, *args, **kwds)

*331* else:

*332* # Fast version of type.__call__(cls, *args, **kwds)


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.CachedFunction.__call__ 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:5545)()

*   1054* return self.cache[k]

*   1055* except TypeError:  # k is not hashable

-> 1056 k = dict_key(k)

*   1057* return self.cache[k]

*   1058* except KeyError:


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.dict_key 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:2650)()

*600* hash(o)

*601* except TypeError:

--> 602 o = (unhashable_key, cache_key_unhashable(o))

*603* return o

*604* 


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.cache_key_unhashable 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:3160)()

*649* """

*650* if isinstance(o, tuple):

--> 651 return tuple(cache_key(item) for item in o)

*652* try:

*653* k = o._cache_key()


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in genexpr 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:3060)()

*649* """

*650* if isinstance(o, tuple):

--> 651 return tuple(cache_key(item) for item in o)

*652* try:

*653* k = o._cache_key()


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.cache_key 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:2851)()

*640* hash(o)

*641* except TypeError:

--> 642 o = cache_key_unhashable(o)

*643* return o

*644* 


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.cache_key_unhashable 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:3160)()

*649* """

*650* if isinstance(o, tuple):

--> 651 return tuple(cache_key(item) for item in o)

*652* try:

*653* k = o._cache_key()


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in genexpr 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:3060)()

*649* """

*650* if isinstance(o, tuple):

--> 651 return tuple(cache_key(item) for item in o)

*652* try:

*653* k = o._cache_key()


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.cache_key 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:2851)()

*640* hash(o)

*641* except TypeError:

--> 642 o = cache_key_unhashable(o)

*643* return o

*644* 


/Users/jahundle/sage/src/sage/misc/cachefunc.pyx in 
sage.misc.cachefunc.cache_key_unhashable 
(/Users/jahundle/sage/src/build/cythonized/sage/misc/cachefunc.c:3215)()

*651* return tuple(cache_key(item

[sage-devel] Re: cayley_table display formatting incorrect

2016-08-19 Thread ciric50
I think you're right. I used my browser developer tools to get the latex 
source for the table from the screen, and pasted that into a simple latex 
document in Texmaker. The table displayed without any problem.

I found one entry in the MathJax Users forum that claims MathJax does not 
support multicolumn and that HTML tables should be used instead. The latex 
"tabular" environment might work, however, though I'm not sure that 
supports everything that needs to be done. Another alternative would be to 
use plain HTML for the table.

I'm going to research these options a bit. If no one comes up with anything 
else in the next few days I'll go ahead and enter a new ticket for this 
issue.

On Friday, August 19, 2016 at 11:25:48 AM UTC-5, Dima Pasechnik wrote:
>
> IMHO  MathJax does not support \mutilcolumn. (the previous incarnation of 
> formula display stuff, what was it called, did work, I suppose)
>
>
> On Friday, August 19, 2016 at 4:11:02 PM UTC+1, cir...@gmail.com wrote:
>>
>> When I display a Cayley table in a notebook with the Typeset checkbox 
>> checked, the table displays certain latex commands rather than using them 
>> as formatting. Works fine without the Typeset checkbox.
>>
>>
>> 
>>
>> This happens with the Firefox, Chromium, and Vivaldi browsers. I built 
>> Sage on my machine by pulling the latest code from the git repository. I'm 
>> running on Linux Mint 18 64-bit.
>>
>> I didn't find this in Trac or sage-devel, but surely someone else has 
>> seen this before?
>>
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Quickest way to find a class definition?

2016-08-19 Thread Vincent Delecroix

sage: import_statements(Permutation)
from sage.combinat.permutation import Permutation

And if there is an ambiguity it does show up

sage: import_statements('ZZ')
# **Warning**: distinct objects with name 'ZZ' in:
#   - sage.rings.integer_ring
#   - sage.libs.ntl.ntl_ZZ
from sage.rings.integer_ring import ZZ

Vincent


On 19/08/16 15:05, Joseph Hundley wrote:

Hi,

Suppose I have something which I know I need to import and have forgotten
where it's found. What is the best way to recover that information? The
best method I know is to type ??ThingIWantToImport and scroll and scroll
and scroll until at the very end it tells me which file I want. Is there a
better approach?

Thanks,

JH



--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Quickest way to find a class definition?

2016-08-19 Thread Joseph Hundley
Hi, 

Suppose I have something which I know I need to import and have forgotten 
where it's found. What is the best way to recover that information? The 
best method I know is to type ??ThingIWantToImport and scroll and scroll 
and scroll until at the very end it tells me which file I want. Is there a 
better approach?

Thanks,

JH

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Joint Mathematics Meetings relevant MAA sessions

2016-08-19 Thread kcrisman
Deadline is a just a month away for submitting abstracts!  

http://jointmathematicsmeetings.org/meetings/national/jmm2017/2180_maacall

Here are some relevant sessions to Sage educational folks you may want to 
submit to - among others!  (Reply to sage-edu if you have any comments.)

Mathematical Technology in the Calculus Classroom, organized by Joel Kilty 
and Alex M. McAllister, Centre College; Thursday morning. 
The modern calculus classroom often employs technology to enrich the 
learning process and to help bring the ideas to life. Many types of 
mathematical software and physical platforms are available to instructors 
and they can be deployed in a myriad of different ways. However, many 
instructors have questions about how best to utilize technology and which 
software best suits their needs. This session invites academic instructors 
to share their pedagogical perspectives on technology choices for their 
calculus classroom, how they effectively incorporate technology to increase 
student understanding, and a candid assessment of both the advantages and 
disadvantages of their choices.

Me and My Gadgets—Teaching with Technology, organized by Karl R. B. 
Schmitt, Valparaiso University; John Travis, Mississippi College; Thomas 
Hagedorn, The College of New Jersey; and Michael Scott, California State 
University at Monterey Bay; Saturday morning. 
Constantly changing technology presents an exciting and shifting 
opportunity to engage students and improve learning. This electronic poster 
session will consist of live, interactive demonstrations of applets, 
widgets or other technology for teaching mathematics. Rather than preparing 
a traditional printed poster, presenters will showcase how students engage 
mathematics through their application using some electronic device such as 
a tablet, smartphone, or laptop. Preference will be given to presenters 
demonstrating their own or new applications or to novel approaches in using 
existing ones. In addition to the active displays, all participants will 
give a 3-5 minute “Lightning Talk” to demonstrate their application, 
highlighting where it fits into a mathematics curriculum. These will be 
scheduled in the middle of the session, and included in the program. 
Abstracts should include a short description of the application/software 
(or a web-link to it) and explain the pedagogical use of the application. 
Sponsored by the MAA Committee for Technology in Mathematics Education 
(CTiME) and Web SIGMAA.

The Advancement of Open Educational Resources, organized by Benjamin 
Atchison, Framingham State University; and Jeremy Russell, The College of 
New Jersey; Saturday morning. 
This session will showcase the increasing popularity of open educational 
resources (OER) in mathematics and statistics. Examples may include, but 
are not limited to, the development or adoption of open source or open 
access course texts and related materials, the creation and/or 
implementation of course technological enhancements, such as instructional 
apps and video tutorials, and experiences with the inclusion of low or 
no-cost homework platforms or mathematics software systems in a particular 
course. Presenters should attempt to address the effectiveness (formally or 
informally assessed) of the adoption of such resources in their courses. 
Preference will be awarded to presentations from community college and 
four-year undergraduate institutions.

Cryptology for Undergraduates, organized by Robert Lewand, Goucher College; 
Joshua Holden, Rose-Hulman Institute of Technology; and Chris Christensen, 
Northern Kentucky University; Wednesday morning. 
Cryptology courses are now a part of the undergraduate mathematics 
curriculum. For mathematics majors, cryptology fits into the curriculum in 
much the same way that number theory does. In addition, cryptology is 
appearing as a topic in mathematics courses for non-majors, as it is a hook 
to interest these students in mathematics. This contributed paper session 
solicits presentations of cryptologic topics that would be of interest to 
faculty who teach undergraduate cryptology courses or presentations of 
cryptologic topics that could be used in undergraduate courses. 
Presentations that describe classroom experiences and that report on their 
outcomes are invited.

Innovative and Effective Ways to Teach Linear Algebra, organized by Megan 
Wawro, Virginia Tech; Gil Strang, MIT; and David Strong, Pepperdine 
University; Friday morning. 
Linear algebra is one of the most interesting and useful areas of 
mathematics, because of its beautiful and multifaceted theory, as well as 
the enormous importance it plays in understanding and solving many real 
world problems. Consequently, many valuable and creative ways to teach its 
rich theory and its many applications are continually being developed and 
refined. This session will serve as a forum in which to share and discuss 
new or improved teaching ideas and approaches. These i

Re: [sage-devel] Re: ExpressionNice

2016-08-19 Thread Bill Page
On the contrary after reading the code for ExpressionNice carefully it
is clear that it does not do post-processing as such and should be
quite general and robust. However that said,  I am very much in favor
of using the approach you demonstrated in

https://trac.sagemath.org/ticket/21286

My main question is whether we should try to replicate what is done by
ExpressionNice and thereby render it obsolete or should we try to
reach some other compromise?



On 18 August 2016 at 13:17, Nils Bruin  wrote:
>
> As far as I can tell, ExpressionNice gets its results by string-based
> regular expression post-processing. That may be good enough for the
> "manifold" setting, if they know expressions are going to be sufficiently
> simple, but it's definitely going to break when used for arbitrary
> expressions.
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: error compiling ntl in sage 7.3.beta8

2016-08-19 Thread chris wuthrich

The original problem in this thread was resolved, but then there were other 
problems with compiling sage 7.3 on CentOS6.8. I decided to install the 
devtools and it worked fine.

Maybe somewhere in the installation guidelines, one could add that for 
CentOS it is recommended to install devtoolset-4 and autotools-latest and 
to compile after "scl enable devtoolset-4 autotools-latest bash".

Chris

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: cayley_table display formatting incorrect

2016-08-19 Thread Dima Pasechnik
IMHO  MathJax does not support \mutilcolumn. (the previous incarnation of 
formula display stuff, what was it called, did work, I suppose)


On Friday, August 19, 2016 at 4:11:02 PM UTC+1, cir...@gmail.com wrote:
>
> When I display a Cayley table in a notebook with the Typeset checkbox 
> checked, the table displays certain latex commands rather than using them 
> as formatting. Works fine without the Typeset checkbox.
>
>
> 
>
> This happens with the Firefox, Chromium, and Vivaldi browsers. I built 
> Sage on my machine by pulling the latest code from the git repository. I'm 
> running on Linux Mint 18 64-bit.
>
> I didn't find this in Trac or sage-devel, but surely someone else has seen 
> this before?
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] cayley_table display formatting incorrect

2016-08-19 Thread ciric50
When I display a Cayley table in a notebook with the Typeset checkbox 
checked, the table displays certain latex commands rather than using them 
as formatting. Works fine without the Typeset checkbox.



This happens with the Firefox, Chromium, and Vivaldi browsers. I built Sage 
on my machine by pulling the latest code from the git repository. I'm 
running on Linux Mint 18 64-bit.

I didn't find this in Trac or sage-devel, but surely someone else has seen 
this before?

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: Logging and optional tests

2016-08-19 Thread Erik Bray
On Wed, Aug 17, 2016 at 11:30 AM, Simon King  wrote:
> On 2016-08-17, Erik Bray  wrote:
>> Off the top of my head I don't know specifically what you're looking
>> to do though; something more concrete would be helpful.
>
> The computation of the cohomology ring of a group G with coefficients in
> GF(p) involves the computation of cohomology rings of several subgroups
> U1, U2,... of G, unless G is abelian. In the log, I of course want to
> see in what cohomology ring we currently do a computational task.
>
> It would be trivial to have a log that looks like this:
> H*(G; GF(p)): Do task 1
> H*(U1; GF(p)): Do task 2
> H*(U1; GF(p)): Do task 3
> H*(U1; GF(p)): Do task 4
> H*(U2; GF(p)): Do task 2
> H*(U2; GF(p)): Do task 3
> H*(G; GF(p)): Do task 5
>
> However, I find such a log difficult to read (just visually) and would
> prefer to have the following instead:
> H*(G; GF(p)): Do task 1
> H*(U1; GF(p)): Do task 2
>Do task 3
>Do task 4
> H*(U2; GF(p)): Do task 2
>Do task 3
> H*(G; GF(p)): Do task 5
> so that the messages related with a specific cohomology ring are nicely
> grouped. Also it would be nice to *both* be able to turn logging on/off
> for each cohomology ring individually as well as turn it on/off
> simultaneously for all rings.
>
> Probably it makes sense that each cohomology ring has its own
> logger (or perhaps there is a global logger, and each ring has its own
> formatter?). But how to do the grouping?
> I.e., how can I make the formatting of a log message depend on whether
> the previous message came from the same or from a different ring?

Maybe don't even think about it that deeply or specifically as
worrying about which log messages came from which ring.  ISTM from
your description that you'd get close enough if you had a log
Formatter that is kind of dumb (in that it doesn't know anything
semantically about the messages), but keeps track of the previous
message it formatted, and strips / replaces with whitespace any common
prefix between the current message and the last message.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: error installing top com

2016-08-19 Thread James Khan
Hi!

This is awesome! thanks so much! That seemed to be the problem!  It's fixed
now!  Thanks!!

J.

On Fri, Aug 19, 2016 at 8:45 AM, leif  wrote:

> Jeroen Demeyer wrote:
> > On 2016-08-19 04:16, James Khan wrote:
> >> Hi!
> >>
> >> Many thanks for your message and kind help.
> >>
> >> I am running virtual machine on windows 7 and the sage 7.3 link is not
> >> ready yet (the source code is there but not the sage-7.3.ova) so I am
> >> stuck with 7.2 for the time being :(
>
> Yep, it's not yet ready.
>
>
> >> I have indeed tried ./sage -i TOPCOM versus "-i topcom" and then also
> >> have tried putting the 0.17.7.tar.bz2 into the /upstream/  folder, but
> >> neither worked :(
> >> I have also tried " ./sage -f
> >> http://files.sagemath.org/spkg/upstream/topcom/topcom-0.17.7.tar.bz2";
> >> but also no luck.
>
> Nope, for Sage 7.2, you have to put the other file I linked to into the
> upstream/ folder (topcom-0.17.4.tar.bz2), then Sage won't try to
> download it (and hence not try to download the mirror list which fails
> for you because of network / internet issues as Jeroen also mentioned).
>
> (To get rid of the logs and temporary build directories of the failed
> attempts, you can do
>
> rm -rvf /home/sage/sage-7.2/logs/pkgs/{optional,topcom,TOPCOM}*
>
> rm -rvf
> /home/sage/sage-7.2/local/var/tmp/sage/build/{optional,topcom,TOPCOM}*
>
> first.)
>
> Afterwards run './sage -i topcom'.
>
>
> By the way, the newer 0.17.7 is not even for Sage 7.3, but some later
> 7.4.beta*.
>
>
> -leif
>
> >>
> >> I have included the full output the error when I do "sage -i topcom"  if
> >> that helps?
> >
> > It seems that the error points to a problem with the internet
> connection...
> >
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/sage-devel/S5zQ5O7HBc0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Eric Gourgoulhon
Hi, 

For the record, I also could not reach patchbot.sagemath.org this morning 
with Firefox 48.0 (under Ubuntu 16.04.1), with an error saying something 
like "this page cannot be displayed by Firefox because it has some security 
issue..."
Now, it is OK. 
Thanks for having the pathbot back!

Best wishes,

Eric.



Le vendredi 19 août 2016 12:42:24 UTC+2, Thierry (sage-googlesucks@xxx) a 
écrit :
>
> On Fri, Aug 19, 2016 at 12:06:08PM +0200, Jeroen Demeyer wrote: 
> > On 2016-08-19 12:02, Thierry wrote: 
> > >Hi, 
> > > 
> > >nginx is configured to use http2, which is the successor of spdy. I 
> > >removed it, is it better ? 
> > 
> > Yes, it works now both from Firefox and Chromium. I don't know if the 
> > problem was client-side or server-side but at least it works now. 
>
> Anyway, thanks for reporting, a slightly slower patchbot is better than a 
> patchbot that some browsers can not reach. 
>
> Ciao, 
> Thierry 
>
>   
> > Thanks, 
> > Jeroen. 
> > 
> > -- 
> > 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+...@googlegroups.com . 
> > To post to this group, send email to sage-...@googlegroups.com 
> . 
> > Visit this group at https://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Report on patchbot.sagemath.org migration

2016-08-19 Thread Thierry
Hi,

here is a report on patchbot migration.

Previous state:

- minor OS-related issues (apparently specific to CentOS):
- Readahead for the filesystem hosting the db was set to 4096KB by
  default, while mongodb recommends at most 256KB. This was temporarly
  fixed by blockdev, until the migration (will disapear on reboot).
- The setup of selinux was too restrictive to allow mongodb to
  recreate an instance from an empty dir (which was needed to work
  locally on a fresh basis). Was fixed by asking selinux to be more
  permissive.

- mongodb-related issues:
- it is impossible to list all the docbuild logs (which is the largest
  part of the db).
- it was not possible to dump the db (errors after 3% of the dump).
- asking mongo to repair the db did not change anything.
- one reason was that some logs were inconsistent (two kinds of errors
  depending on the log: InvalidDocument or OperationFailure)
- the trick was to reach the logs one by one by iterating over the
  ticket reports and remove the broken ones (63 such logs were
  inconsistent, hence destroyed), and recreate a db from there.
- This results in a db two times smaller (16GB of data instead of 32B,
  effectively 20GB instead of 40GB on the hard disk). One hypothesis
  is that there was also some spam in the remaining part of the db,
  but i guess that most of it was actually made of "pending builds"
  logs, that were not removed when the corresponding report is
  removed. I modified the source code of the patchbot to also remove
  pending logs when the pending reports are pruned, so that the db
  only contains reachable information, and remains slim.

So, after dealing with that stuff, i could get a healthy install at my
lab, now using the same technology as asksage (ubuntu, nginx, uwsgi,...)
and no special tweaks (e.g. custom mongodb port), so that the admins do
not have to learn some new softwares to help there. Everything is fully
documented in /root/admin, so that it is trivial to redeploy without
additional archelolgy.

Then, Frederic Chapoton (who currently maintains the patchbot) got a
dedicated VM at his university, and we moved the stuff there. Everything
seems fine, please tell whether you discover some issue.

Regarding ssl certificates, i am not sure about registration thresholds
for LetsEncrypt so i just copied the current certificate, without
installing any renewal stuff. It is valid until september 8th, so we have
time to do it consistently.

Ciao,
Thierry

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: How to check if package is up-to-date?

2016-08-19 Thread Jeroen Demeyer

On 2016-08-19 12:34, Simon King wrote:

*unless* the user has somehow installed an old version manually


Or *unless* the build has not finished yet, which is my use case.

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Thierry
On Fri, Aug 19, 2016 at 12:06:08PM +0200, Jeroen Demeyer wrote:
> On 2016-08-19 12:02, Thierry wrote:
> >Hi,
> >
> >nginx is configured to use http2, which is the successor of spdy. I
> >removed it, is it better ?
> 
> Yes, it works now both from Firefox and Chromium. I don't know if the
> problem was client-side or server-side but at least it works now.

Anyway, thanks for reporting, a slightly slower patchbot is better than a
patchbot that some browsers can not reach.

Ciao,
Thierry

 
> Thanks,
> Jeroen.
> 
> -- 
> 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, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: How to check if package is up-to-date?

2016-08-19 Thread Simon King
Hey!

On 2016-08-19, leif  wrote:
> Jeroen Demeyer wrote:
>> What is the recommended way to check if the latest version of a given
>> Sage package is installed? The function is_package_installed() only
>> checks whether *some* version of the package is installed, which might
>> not be the latest version.
>
> Note that the "latest" version of any package is always exactly the one
> hardcoded into the "unified repo" for any given Sage version.

Which means that is_package_installed() gives the desired answer,
*unless* the user has somehow installed an old version manually, isn't
it?

Cheers,
Simon

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Jeroen Demeyer
Looking at how sage4 runs now, it looks like it is getting an outdated 
ticket list somehow. First of all, it doesn't see any ticket numbers 
above #21184.


And it thinks that #12866 has positive_review, while in reality it is 
closed:


[2016-08-19 10:16:06] #12866: start rating
 rating 0 after authors
 rating 0 after participants
 rating 0 after components
 rating 510 after status (positive_review)/priority (major)/id (12866)
 start report scanning
 rating 1034 after behind
 rating 1054 after applies
 rating 1014 after uniqueness
 rating 1538 after behind
 rating 1558 after applies
 rating 1518 after uniqueness
 rating 2042 after behind
 rating 2062 after applies
 rating 2022 after uniqueness
 rating 2022 after report scanning

That would explain the testing of closed tickets.

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Jeroen Demeyer

On 2016-08-19 12:02, Thierry wrote:

Hi,

nginx is configured to use http2, which is the successor of spdy. I
removed it, is it better ?


Yes, it works now both from Firefox and Chromium. I don't know if the 
problem was client-side or server-side but at least it works now.


Thanks,
Jeroen.

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Thierry
Hi,

nginx is configured to use http2, which is the successor of spdy. I
removed it, is it better ?

Ciao,
Thierry



On Fri, Aug 19, 2016 at 11:52:40AM +0200, Jeroen Demeyer wrote:
> There seem to be some problems, possibly related to SSL. My firefox browser
> just shows a blank page for https://patchbot.sagemath.org (not even an error
> message)
> 
> 
> Chromium gives an error page with
> 
> This site can’t be reached
> 
> The web page at https://patchbot.sagemath.org/ticket/21288/ might be
> temporarily down or it may have moved permanently to a new web address.
> ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY
> 
> -- 
> 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, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Re: patchbot.sagemath.org down?

2016-08-19 Thread Jeroen Demeyer
There seem to be some problems, possibly related to SSL. My firefox 
browser just shows a blank page for https://patchbot.sagemath.org (not 
even an error message)



Chromium gives an error page with

This site can’t be reached

The web page at https://patchbot.sagemath.org/ticket/21288/ might be 
temporarily down or it may have moved permanently to a new web address.

ERR_SPDY_INADEQUATE_TRANSPORT_SECURITY

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: How to check if package is up-to-date?

2016-08-19 Thread leif
Jeroen Demeyer wrote:
> Hello,
> 
> What is the recommended way to check if the latest version of a given
> Sage package is installed? The function is_package_installed() only
> checks whether *some* version of the package is installed, which might
> not be the latest version.

The "recommended" way?! X)

Well, by the cool design, construct the version from the files
package-version.txt and probably checksums.ini in
build/pkgs/what_you_think_the_basename_in_sage_is/, and compare that to
what you may find in $SAGE_LOCAL/var/lib/sage/installed/ [sic].

To go triple-safe, compare the checksum(s) in one of the files mentioned
above to that of the upstream tarball (whose name you have to construct
as well from the files above) if present.

Simple, isn't it?

(As a "user", you may simply try './sage -i ...' and see if it says "...
already installed".)


Note that the "latest" version of any package is always exactly the one
hardcoded into the "unified repo" for any given Sage version.


-leif


-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Dealing with libc math differences

2016-08-19 Thread Erik Bray
On Fri, Aug 19, 2016 at 11:00 AM, Erik Bray  wrote:
> On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray  wrote:
>> Hi all,
>>
>> Sorry if this has been discussed ad-infinitum before--I looked around
>> a bit but didn't find a definitive answer.
>>
>> I have one (well at least one) test that's failing on Cygwin due to
>> tiny difference in the last digit of the result of log(3).
>>
>> This leads to to several questions:
>>
>> 1) Is it worth investigating the reason for the difference?
>> 2) Is it worth trying to provide a workaround for the difference?
>> 3) Or should the test just be updated to ignore the last couple digits
>> of the result, and if so how (ellipses?)
>
> The difference in log(3) strikes again, but this time in a test where
> it's harder to just set a tolerance.  The test is for the algdep()
> method of ComplexDoubleElements:
> https://git.sagemath.org/sage.git/tree/src/sage/rings/complex_double.pyx#n2377
>
> Because of the way RDF(sqrt(3)) is calculated it uses log(3).  This
> results in a different numeric result for "z".  The test already has
> "abs tol 1e-16" for "z" which is fine, but the algorithm from PARI is
> sensitive to even that small difference and gives a totally different
> polynomial result:
>
> sage: z = (1/2)*(1 + RDF(sqrt(3)) *CDF.0); z
> 0.5 + 0.8660254037844386*I
> sage: p = z.algdep(5); p
> x^5 + x^2
> sage: z^5 + z^2
> -4.996003610813204e-16 - 2.220446049250313e-16*I
>
> So the answer isn't wrong--it's still a good approximation.  But the
> test expects:
>
> sage: z = (1/2)*(1 + RDF(sqrt(3)) *CDF.0); z
> 0.5 + 0.8660254037844387*I
> sage: p = z.algdep(5); p
> x^3 + 1
>
> Not really sure what the best course of action would be for this test
> then, other than to hard-code a value for z.

To answer my own question, this is how I rewrote the test for now:

2389 sage: z = (1/2)*(1 + RDF(sqrt(3)) *CDF.0); z   # abs tol 1e-16
2390 0.5 + 0.8660254037844387*I
2391 sage: p = z.algdep(5); p  # random
2392 x^3 + 1
2393 sage: p.factor()
2394 (x + 1) * ... (x^2 - x + 1)
2395 sage: abs(z^2 - z + 1) < 1e-14
2396 True

This works out fine because the result I got still has (x^2 - x + 1)
as a factor.  It just has one additional factor of x^2.
I'm not too happy with marking the result of z.algdep() as "random"
though.  It's definitely deterministic, just sensitive.  I think the
doctest module maybe needs an "# ignore" flag that is effectively the
same as "# random" without the implication that the output is truly
random.  Just that the line should be run, but its output should not
be checked.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Dealing with libc math differences

2016-08-19 Thread Erik Bray
On Wed, Aug 10, 2016 at 1:38 PM, Erik Bray  wrote:
> Hi all,
>
> Sorry if this has been discussed ad-infinitum before--I looked around
> a bit but didn't find a definitive answer.
>
> I have one (well at least one) test that's failing on Cygwin due to
> tiny difference in the last digit of the result of log(3).
>
> This leads to to several questions:
>
> 1) Is it worth investigating the reason for the difference?
> 2) Is it worth trying to provide a workaround for the difference?
> 3) Or should the test just be updated to ignore the last couple digits
> of the result, and if so how (ellipses?)

The difference in log(3) strikes again, but this time in a test where
it's harder to just set a tolerance.  The test is for the algdep()
method of ComplexDoubleElements:
https://git.sagemath.org/sage.git/tree/src/sage/rings/complex_double.pyx#n2377

Because of the way RDF(sqrt(3)) is calculated it uses log(3).  This
results in a different numeric result for "z".  The test already has
"abs tol 1e-16" for "z" which is fine, but the algorithm from PARI is
sensitive to even that small difference and gives a totally different
polynomial result:

sage: z = (1/2)*(1 + RDF(sqrt(3)) *CDF.0); z
0.5 + 0.8660254037844386*I
sage: p = z.algdep(5); p
x^5 + x^2
sage: z^5 + z^2
-4.996003610813204e-16 - 2.220446049250313e-16*I

So the answer isn't wrong--it's still a good approximation.  But the
test expects:

sage: z = (1/2)*(1 + RDF(sqrt(3)) *CDF.0); z
0.5 + 0.8660254037844387*I
sage: p = z.algdep(5); p
x^3 + 1

Not really sure what the best course of action would be for this test
then, other than to hard-code a value for z.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] spamming patchbot sage4

2016-08-19 Thread Jeroen Demeyer

I created a ticket:
https://trac.sagemath.org/ticket/21288

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] How to check if package is up-to-date?

2016-08-19 Thread Jeroen Demeyer

Hello,

What is the recommended way to check if the latest version of a given 
Sage package is installed? The function is_package_installed() only 
checks whether *some* version of the package is installed, which might 
not be the latest version.


Jeroen.

--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] spamming patchbot sage4

2016-08-19 Thread Thierry
Hi,

i personally had the exact same issue. I solved it by removing the file

$SAGE_ROOT/local/var/lib/sage/installed/bliss-0.73 

and restart the compilation.

Ciao,
Thierry



On Fri, Aug 19, 2016 at 10:05:18AM +0200, Jeroen Demeyer wrote:
> On 2016-08-19 08:37, Ralf Stephan wrote:
> >The sage4 patchbot spams BuildFailed because of
> >
> >Fatal error: bliss/graph.hh: No such file or directory
> >[sagelib-7.4.beta1]  #include "bliss/graph.hh"
> 
> It seems that bliss is not installed, but Sage thinks that it is installed.
> I wonder what could cause this, maybe the funny package version
> "0.73+debian-1+sage-2016-08-02"?
> 
> -- 
> 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, send email to sage-devel@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] spamming patchbot sage4

2016-08-19 Thread Jeroen Demeyer

On 2016-08-19 08:37, Ralf Stephan wrote:

The sage4 patchbot spams BuildFailed because of

Fatal error: bliss/graph.hh: No such file or directory
[sagelib-7.4.beta1]  #include "bliss/graph.hh"


It seems that bliss is not installed, but Sage thinks that it is 
installed. I wonder what could cause this, maybe the funny package 
version "0.73+debian-1+sage-2016-08-02"?


--
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: error installing top com

2016-08-19 Thread leif
Jeroen Demeyer wrote:
> On 2016-08-19 04:16, James Khan wrote:
>> Hi!
>>
>> Many thanks for your message and kind help.
>>
>> I am running virtual machine on windows 7 and the sage 7.3 link is not
>> ready yet (the source code is there but not the sage-7.3.ova) so I am
>> stuck with 7.2 for the time being :(

Yep, it's not yet ready.


>> I have indeed tried ./sage -i TOPCOM versus "-i topcom" and then also
>> have tried putting the 0.17.7.tar.bz2 into the /upstream/  folder, but
>> neither worked :(
>> I have also tried " ./sage -f
>> http://files.sagemath.org/spkg/upstream/topcom/topcom-0.17.7.tar.bz2";
>> but also no luck.

Nope, for Sage 7.2, you have to put the other file I linked to into the
upstream/ folder (topcom-0.17.4.tar.bz2), then Sage won't try to
download it (and hence not try to download the mirror list which fails
for you because of network / internet issues as Jeroen also mentioned).

(To get rid of the logs and temporary build directories of the failed
attempts, you can do

rm -rvf /home/sage/sage-7.2/logs/pkgs/{optional,topcom,TOPCOM}*

rm -rvf
/home/sage/sage-7.2/local/var/tmp/sage/build/{optional,topcom,TOPCOM}*

first.)

Afterwards run './sage -i topcom'.


By the way, the newer 0.17.7 is not even for Sage 7.3, but some later
7.4.beta*.


-leif

>>
>> I have included the full output the error when I do "sage -i topcom"  if
>> that helps?
> 
> It seems that the error points to a problem with the internet connection...
> 


-- 
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, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.