Re: [sage-devel] Re: find_stat in Sage, the combinatorial_map decorator and its consequences

2013-06-19 Thread tom d
Indeed, the whole reason many of us do any work on Sage is to help our 
research projects.  The principle of helping Sage to help our individual 
mathematical pursuits is actually what makes it consistently stronger as a 
system.

Find Stat is a great tool for the community, and I think there are other 
contexts even inside of Sage where identifying maps between combinatorial 
objects could be quite helpful.  (We were thinking today about objects with 
representations as different kinds of combinatorial objects, with different 
algorithms available in the different representations; having an explicit 
list of maps between such objects could be useful for some type-switching 
or coercion.)

cheers!


On Thursday, June 20, 2013 12:13:24 AM UTC+3, John Cremona wrote:
>
> I confess that I did not understand Nathan's objection, not being 
> familiar with find_stat or the kind of decorator used in that added 
> function.  But I myself have added functions to Sage to help a 
> separate project which uses Sage, namely the lmfdb (see 
> http://www.lmfdb.org/).The cost to Sage users who never work with 
> elliptic curves and their labels seems trivial, and it never occurred 
> to me that anyone would object to such functionality. 
>
> Perhaps I completely misunderstood though. 
>
> John 
>
> On 19 June 2013 21:57, Nathann Cohen > 
> wrote: 
> >> Everything can be rewritten more efficiently, just at a cost in code 
> size / 
> >> maintainability and human effort. Much like Python itself, decorators 
> are a 
> >> way to make code smaller and easier to read for humans, at a certain 
> >> performance penalty. Don't optimize for speed until profiling showed 
> that 
> >> this is a performance bottleneck. 
> > 
> > I am glad to know that there is a general-purpose rule to tell me that 
> > I should refrain from thinking. I guess that this also answers my 
> > other points about the development model. 
> > 
> > Thank you very much, 
> > 
> > Nathann 
> > 
> > -- 
> > 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 http://groups.google.com/group/sage-devel. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: Paper publication of the book "Calcul Mathematique avec Sage"

2013-06-14 Thread tom d
Congratulations!

This reminds me that I need to work on my paper interface to the Sage Cell 
Server.  :)

On Wednesday, June 12, 2013 12:18:21 AM UTC+3, Dox wrote:
>
> Great work! Congratulations!
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Signal handling

2013-03-29 Thread tom d
Ok, cool; as I'm looking around more, it's seeming like getting a good 
grasp of how the cell server is working and using or adapting it 
appropriately.  Will keep on hacking.

On Friday, March 29, 2013 2:29:57 PM UTC+3, Volker Braun wrote:
>
> This is somewhat scary ;-) You can execute arbitrary machine code from 
> within Sage, so you need to have a plan for how to isolate it from the web 
> frontend. Importing it all into one process is a bad idea.
>
> On Friday, March 29, 2013 7:23:10 AM UTC, tom d wrote:
>>
>> I'm trying to import the sage libraries into some Django code.  I'm 
>> playing with getting a sage-enabled web-framework, which would allow me to 
>> do lots and lots of Sage-things in a webpage using a local installation of 
>> Sage directly, instead of passing through the cell server, for example.
>>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Signal handling

2013-03-29 Thread tom d
Hm, the issue is that there's really big startup costs for Sage; it looks 
based on my cursory understanding of subprocess that there's a couple 
seconds of hang-time for each calculation one wants to execute.  This 
doesn't really scale.  I know there's something involving spawning a pile 
of kernels in the cell server, which is something that could work nicely to 
get around the time problem, but I'm not sure where to look to learn how to 
use those kernels appropriately.

The idea is to build something for dropping exercises into the text of some 
notes, websites, maybe eventually moodle...  So this means doing some 
initializing code, displaying the 'text' of the problem, collecting a user 
response, and evaluating the response, and repeating.  I also like the idea 
of some webwork-style randomization of the problems, which means the 
initialization and display would be less trivial to pre-cache.

cheers!


On Friday, March 29, 2013 12:47:11 PM UTC+3, David Roe wrote:
>
> You could just use call from the Python subprocess module, which is 
> documented in the Python docs.  It depends on exactly what functionality 
> you need from Sage.
> David
>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Signal handling

2013-03-29 Thread tom d
Ok, the patch maybe works.  Sage starts normally after patching, but I'm 
getting a segfault from the django process when I try to load a webpage, so 
not sure what that's about

Is there documentation or good examples somewhere on how to use Sage as a 
subprocess?

On Friday, March 29, 2013 10:23:10 AM UTC+3, tom d wrote:
>
> Cool, I'll give the patch a shot.  It looks like some other projects have 
> a variable or option for disabling interrupts for exactly this reason; if a 
> patch works, it might make sense to do signals optionally in Sage.
>
> I'm trying to import the sage libraries into some Django code.  I'm 
> playing with getting a sage-enabled web-framework, which would allow me to 
> do lots and lots of Sage-things in a webpage using a local installation of 
> Sage directly, instead of passing through the cell server, for example. 
>  Django has a server which builds up the webpages that you ask for.  Then, 
> in the code that generates a webpage, I'm doing a 'from sage.all import *' 
> to give access to the Sage libraries.  If a subprocess is a better way to 
> do that, I should look into it...
>
> Thanks for the quick response!
>
> On Friday, March 29, 2013 10:02:25 AM UTC+3, Jeroen Demeyer wrote:
>>
>> On 03/28/2013 11:44 PM, tom d wrote: 
>> > The problem seems to be at: 
>> > from sage.ext.c_lib import _init_csage, sig_on_count 
>> > _init_csage() 
>> > which is explicitly using the signal library and doing signal handling 
>> > stuff for Sage.  Any idea how deep this goes?  Some of the online 
>> > suggestions are about using some different libraries for signal 
>> > handling, which might be a bit more sensitive about whether Sage is the 
>> > main process or not. 
>> You could completely disable the Sage signal handler, I guess the 
>> following patch would do it (NOT TESTED!) 
>>
>> diff --git a/c_lib/src/stdsage.c b/c_lib/src/stdsage.c 
>> --- a/c_lib/src/stdsage.c 
>> +++ b/c_lib/src/stdsage.c 
>> @@ -48,7 +48,6 @@ 
>>   void init_csage() { 
>>   init_global_empty_tuple(); 
>>   init_memory_functions(); 
>> -setup_sage_signal_handler(); 
>>   setup_NTL_error_callback(global_NTL_error_callback, NULL); 
>>   } 
>>
>> diff --git a/sage/ext/c_lib.pyx b/sage/ext/c_lib.pyx 
>> --- a/sage/ext/c_lib.pyx 
>> +++ b/sage/ext/c_lib.pyx 
>> @@ -37,8 +37,6 @@ 
>>   # call its interrupt handler (which is the one we set now). This 
>>   # handler issues a sig_check() which finally raises the 
>>   # KeyboardInterrupt exception. 
>> -import signal 
>> -signal.signal(signal.SIGINT, sage_python_check_interrupt) 
>>
>>   init_csage() 
>>
>>
>>
>> But seriously: why are you trying to run Django and Sage in the same 
>> process? That seems like asking for trouble.  Couldn't you run a Sage 
>> subprocess? 
>>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Signal handling

2013-03-29 Thread tom d
Cool, I'll give the patch a shot.  It looks like some other projects have a 
variable or option for disabling interrupts for exactly this reason; if a 
patch works, it might make sense to do signals optionally in Sage.

I'm trying to import the sage libraries into some Django code.  I'm playing 
with getting a sage-enabled web-framework, which would allow me to do lots 
and lots of Sage-things in a webpage using a local installation of Sage 
directly, instead of passing through the cell server, for example.  Django 
has a server which builds up the webpages that you ask for.  Then, in the 
code that generates a webpage, I'm doing a 'from sage.all import *' to give 
access to the Sage libraries.  If a subprocess is a better way to do that, 
I should look into it...

Thanks for the quick response!

On Friday, March 29, 2013 10:02:25 AM UTC+3, Jeroen Demeyer wrote:
>
> On 03/28/2013 11:44 PM, tom d wrote: 
> > The problem seems to be at: 
> > from sage.ext.c_lib import _init_csage, sig_on_count 
> > _init_csage() 
> > which is explicitly using the signal library and doing signal handling 
> > stuff for Sage.  Any idea how deep this goes?  Some of the online 
> > suggestions are about using some different libraries for signal 
> > handling, which might be a bit more sensitive about whether Sage is the 
> > main process or not. 
> You could completely disable the Sage signal handler, I guess the 
> following patch would do it (NOT TESTED!) 
>
> diff --git a/c_lib/src/stdsage.c b/c_lib/src/stdsage.c 
> --- a/c_lib/src/stdsage.c 
> +++ b/c_lib/src/stdsage.c 
> @@ -48,7 +48,6 @@ 
>   void init_csage() { 
>   init_global_empty_tuple(); 
>   init_memory_functions(); 
> -setup_sage_signal_handler(); 
>   setup_NTL_error_callback(global_NTL_error_callback, NULL); 
>   } 
>
> diff --git a/sage/ext/c_lib.pyx b/sage/ext/c_lib.pyx 
> --- a/sage/ext/c_lib.pyx 
> +++ b/sage/ext/c_lib.pyx 
> @@ -37,8 +37,6 @@ 
>   # call its interrupt handler (which is the one we set now). This 
>   # handler issues a sig_check() which finally raises the 
>   # KeyboardInterrupt exception. 
> -import signal 
> -signal.signal(signal.SIGINT, sage_python_check_interrupt) 
>
>   init_csage() 
>
>
>
> But seriously: why are you trying to run Django and Sage in the same 
> process? That seems like asking for trouble.  Couldn't you run a Sage 
> subprocess? 
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Signal handling

2013-03-28 Thread tom d
Hello!

I'm trying to run Django inside of the Sage python and import the sage 
libraries.  (Idea: "Hey, look, a web server that can find derivatives!") 
 The Django install into my Sage install went fine, but I'm getting an 
error when trying to import the Sage libraries:
http://dpaste.com/1038581/

It sounds like this is because of the signal handling when importing 
sage.all produces some conflict with the signal handlers in the Django 
server thread.
http://stackoverflow.com/questions/8572830/pythondjango-signal-handler-and-main-thread
(Trying to run 'sage --python manage.py runserver --noreload' as suggested 
in that thread doesn't help.)

The problem seems to be at:
from sage.ext.c_lib import _init_csage, sig_on_count
_init_csage()
which is explicitly using the signal library and doing signal handling 
stuff for Sage.  Any idea how deep this goes?  Some of the online 
suggestions are about using some different libraries for signal handling, 
which might be a bit more sensitive about whether Sage is the main process 
or not.

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: a problem in the new permutation groups code (and a solution ?)

2013-03-27 Thread tom d
'Allo!

On Tuesday, March 26, 2013 1:34:32 PM UTC+3, Volker Braun wrote:
>
> The group action framework is just the implementation, you still haven't 
> answered the question that this thread was about: Should permutation 
> actions on nested containers automatically discover one possible action or 
> not. As you said, in the group action framework you can implement either 
> possibility. You can also implement either if you don't use it. 
>

Yeah, I was thinking that because of the ambiguity that was being discussed 
in dealing with the nested actions, the best approach would be to provide a 
simple framework for specifying actions, and easy-to-access examples of 
That Sort of Thing, for people interested in using it, rather than putting 
in an implementation which half of users will think is mussed up.

I'll be at the Sage-Combinat days in June; helping to build out the action 
code that others have already started developing sounds like a great way to 
spend at least a chunk of that week.

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: a problem in the new permutation groups code (and a solution ?)

2013-03-25 Thread tom d
oops, here's the code!  I keep getting server erros when trying to attach 
as a file, so I'm just including the text of the code file below:

class GroupAction(Parent):
def __init__(self, G, S, phi):
#phi a group action G\times S \rightarrow S
self.phi=phi
self.G=G
self.S=S

def __repr__(self):
return "Action of "+self.G.__repr__()+" on the set 
"+self.S.__repr__()

def action(self, g, s):
"""
Gives the action of g on s.
"""
return self.phi(g,s)

def group(self):
"""
Group which acts.
"""
return self.G

def gset(self):
"""
Set on which the group acts.
"""
return self.S

def action_function(self):
"""
Function from `G\times S \rightarrow S`.
"""
return self.phi

def check_action(self, g, h, s):
"""
Checks whether g(hs)=(gh)s.
"""
return self.phi(g*h,s)==self.phi(g,self.phi(h,s))

def check_action_full(self, gens=None, contragradiant=False):
"""
Checks that this is actually a group action using a generating set 
for
the group acting on the full set.
"""
assert self.S.is_finite(), 'Cannot check group action on an 
infinite set.'
if gens==None:
#Should check if g has gens implemented.
gens=self.group().gens()
for g in gens:
for h in gens:
for s in S:
if contragradiant:
if not self.phi(g*h,s)==self.phi(g,self.phi(h,s)):
stringy=g.__repr__()+', '+h.__repr__()+' 
'+s.__repr__()
assert False, 'Action fails on '+stringy
else:
if not self.phi(h*g,s)==self.phi(g,self.phi(h,s)):
stringy=g.__repr__()+', '+h.__repr__()+' 
'+s.__repr__()
assert False, 'Action fails on '+stringy
return True

def orbit(self, s):
return Set([self.action(g,s) for g in self.group()])

def is_transitive(self):
if len(self.gset())==0: return True
s=self.gset()[0]
return orbit(s)==Set(self.gset())

def twist(self, endomorphism):
"""
Twists this representation by an endomorphism of the group.
"""
phi=self.action_function()
kappa=lambda g,s: phi( endomorphism(g), s)
return GroupAction(self.G, self.S, kappa)

def character(self):
"""
Count fixed points for conjugacy class representatives.
"""
c=[]
for g in self.G.conjugacy_classes_representatives():
fix=0
for s in self.S:
if self.action(g,s)==s: fix+=1
c.append(fix)
return c

def cayley_graph(self, gens=None):
"""
Builds a cayley graph of the group action, using the specified 
generating set.
"""
assert self.S.is_finite(), 'Cannot check group action on an 
infinite set.'
if gens==None:
#Should check if g has gens implemented.
gens=self.group().gens()
G=DiGraph()
for g in gens:
for s in self.gset():
G.add_edge( s, self.action(g,s) )
return G

def product_action(self, B):
"""
Given a second group action B with the same group and set T, 
generates
the product group action of self and B.
"""

assert self.group()==B.group(), 'Actions need to have same group 
acting.'
T=B.gset()
U=CartesianProduct(self.gset(),T)
kappa=lambda g, u: U( [self.action_function()(g,u[0]), 
B.action(g,u[1])] )
return GroupAction(G,U,kappa)

"""
#Example 1: Usual symmetric group action.
sage: G=SymmetricGroup(4)
sage: S=Set([1,2,3,4])
sage: phi = lambda g,s: g(s)
sage: A=GroupAction(G,S,phi)
sage: A.character()
[4, 2, 0, 1, 0]

#Example 2: Symmetric group acting on a set.
sage: rho=lambda g,s: Set([phi(g,t) for t in s])
sage: T=Subsets(S,2)
sage: B=GroupAction(G,T,rho)
sage: B.character()
[6, 2, 2, 0, 0]

#Example 3: Product action.
sage: C=A.product_action(B)
sage: C.character()
[24, 4, 0, 0, 0]

#Example 4: Twist by an automorphism.
sage: a=G.an_element()^2
sage: ai=a.inverse()
sage: auto=lambda g: a*g*ai
sage: At=A.twist(auto)
sage: y=G.simple_reflection(1)
sage: [A.action(y,s) for s in S]
[2, 1, 3, 4]
sage: [At.action(y,s) for s in S]
[1, 2, 4, 3]
"""

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: a problem in the new permutation groups code (and a solution ?)

2013-03-25 Thread tom d
Specify the action!  By making a group action framework, we would also be 
providing the possibility of changing the action to something contrary to 
the assumptions of the original developers Yes, in fact I think this is 
one of the natural reasons for doing an explicit group action framework. 
 Even for the action of S_n on the set {1,2,3,...,n} one can twist the 
'usual' action with an automorphism \phi of S_n, so that \sigma acts on i 
by \phi(\sigma)(i).  

The 'usual' actions then become special predefined objects, like the 
special graphs, maybe summoned up automatically using the 
permutation/whatever's __call__ function if it's an idiomatic action like 
\sigma(3).

As a category, I would imagine we would have a GroupAction category and/or 
a GroupWithAction category, which would put some requirements on the group 
and its elements.

I've attached a bit of sample code, which could be used as a base to start 
a group action category.  (Currently just a class, as I need to go and read 
the category tutorials, though...)  The examples are at the bottom; 
includes products of actions, twisting by a group endomorphism, computing 
characters, orbits, checking the action definition, checking transitivity, 
and generating the Cayley graph of the action for a given generating 
set.

On Monday, March 25, 2013 2:30:57 PM UTC+3, Volker Braun wrote:
>
> The group action category stuff would be nice, but you would run into 
> exactly the same question that Dima asked: What are you going to do if 
> there is more than one possible action. You'll have to either use some 
> heuristics (take the simpler / less nested action) or raise some exception 
> telling the user to explicitly disambiguate between them. 
>
>
>
> On Monday, March 25, 2013 8:33:57 AM UTC+1, tom d wrote:
>>
>> Hm, wouldn't this just be a direct product of the individual group 
>> actions?  It seems to me that we're expecting the permutations to act 
>> according to an 'obvious' group action.  Should we also expect 'obvious' 
>> actions of things like a dihedral group when given a 2-dimensional vector?  
>> Probably the answer is to generalize and build up a proper group actions 
>> category (with obvious methods passing to representations!).
>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: a problem in the new permutation groups code (and a solution ?)

2013-03-25 Thread tom d
Hm, wouldn't this just be a direct product of the individual group 
actions?  It seems to me that we're expecting the permutations to act 
according to an 'obvious' group action.  Should we also expect 'obvious' 
actions of things like a dihedral group when given a 2-dimensional vector?  
Probably the answer is to generalize and build up a proper group actions 
category (with obvious methods passing to representations!).

It looks like there's a bare semblance of a glimmer of the idea of actions 
in Sage:
http://combinat.sagemath.org/doc/reference/categories/sage/categories/action.html
but it's not very fleshed out

One way to deal with the problem at hand would be to define a direct 
product of group actions and behave/coerce accordingly.  This could look 
something like:
1) Look at the list of things the permutation is supposed to be acting on, 
like [1, Set([1,2])]
2) Build a group action parent for each of the components, which we then 
use to build a direct product parent
3) Return the appropriate element of the direct product.

Such a framework would have the advantage of being there to deal with 
similar problems in other groups.

cheers!


On Friday, March 22, 2013 4:43:18 PM UTC+3, Volker Braun wrote:
>
> I think its unambiguous to define the orbit of x recursively as 
> 1. use the action on domain elements if x is a domain element
> 2. otherwise, assume that the x is a list/set/... of domain elements
>
>
>
> On Thursday, March 21, 2013 3:10:38 PM UTC+1, Dima Pasechnik wrote:
>>
>> While working on http://trac.sagemath.org/sage_trac/ticket/14291, it 
>> came to my attention that one can now have permutation groups acting 
>> on quite arbitrary domains (the only requirement for the domain elements 
>> seems to be them being hashable). 
>>
>> This leads to the following kind of confusing situations: 
>> suppose our permutation group G acts on, say, (1,2,3,4,(1,2),(2,3)). 
>> Then things like "the orbit (1,2) under G" can be interpreted in two 
>> different incompatible ways: 
>>   * the images under G of the pair of domain elements 1 and 2. 
>>   * the images under G of of the domain element (1,2). 
>>
>> I can see two ways to remedy this: 
>>   1) a framework with parents, etc 
>>   2) "boxing" the most "primitive" elements of the domain, i.e. 
>> as in our example, using ((1),(2),(3),(4),(1,2),(2,3)) instead of 
>> (1,2,3,4,(1,2),(2,3)); then certainly ((1),(2)) and (1,2) are 
>> different things, problem solved. 
>>
>> (and certainly you can tell me that actually it's OK as it is... :)) 
>>
>> IMHO, 2) is relatively easy to put into place, and 1) is tricky and quite 
>> a bit of 
>> work. 
>>
>> Dima 
>>
>>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: strange behavior of sage

2013-03-05 Thread tom d
Yes, I would support such a warning; I've even led tutorials with new sage 
users where defining things called 'max' or 'min' has seemed an obvious 
thing to do and then minutes later been a problem as the default function 
was unavailable.

On Tuesday, March 5, 2013 12:36:33 AM UTC+3, luisfe wrote:
>
> Hi,
>
> Can any one enlight me about what is going on here?
>
> {{{
> sage: t=(1,2,3)
> sage: type(t)
> tuple
> sage: len(t)
> 3
> sage: len(t)=4
> sage: t
> t
> sage: type(t)
> sage.symbolic.expression.Expression
> }}}
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: Longest element in a Coxeter Group - name decision

2013-03-05 Thread tom d
I think longest_element is fine; long_word indicates that there will be a 
word returned instead of an element, which is maybe not what we're after 
here.

Wiser minds than mine will have more knowledge of how to handle 
deprecation, but here's an example from skew_partition.py:

sage: x.r_quotient??
Type:   instancemethod
String Form:
File:   
/home/kaibutsu/sage-5.7/local/lib/python2.7/site-packages/sage/combinat/skew_partition.py
Definition: x.r_quotient(self, length)
Source:
def r_quotient(self, length):
  """
  This method is deprecated.

  EXAMPLES::

  sage: SkewPartition([[3, 3, 2, 1], [2, 1]]).r_quotient(2)
  doctest:1: DeprecationWarning: r_quotient is deprecated. Use 
quotient instead.
  See http://trac.sagemath.org/5790 for details.
  [[[3], []], [[], []]]
  """
  from sage.misc.superseded import deprecation
  deprecation(5790, 'r_quotient is deprecated. Use quotient instead.')
  return self.quotient(length)

On Tuesday, March 5, 2013 12:37:17 PM UTC+3, Kannappan Sampath wrote:
>
> Hello friends, 
>
> I am writing this mail to ask for your help in a naming decision. 
> In the file sage/categories/finite_coxeter_groups.py, there is a function 
> called long_element. The docstring asks if this should be renamed and if 
> so, to what?  
>
> There are two suggestions from the authors: longest_element, 
> maximal_element. 
>
> Now, I think "longest_element" is pretty common. But, LiE, Marc's Lie 
> Group computation software seems to call this `long_word()`. 
>
> 1) what should we pick?
>
> 2) I started a ticket to clean up this file on trac: 
> http://trac.sagemath.org/sage_trac/ticket/14050 
>
> I understand that name changes are to be handled with care. How do we go 
> about this one? Deprecate? 
>
> With Sincere Regards, 
> Kannappan. 
>  

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: Sage-5.2 on raspberry pi

2013-01-30 Thread tom d
In Ubuntu, the www-browser is a link:

kaibutsu@sophos:~$ ls -lah /usr/bin/www-browser
lrwxrwxrwx 1 root root 29 Oct  4 12:01 /usr/bin/www-browser -> 
/etc/alternatives/www-browser

So you could create that link and make it point to your favorite default 
browser.  It might also be worth dropping a line to the Raspian folks and 
asking them to make such a link in the Raspbian image.

Best,
-tom

On Monday, January 28, 2013 5:54:42 PM UTC+3, Dima Pasechnik wrote:
>
> On 2013-01-28, Dan > wrote: 
> > --=_Part_291_16107307.1359380648388 
> > Content-Type: text/plain; charset=ISO-8859-1 
> > 
> > Are there other packages that need to be installed for notebook support? 
> > 
> > -d 
> > 
> > sage: notebook() 
> > The notebook files are stored in: sage_notebook.sagenb 
> > ** 
> > ** 
> > * Open your web browser to http://localhost:8080 * 
> > ** 
> > ** 
> > Executing twistd  --pidfile="sage_notebook.sagenb/sagenb.pid" -ny 
> > "sage_notebook  .sagenb/twistedconf.tac" 
> > 2013-01-27 20:43:07-0500 [-] Log opened. 
> > 2013-01-27 20:43:07-0500 [-] twistd 12.1.0 
> > (/home/pi/sage-5.5/local/bin/python 2  .7.3) starting up. 
> > 2013-01-27 20:43:07-0500 [-] reactor class: 
> > twisted.internet.epollreactor.EPollR  eactor. 
> > 2013-01-27 20:43:07-0500 [-] QuietSite starting on 8080 
> > 2013-01-27 20:43:07-0500 [-] Starting factory <__builtin__.QuietSite 
> > instance at   0x49d70f8> 
> > /usr/bin/xdg-open: 1: eval: www-browser: not found 
> > /usr/bin/xdg-open: 1: eval: links2: not found 
> > /usr/bin/xdg-open: 1: eval: elinks: not found 
> > /usr/bin/xdg-open: 1: eval: links: not found 
> > /usr/bin/xdg-open: 1: eval: lynx: not found 
> > /usr/bin/xdg-open: 1: eval: w3m: not found 
> > xdg-open: no method available for opening 
>
> Sage wants to start the notebook locally. It looks like you don't have a 
> web browser installed... 
>
> > 'http://localhost:8080/?startup_token= 
> >  5205177994b865cb3e99880e2c701a7b' 
> > 
> > 
> >> 
> > 
>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-devel] Re: Sage 5.6 on ARM

2013-01-30 Thread tom d
I can confirm that this same numerical noise (binomial, gamma functions) 
happens on the ARM6 on the Raspberry Pi, running the 'raspian' distro.  
(Which isn't Ubuntu, though it is a Debian derivative.)

On Monday, January 28, 2013 1:55:30 PM UTC+3, Dima Pasechnik wrote:
>
> On 2013-01-28, Julien Puydt > wrote: 
> > Hi, 
> > 
> > here is where we stand: 
> > 
> > - build: ok, even though libm4rie's conversion.c is a pain ; 
> > 
> > - ptestlong: three failing tests, related to libc's gamma function (as 
> > usual... I should find the time to fix that...) ; 
> > 
> > - bdist: available in the bdist/ directory of my home dir (~jpuydt) on 
> > sage.math.washington.edu 
> > 
> > 
> > Snark on #sagemath 
> > 
> > PS: in case someone has access to another ARM box than ubuntu-based, 
> > here is which files give problems ; please report if you don't see 
> errors : 
> > sage -t  --long -force_lib devel/sage/sage/functions/other.py 
> > sage -t  --long -force_lib devel/sage/sage/symbolic/expression.pyx 
> > sage -t  --long -force_lib devel/sage/sage/rings/arith.py 
>
> I wonder why exactly these files also produce numerical noise on Cygwin, 
> as I reported: 
>
> http://boxen.math.washington.edu/home/dima/tmp/cygwin_sage-5.7.beta0.test.log 
> E.g. 
> File 
> "/usr/local/src/sage/sage-5.7.beta0/devel/sage/sage/rings/arith.py", 
> line 3162: 
> sage: binomial(0.5r, 5) 
> Expected: 
> 0.02734375 
> Got: 
> 0.027343751 
>
> How one does get numerical noise like this on an Intel, is beyond me. 
>
> Dima 
>
>
>
>

-- 
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 http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-devel] Should sage -b run sage -sync-build to get rid of outdated .py and .pyc files?

2013-01-22 Thread tom d
Another possible solution would be to change the error message one gets on 
a failed import statement.  (I also lost hair on this issue a couple days 
ago.)  Right now it says 'have you tried %upgrade?' or something similar; 
it could include the recommendation to -sync-build.

On Sunday, January 20, 2013 7:07:00 PM UTC+3, Jeroen Demeyer wrote:
>
> On 2013-01-20 16:53, Hugh Thomas wrote: 
> > Would it be a good idea for sage -b to run this automatically?  On my 
> > laptop, it takes just a few seconds to run sage -sync-build. 
> Personally, I wouldn't like it if a few seconds were added to the time 
> that ./sage -b takes. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Sage-5.2 on raspberry pi

2013-01-17 Thread tom d
After many trials and tribulations, I've finished a build of Sage-5.5 for 
the Raspberry Pi.  I'm still running the doctests; I've only seen timeouts 
so far, which is quite positive.  I'm unsure how long the full (long) 
testsuite will take to run, but will post an update when it finishes.  If 
anyone wants to play around with it, I've posted the binary here:
http://garsia.math.yorku.ca/~sdenton/sage-5.5-pi.tar.bz2

The details below are reposted from my blog entry on the topic, which can 
be found here:
http://blogs.africanmathsinitiative.net/tomd/2013/01/17/pisage/
The blog post also includes build time data for every spkg.  The winner was 
lib4mrie, which took about 3 days of real time.

The gory details:

   1. This was a long, long process.  The full build took 6.32 days of 
   'real' time (plus some extra down time a couple times when things were 
   stopped for a few hours while I slept), but only 2.9 days of processor 
   time.  This discrepancy is discussed in point 3, below.
   2. The Sage build is broken up into 'spkg' files, essentially many 
   different components of Sage which need to be built.  This modularity is 
   actually quite helpful, since if the build is interrupted for any reason, 
   it restarts on the last spkg it was working on instead of starting over 
   from scratch.
   3. I ran the build on an 8gb USB stick with 3gb set aside as swap.  You 
   have to set aside a large amount of swap in order for the build to 
   succeed.  The USB ports on the Pi are known to have much better throughput 
   than the SD reader, so it's better to build on an attached drive.  It would 
   be best to use an external mechanical hard drive, both due to good write 
   speed and because utilizing a USB key as swap space is pretty dumb and will 
   greatly shorten the life of the drive.  I didn't have easy access to an 
   external mechanical hard drive, so used a USB key.  (Actually, I do have an 
   external drive, but the Pi doesn't supply enough power to spin it up; so an 
   external drive should either be wall-powered or running from an attached 
   powered USB hub.)
   4. The build really uses the swap quite a bit; the 512mb of memory isn't 
   quite enough.  You can make things a bit better by running headless and not 
   starting the X server and setting aside 0mb of memory for the video card, 
   using raspi-config.  But still the swap is heavily used.  The worst 
   instance is in building libm4rie, which took about 100 minutes of CPU time 
   and almost three days of real time, the great majority of which was spent 
   waiting for read/writes to the swap memory.
   5. I also managed to speed things up a bit by using 'nice' to greatly 
   increase the priority of the build.  In the Sage directory, start the 
   compilation with:
   sudo nice -n -20 make
   6. Probably the most fiddly part technically was building the Tachyon 
   package.  (Everything else you can deal with by just waiting longer!) The 
   'tachyon' spkg fails to build out of the box because it doesn't recognize 
   the 'armv6l' architecture.  To fix this, you need to unpack the tachyon 
   spkg (which lives in sage-X/spkg/standard) and edit the spkg-install file.  
   In this file, find the sole reference to the 'armv7l' and change the 7 to a 
   6 and you'll be good to go.  Repack the spkg, put it back in the original 
   directory where you found it, and all will be ok.  (This old Sage trac 
   ticket  was very 
   helpful in figuring out the problem.  And here's the Sage page on 
   building spkgs
   .)


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] raspberry pi build fails - ARM

2013-01-15 Thread tom d
Hi, I'm working on exactly this (and have been on-and-off since last month).

I actually JUST TODAY finished compiling lib4mrie on the nth attempt.  I am 
doing the compilation on an 8gb USB stick with 3gb set as swap and the rest 
as an ext4-fs.  THe above comments are spot on: after about 20m working on 
conversion.o, the Pi runs out of RAM and crashes unless you turn on extra 
swap space.  The USB drivers are much faster for read/write than the SD 
card, so it's preferable to run the compilation on an attached USB drive.  
It's also probably better to use a mechanical hard disk, since 
super-extensive read-writes on flash media (like when you're using it for 
swap space) is a bad thing and will kill your drive after a while (this 
could be what happened to your sd card).  But the hard drive should be 
plugged in to either a powered USB hub or else be otherwise externally 
powered, since the pi doesn't supply enough power on USB to run a hard 
drive on its own.

In any case, the lib4mrie spkg took about 70.5 hours to compile, the great 
majority of which was waiting on swap usage with the USB drive  So 
anything you can do to improve the swap available will help with the 
compilation time.

Best,
-tom

On Wednesday, January 2, 2013 10:27:21 AM UTC+3, Don Harter wrote:
>
> I ran the compile again after shutting down several services.   I also 
> shut down a swap file so that it would only have swap disk partitions to 
> use.
> I started getting read and write errors on the swap drive which is a SDHC 
> card in a reader.  Eventually the kernel oopsed/crashed.  Maybe it is the 
> drivers in the ARM kernel.  I know that when they improves some of the SDHC 
> kernel drivers that some cards which did not work before started working.
> Right now I don't have any spare USB hard drives to test with.  They are 
> all one big partition and I don't want mess with resizing partitions.
> Maybe I will try a USB memory stick.  But the problem could be common to 
> several USB "drive" types for ARM.
>
> On Tuesday, January 1, 2013 12:05:32 PM UTC-6, Snark wrote:
>>
>> Le 01/01/2013 18:06, Don Harter a �crit : 
>> > My compile has gotten to m4rie/conversion.c. 
>>
>> Oh, that one file is such a pain, see my recent ramblings on this list. 
>>
>> Snark on #sagemath 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: Re: [sage-devel] Re: Sage 5.4 on ARM

2012-12-24 Thread tom d
And I'm on a truly measly 256mb of RAM, but with 2gb swap.

Thanks for taking some time to consider this!

On Monday, December 24, 2012 2:53:56 PM UTC+3, Martin Albrecht wrote:
>
> On Monday 24 Dec 2012, tom d wrote: 
> > Man, still no success in getting through the libm4rie build.  It ran for 
> 38 
> > hours before I had to get ready to head back to North America (which 
> > involved cutting power to the Pi).  It looks like the swap (on a 
> connected 
> > usb drive) just got so jammed up after a couple hours that the work was 
> > happening at a truly glacial pace: cpu usage was basically zero, with 
> 98+% 
> > of the cpu time spent 'waiting,' according to top. 
>
> Hi, M4RIE developer here. 
>
> I am pretty sure you're stuck in conversion.c which is a pretty dumb file 
> actually which translates bitpacked representations to bitsliced, it's 
> just 
> bit fiddling but unrolled which probably explains the huge demand for 
> compiling. How much RAM do you have? I could try to limit my RAM on my 
> machine 
> and split up the file so GCC compiles it with that RAM limit. 
> Alternatively, 
> try reducing the -O level. 
>
> Cheers, 
> Martin 
>
> -- 
> name: Martin Albrecht 
> _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 
> _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF 
> _www: http://martinralbrecht.wordpress.com/ 
> _jab: martinr...@jabber.ccc.de  
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




Re: [sage-devel] Re: Sage 5.4 on ARM

2012-12-24 Thread tom d
Man, still no success in getting through the libm4rie build.  It ran for 38 
hours before I had to get ready to head back to North America (which 
involved cutting power to the Pi).  It looks like the swap (on a connected 
usb drive) just got so jammed up after a couple hours that the work was 
happening at a truly glacial pace: cpu usage was basically zero, with 98+% 
of the cpu time spent 'waiting,' according to top.

So I'm wondering about options for making a more portable Sage, given that 
we're going to want to build on more kinds of devices in the future.  
Things I've thought about:

a) Is it possible to cross-compile some packages, while leaving tuned 
pacages like ATLAS to compile on the actual device?  This would let us 
build _most_ of Sage, and then do the remainder on the slow device.

b) Would it be reasonable to build a 'lite' version of Sage, with some of 
the heavier packages left as optional?  This would probably involve setting 
up some extra flags when checking for dependencies in the code..  
maybe terrible for doc-testing, and probably a very large project overall.

c) ATLAS has these default settings which one can choose from for different 
processors with different instruction sets.  Is there a place I could 
harvest/submit the processor profile of the Raspberry Pi for inclusion in 
ATLAS?

I think this is pretty important stuff, as the Pi has sold piles and piles 
of units; if we can have a Sage binary, it becomes available to every 10-20 
year old nerd with $35+ to burn on a new machine..  I'm personally 
looking at deploying in rural schools in Western Kenya.

Best,
-tom

On Thursday, December 20, 2012 12:47:53 AM UTC+3, Snark wrote:
>
> Le 19/12/2012 21:52, tom d a �crit : 
> > I'm experimenting with building Sage on the Raspberry Pi. It apparently 
> > has an ARM6 processor, so I'm running from scratch. I ran into problems 
> > building libm4rie as well (and also on building conversion.c); it would 
> > start running and then after about 20 minutes the device would freeze up 
> > and my ssh session (since I'm running headless!) would seize up. Nothing 
> > I can find in the log files; seems like just a straight out crash. I'm 
> > trying again from the beginning in case something went wrong earlier in 
> > the build process. 
>
> Yes, that one file is a problem. 
>
> > ATLAS took 807 minutes to compile on the first attempt. I seem to recall 
> > hearing that ATLAS has some kind of processor database at some point? I 
> > poked around looking for whether there's a good way to store the 
> > timings, etc, and chop down the ATLAS compile time but wasn't 
> > immediately able to turn any answers up. Anyone have a good idea of 
> > where to look? 
>
> apt-get install libatlas-dev (or something like this), 
> then export SAGE_ATLAS_LIB=/usr 
> that way atlas won't get compiled in sage. 
>
> Snark on #sagemath 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Sage 5.4 on ARM

2012-12-19 Thread tom d
Hey, yo;

I'm experimenting with building Sage on the Raspberry Pi.  It apparently 
has an ARM6 processor, so I'm running from scratch.  I ran into problems 
building libm4rie as well (and also on building conversion.c); it would 
start running and then after about 20 minutes the device would freeze up 
and my ssh session (since I'm running headless!) would seize up.  Nothing I 
can find in the log files; seems like just a straight out crash.  I'm 
trying again from the beginning in case something went wrong earlier in the 
build process.

ATLAS took 807 minutes to compile on the first attempt.  I seem to recall 
hearing that ATLAS has some kind of processor database at some point?  I 
poked around looking for whether there's a good way to store the timings, 
etc, and chop down the ATLAS compile time but wasn't immediately able to 
turn any answers up.  Anyone have a good idea of where to look?

cheers!
-tom

On Thursday, December 13, 2012 2:35:52 PM UTC+3, mmarco wrote:
>
> jaebond, did you try the image i linked? did it work for you? 
>
> On 9 dic, 10:56, mmarco  wrote: 
> > I have made a zip archive with both the image and the scripts that i 
> > use. you can download it from: 
> > 
> > http://riemann.unizar.es/algebra/Archive1.zip 
> > 
> > It also includes a readme.txt file 
> > 
> > On 8 dic, 23:01, jaebond  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Thank you for that, that will help a lot.  I would be interested in 
> the 7gb 
> > > file.  How do you chroot into your images, do you use a script or an 
> app? 
> > >  I have been using an app, but it doesn't seem to like images that 
> weren't 
> > > made by the app. 
> > 
> > > On Saturday, December 8, 2012 9:22:20 AM UTC-5, mmarco wrote: 
> > 
> > > > The problem was that the ubuntu image that i was using was armel 
> > > > architecture, but the sage distribution made by Julien was compiled 
> in 
> > > > an armhf environment (a slightly different architecture). So there 
> > > > were not compatible. 
> > 
> > > > My solution was to get an armhf rootfs from the ubuntu core site 
> > > > (http://cdimage.ubuntu.com/ubuntu-core/releases/12.04/release/), 
> and 
> > > > create a disk image with it to use. 
> > 
> > > > The procedure to do so would be the following (on a linux box, maybe 
> > > > you would need root privileges to mount the image): 
> > 
> > > > 1) create an empty file to build the image in. If you just wwant it 
> to 
> > > > use sage, 3GB should be fine. If you want to install a complete 
> ubuntu 
> > > > system, you will need more (i used 7GB): 
> > > > dd -if=/dev/zero of=ubuntu.img -bs=1G count=3 
> > 
> > > > 2) format the file 
> > > > mkfs.ext2 ubuntu.img 
> > 
> > > > 3)create a directory and mount the image there 
> > > > mkdir mount 
> > > > mount -o loop ubuntu.img mount 
> > 
> > > > 4) put the ubuntu core tarball in the directory and unpack it 
> > > > cd mount 
> > > > wget 
> > > >
> http://cdimage.ubuntu.com/ubuntu-core/releases/12.04/release/ubuntu-c... 
> > > > tar xzf ubuntu-core-12.04.1-core-armhf.tar.gz 
> > 
> > > > 5) Unpack the sage install inside the directory 
> > > > 6) Unmount the directory 
> > > > cd .. 
> > > > umount mount 
> > 
> > > > And that's it, the file ubuntu.img is ready to be used as a chroot 
> > > > environment with a very minimal ubuntu system (not even graphical 
> > > > interface, just the very basic system tools), where sage should work 
> > > > just fine. 
> > 
> > > > I do have a 7gb image with a lightweight desktop, vnc server, and 
> some 
> > > > applications installed (although for example qt apps don't render 
> > > > well, and firefox and chromium don't work either, so i have replaced 
> > > > them by some alternatives). 
> > 
> > > > I can try to upload it somewhere, if people is interested. 
> > 
> > > > On 7 dic, 23:46, jaebond  wrote: 
> > > > > mmarco, 
> > 
> > > > > I had been working on this exact same issue a few months ago. 
>  Would you 
> > > > > mind explaining what you did to fix your issue? 
> > 
> > > > > On Friday, December 7, 2012 7:55:55 AM UTC-5, mmarco wrote: 
> > 
> > > > > > Nevermind, i found the problem: i had to use an armhf ubuntu. 
> > 
> > > > > > On 7 dic, 13:15, mmarco  wrote: 
> > > > > > > I have tried your package in a chroot environment (actually in 
> two, 
> > > > a 
> > > > > > > full ubuntu and a lubuntu), and it doesn't start in neither of 
> them. 
> > 
> > > > > > > Stranegly, the problem seems to be different: in the lubuntu 
> case, 
> > > > it 
> > > > > > > just shows the message with the version and quits. In the full 
> > > > ubuntu, 
> > > > > > > it complains with the message "can't import module sage", but 
> for 
> > > > > > > example, sage -python works fine 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this g

[sage-devel] Re: Sage Days in Bobo-Dioulasso debriefing; Sage in developping countries

2012-11-20 Thread tom d
Hey, all;

So the Mombasa algebraic geometry workshop is set for 6-28 July, 2013.  
Which is really long!  They're interested in having some sage sessions; if 
anyone's interested in coming out I can plan to be there for an overlapping 
time and co-hosting the Sage sessions.  (However, the first week I'll be in 
Ethiopia.)  Basically, drop me a line and we can talk about scope and 
further details that should be nailed down.

Best,
-tom

On Sunday, November 11, 2012 12:00:34 PM UTC+3, Nicolas M. Thiery wrote:
>
> Dear Sage devs, 
>
> The fall school on Discrete Mathematics in Bobo Dioulasso, Burkina 
> Faso, aka Sage Days 43, just finished. For two weeks we had courses 
> (combinatorics of words, dynamics, tilings, ...) interspersed with 
> on-hands tutorials using Sage. The public consisted mostly from 
> graduate students, from subsaharian Africa and some further away 
> countries. 
>
> That was a good occasion for a real-life evaluation of a claim I have 
> been desiring to make for a long time: �Sage, being open-source, is 
> well adapted for universities in developing countries�. 
>
> Let's see about this. 
>
> A couple words of context: 
> -- 
>
> - 70 participants total; in average 40-50 were there. 
> - Most participants had a laptop (or netbook for a few of them): 
>   - 90%: windows, 5% mac, 5% Linux Ubuntu (usually in double-boot with 
> Windows) 
>   - Laptop age ranging from 2003 to 2012; 4 years on average 
>   - RAM: 500k-6Gb; 1Gb on average? 
> - Network: one ADSL line for 60 persons in the conference center 
>   Well, when it actually worked, which was not that often. 
>   We finished using a cell-phone shared over wifi. 
>   The local wireless network itself was down quite often. 
>   No network at the university itself or nearby 
> - Among the organizers were Sage devs with good experience on running 
>   Sage workshops and doing system/network administration, ... 
> - Sam had brought a big bunch of power cables. I screwed up not 
>   bringing my own wireless router to at least guarantee a reliable 
>   local network. 
>
> Strategies we tried or considered: 
> -- 
>
> (a) Installing Sage on Linux/Mac with the binaries from Sagemath.org 
> (b) Installing Sage on Linux/Mac from sources 
> (c) Installing Sage on Linux from a custom built fat binary 
> (d) Installing Sage on Windows with the virtual machine 
> (e) Running a Sage server on my laptop (8 cores, 8Gb) 
> (f) Using a remote Sage server 
> (g) Installing Linux and reducing the problem to (a-c) 
> (h) Booting on a live Debian USB key, custom-build by Thierry Monteil 
> with Sage, self-cloning and persistence. 
> (i) Using a local PC lab after installing Sage on them 
>
> I would like to use the occasion to send my kudos to all those who 
> strive hard at making Sage easier to use one way or the other. 
>
> How it went: 
>  
>
> (a) Went smoothly on Mac when appropriate binaries were available. We 
> had to recompile a few of those binaries. 
>
> (a) failed most of the time on Linux by lack of gfortran. Since we did 
> not have a reasonable network, apt-get install was not an option. 
> We did not have iso's of all the Ubuntu versions that were in use. 
> 3D plotting was usually not available (by lack of appropriate Java 
> plug-ins). 
>
> (b) Compiling from source was not a viable option on Linux for the 
> same reason as above: build-essentials was usually not there. On 
> Mac that was ok, provided we had under hand the appropriate 
> version of XCode. 
>
> (c) This fat binary was built by Thierry Monteil on an old pentium 3 
> (!) with a minimal Debian install. Installation and usage went 
> smoothly, except that 3D plotting was usually not available. 
>
> (d) Virtual machine: Installation went smoothly on about 20 machines 
> (with close guidance). It failed on 2-3 machines due to resource 
> limitations (disk, ...). 
>
> However, except for about five recent machines, the memory 
> footprint was just too high: any non trivial calculation or plot 
> made the laptop swap and become simply too slow to use. 
>
> The french keyboard was not properly self-detected. Due to the 
> network, we could not look up on the web for help. We ended up 
> finding how to configure it from a shell. I'll create a ticket. 
>
> The Sage version available was a bit old (5.1) though that was not 
> an issue for us this time (but it could have been). 
>
> The usage was on the complex side for most participants. They 
> typically tended to reclick on the ova, creating a new virtual 
> machine each time. Also uploading worksheets was tricky; it would 
> be much simpler if the virtual machine was setup to access the 
> user directory on the host machine or if the web client was 
> running on the host. 
>
> (e) Running a local Sage server: This is a priori good short term 

[sage-devel] Re: Sage Days in Bobo-Dioulasso debriefing; Sage in developping countries

2012-11-20 Thread tom d
Hey, all!

Thanks for running this, Nicolas, and providing the detailed report!

For converting people to linux: I'm working with a computer lab in Maseno, 
where we've now got linux dual-booting on all of the machines (about 40).  
Over the last couple months, we've gained a number of linux converts: 
windows in the developing world tends to be pirated and without regularly 
updating anti-virus software.  So the machines 'gunk up' over the course of 
just a week or two of use to the point of being nigh-unusable.  Providing 
an easily-accessible linux desktop as an option lets people decide for 
themselves, and once they've tried it, they're overwhelmingly preferring 
linux.

Of course, live-usb's are a perfectly good way to provide such an 
experience as well.  I just got a pile of 8gb usb sticks for $5 each from 
Canada; setting aside $250 and a bit of time could then provide live usb 
sticks for up to 50 participants at a sage-days event (with leftovers going 
towards the next event, of course).  4gb is probably a bit tight for a full 
installation plus sage, but could cut cost a bit.  And with 8gb, we could 
also include open-office and a couple good text editors, making a good case 
for general linux use.

As a last note, there's an algebraic geometry workshop happening in 
Mombasa, Kenya, sometime between May and June next year; I'm trying to 
figure out what the dates are now!  We could potentially try some things 
out there, as well!

Best,
-tom






On Sunday, November 11, 2012 12:00:34 PM UTC+3, Nicolas M. Thiery wrote:
>
> Dear Sage devs, 
>
> The fall school on Discrete Mathematics in Bobo Dioulasso, Burkina 
> Faso, aka Sage Days 43, just finished. For two weeks we had courses 
> (combinatorics of words, dynamics, tilings, ...) interspersed with 
> on-hands tutorials using Sage. The public consisted mostly from 
> graduate students, from subsaharian Africa and some further away 
> countries. 
>
> That was a good occasion for a real-life evaluation of a claim I have 
> been desiring to make for a long time: �Sage, being open-source, is 
> well adapted for universities in developing countries�. 
>
> Let's see about this. 
>
> A couple words of context: 
> -- 
>
> - 70 participants total; in average 40-50 were there. 
> - Most participants had a laptop (or netbook for a few of them): 
>   - 90%: windows, 5% mac, 5% Linux Ubuntu (usually in double-boot with 
> Windows) 
>   - Laptop age ranging from 2003 to 2012; 4 years on average 
>   - RAM: 500k-6Gb; 1Gb on average? 
> - Network: one ADSL line for 60 persons in the conference center 
>   Well, when it actually worked, which was not that often. 
>   We finished using a cell-phone shared over wifi. 
>   The local wireless network itself was down quite often. 
>   No network at the university itself or nearby 
> - Among the organizers were Sage devs with good experience on running 
>   Sage workshops and doing system/network administration, ... 
> - Sam had brought a big bunch of power cables. I screwed up not 
>   bringing my own wireless router to at least guarantee a reliable 
>   local network. 
>
> Strategies we tried or considered: 
> -- 
>
> (a) Installing Sage on Linux/Mac with the binaries from Sagemath.org 
> (b) Installing Sage on Linux/Mac from sources 
> (c) Installing Sage on Linux from a custom built fat binary 
> (d) Installing Sage on Windows with the virtual machine 
> (e) Running a Sage server on my laptop (8 cores, 8Gb) 
> (f) Using a remote Sage server 
> (g) Installing Linux and reducing the problem to (a-c) 
> (h) Booting on a live Debian USB key, custom-build by Thierry Monteil 
> with Sage, self-cloning and persistence. 
> (i) Using a local PC lab after installing Sage on them 
>
> I would like to use the occasion to send my kudos to all those who 
> strive hard at making Sage easier to use one way or the other. 
>
> How it went: 
>  
>
> (a) Went smoothly on Mac when appropriate binaries were available. We 
> had to recompile a few of those binaries. 
>
> (a) failed most of the time on Linux by lack of gfortran. Since we did 
> not have a reasonable network, apt-get install was not an option. 
> We did not have iso's of all the Ubuntu versions that were in use. 
> 3D plotting was usually not available (by lack of appropriate Java 
> plug-ins). 
>
> (b) Compiling from source was not a viable option on Linux for the 
> same reason as above: build-essentials was usually not there. On 
> Mac that was ok, provided we had under hand the appropriate 
> version of XCode. 
>
> (c) This fat binary was built by Thierry Monteil on an old pentium 3 
> (!) with a minimal Debian install. Installation and usage went 
> smoothly, except that 3D plotting was usually not available. 
>
> (d) Virtual machine: Installation went smoothly on about 20 machines 
> (with close guidance). It failed on 2-3 machines due to r

[sage-devel] Re: Sage-Combinat days in Paris, June 2013

2012-11-19 Thread tom d
It's looking like there's a good chance that I'll be able to come through!

On Friday, September 28, 2012 11:12:05 AM UTC+3, Nicolas M. Thiéry wrote:
>
> Dear Sage / Sage-Combinat fans, 
>
> FPSAC (Formal Power Series and Algebraic Combinatorics) is the main 
> yearly international conference in algebraic combinatorics. It will 
> happen this year in Paris, June 24th-28th. We are planning to organize 
> a Sage-Combinat Days as a satellite event the week before: 
>
> Sage Days ???: Free and Practical Software for (Algebraic) 
> Combinatorics 
> Paris or Orsay (near Paris) 
> June 17th-21st 2013 
>
> To start organizing it, it would be helpful to have a rough idea of 
> how many people would attend. If you are considering to join, please 
> drop me a line. At this point, it is likely that we won't have much 
> funding, except for people from American institutions through our NSF 
> grant. So please mention if you would need funding for lodging and 
> travel, but don't plan too much on it! 
>
> If anyone interested in joining for the organization, please contact 
> me as well! 
>
> Cheers, 
> Nicolas 
>
> PS: the week after FPSAC, there will be the yearly conference 
> Permutation Patterns in the same location. 
>
> -- 
> Nicolas M. Thi�ry "Isil" > 
> http://Nicolas.Thiery.name/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.




[sage-devel] Re: Issue with coefficients for LaurentPolynomialRing

2008-12-24 Thread tom d

I see; thank you, and sorry to bother.

Best,
-tom

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---