[sage-combinat-devel] help wanted with braid groups

2012-06-07 Thread mmarco
I have been working on an implementation of braid groups for sage
(together with free and finitely presented groups). So far i have a
preliminary version (see ticket #12339). It is still not feature
complete and also very slow compared to cbraid[1], for example, but it
is usable.

In order to speed it up, i want to interface cbraid directly. But i
have no experience at all with c++ or python interfaces to external
libraries. Please can someone help me with it? For example, i would
need to write a function that takes an integer n and a list of
integers l (that represents a braid of n strands), and uses cbraid to
compute the left normal form. I have tried to do it directly with
ctypes, but i only got error messages.

Thanks in advance.

[1]http://code.google.com/p/cbraid/

-- 
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] testing new symmetric function functionality

2012-06-07 Thread Mike Zabrocki
Hey SFA users...

I've been working on a patch to change how symmetric functions are used in 
the future.  I will be deprecating some common functions soon on the sage 
combinat queue and we will try to get this into sage in an upcoming 
version.  Starting soon: SFAxxx where xxx in {Schur, Monomial, Homogeneous, 
Elementary, Power} will not be the way to access these functions.

Old notation:
sage: s = SFASchur(QQ)
sage: h = SFAHomogeneous(QQ)
sage: e = SFAElementary(QQ)
...

The new notation will be:
sage: SF = SymmetricFunctions(QQ)
sage: s = SF.schur() # or .s()
sage: h = SF.homogeneous() # or .h()
sage: e = SF.elementary() # or .e()
sage: p = SF.power() # or .p()
sage: m = SF.monomial() # or .m()

Moreover, LLT polynomials, Hall-Littlewood, Jack and Macdonald symmetric 
functions have all been moved into SymmetricFunctions(R).

sage: Mac = SF.macdonald()
gives an error because q and t are not in the ring! (this is different 
behavior than before where the q and t were added to the base ring)

New notation:
sage: SF = SymmetricFunctions(QQ['q','t'].fraction_field())
sage: Mac = SF.macdonald()
sage: MP = Mac.P() # or .Q() or .J() or .H() or .Ht()
sage: HL = SF.hall_littlewood()
sage: HLP = HL.P() # or .Q() or .Qp()
sage: Jack = SF.jack()
sage: JP = Jack.P() # or .Q() or .Qp() or .J()
sage: LLT = SF.llt(2) # 2 is the level here which needs to be specified
sage: HS = LLT.hspin() # .hcospin()

The real improvements are behind the scenes.  Your field can be more 
general than before and your q and t parameters should be something in that 
field.
sage: SF = SymmetricFunctions(QQ['x','y'].fraction_field()); (x,y) = 
SF.base_ring().gens()
sage: MPxy = SF.macdonald(q=x,t=y).P()
sage: MPy5 = SF.macdonald(q=y,t=5).P()
sage: MPy5(MPxy[2,1])

Other changes include bringing .omega_qt(), .scalar_qt() and .nabla() to 
all bases and adding q=value, t=value as optional parameters.
I could use some help testing.  If you use symmetric functions and notice 
any bad behavior please pass along odd doc tests.

If you want functionality does not seem to be part of these changes, please 
feel free to add your two cents.

-Mike

-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/O1XqNR_bbLUJ.
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: testing new symmetric function functionality

2012-06-07 Thread Mike Zabrocki
Hi,
I should add that one thing that should really be tested in addition to 
behavior is *speed*!

With these changes there might be potential slow-down from previous 
versions.
We don't want this to happen.  I've tested a bit, but this is one thing 
that is even more difficult to identify than a bad doc test.

If there is some functionality that you use in particular I am asking for 
testers who are willing to run heavy computations with and without the 
patch applied to try to identify where the changes I have made may have 
slowed things down.  The changes I have made with the classical bases are 
minor, but with Hall-Littlewood, Jacks, Macdonald and LLT had their caches 
shaken up a bit.  Please let me know if you notice slow downs (or 
improvements).

-Mike

On Thursday, 7 June 2012 12:26:15 UTC-4, Mike Zabrocki wrote:

 Hey SFA users...

 I've been working on a patch to change how symmetric functions are used in 
 the future.  I will be deprecating some common functions soon on the sage 
 combinat queue and we will try to get this into sage in an upcoming 
 version.  Starting soon: SFAxxx where xxx in {Schur, Monomial, Homogeneous, 
 Elementary, Power} will not be the way to access these functions.

 Old notation:
 sage: s = SFASchur(QQ)
 sage: h = SFAHomogeneous(QQ)
 sage: e = SFAElementary(QQ)
 ...

 The new notation will be:
 sage: SF = SymmetricFunctions(QQ)
 sage: s = SF.schur() # or .s()
 sage: h = SF.homogeneous() # or .h()
 sage: e = SF.elementary() # or .e()
 sage: p = SF.power() # or .p()
 sage: m = SF.monomial() # or .m()

 Moreover, LLT polynomials, Hall-Littlewood, Jack and Macdonald symmetric 
 functions have all been moved into SymmetricFunctions(R).

 sage: Mac = SF.macdonald()
 gives an error because q and t are not in the ring! (this is different 
 behavior than before where the q and t were added to the base ring)

 New notation:
 sage: SF = SymmetricFunctions(QQ['q','t'].fraction_field())
 sage: Mac = SF.macdonald()
 sage: MP = Mac.P() # or .Q() or .J() or .H() or .Ht()
 sage: HL = SF.hall_littlewood()
 sage: HLP = HL.P() # or .Q() or .Qp()
 sage: Jack = SF.jack()
 sage: JP = Jack.P() # or .Q() or .Qp() or .J()
 sage: LLT = SF.llt(2) # 2 is the level here which needs to be specified
 sage: HS = LLT.hspin() # .hcospin()

 The real improvements are behind the scenes.  Your field can be more 
 general than before and your q and t parameters should be something in that 
 field.
 sage: SF = SymmetricFunctions(QQ['x','y'].fraction_field()); (x,y) = 
 SF.base_ring().gens()
 sage: MPxy = SF.macdonald(q=x,t=y).P()
 sage: MPy5 = SF.macdonald(q=y,t=5).P()
 sage: MPy5(MPxy[2,1])

 Other changes include bringing .omega_qt(), .scalar_qt() and .nabla() to 
 all bases and adding q=value, t=value as optional parameters.
 I could use some help testing.  If you use symmetric functions and notice 
 any bad behavior please pass along odd doc tests.

 If you want functionality does not seem to be part of these changes, 
 please feel free to add your two cents.

 -Mike


-- 
You received this message because you are subscribed to the Google Groups 
sage-combinat-devel group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/BL6LbzXBo6wJ.
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] testing new symmetric function functionality

2012-06-07 Thread Franco Saliola
On Thu, Jun 7, 2012 at 12:26 PM, Mike Zabrocki mike.zabro...@gmail.com wrote:
 Hey SFA users...

 I've been working on a patch to change how symmetric functions are used in
 the future.  I will be deprecating some common functions soon on the sage
 combinat queue and we will try to get this into sage in an upcoming version.
  Starting soon: SFAxxx where xxx in {Schur, Monomial, Homogeneous,
 Elementary, Power} will not be the way to access these functions.

 Old notation:
 sage: s = SFASchur(QQ)
 sage: h = SFAHomogeneous(QQ)
 sage: e = SFAElementary(QQ)
 ...

 The new notation will be:
 sage: SF = SymmetricFunctions(QQ)
 sage: s = SF.schur() # or .s()
 sage: h = SF.homogeneous() # or .h()
 sage: e = SF.elementary() # or .e()
 sage: p = SF.power() # or .p()
 sage: m = SF.monomial() # or .m()

Let me also point out that you can define s, h, e, p, and m in one
line with the command:

sage: SF.inject_shorthands()

 Moreover, LLT polynomials, Hall-Littlewood, Jack and Macdonald symmetric
 functions have all been moved into SymmetricFunctions(R).

 sage: Mac = SF.macdonald()
 gives an error because q and t are not in the ring! (this is different
 behavior than before where the q and t were added to the base ring)

Why can't SF.macdonald() just return the appropriate thing?

If you really are going to do this, then you need to improve the error message:

ValueError: parameter q must be in the base ring

Perhaps we can include in the error message the command that would
produce what the user wants?

Franco

--
 New notation:
 sage: SF = SymmetricFunctions(QQ['q','t'].fraction_field())
 sage: Mac = SF.macdonald()
 sage: MP = Mac.P() # or .Q() or .J() or .H() or .Ht()
 sage: HL = SF.hall_littlewood()
 sage: HLP = HL.P() # or .Q() or .Qp()
 sage: Jack = SF.jack()
 sage: JP = Jack.P() # or .Q() or .Qp() or .J()
 sage: LLT = SF.llt(2) # 2 is the level here which needs to be specified
 sage: HS = LLT.hspin() # .hcospin()

 The real improvements are behind the scenes.  Your field can be more general
 than before and your q and t parameters should be something in that field.
 sage: SF = SymmetricFunctions(QQ['x','y'].fraction_field()); (x,y) =
 SF.base_ring().gens()
 sage: MPxy = SF.macdonald(q=x,t=y).P()
 sage: MPy5 = SF.macdonald(q=y,t=5).P()
 sage: MPy5(MPxy[2,1])

 Other changes include bringing .omega_qt(), .scalar_qt() and .nabla() to all
 bases and adding q=value, t=value as optional parameters.
 I could use some help testing.  If you use symmetric functions and notice
 any bad behavior please pass along odd doc tests.

 If you want functionality does not seem to be part of these changes, please
 feel free to add your two cents.

 -Mike

 --
 You received this message because you are subscribed to the Google Groups
 sage-combinat-devel group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/sage-combinat-devel/-/O1XqNR_bbLUJ.
 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] testing new symmetric function functionality

2012-06-07 Thread Anne Schilling
Hi Mike,

Very impressive work! I am glad you took over my initial patch.
I will send you more comments off-line except for the main issues
that need to be discussed with everyone.

Franco:

 Moreover, LLT polynomials, Hall-Littlewood, Jack and Macdonald symmetric
 functions have all been moved into SymmetricFunctions(R).

 sage: Mac = SF.macdonald()
 gives an error because q and t are not in the ring! (this is different
 behavior than before where the q and t were added to the base ring)
 
 Why can't SF.macdonald() just return the appropriate thing?

This is what was discussed during the Sage Days 38 in Montreal. SF needs
to specify the base and macdonald() does not live in the ring of symmetric
functions without q,t.

 If you really are going to do this, then you need to improve the error 
 message:
 
 ValueError: parameter q must be in the base ring
 
 Perhaps we can include in the error message the command that would
 produce what the user wants?

That might be a good idea!

Best,

Anne

-- 
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: testing new symmetric function functionality

2012-06-07 Thread Anne Schilling
Hi Mike,

I did some timing tests on the old and new code:

sage: Sym = SymmetricFunctions(QQ['q','t'].fraction_field())
sage: s = Sym.schur()
sage: m = Sym.monomial()
sage: timeit('m(s([6,3,3,2,1]))')
25 loops, best of 3: 8.51 ms per loop
sage: timeit('m(s([10,6,3,3,2,1]))')
5 loops, best of 3: 214 ms per loop

sage: M = Sym.macdonald()
sage: Ht = M.Ht()
sage: timeit('s(Ht([4,2,1]))')
5 loops, best of 3: 16.2 ms per loop

as compared to

sage: Ht = MacdonaldPolynomialsHt(QQ)
sage: s = SFASchur(Ht.base_ring())
sage: m = SFAMonomial(Ht.base_ring())
sage: timeit('m(s([6,3,3,2,1]))')
25 loops, best of 3: 8.25 ms per loop
sage: timeit('m(s([10,6,3,3,2,1]))')
5 loops, best of 3: 211 ms per loop

sage: timeit('s(Ht([4,2,1]))')
5 loops, best of 3: 16.1 ms per loop

So the new code seems only very slightly (negligibly?) slower.

Best,

Anne


On 6/7/12 9:37 AM, Mike Zabrocki wrote:
 Hi,
 I should add that one thing that should really be tested in addition to 
 behavior is *speed*!
 
 With these changes there might be potential slow-down from previous versions.
 We don't want this to happen.  I've tested a bit, but this is one thing that 
 is even more difficult to identify than a bad doc test.
 
 If there is some functionality that you use in particular I am asking for 
 testers who are willing to run heavy computations with and without the patch 
 applied to try to identify where the changes I
 have made may have slowed things down.  The changes I have made with the 
 classical bases are minor, but with Hall-Littlewood, Jacks, Macdonald and LLT 
 had their caches shaken up a bit.  Please let me
 know if you notice slow downs (or improvements).
 
 -Mike
 
 On Thursday, 7 June 2012 12:26:15 UTC-4, Mike Zabrocki wrote:
 
 Hey SFA users...
 
 I've been working on a patch to change how symmetric functions are used 
 in the future.  I will be deprecating some common functions soon on the sage 
 combinat queue and we will try to get this into
 sage in an upcoming version.  Starting soon: SFAxxx where xxx in {Schur, 
 Monomial, Homogeneous, Elementary, Power} will not be the way to access these 
 functions.
 
 Old notation:
 sage: s = SFASchur(QQ)
 sage: h = SFAHomogeneous(QQ)
 sage: e = SFAElementary(QQ)
 ...
 
 The new notation will be:
 sage: SF = SymmetricFunctions(QQ)
 sage: s = SF.schur() # or .s()
 sage: h = SF.homogeneous() # or .h()
 sage: e = SF.elementary() # or .e()
 sage: p = SF.power() # or .p()
 sage: m = SF.monomial() # or .m()
 
 Moreover, LLT polynomials, Hall-Littlewood, Jack and Macdonald symmetric 
 functions have all been moved into SymmetricFunctions(R).
 
 sage: Mac = SF.macdonald()
 gives an error because q and t are not in the ring! (this is different 
 behavior than before where the q and t were added to the base ring)
 
 New notation:
 sage: SF = SymmetricFunctions(QQ['q','t'].fraction_field())
 sage: Mac = SF.macdonald()
 sage: MP = Mac.P() # or .Q() or .J() or .H() or .Ht()
 sage: HL = SF.hall_littlewood()
 sage: HLP = HL.P() # or .Q() or .Qp()
 sage: Jack = SF.jack()
 sage: JP = Jack.P() # or .Q() or .Qp() or .J()
 sage: LLT = SF.llt(2) # 2 is the level here which needs to be specified
 sage: HS = LLT.hspin() # .hcospin()
 
 The real improvements are behind the scenes.  Your field can be more 
 general than before and your q and t parameters should be something in that 
 field.
 sage: SF = SymmetricFunctions(QQ['x','y'].fraction_field()); (x,y) = 
 SF.base_ring().gens()
 sage: MPxy = SF.macdonald(q=x,t=y).P()
 sage: MPy5 = SF.macdonald(q=y,t=5).P()
 sage: MPy5(MPxy[2,1])
 
 Other changes include bringing .omega_qt(), .scalar_qt() and .nabla() to 
 all bases and adding q=value, t=value as optional parameters.
 I could use some help testing.  If you use symmetric functions and notice 
 any bad behavior please pass along odd doc tests.
 
 If you want functionality does not seem to be part of these changes, 
 please feel free to add your two cents.
 
 -Mike

-- 
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-devel] Re: Sage server port forwarding

2012-06-07 Thread Keshav Kini
Nils Bruin nbr...@sfu.ca writes:
 As remarked on:

 http://wiki.sagemath.org/SageServer

 it's essentially impossible to safely run sage to natively listen on
 port 80 or port 443, because these are privileged ports and sage
 currently doesn't have convenient mechanisms to relinquish privileges
 after opening the port.

 The solution on the above wikipage is to use Apache to set up a
 forward proxy, delegating the SSL layer to Apache in the process.

 Another solution is to use iptables nat to forward the port:

 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --
 to-port 8000

 Any comments on the pros and cons of these approaches? I thought one
 of the pros is that iptables is virtually sure to be running already,
 whereas apache might not be.

I used iptables to run our university's Sage server on external port 80
but internal port 8000. It worked, and still works, without any
problems. I agree that it would be good to mention this on the wiki
page.

-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


[sage-devel] reporting Xcode 4 problems to Apple

2012-06-07 Thread Dima Pasechnik
Dear all,
Are there bug reports filed regarding issues with Xcode 4?
Someone who works at Apple asked me for details of the troubles we
have with building Sage using Xcode 4, so I would like to supply as
much detail as possible.
Thanks,
Dima

-- 
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: Sage server port forwarding

2012-06-07 Thread Jason Grout

On 6/6/12 10:20 PM, Nils Bruin wrote:

Another solution is to use iptables nat to forward the port:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --
to-port 8000


Just double-checking: this means that you run with secure=True, and the 
notebook itself does the SSL, right?


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] help wanted with braid groups

2012-06-07 Thread mmarco
I have been working on an implementation of braid groups for sage
 (together with free and finitely presented groups). So far i have a
 preliminary version (see ticket #12339). It is still not feature
 complete and also very slow compared to cbraid[1], for example, but
it
 is usable.

In order to speed it up, i want to interface cbraid directly. But i
 have no experience at all with c++ or python interfaces to external
 libraries. Please can someone help me with it? For example, i would
 need to write a function that takes an integer n and a list of
 integers l (that represents a braid of n strands), and uses cbraid
to
 compute the left normal form. I have tried to do it directly with
 ctypes, but i only got error messages.

Thanks in advance.

[1]http://code.google.com/p/cbraid/

-- 
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: help wanted with braid groups

2012-06-07 Thread Volker Braun
Is cbraid really the best/fastest implementation of braid groups out there? 
How does it compare to what GAP can do? Just from glancing at it, the 
author doesn't use many C++ features. Not necessarily a minus. It 
implements bubble sort, really? Also seems to be very hard to maintain, 
many nested loops with undocumented one-letter variables. 



On Thursday, June 7, 2012 12:28:08 PM UTC+1, mmarco wrote:

 I have been working on an implementation of braid groups for sage 
  (together with free and finitely presented groups). So far i have a 
  preliminary version (see ticket #12339). It is still not feature 
  complete and also very slow compared to cbraid[1], for example, but 
 it 
  is usable. 

 In order to speed it up, i want to interface cbraid directly. But i 
  have no experience at all with c++ or python interfaces to external 
  libraries. Please can someone help me with it? For example, i would 
  need to write a function that takes an integer n and a list of 
  integers l (that represents a braid of n strands), and uses cbraid 
 to 
  compute the left normal form. I have tried to do it directly with 
  ctypes, but i only got error messages. 

 Thanks in advance. 

 [1]http://code.google.com/p/cbraid/

-- 
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: help wanted with braid groups

2012-06-07 Thread Dima Pasechnik


On Thursday, 7 June 2012 13:50:59 UTC+2, Volker Braun wrote:

 Is cbraid really the best/fastest implementation of braid groups out 
 there? How does it compare to what GAP can do? 

 
Indeed, there is (nonstandard) GAP package braid, packaged in 
gap_packages spkg, and
as far as I am told by one of its authors, Sergey Shpectorov, their package 
mapclass
http://web.mat.bham.ac.uk/S.Shpectorov/mapclass/  
can do all of what braid can, and more.


Just from glancing at it, the author doesn't use many C++ features. Not 
 necessarily a minus. It implements bubble sort, really? Also seems to be 
 very hard to maintain, many nested loops with undocumented one-letter 
 variables. 



 On Thursday, June 7, 2012 12:28:08 PM UTC+1, mmarco wrote:

 I have been working on an implementation of braid groups for sage 
  (together with free and finitely presented groups). So far i have a 
  preliminary version (see ticket #12339). It is still not feature 
  complete and also very slow compared to cbraid[1], for example, but 
 it 
  is usable. 

 In order to speed it up, i want to interface cbraid directly. But i 
  have no experience at all with c++ or python interfaces to external 
  libraries. Please can someone help me with it? For example, i would 
  need to write a function that takes an integer n and a list of 
  integers l (that represents a braid of n strands), and uses cbraid 
 to 
  compute the left normal form. I have tried to do it directly with 
  ctypes, but i only got error messages. 

 Thanks in advance. 

 [1]http://code.google.com/p/cbraid/



-- 
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] reporting Xcode 4 problems to Apple

2012-06-07 Thread Jeroen Demeyer
On 2012-06-07 12:31, Dima Pasechnik wrote:
 Dear all,
 Are there bug reports filed regarding issues with Xcode 4?
 Someone who works at Apple asked me for details of the troubles we
 have with building Sage using Xcode 4, so I would like to supply as
 much detail as possible.

The situation has improved a lot with newer versions of XCode compared
to older versions.  Of course the fact that XCode doesn't support
Fortran is an issue for Sage (not specific to XCode 4 though).

If you want to test building Sage with XCode, you should do the
following to use Sage's gfortran but the system gcc and g++:

$ cd spkg
$ ./install installed/gcc-4.6.3
$ cd ..
$ chmod 644 local/bin/gcc local/bin/g++
$ make

-- 
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: VirtualBox testers needed

2012-06-07 Thread Anthony Wickstead
 

Using 64 bit Ubuntu 12.04 inside VirtualBox 4.14 under Windows 7, I was 
able to make sage-5.0.1.rc0 with no errors. 

Running ./sage –testall resulted in just one error:

Sage –t –force_lib “devel/sage/sage/schemes/plane_curves/curve.py”


Tony Wickstead

-- 
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] reporting Xcode 4 problems to Apple

2012-06-07 Thread Dima Pasechnik
Hi Jeroen,
and how about segfaults while building gcc spkg?
Are they gone, too?


On Thursday, 7 June 2012 14:28:59 UTC+2, Jeroen Demeyer wrote:

 On 2012-06-07 12:31, Dima Pasechnik wrote: 
  Dear all, 
  Are there bug reports filed regarding issues with Xcode 4? 
  Someone who works at Apple asked me for details of the troubles we 
  have with building Sage using Xcode 4, so I would like to supply as 
  much detail as possible. 

 The situation has improved a lot with newer versions of XCode compared 
 to older versions.  Of course the fact that XCode doesn't support 
 Fortran is an issue for Sage (not specific to XCode 4 though). 

 If you want to test building Sage with XCode, you should do the 
 following to use Sage's gfortran but the system gcc and g++: 

 $ cd spkg 
 $ ./install installed/gcc-4.6.3 
 $ cd .. 
 $ chmod 644 local/bin/gcc local/bin/g++ 
 $ make 


-- 
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] reporting Xcode 4 problems to Apple

2012-06-07 Thread Jeroen Demeyer
On 2012-06-07 15:58, Dima Pasechnik wrote:
 Hi Jeroen,
 and how about segfaults while building gcc spkg?
These only happened with old versions of XCode 4 I think.

-- 
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] Sage server port forwarding

2012-06-07 Thread Jason Ekstrand
On Wed, Jun 6, 2012 at 10:20 PM, Nils Bruin nbr...@sfu.ca wrote:
 Another solution is to use iptables nat to forward the port:

 iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --
 to-port 8000

 Any comments on the pros and cons of these approaches? I thought one
 of the pros is that iptables is virtually sure to be running already,
 whereas apache might not be.
One advantage to using something like Apache or nginx (I'm planning to
post nginx configs to the wiki in a week or two) is that you can set
it up so that port 80 automatically redirects to the secure one. That
way if someone simply types sage.mydomain.com into their web browser
it initially connects to 80 and gets automatically redirected to 443
(https). This can make the whole setup much less confusing.
--Jason Ekstrand

-- 
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] Sage and LinBox = 1.3.0

2012-06-07 Thread Martin Albrecht
Hi,

Brice (for [sage-devel]: he's from the LinBox project) and I are at
the Efficient Linear Algebra for Gröbner Basis Computations workshop
at the moment and got kind of sidetracked into updating LinBox in
Sage.

Sage still uses version 1.1.6 which was released 4 years ago, this is
embarrassing!

Anyway, we got it to compile and Sage starts!

See

  http://trac.sagemath.org/sage_trac/ticket/12883

which has a bunch of dependencies:

 * Givaro update: http://trac.sagemath.org/sage_trac/ticket/9511
 * M4RIE update (because of Givaro update):
http://trac.sagemath.org/sage_trac/ticket/12840
 * M4RI update (because of the Givaro update):
http://trac.sagemath.org/sage_trac/ticket/12841



-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com
_jab: martinralbre...@jabber.ccc.de

-- 
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: Sage and LinBox = 1.3.0

2012-06-07 Thread Volker Braun
Can you try with the newest ATLAS? 3.9.77 just came out and should be 
pretty much to the final release. The Sage testsuite always found some 
errors in the combination of the newer atlas and linbox... 




On Thursday, June 7, 2012 7:32:15 PM UTC+1, Martin Albrecht wrote:

 Brice (for [sage-devel]: he's from the LinBox project) and I are at 
 the Efficient Linear Algebra for Gröbner Basis Computations workshop 
 at the moment and got kind of sidetracked into updating LinBox in 
 Sage. 



-- 
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: Sage and LinBox = 1.3.0

2012-06-07 Thread Jason Grout

On 6/7/12 1:32 PM, Martin Albrecht wrote:

Hi,

Brice (for [sage-devel]: he's from the LinBox project) and I are at
the Efficient Linear Algebra for Gröbner Basis Computations workshop
at the moment and got kind of sidetracked into updating LinBox in
Sage.

Sage still uses version 1.1.6 which was released 4 years ago, this is
embarrassing!


So do you recommend running the testing release?  Or the stable release, 
which is 1.1.7, right?


And +1 for the idea of updating linbox (and dependencies).  Good job!

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] Fwd: Sage and LinBox = 1.3.0

2012-06-07 Thread Martin Albrecht
Argh, pressed sent by accident. Now again:

Hi [sage-devel], (CC [linbox-devel] FYI)

Brice (for [sage-devel]: he's from the LinBox project) and I are at
the Efficient Linear Algebra for Gröbner Basis Computations workshop
at the moment and got kind of sidetracked into updating LinBox in
Sage.

Sage still uses version 1.1.6 which was released 4 years ago, this is
embarrassing!

Anyway, we got it to compile and Sage starts!

See

 http://trac.sagemath.org/sage_trac/ticket/12883

which has a bunch of dependencies:

 * Givaro update: http://trac.sagemath.org/sage_trac/ticket/9511
 * M4RIE update (because of Givaro update):
http://trac.sagemath.org/sage_trac/ticket/12840
 * M4RI update (because of the Givaro update):
http://trac.sagemath.org/sage_trac/ticket/12841

However, we found two bugs already. One of them is definitely in
upstream (reduced row echelon forms are wrong when using
EchelonDomain's but work when one is using FFPACK directly). I believe
Brice will report this bug to LinBox properly. Another but which is a
segfault in determinants over the Integers. However, we cannot
reproduce this outside of Sage, so this bug needs some tracking down.
It is plausible that there are more bugs.

Hence, I'd appreciate help. That is, please try to compile this code
and try to track down issues and perhaps fix them. It seems we are
closer to upgrading LinBox than we were before and I would hate to see
this bitrot. For that to happen, we need your help.

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com
_jab: martinralbre...@jabber.ccc.de


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com
_jab: martinralbre...@jabber.ccc.de

-- 
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: Sage and LinBox = 1.3.0

2012-06-07 Thread Martin Albrecht
Can you perhaps provide a new SPKG? I'm happy to try.

On 7 June 2012 19:38, Volker Braun vbraun.n...@gmail.com wrote:
 Can you try with the newest ATLAS? 3.9.77 just came out and should be pretty
 much to the final release. The Sage testsuite always found some errors in
 the combination of the newer atlas and linbox...




 On Thursday, June 7, 2012 7:32:15 PM UTC+1, Martin Albrecht wrote:

 Brice (for [sage-devel]: he's from the LinBox project) and I are at
 the Efficient Linear Algebra for Gröbner Basis Computations workshop
 at the moment and got kind of sidetracked into updating LinBox in
 Sage.

 --
 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



-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com
_jab: martinralbre...@jabber.ccc.de

-- 
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: Sage and LinBox = 1.3.0

2012-06-07 Thread Martin Albrecht
On 7 June 2012 19:37, Jason Grout jason-s...@creativetrax.com wrote:
 On 6/7/12 1:32 PM, Martin Albrecht wrote:

 Hi,

 Brice (for [sage-devel]: he's from the LinBox project) and I are at
 the Efficient Linear Algebra for Gröbner Basis Computations workshop
 at the moment and got kind of sidetracked into updating LinBox in
 Sage.

 Sage still uses version 1.1.6 which was released 4 years ago, this is
 embarrassing!


 So do you recommend running the testing release?  Or the stable release,
 which is 1.1.7, right?

1.1.7 is the latest stable but Brice recommended 1.3.1. I think the
stable mainly refers to API stability.

 And +1 for the idea of updating linbox (and dependencies).  Good job!

Unfortunately, I pressed sent too early, there are still many issues
left. Still, we seem closer than before, so let's not loose momentum.

 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



-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com
_jab: martinralbre...@jabber.ccc.de

-- 
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: help wanted with braid groups

2012-06-07 Thread kcrisman


On Jun 7, 8:02 am, Dima Pasechnik dimp...@gmail.com wrote:
 On Thursday, 7 June 2012 13:50:59 UTC+2, Volker Braun wrote:

  Is cbraid really the best/fastest implementation of braid groups out
  there? How does it compare to what GAP can do?

 Indeed, there is (nonstandard) GAP package braid, packaged in
 gap_packages spkg, and
 as far as I am told by one of its authors, Sergey Shpectorov, their package
 mapclasshttp://web.mat.bham.ac.uk/S.Shpectorov/mapclass/
 can do all of what braid can, and more.


Wow, that looks awesome.

-- 
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: help wanted with braid groups

2012-06-07 Thread mmarco
Both gap4 packages (braid and mapclass) don't deal with braid groups
themselves, but with the orbits of a certain actions of them (and more
general groups). I mean, they don't implement the usual stuff one
would expect in a braid group: normal forms, burau representation, lcm
and gcd, conjugation problem...

Chevie does have some of this (at least it has something similar to a
left normal form, which is the basis for the rest). It can compute the
left normal form faster than my python code, but it has some
drawbacks: it runs on gap3, which is not even listed as an
experimental package (there are some .spkg available in some trac
ticket though), and also, the comunication with it is done through a
pexpect interface, which has a noticeable overhead.

With all that in mind, i considered cbraid as a good option, since it
is very fast, and small. Other option would be to try to optimize my
python code, but i think it will be always be slow. Maybe cythonizing
some parts of it would make it faster, but i have noted that
cythonizing code only leads to speedups when made very carefully.

On 7 jun, 14:02, Dima Pasechnik dimp...@gmail.com wrote:
 On Thursday, 7 June 2012 13:50:59 UTC+2, Volker Braun wrote:

  Is cbraid really the best/fastest implementation of braid groups out
  there? How does it compare to what GAP can do?

 Indeed, there is (nonstandard) GAP package braid, packaged in
 gap_packages spkg, and
 as far as I am told by one of its authors, Sergey Shpectorov, their package
 mapclasshttp://web.mat.bham.ac.uk/S.Shpectorov/mapclass/
 can do all of what braid can, and more.

 Just from glancing at it, the author doesn't use many C++ features. Not

  necessarily a minus. It implements bubble sort, really? Also seems to be
  very hard to maintain, many nested loops with undocumented one-letter
  variables.

  On Thursday, June 7, 2012 12:28:08 PM UTC+1, mmarco wrote:

  I have been working on an implementation of braid groups for sage
   (together with free and finitely presented groups). So far i have a
   preliminary version (see ticket #12339). It is still not feature
   complete and also very slow compared to cbraid[1], for example, but
  it
   is usable.

  In order to speed it up, i want to interface cbraid directly. But i
   have no experience at all with c++ or python interfaces to external
   libraries. Please can someone help me with it? For example, i would
   need to write a function that takes an integer n and a list of
   integers l (that represents a braid of n strands), and uses cbraid
  to
   compute the left normal form. I have tried to do it directly with
   ctypes, but i only got error messages.

  Thanks in advance.

  [1]http://code.google.com/p/cbraid/

-- 
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: VirtualBox testers needed

2012-06-07 Thread Keshav Kini
Anthony Wickstead anthony.wickst...@gmail.com writes:
 Using 64 bit Ubuntu 12.04 inside VirtualBox 4.14 under Windows 7, I was able 
 to
 make sage-5.0.1.rc0 with no errors.

What hardware CPU does your computer have?

 Running ./sage –testall resulted in just one error:

 Sage –t –force_lib “devel/sage/sage/schemes/plane_curves/curve.py”

Can you give more detail about what error it was? If you run `./sage -t
-force_lib devel/sage/sage/schemes/plane_curves/curve.py` again (in the
appropriate directory), do you get the error again?

-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


[sage-devel] Re: help wanted with braid groups

2012-06-07 Thread kcrisman


On Jun 7, 3:40 pm, mmarco mma...@unizar.es wrote:
 Both gap4 packages (braid and mapclass) don't deal with braid groups
 themselves, but with the orbits of a certain actions of them (and more
 general groups). I mean, they don't implement the usual stuff one
 would expect in a braid group: normal forms, burau representation, lcm
 and gcd, conjugation problem...

I did notice that mapclass didn't implement mapping class groups, but
rather the orbits of certain groups under the MCG.

Do you think that your framework would work or be extensible for Artin
groups?

-- 
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: help wanted with braid groups

2012-06-07 Thread kcrisman

 With all that in mind, i considered cbraid as a good option, since it
 is very fast, and small. Other option would be to try to optimize my
 python code, but i think it will be always be slow. Maybe cythonizing
 some parts of it would make it faster, but i have noted that
 cythonizing code only leads to speedups when made very carefully.

Also, would the project Braiding which uses cbraid be more useful as
an optional/standard spkg?  I assume not, just asking.

-- 
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: help wanted with braid groups

2012-06-07 Thread mmarco

In the link i gave, both cbraid and braiding are mixed in a single
project, also called cbraid. So when i said cbraid i actually meant
cbraid+braiding.


So far, what i have done is specific for braids. A framework for more
general groups (artin or garside, for example) would require a
different project.


 7 jun, 22:10, kcrisman kcris...@gmail.com wrote:
  With all that in mind, i considered cbraid as a good option, since it
  is very fast, and small. Other option would be to try to optimize my
  python code, but i think it will be always be slow. Maybe cythonizing
  some parts of it would make it faster, but i have noted that
  cythonizing code only leads to speedups when made very carefully.

 Also, would the project Braiding which uses cbraid be more useful as
 an optional/standard spkg?  I assume not, just asking.

-- 
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: help wanted with braid groups

2012-06-07 Thread Volker Braun
I suggest you first make a spkg for cbraid that installs the headers/libary 
in the appropriate place.

Then, do you know how to do your computation within c/c++? Do you want to 
use the ArtinBraid or BandBraid class?


-- 
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] Has anybody gotten ropemacs working for sage?

2012-06-07 Thread Ivan Andrus
Greg, 

I got something that seems to work.  I don't take the time to set up a ropemacs 
project (since I don't know what I'm doing), but if you could test it to see if 
it works for you that would be great.  If it does work then we can put the 
instructions on the wiki, and/or make an spkg or something.

download pymacs


sage -sh

easy_install rope
easy_install ropemode
easy_install ropemacs

cd /path/to/pymacs/source
make check
make install # Not sure what this did if anything -- we install it next
cp Pymacs.py $SAGE_ROOT/local/lib/python/
cp Pymacs.el $SAGE_ROOT/data/emacs

exit

# test it when no longer in sage -sh
sage --python -c 'import sys; from Pymacs import main; main(*sys.argv[1:])' -f


Then, either create a sage-python shell script:

#!/bin/sh
sage --python $@

or patch Pymacs.el to add (hopefully where is obvious):


(defvar pymacs-python-options '()
  Options to pass to Python interpreter)

(defun pymacs-start-services ()
...
  (append
   pymacs-python-options
   (list -c
 (concat import sys;
  from Pymacs import main;
  main(*sys.argv[1:])))
   (and (= emacs-major-version 24) '(-f))
   (mapcar 'expand-file-name pymacs-load-path))
...


;; Add the following to .emacs
;; pymacs.el should be in the load-path if sage-mode is...
(require 'pymacs)

(setq pymacs-python-command sage-command
  pymacs-python-options '(--python))

(autoload 'pymacs-apply pymacs)
(autoload 'pymacs-call pymacs)
(autoload 'pymacs-eval pymacs nil t)
(autoload 'pymacs-exec pymacs nil t)
(autoload 'pymacs-load pymacs nil t)
(autoload 'pymacs-autoload pymacs)

(pymacs-load ropemacs rope-)
(setq ropemacs-enable-autoimport t)

(require 'auto-complete)
(global-auto-complete-mode t)




Then test:

M-x pymacs-eval 

and see the ropemacs menu etc.

-Ivan

On May 30, 2012, at 10:17 AM, Ivan Andrus wrote:

 Sorry, I meant to write back earlier.  I haven't gotten ropemacs to work, but 
 I haven't tried.  I don't have time to work on it right now, but if you open 
 a ticket on https://bitbucket.org/gvol/sage-mode/issues then I'll get around 
 to it eventually.
 
 Unfortunately, the installation looks rather complicated.  What did you try 
 and how did it fail?  Did you install rope and friends in sage's python for 
 example?
 
 sage -sh
 easy_install rope
 easy_install ropemode
 easy_install ropemacs
 
 In fact perhaps everything would best be done in sage -sh.  
 
 -Ivan
 
 On May 16, 2012, at 4:26 AM, Greg Laun wrote:
 
 I'm writing some modules for sage, and I would like to get some auto-
 completion and refactoring abilities.  I can get some things to work,
 such as pyflakes for code checking, but I would really like ropemacs
 to work.
 
 I see there is a page on the wiki about setting up IDEs, but no
 mention is made of the emacs IDE features.  I know many sage
 developers use emacs, so I was wondering if anyone had gotten ropemacs
 or pymacs or something similar to work.
 
 If so, would anybody be willing to document the procedure?
 
 Thanks!
 
 Greg Laun

-- 
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] sage-5.0 serious bug: segfaults in basic linear algebra?

2012-06-07 Thread William Stein
Hi Sage-Devel,

I'm randomly running into segfaults when multiplying matrices over the
integers, in the course of doing basic modular symbols calculations.
For example, sometimes (but not always), this crashes:

sage: M = ModularSymbols(389,sign=0).cuspidal_submodule().decomposition()[0]
...
/Users/wstein/sage/build/sage-5.0/local/lib/python2.7/site-packages/sage/matrix/matrix_rational_dense.so
in 
sage.matrix.matrix_rational_dense.Matrix_rational_dense._multiply_over_integers
(sage/matrix/matrix_rational_dense.c:11754)()

RuntimeError: Segmentation fault
--

I can't reliably get this to happen.  I'm observing this on OS X 10.7
with sage-5.0.
Anyway, in case anybody else runs into this, please post, since it is
obviously a serious obstruction for research.

 -- william

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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: sage-5.0 serious bug: segfaults in basic linear algebra?

2012-06-07 Thread Nils Bruin
On Jun 7, 4:19 pm, William Stein wst...@gmail.com wrote:
 Hi Sage-Devel,

 I'm randomly running into segfaults when multiplying matrices over the
 integers, in the course of doing basic modular symbols calculations.
 For example, sometimes (but not always), this crashes:

 sage: M = ModularSymbols(389,sign=0).cuspidal_submodule().decomposition()[0]

I observed (once) on Sage 4.7.1 (Fedora 15 x64):

sage: %time M =
ModularSymbols(389,sign=0).cuspidal_submodule().decomposition()[0]
ArithmeticError: subspace is not invariant under matrix

I'm not able to reliably reproduce this error either.

-- 
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] trac connection error

2012-06-07 Thread Benjamin Jones
I haven't seen this before, after logging in to trac.sagemath.org:

Traceback (most recent call last):
  File build/bdist.linux-x86_64/egg/trac/web/api.py, line 436, in send_error
data, 'text/html')
  File build/bdist.linux-x86_64/egg/trac/web/chrome.py, line 803, in
render_template
message = req.session.pop('chrome.%s.%d' % (type_, i))
  File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in __getattr__
value = self.callbacks[name](self)
  File build/bdist.linux-x86_64/egg/trac/web/main.py, line 298, in
_get_session
return Session(self.env, req)
  File build/bdist.linux-x86_64/egg/trac/web/session.py, line 156, in __init__
if req.authname == 'anonymous':
  File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in __getattr__
value = self.callbacks[name](self)
  File build/bdist.linux-x86_64/egg/trac/web/main.py, line 157, in
authenticate
authname = authenticator.authenticate(req)
  File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 83, in authenticate
authname = self._get_name_for_cookie(req, req.incookie['trac_auth'])
  File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 205, in
_get_name_for_cookie
db = self.env.get_db_cnx()
  File build/bdist.linux-x86_64/egg/trac/env.py, line 335, in get_db_cnx
return get_read_db(self)
  File build/bdist.linux-x86_64/egg/trac/db/api.py, line 90, in get_read_db
return _transaction_local.db or DatabaseManager(env).get_connection()
  File build/bdist.linux-x86_64/egg/trac/db/api.py, line 152, in
get_connection
return self._cnx_pool.get_cnx(self.timeout or None)
  File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 172, in get_cnx
return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 105, in get_cnx
cnx = connector.get_connection(**kwargs)
  File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py,
line 87, in get_connection
params)
  File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py,
line 203, in __init__
port))
OperationalError: FATAL:  connection limit exceeded for non-superusers

--
Benjamin Jones

-- 
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: trac connection error

2012-06-07 Thread kcrisman
I just got this too.  Just keep on trying; apparently developing for
Sage is very popular right now :)

On Jun 7, 8:02 pm, Benjamin Jones benjaminfjo...@gmail.com wrote:
 I haven't seen this before, after logging in to trac.sagemath.org:

 Traceback (most recent call last):
   File build/bdist.linux-x86_64/egg/trac/web/api.py, line 436, in send_error
     data, 'text/html')
   File build/bdist.linux-x86_64/egg/trac/web/chrome.py, line 803, in
 render_template
     message = req.session.pop('chrome.%s.%d' % (type_, i))
   File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in 
 __getattr__
     value = self.callbacks[name](self)
   File build/bdist.linux-x86_64/egg/trac/web/main.py, line 298, in
 _get_session
     return Session(self.env, req)
   File build/bdist.linux-x86_64/egg/trac/web/session.py, line 156, in 
 __init__
     if req.authname == 'anonymous':
   File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in 
 __getattr__
     value = self.callbacks[name](self)
   File build/bdist.linux-x86_64/egg/trac/web/main.py, line 157, in
 authenticate
     authname = authenticator.authenticate(req)
   File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 83, in 
 authenticate
     authname = self._get_name_for_cookie(req, req.incookie['trac_auth'])
   File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 205, in
 _get_name_for_cookie
     db = self.env.get_db_cnx()
   File build/bdist.linux-x86_64/egg/trac/env.py, line 335, in get_db_cnx
     return get_read_db(self)
   File build/bdist.linux-x86_64/egg/trac/db/api.py, line 90, in get_read_db
     return _transaction_local.db or DatabaseManager(env).get_connection()
   File build/bdist.linux-x86_64/egg/trac/db/api.py, line 152, in
 get_connection
     return self._cnx_pool.get_cnx(self.timeout or None)
   File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 172, in get_cnx
     return _backend.get_cnx(self._connector, self._kwargs, timeout)
   File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 105, in get_cnx
     cnx = connector.get_connection(**kwargs)
   File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py,
 line 87, in get_connection
     params)
   File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py,
 line 203, in __init__
     port))
 OperationalError: FATAL:  connection limit exceeded for non-superusers

 --
 Benjamin Jones

-- 
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: sage-5.0 serious bug: segfaults in basic linear algebra?

2012-06-07 Thread William Stein
On Thu, Jun 7, 2012 at 4:41 PM, Nils Bruin nbr...@sfu.ca wrote:
 On Jun 7, 4:19 pm, William Stein wst...@gmail.com wrote:
 Hi Sage-Devel,

 I'm randomly running into segfaults when multiplying matrices over the
 integers, in the course of doing basic modular symbols calculations.
 For example, sometimes (but not always), this crashes:

 sage: M = ModularSymbols(389,sign=0).cuspidal_submodule().decomposition()[0]

 I observed (once) on Sage 4.7.1 (Fedora 15 x64):

 sage: %time M =
 ModularSymbols(389,sign=0).cuspidal_submodule().decomposition()[0]
 ArithmeticError: subspace is not invariant under matrix

 I'm not able to reliably reproduce this error either.

Thanks for reporting this, which is different than what I saw before.

 -- William



 --
 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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: Changing password on notebook server?

2012-06-07 Thread Maarten Derickx
When I do it in sage5.0 using google chrome I get redirected to the login 
page. What version of sage and which browser do you use?

ps. Hidden sage security easter egg: Is you password longer then 8 
characters? Then try to just type the first 8

Le jeudi 7 juin 2012 02:03:48 UTC+2, Nils Bruin a écrit :

 Can this be confirmed? 

  - Log into a sage notebook 
  - Change password 

 Expected result: 

  - happy computing with a new password 

 Observed outcome 

  404 Not Found: The resource / cannot be found. 

 Workaround 

  -Quit browser 
  -Start browser and reconnect 
  -New password provides access.

-- 
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: Changing password on notebook server?

2012-06-07 Thread Jason Grout

On 6/7/12 8:41 PM, Maarten Derickx wrote:


ps. Hidden sage security easter egg: Is you password longer then 8
characters? Then try to just type the first 8


Until you change your password.  A year ago we switched from using crypt 
to using sha256, so any recent accounts and any recently-changed 
passwords should not have the 8-character limit.  I don't know if this 
change is in the old notebook.


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: Sage server port forwarding

2012-06-07 Thread Maarten Derickx


Le jeudi 7 juin 2012 05:20:02 UTC+2, Nils Bruin a écrit :

 As remarked on: 

 http://wiki.sagemath.org/SageServer 

 it's essentially impossible to safely run sage to natively listen on 
 port 80 or port 443, because these are privileged ports and sage 
 currently doesn't have convenient mechanisms to relinquish privileges 
 after opening the port. 

  
Maybe its also worth looking into authbind . I use it for quite a while now 
to run sage.mderickx.nl nativily on a privaliged port. authbind is a linux 
tool which allows you to configure which non privaleged users can use which 
non privaleged ports. Note that in my case I still can't use port 80 or 443 
since apache already needs to listen to those ports to server other 
webpages.

-- 
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: Changing password on notebook server?

2012-06-07 Thread Maarten Derickx
Le vendredi 8 juin 2012 04:04:07 UTC+2, jason a écrit :

 On 6/7/12 8:41 PM, Maarten Derickx wrote: 

  ps. Hidden sage security easter egg: Is you password longer then 8 
  characters? Then try to just type the first 8 

 Until you change your password.  A year ago we switched from using crypt 
 to using sha256, so any recent accounts and any recently-changed 
 passwords should not have the 8-character limit.  I don't know if this 
 change is in the old notebook. 

 
It's still in the current notebook (at least the one included in 5.0). 

The file sagenb/notebook/user.py still contains the line:

SALT = 'aa'
 
And I verified it in my own sage 5.0 server so this code is still getting 
used. Note that it could be fixed by a minimal effort of changing this line 
to

SALT = '$1$aa'

but this will not be very usefull since flask already has positive review 
so it will be fixed in the new notebook.


 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: Changing password on notebook server?

2012-06-07 Thread Nils Bruin
On Jun 7, 6:41 pm, Maarten Derickx m.derickx.stud...@gmail.com
wrote:
 When I do it in sage5.0 using google chrome I get redirected to the login
 page. What version of sage and which browser do you use?

Firefox  Sage 5.0. There's something funny with that setup anyway --
sometimes, the logout button doesn't work, which is probably exactly
the same problem. So there must be some cookie that doesn't always go
away when it should. Unless I find a way to reproduce it on other
systems I'll chalk it up to the browser configuration.

-- 
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: Changing password on notebook server?

2012-06-07 Thread Jason Grout

On 6/7/12 9:36 PM, Nils Bruin wrote:

Firefox  Sage 5.0.


Sage 5.0 with the included notebook? Or the new flask notebook (like 
what is running on *.sagenb.org)?


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: Changing password on notebook server?

2012-06-07 Thread Nils Bruin
On Jun 7, 7:46 pm, Jason Grout jason-s...@creativetrax.com wrote:
 On 6/7/12 9:36 PM, Nils Bruin wrote:

  Firefox  Sage 5.0.

 Sage 5.0 with the included notebook? Or the new flask notebook (like
 what is running on *.sagenb.org)?

I'm not that adventurous. Stock Sage 5.0.

-- 
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: trac connection error

2012-06-07 Thread Maarten Derickx
This happend in the past also. It was an issue with to many connections to 
the database still being open for some reasons. It should be (at least till 
for the short future) fixed now.

Le vendredi 8 juin 2012 02:54:05 UTC+2, kcrisman a écrit :

 I just got this too.  Just keep on trying; apparently developing for 
 Sage is very popular right now :) 

 On Jun 7, 8:02 pm, Benjamin Jones benjaminfjo...@gmail.com wrote: 
  I haven't seen this before, after logging in to trac.sagemath.org: 
  
  Traceback (most recent call last): 
File build/bdist.linux-x86_64/egg/trac/web/api.py, line 436, in 
 send_error 
  data, 'text/html') 
File build/bdist.linux-x86_64/egg/trac/web/chrome.py, line 803, in 
  render_template 
  message = req.session.pop('chrome.%s.%d' % (type_, i)) 
File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in 
 __getattr__ 
  value = self.callbacks[name](self) 
File build/bdist.linux-x86_64/egg/trac/web/main.py, line 298, in 
  _get_session 
  return Session(self.env, req) 
File build/bdist.linux-x86_64/egg/trac/web/session.py, line 156, in 
 __init__ 
  if req.authname == 'anonymous': 
File build/bdist.linux-x86_64/egg/trac/web/api.py, line 212, in 
 __getattr__ 
  value = self.callbacks[name](self) 
File build/bdist.linux-x86_64/egg/trac/web/main.py, line 157, in 
  authenticate 
  authname = authenticator.authenticate(req) 
File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 83, in 
 authenticate 
  authname = self._get_name_for_cookie(req, req.incookie['trac_auth']) 
File build/bdist.linux-x86_64/egg/trac/web/auth.py, line 205, in 
  _get_name_for_cookie 
  db = self.env.get_db_cnx() 
File build/bdist.linux-x86_64/egg/trac/env.py, line 335, in 
 get_db_cnx 
  return get_read_db(self) 
File build/bdist.linux-x86_64/egg/trac/db/api.py, line 90, in 
 get_read_db 
  return _transaction_local.db or 
 DatabaseManager(env).get_connection() 
File build/bdist.linux-x86_64/egg/trac/db/api.py, line 152, in 
  get_connection 
  return self._cnx_pool.get_cnx(self.timeout or None) 
File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 172, in 
 get_cnx 
  return _backend.get_cnx(self._connector, self._kwargs, timeout) 
File build/bdist.linux-x86_64/egg/trac/db/pool.py, line 105, in 
 get_cnx 
  cnx = connector.get_connection(**kwargs) 
File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py, 
  line 87, in get_connection 
  params) 
File build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py, 
  line 203, in __init__ 
  port)) 
  OperationalError: FATAL:  connection limit exceeded for non-superusers 
  
  -- 
  Benjamin Jones

-- 
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: Sage server port forwarding

2012-06-07 Thread William Stein
On Thu, Jun 7, 2012 at 7:23 PM, Maarten Derickx
m.derickx.stud...@gmail.com wrote:


 Le jeudi 7 juin 2012 05:20:02 UTC+2, Nils Bruin a écrit :

 As remarked on:

 http://wiki.sagemath.org/SageServer

 it's essentially impossible to safely run sage to natively listen on
 port 80 or port 443, because these are privileged ports and sage
 currently doesn't have convenient mechanisms to relinquish privileges
 after opening the port.


 Maybe its also worth looking into authbind . I use it for quite a while now
 to run sage.mderickx.nl nativily on a privaliged port. authbind is a linux
 tool which allows you to configure which non privaleged users can use which
 non privaleged ports.

Just curious -- by non privaleged here do you mean privileged?

 Note that in my case I still can't use port 80 or 443
 since apache already needs to listen to those ports to server other
 webpages.

 --
 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



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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


Re: [sage-devel] Re: Is left_kernel_matrix missing intentionally?

2012-06-07 Thread Rob Beezer
So William knows my memory is faulty, and I finally overcame my own 
laziness and looked at the code (and the ticket where this originated, 
http://trac.sagemath.org/sage_trac/ticket/10746).  IML, PARI, Sage generic 
code produce right kernels. These come in different formats, so one option 
for the right_kernel_matrix() function is to do no extra processing of the 
result by asking for a computed basis. ('padic' uses IML.)

sage: A = matrix(ZZ,
[[-1, 0, -2, 2, -3],
[1, -1, 4, 0, 0],
[2, -2, 8, 0, 0],
[0, -2, 4, 4, -6]])
sage: A.right_kernel_matrix(algorithm='padic', basis='computed')
[ 2 -2 -1  0  0]
[-2 -2  0 -1  0]
[ 3  3  0  0 -1]
sage: A.right_kernel_matrix(algorithm='pari', basis='computed')
[-1 -1  0  1  1]
[ 1  1  0  2  1]
[-2  2  1  0  0]

Over fields, the results of a basis matrix of a kernel are a list of 
vectors as rows, echelonized, whereas the computed basis of the Sage 
generic code comes naturally (and simply) from the echelon form.

sage: A.change_ring(QQ).right_kernel_matrix(algorithm='generic', 
basis='computed')
[-2  2  1  0  0]
[ 2  2  0  1  0]
[-3 -3  0  0  1]
sage: A.change_ring(QQ).right_kernel().basis_matrix()
[   10 -1/40 -1/6]
[   01  1/40 -1/6]
[   0001  2/3]

The existing code before the ticket had a _right_kernel_matrix() over the 
integers, which was called one place 
(sage/algebras/quatalg/quaternion_algebra.py) and this was the model for 
the new non-underscore method which replaced it (available for almost any 
ring).

Previously Sage had a preference for left kernels, so a matrix would be 
transposed *before* the call to a specialized procedure that was designed 
to compute right kernels.  For a right kernel, the matrix would be 
transposed to compute a left kernel, then transposed again to be correct 
input for the routine.  I think this inefficiency is now gone.

I would be in favor of a right kernel matrix having its vectors as 
columns.  It looks like this would save some transposes on the exit from 
the actual routines doing the computations.  In refactoring, I was 
concentrating on the organization of the code and packaging of the results, 
so left a lot of things alone.  It looks to me now like some of this old 
code could be made more efficient in terms of packaging the results.  
However, changing the format of an output of a function like this, 
especially for square matrices, would probably be unwise.

Anyway, short answer is that there looks to be some room for further 
(minor) improvements.  But you'd have to look at the code.


Rob

-- 
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: help wanted with braid groups

2012-06-07 Thread Andrew Mathas


On Friday, June 8, 2012 1:40:05 AM UTC+6, mmarco wrote:

 Chevie does have some of this (at least it has something similar to a 
 left normal form, which is the basis for the rest). It can compute the 
 left normal form faster than my python code, but it has some 
 drawbacks: it runs on gap3, which is not even listed as an 
 experimental package (there are some .spkg available in some trac 
 ticket though), and also, the comunication with it is done through a 
 pexpect interface, which has a noticeable overhead. 

 Franco Saliola has written a good gap3 interface for sage:

sage: from sage.interfaces.gap3 import Gap3
sage: gap3 = Gap3(command='gap3') 

Note, however, that gap3 is not bundled with sage and you have to install 
it yourself. From Franco's documentation:

- There is an optional Sage package providing GAP3 pre-packaged
  with several GAP3 packages:

http://trac.sagemath.org/sage_trac/ticket/8906



-- 
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