Re: [sage-combinat-devel] Plotting permutations

2012-04-24 Thread Florent Hivert
  Hi Nathann,

 I am writing a patch for the recognition of Permutation graphs (and
 comparability graphs, actually), and I thought that it would be nice
 to have some way to plot the permutations built this way. Given a
 permutation p on 1...n, you get the permutation graph by linking
 together two vertices ij such that ij and p(i)  p(j). Hence the kind
 of plot I have in mind is the one you can see on the top-right corner
 of his page :
 
 http://en.wikipedia.org/wiki/Permutation_graph
 
 I intended to write it, but there are two questions that need an
 answer before doing that

 1) Is it aready implemented in Sage somewhere ? I did not see it, but well :-)

The set {(i,j) | ij and p(i)  p(j)} is called the set of the inversion of p
and is in Sage. Rather than the Graph, we use the matrix associated to it
under the name Rothe diagram or inversion diagram. We had it in MuPAD-Combinat
but it wasn't ported to Sage. See eg 

   http://www.mathe2.uni-bayreuth.de/frib/KERBER/h00/node29.html

It is closely related to the Lehmer code of the permutation which is in sage.

 2) Is it useful to add it as a method of Permutation ? That is, should
 it be implemented there or rather as a part of my recognition
 algorithm, if it is only of interest for graph theoreticians ?

The algorithm I used to teach my Master students works as follows: Build an
orientation of the complete graph K_n as follows: for ij the arrow is
oriented
   * j - i if (i,j) is an inversion (ie is in your Graph)
   * i - j else
Then the inversion set (or the candidate permutation graph) comes from a
permutation if the resulting orientation of K_n is acyclic. Is it what you
want to implement (or maybe an optimization of it) ?

Now, to answer your question, I certainly would vote +1 on having a
Permutation.from_inversions methods which raise an error if the parameter is
not a proper inversion set. Alternatively, is_inversion_set returning True
or False is good too.

Cheers,

Florent




 Thanks ! :-)
 
 Nathann
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 sage-combinat-devel group.
 To post to this group, send email to sage-combinat-devel@googlegroups.com.
 To unsubscribe from this group, send email to 
 sage-combinat-devel+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/sage-combinat-devel?hl=en.

-- 
Florent Hivert
  ---
   Il y a trois sortes de gens dans le monde : ceux qui savent compter et
ceux qui ne savent pas.
   There are three kinds of people in the world: those who can count,
and those who cannot.
  ---
Professeur, LRI, Univ. Paris Sud 11, CNRS.
Bureau 38, Laboratoire de Recherche en Informatique (UMR CNRS 8623)
Bâtiment 650, Université Paris Sud 11, 91405 ORSAY CEDEX
Tél: 01-69-15-65-99
http://www.lri.fr/~hivert

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



[sage-combinat-devel] Generating many classes, some of them with additional methods

2012-04-24 Thread Nathann Cohen
Helloo Everybody !!

The subject is not very clear, but given a few more lines I can make it a
bit more explicit. Here is my problem :

When #11880 we will have in Sage a database of graph classes. That is
objects representing things like Interval Graphs, Planar Graphs, things
like that. This database contains a HUGE number of classes (around 1000),
and some of these graph classes are more famous than others.
In particular, we have in Sage algorithms to tests whether a graph is
planar, or an interval graph. Hence it would be nice to be able to use
these methods like that :

g in graph_classes.PlanarGraphs
g in graph_classes.IntervalGraph

To do so, the recognition methods should be reached by the __in__ method of
each of those graph classes. And here is where the problem lies : I have on
one hand a way to build Sage objects representing graph classes, and on the
other hand recognition algorithms for SOME of them. How should I make the
link between the two ?

1) Should any object representing a Graph class have a __in__ method which
checks whether the class represented by the object has a recognition
algorithm listed in a dictionnary somewhere ?
2) Should the graph classes objects be generated in such a way (how ?) such
that its __in__ method is automatically the good one ?

I expect you already had to deal with problems like that in your code, so
just in case you already found a great answer to that. ;-)

Thank yo !!!

Nathann

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



Re: [sage-combinat-devel] Plotting permutations

2012-04-24 Thread Nathann Cohen
Hell !!

I vote yes. When I teach this, I call this the swapping diagram (not
 standard terminology). The number of swaps gives you the Bruhat
 length, if I remember correctly, when you regard S_n as a Coxeter group.
 The parity gives you the sign of the permutation, which gives you, in
 turn, the
 determinant of the associated matrix. It is a very useful diagram:-)


Hmmm I just took a look at it, and it seems I just can not do this for
my own purposes. I mean, this diagram can be written, but Permutations
objets basically *cannot* store a permutation between anything different
from 1  n
Well, it just supposes that the elements in the permutation have some
natural linear ordering, which is the one given by the '' python
operator. Here is the code from Permutation.inversions :

 p = self[:]
inversion_list = []

for i in range(len(p)):
for j in range(i+1,len(p)):
if  p[i]  p[j]:
#inversion_list.append((p[i],p[j]))
inversion_list.append([i,j])

return inversion_list

So it looks like I cannot trust it with my strings, for instance :-/

I will write this diagram anyway. It can prove useful to me later, and it
looks like you could use it anyway ^^;
It will be ticket #12872.

Nathann

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



[sage-combinat-devel] Drawings for Permutations -- how would you plot them ?

2012-04-24 Thread Nathann Cohen
Helloo everybody !!!

Because of a former post on this google group [1] I created the following
patch [2]. It adds to Permutation objects a .show() method that produces
this kind of drawings [3].

Hence, that would be the default way to plot Permutations in Sage. The
thing is that it is the natural drawing for what I am current working on
(Permutation graphs [4]), and David says he uses them and calls them
Swapping diagrams -- which is non-standard according to him.

Well. Do you think there should be other ways to draw permutations in Sage
? Do you have anything against that patch, which somehow makes these
drawings the default ones ?
If you like other type of drawings, I think it would be nice to have many
arguments to the .show() method that would yield different kind of
drawings, but the .show() method is definitely what I would look for if I
were to try to plot a drawing, so I think that these drawings should be
reachable through the .show() method, even if they are not the default
ones.

Well, I'm all ears now ! Give me your thoughts, mysterious sage-combinat
crowd O_O

Nathann

[1]
https://groups.google.com/d/topic/sage-combinat-devel/vdfE7iaJTxs/discussion
[2] http://trac.sagemath.org/sage_trac/ticket/12872
[3] http://trac.sagemath.org/sage_trac/attachment/ticket/12872/tmp_1.png
[4] http://en.wikipedia.org/wiki/Permutation_graph

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



Re: [sage-combinat-devel] Drawings for Permutations -- how would you plot them ?

2012-04-24 Thread Tom Boothby
I typically draw them top-to-bottom.  I've seen them called string
diagrams by people in pattern avoidance.

On Tue, Apr 24, 2012 at 8:24 AM, Nathann Cohen nathann.co...@gmail.com wrote:
 Helloo everybody !!!

 Because of a former post on this google group [1] I created the following
 patch [2]. It adds to Permutation objects a .show() method that produces
 this kind of drawings [3].

 Hence, that would be the default way to plot Permutations in Sage. The
 thing is that it is the natural drawing for what I am current working on
 (Permutation graphs [4]), and David says he uses them and calls them
 Swapping diagrams -- which is non-standard according to him.

 Well. Do you think there should be other ways to draw permutations in Sage ?
 Do you have anything against that patch, which somehow makes these drawings
 the default ones ?
 If you like other type of drawings, I think it would be nice to have many
 arguments to the .show() method that would yield different kind of drawings,
 but the .show() method is definitely what I would look for if I were to try
 to plot a drawing, so I think that these drawings should be reachable
 through the .show() method, even if they are not the default ones.

 Well, I'm all ears now ! Give me your thoughts, mysterious sage-combinat
 crowd O_O

 Nathann

 [1] https://groups.google.com/d/topic/sage-combinat-devel/vdfE7iaJTxs/discussion
 [2] http://trac.sagemath.org/sage_trac/ticket/12872
 [3] http://trac.sagemath.org/sage_trac/attachment/ticket/12872/tmp_1.png
 [4] http://en.wikipedia.org/wiki/Permutation_graph

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

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



Re: [sage-combinat-devel] Re: Do we want a metaclass framework?

2012-04-24 Thread Nicolas M. Thiery
On Mon, Apr 23, 2012 at 05:48:10AM -0700, Simon King wrote:
 ...
 
 Our current metaclasses all work by overriding a magical method of
 type, or adding a magical method to type. Ideally, this should be in
 a customisable way. In some cases, we want to override not just one
 method. Currently, each combination of customised methods requires to
 write a new metaclass. But why not have just *one* metametaclass
 CustomisationMetaclass, such that
 CustomisationMetaclass(init,get,reduce) returns a metaclass that
 allows customisation of three methods?

An alternative would be to have a single metaclass, subclass of type,
that adds hooks to enable at once all special methods for classes.

Pros:

- It's simple
- It pushes toward eventually having all those hooks directly in type
- It is similar to what happens for objects: all hooks are directly
  available; you just implement those that you need.

Inconvenient:

- If a class does not use a hook, does it still pay an overhead for
  the handling of this hook? For most hooks, that's irrelevant: if a
  class does not use the __classmul__ hook it won't use the syntax A*B
  either. But a couple of hooks like __classcall__, __classinit__
  could slow basic usage.

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

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



Re: [sage-combinat-devel] Re: Do we want a metaclass framework?

2012-04-24 Thread Nicolas M. Thiery
On Mon, Apr 23, 2012 at 05:59:04AM -0700, Simon King wrote:
 In CustomisationMetaclass, it should not be needed to explicitly state
 which methods are to be customised. Instead, CustomisationMetaclass
 should look if it finds a method named __classbla__ and would
 *automatically* customize type.__bla__.
 
 Hence,
class MyClass(Parent):
__metaclass__ = CustomisationMetaclass
@staticmethod
def __classadd__(...
 should suffice.

I like this variant because it encapsulates the technical metaclass
details. So we can easily change the implementation later on if we
change our mind or find a better approach.

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

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



[sage-combinat-devel] Re: Do we want a metaclass framework?

2012-04-24 Thread Simon King
Hi Nicolas!

On 2012-04-24, Nicolas M. Thiery nicolas.thi...@u-psud.fr wrote:
 On Mon, Apr 23, 2012 at 05:59:04AM -0700, Simon King wrote:
 Hence,
class MyClass(Parent):
__metaclass__ = CustomisationMetaclass
@staticmethod
def __classadd__(...
 should suffice.

 I like this variant because it encapsulates the technical metaclass
 details. So we can easily change the implementation later on if we
 change our mind or find a better approach.

OK. But I think priority should be given to cythonization of the existing
metaclasses. Namely, Florent found out how one can produce a cdef'd
metaclasses, so that its instances (thus, usual classes) inherit the fast
methods (like __call__). One can cdefine NestedClassMetaclass and
derive from it a cdefined ClasscallMetaclass (my patch isn't posted
yet). Together with some tricks that Florent presented in his original
patch at #12808, one should get a considerable speedup in creation of
classes.

Also I found that one can simply rename sage/structure/dynamic_class.py
into sage/structure/dynamic_class.pyx -- that alone should yield some
speedup. And then one can likely gain even more from using Cython more
properly.

But independent of that, I think at some point I will try to produce
a cdefined CustomisationMetaclass. *IF* it turns out that it can compete
speed-wise, then we can still decide whether we should use it to
refactor the existing metaclasses.

Best regards,
Simon


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



Re: [sage-combinat-devel] Re: Do we want a metaclass framework?

2012-04-24 Thread Nicolas M. Thiery
On Tue, Apr 24, 2012 at 07:23:27PM +, Simon King wrote:
 OK. But I think priority should be given to cythonization of the existing
 metaclasses. Namely, Florent found out how one can produce a cdef'd
 metaclasses, so that its instances (thus, usual classes) inherit the fast
 methods (like __call__). One can cdefine NestedClassMetaclass and
 derive from it a cdefined ClasscallMetaclass (my patch isn't posted
 yet). Together with some tricks that Florent presented in his original
 patch at #12808, one should get a considerable speedup in creation of
 classes.

+1

 Also I found that one can simply rename sage/structure/dynamic_class.py
 into sage/structure/dynamic_class.pyx -- that alone should yield some
 speedup. And then one can likely gain even more from using Cython more
 properly.

Yes, I have seen that (but see my comment on the ticket)

 But independent of that, I think at some point I will try to produce
 a cdefined CustomisationMetaclass. *IF* it turns out that it can compete
 speed-wise, then we can still decide whether we should use it to
 refactor the existing metaclasses.

+1

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

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



Re: [sage-combinat-devel] Plotting permutations

2012-04-24 Thread Nicolas M. Thiery
On Tue, Apr 24, 2012 at 12:51:34PM +0200, Nathann Cohen wrote:
Hell !!
 
  I vote yes. When I teach this, I call this the swapping diagram (not
  standard terminology). The number of swaps gives you the Bruhat
  length, if I remember correctly, when you regard S_n as a Coxeter group.
  The parity gives you the sign of the permutation, which gives you, in
  turn, the
  determinant of the associated matrix. It is a very useful diagram:-)
 
Hmmm I just took a look at it, and it seems I just can not do this for
my own purposes. I mean, this diagram can be written, but Permutations
objets basically *cannot* store a permutation between anything different
from 1  n
Well, it just supposes that the elements in the permutation have some
natural linear ordering, which is the one given by the '' python
operator. Here is the code from Permutation.inversions :
 p = self[:]
inversion_list = []
for i in range(len(p)):
for j in range(i+1,len(p)):
if  p[i]  p[j]:
#inversion_list.append((p[i],p[j]))
inversion_list.append([i,j])
return inversion_list
So it looks like I cannot trust it with my strings, for instance :-/
I will write this diagram anyway. It can prove useful to me later, and it
looks like you could use it anyway ^^;

You might want to use permutations from the symmetric group instead::

sage: S = SymmetricGroup(10)
sage: x = S.random_element()
sage: x.inversions()
[(2,3), (2,4), (2,5), (4,5), (3,5), (1,5), (2,6), (4,6), (3,6), (1,6), 
(5,6), (2,7), (4,7), (3,7), (1,7), (2,8), (4,8)]

It has been implemented recently by Mark, and it will work for any
Coxeter group.

Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/

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



Re: [sage-devel] sagenb.org is unusably slow

2012-04-24 Thread Jeroen Demeyer
On 2012-04-24 05:49, Dima Pasechnik wrote:
 On Monday, 23 April 2012 21:02:05 UTC+8, William wrote:
 
 On Mon, Apr 23, 2012 at 12:11 AM, Dan Drake  wrote:
  sagenb.org http://sagenb.org is so slow as to be unusable right
 now. Can someone
  investigate? Perhaps restart it?
 
 It gets automatically restarted twice a day anyways.   It's just
 massively overused compared to the server resources and scalability of
 the app.Encourage me to do a complete truly scalable rewrite on
 scalable infrastructure...
 
 Would one still need hardware and bandwidth way beyond what NSF and
 other grants
 can pay for, if the usage growth continues like this?
Isn't the main bottleneck software currently?

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


[sage-devel] Artithmetics in p-adic extensions?

2012-04-24 Thread Karl
Is there any progress in making SAGE support artithmetics in (ramified)
p-adic extensions?
-Karl

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


[sage-devel] Re: inferior sage in emacs, bug?

2012-04-24 Thread syd.lavas...@gmail.com
I confirm I getting the same bug, in emacs 24, sage 5, getting

Wrong type argument: hash-table-p, nil

buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.

I have to run inferior-sage-mode, manually.

I have installed sage-mode-0.6 and sage-mode-0.7 directly from sage website
I also checked Ivan's sage_mode-0.8. The error is persistant in all version.

בתאריך יום שלישי, 10 באפריל 2012 15:38:54 UTC-6, מאת Ezequiel Birman:

 Are sage-mode inferior-sage-mode and sage-view still supported?

 I (kind of) managed to get an Inferior Sage. Is there a way to eval last
 expresion in sage-mode instead of the whole buffer (C-c C-r)?

 I am using latest sage (4.8) and sage-mode cloned from mercurial
 repo.  (by the way, I've built and installed sage-mode python packages in
 the default location: /usr/lib/python2.7/site-packages/ Should I move
 them under the sage dir hierarchy? ie. overwrite the old python packages
 installed by sage 4.8?)

 After 'M-x sage' i got this error:

  compilation-forget-errors: Wrong type argument: hash-table-p, nil

 and buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.

 The problem seems to lie in python-send-command. I'm not quite sure, but
 i've added

  ;;; hack to avoid error in python-send-command
  (add-hook 'sage-startup-before-prompt-hook (lambda () 
 (compilation-minor-mode 1)))

 which initializes a hash table needed by compilation-mode, to my .emacs.

 Now, after 'M-x sage' *SAGE-main* pops-up properly but i still get:

  comint-redirect-send-command-to-process: No prompt found or
  `comint-prompt-regexp' not set properly

 but comint-prompt-regexp local value for buffer *SAGE-main* is:

  
 ^\\(?:\\(?:\\(?:(\\(?:[Pg]db)\\)\\|\\.\\.\\.\\(?:\\.\\.\\)?\\|\\|ipdb\\|sage:\\)\\)
  
 \\)+

 Here is a portion of my .emacs:

  sage-mode
 ;;; https://bitbucket.org/ncalexan/sage-mode
 ;;; http://wiki.sagemath.org/sage-mode
 ;;(add-to-list 'load-path /usr/local/share/sage/data/emacs)
 (add-to-list 'load-path /usr/local/src/sage/sage-mode/emacs)
 (require 'sage)
 (setq sage-command /usr/local/share/sage/sage)

 ;; If you want sage-view to typeset all your output and have plot()
 ;; commands inline, uncomment the following line and configure sage-view:
 (autoload 'sage-view sage-view  t)

 ;; (add-hook 'sage-startup-before-prompt-hook
 ;;   (lambda ()
 ;; (set (make-local-variable 'compilation-locs)
 ;;  (make-hash-table :test 'equal :weakness 'value

 ;; (remove-hook 'sage-startup-before-prompt-hook 
 'sage-send-startup-before-prompt-command)

 (add-hook 'inferior-sage-mode-hook
   (function
(lambda ()
  ;;(setq comint-redirect-perform-sanity-check t)
  (sage-view)
  ;; (sage-view-enable-inline-output)
  ;; (sage-view-enable-inline-plots)
  )))

 ;;; hack to avoid error in python-send-command
 (add-hook 'sage-startup-before-prompt-hook
(lambda () (compilation-minor-mode 1)))
   
 (add-hook 'sage-mode-hook
   '(lambda () ; taken from 
 http://www.cs.caltech.edu/courses/cs11/material/python/misc/python_style_guide.html#TABS
  (set-variable 'py-indent-offset 4)
  (set-variable 'py-smart-indentation nil)
  (set-variable 'indent-tabs-mode nil)))

 Thank you

 -- 
 Ezequiel Birman



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


Re: [sage-devel] sagenb.org is unusably slow

2012-04-24 Thread Dima Pasechnik


On Tuesday, 24 April 2012 15:59:22 UTC+8, Jeroen Demeyer wrote:

 On 2012-04-24 05:49, Dima Pasechnik wrote:
  On Monday, 23 April 2012 21:02:05 UTC+8, William wrote:
  
  On Mon, Apr 23, 2012 at 12:11 AM, Dan Drake  wrote:
   sagenb.org http://sagenb.org is so slow as to be unusable right
  now. Can someone
   investigate? Perhaps restart it?
  
  It gets automatically restarted twice a day anyways.   It's just
  massively overused compared to the server resources and scalability 
 of
  the app.Encourage me to do a complete truly scalable rewrite on
  scalable infrastructure...
  
  Would one still need hardware and bandwidth way beyond what NSF and
  other grants
  can pay for, if the usage growth continues like this?
 Isn't the main bottleneck software currently?


If 1% of registered sagenb users would run stuff on boxen at the same time, 
this would be 900 instances of sagenb.
I doubt boxen can handle this smoothly, even if they were interactive 
non-graphic terminal sessions.
 

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


[sage-devel] Mathematica language vs. python

2012-04-24 Thread Jason Grout
Here is a very interesting informal survey of Mathematica qualities.  It 
looks like people are asked to rate different languages against 
different statements:


http://hammerprinciple.com/therighttool/items/mathematica

Notice that the ratings are most dissimilar from Python (see bottom of 
page)!  Indeed, it is very interesting to look at the comparison page:


http://hammerprinciple.com/therighttool/items/mathematica/python

Thanks,

Jason


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


[sage-devel] Re: ARM port (again)

2012-04-24 Thread mmarco
There is no /dev/shm in my android system. Could it be that this is
the problem? If so, is there any hope of solving it?

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


[sage-devel] Re: ARM port (again)

2012-04-24 Thread mmarco

Nevermind, it worked by mounting an empty tmpfs as shm device

On 24 abr, 18:07, mmarco mma...@unizar.es wrote:
 There is no /dev/shm in my android system. Could it be that this is
 the problem? If so, is there any hope of solving it?

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


[sage-devel] Re: Mathematica language vs. python

2012-04-24 Thread Keshav Kini
Jason Grout jason-s...@creativetrax.com writes:
 Notice that the ratings are most dissimilar from Python (see bottom of
 page)!  Indeed, it is very interesting to look at the comparison page:

 http://hammerprinciple.com/therighttool/items/mathematica/python

I find it a little bizarre that almost 40% of respondents consider
Python better at symbolic manipulation than Mathematica. Mathematica is
practically built for symbolic manipulation, and in Sage a lot of hard
work has gone into pynac because plain Python does not have symbolics
support.

Why does Mathematica supposedly have a strong static type system? It's
an interpreted language...

Also interesting is that Mathematica beats Python at numeric computing
(62%), but Python strikes back with a victory in scientific computing
(81%)... huh?

Certainly an interesting listing, though maybe one should not set too
much stock by it since there are only a couple dozen respondents as yet.

-Keshav


Join us in #sagemath on irc.freenode.net !

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


Re: [sage-devel] Artithmetics in p-adic extensions?

2012-04-24 Thread David Roe
Sage currently supports arithmetic in totally ramified p-adic extensions
defined by an Eisenstein polynomial.  There is progress in more general
extensions in the last few months, but I've been really busy with other
projects as well.  What kind of extensions do you need?
David

On Tue, Apr 24, 2012 at 07:02, Karl jk.lind...@gmail.com wrote:

 Is there any progress in making SAGE support artithmetics in (ramified)
 p-adic extensions?
 -Karl

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


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


[sage-devel] Re: inferior sage in emacs, bug?

2012-04-24 Thread syd.lavas...@gmail.com
sage-update-autoloads also did not solve my problem, but with the hack of 
Ezequiel

   ;;; hack to avoid error in python-send-command
 (add-hook 'sage-startup-before-prompt-

hook (lambda () (compilation-minor-mode 1)))

it works fine. It could be emacs 24 thing.


בתאריך יום שלישי, 24 באפריל 2012 08:27:29 UTC-6, מאת syd.la...@gmail.com:

 I confirm I getting the same bug, in emacs 24, sage 5, getting

 Wrong type argument: hash-table-p, nil

 buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.

 I have to run inferior-sage-mode, manually.

 I have installed sage-mode-0.6 and sage-mode-0.7 directly from sage website
 I also checked Ivan's sage_mode-0.8. The error is persistant in all 
 version.

 בתאריך יום שלישי, 10 באפריל 2012 15:38:54 UTC-6, מאת Ezequiel Birman:

 Are sage-mode inferior-sage-mode and sage-view still supported?

 I (kind of) managed to get an Inferior Sage. Is there a way to eval last
 expresion in sage-mode instead of the whole buffer (C-c C-r)?

 I am using latest sage (4.8) and sage-mode cloned from mercurial
 repo.  (by the way, I've built and installed sage-mode python packages in
 the default location: /usr/lib/python2.7/site-packages/ Should I move
 them under the sage dir hierarchy? ie. overwrite the old python packages
 installed by sage 4.8?)

 After 'M-x sage' i got this error:

  compilation-forget-errors: Wrong type argument: hash-table-p, nil

 and buffer *SAGE-main* is in commint-run mode. No inferior-sage-mode.

 The problem seems to lie in python-send-command. I'm not quite sure, but
 i've added

  ;;; hack to avoid error in python-send-command
  (add-hook 'sage-startup-before-prompt-hook (lambda () 
 (compilation-minor-mode 1)))

 which initializes a hash table needed by compilation-mode, to my .emacs.

 Now, after 'M-x sage' *SAGE-main* pops-up properly but i still get:

  comint-redirect-send-command-to-process: No prompt found or
  `comint-prompt-regexp' not set properly

 but comint-prompt-regexp local value for buffer *SAGE-main* is:

  
 ^\\(?:\\(?:\\(?:(\\(?:[Pg]db)\\)\\|\\.\\.\\.\\(?:\\.\\.\\)?\\|\\|ipdb\\|sage:\\)\\)
  
 \\)+

 Here is a portion of my .emacs:

  sage-mode
 ;;; https://bitbucket.org/ncalexan/sage-mode
 ;;; http://wiki.sagemath.org/sage-mode
 ;;(add-to-list 'load-path /usr/local/share/sage/data/emacs)
 (add-to-list 'load-path /usr/local/src/sage/sage-mode/emacs)
 (require 'sage)
 (setq sage-command /usr/local/share/sage/sage)

 ;; If you want sage-view to typeset all your output and have plot()
 ;; commands inline, uncomment the following line and configure sage-view:
 (autoload 'sage-view sage-view  t)

 ;; (add-hook 'sage-startup-before-prompt-hook
 ;;   (lambda ()
 ;; (set (make-local-variable 'compilation-locs)
 ;;  (make-hash-table :test 'equal :weakness 'value

 ;; (remove-hook 'sage-startup-before-prompt-hook 
 'sage-send-startup-before-prompt-command)

 (add-hook 'inferior-sage-mode-hook
   (function
(lambda ()
  ;;(setq comint-redirect-perform-sanity-check t)
  (sage-view)
  ;; (sage-view-enable-inline-output)
  ;; (sage-view-enable-inline-plots)
  )))

 ;;; hack to avoid error in python-send-command
 (add-hook 'sage-startup-before-prompt-hook
(lambda () (compilation-minor-mode 1)))
   
 (add-hook 'sage-mode-hook
   '(lambda () ; taken from 
 http://www.cs.caltech.edu/courses/cs11/material/python/misc/python_style_guide.html#TABS
  (set-variable 'py-indent-offset 4)
  (set-variable 'py-smart-indentation nil)
  (set-variable 'indent-tabs-mode nil)))

 Thank you

 -- 
 Ezequiel Birman



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


Re: [sage-devel] Re: ARM port (again)

2012-04-24 Thread Paulo César Pereira de Andrade
Em 24 de abril de 2012 13:46, mmarco mma...@unizar.es escreveu:

 Nevermind, it worked by mounting an empty tmpfs as shm device

  Good to know the real issue :-) My workaround only works for
missing /dev/shm. Missing /dev/pts on build chroots I managed
to bug at Mandriva sometime ago, to get it properly mounted in
build nodes, otherwise it cannot generate documentation because
gap would fail to start.

 On 24 abr, 18:07, mmarco mma...@unizar.es wrote:
 There is no /dev/shm in my android system. Could it be that this is
 the problem? If so, is there any hope of solving it?

Paulo

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


[sage-devel] Re: Mathematica language vs. python

2012-04-24 Thread rjf
Someone should tell the survey people that it's   is not the possessive
form of it.   It's  is a contraction for it is.  The possessive is 
its.

If you want a slightly more informative comparison, try common lisp vs 
python.

Crowdsourcing on opinions of programming languages seems like a pretty
poor way of garnering information other than uncalibrated, uh, opinions.

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


Re: [sage-devel] Re: Mathematica language vs. python

2012-04-24 Thread Dr. David Kirkby

On 04/24/12 06:21 PM, Keshav Kini wrote:

Jason Groutjason-s...@creativetrax.com  writes:

Notice that the ratings are most dissimilar from Python (see bottom of
page)!  Indeed, it is very interesting to look at the comparison page:

http://hammerprinciple.com/therighttool/items/mathematica/python


I find it a little bizarre that almost 40% of respondents consider
Python better at symbolic manipulation than Mathematica. Mathematica is
practically built for symbolic manipulation, and in Sage a lot of hard
work has gone into pynac because plain Python does not have symbolics
support.


snip



-Keshav


Join us in #sagemath on irc.freenode.net !



There appear to be numerous strange results on that site, so I take the results 
with a pinch of salt. I decided to compare MATLAB and Mathematica.



http://hammerprinciple.com/therighttool/items/mathematica/matlab

1) I use this language out of choice
7 out of 8 picked Mathematica over Matlab

Now it is pretty clear to me that there are FAR more people programming in 
MATLAB than Mathematica, and a lot of people like MATLAB. (Do a search on a job 
site and see how many jobs want Mathematica programmers vs MATLAB ones). So why 
87% program in Mathematica out of choice is strange to me.


2) When I run into problems my colleagues can provide me with immediate help 
with this language

7 out of 9 picked Matlab over Mathematica.

Funny that result, given the result to (1). 7 out of 8 chose Mathematica over 
MATLAB out of choice, but  7 out of 9 find their colleagues can help them with 
MATLAB more than Mathematica.


3) When I write code in this language I can be very sure it is correct
7 out of 8 picked Mathematica over Matlab

Come on, which a stupid question. How the  can you be much more sure 
Mathematica code is more correct than MATLAB code?


The site looks good for a laugh, but does not appear to have any value other 
than that to me.


Dave

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


Re: [sage-devel] Re: Mathematica language vs. python

2012-04-24 Thread Dr. David Kirkby

On 04/24/12 06:21 PM, Keshav Kini wrote:


I find it a little bizarre that almost 40% of respondents consider
Python better at symbolic manipulation than Mathematica.Mathematica is
practically built for symbolic manipulation, and in Sage a lot of hard
work has gone into pynac because plain Python does not have symbolics
support.


Yes, could not agree more.



-Keshav


A bizarre result. Clearly Mathematica is better at symbolics. Arguably it is the 
best language for this.


Perhaps it's skewed by the fact considerably more people use Python than 
Mathematica. If 1000x as many people use Python than do Mathematica, than you 
might expect more people to find Python good for symbolics than you do Mathematica.


The results seem odd all around.

The rest of it should go to /dev/null!

Dave

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