Re: [sage-devel] [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Julien Puydt
Le Mon, 6 Feb 2012 17:59:57 -0800 (PST),
Dima Pasechnik  a écrit :
> still, might be worth trying (unlike with (e)glibc)

Well, after some poking around, it seems it's a mistake to confuse
eglibc and glibc, especially when considering upstream friendliness to
suggestions/bug reports/patches ; here is a blog post about the debian
developper which uploaded eglibc in debian :
http://blog.aurel32.net/47
(now eglibc is the default libc in debian, and hence in ubuntu)

So perhaps that isn't such a bad idea to try to fix the issue at its
root : in eglibc!

Snark

-- 
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] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Julien Puydt
Le Mon, 6 Feb 2012 15:27:48 -0800 (PST),
rjf  a écrit :
> On Feb 6, 9:00 am, Julien Puydt  wrote:
> > Still, I'm glad you think the problem is trivial/doesn't exist :
> > that means you'll be able to provide a nice patch real soon.
> >
> > Looking forward for your fix, thanks for your suggestions,
> I wasn't offering a patch. The problem is a PICNIC.
> == Problem in Chair not in Computer.

I have a ptestlong.log with failing test, and I'm pretty sure it
doesn't sit in a chair.

Please get out of that thread since you think it's not worth your
attention,

Snark on #sagemath

-- 
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] [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Dima Pasechnik


On Tuesday, February 7, 2012 7:57:11 AM UTC+8, Jonathan Bober wrote:
>
> On Mon, Feb 6, 2012 at 3:05 PM, Dr. David Kirkby <> wrote:
>
>> On 02/ 5/12 10:16 PM, Jonathan Bober wrote:
>>
>>  Never mind all that: the gsl implementation is not very good at all,
>>> whereas the libc implementation on my machine seems quite good. Old 
>>> (libc):
>>>
>>
>> If that's the case, why not report the fact to the appropiate mailing 
>> list - bug-gsl at gnu.org?
>>
>> dave
>>
>
> Well, I just sort of assume that the gsl developers have some idea how 
> accurate their gamma function is and perhaps they consider their 
> implementation just fine. It might not be a bug --- it might just be a 
> design decision. Instead of "not very good" I should have said "not as 
> accurate as eglibc".
>

still, might be worth trying (unlike with (e)glibc)

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: Saving GAP objects across sessions

2012-02-06 Thread Dima Pasechnik
A workaround is to use GAP facilities to encode a pc group using a pair of 
integers.
Cutting from the GAP manual on CodePcgs

gap> G := SmallGroup( 24, 12 );;
gap> p := Pcgs( G );;
gap> code := CodePcgs( p );
5790338948
gap> H := PcGroupCode( code, 24 );

gap> map := GroupHomomorphismByImages( G, H, p, FamilyPcgs(H) );
Pcgs([ f1, f2, f3, f4 ]) -> Pcgs([ f1, f2, f3, f4 ])
gap> IsBijective(map);
true

That is, in Sage you'd do
sage: G = gap.SmallGroup( 24, 12 )
sage: code=gap.CodePcgs(gap.Pcgs( G ))
sage: code
5790338948

(and you can easily store 24 and 5790338948), and then recover them:
sage: gap.PcGroupCode(code,24)
Group( [ f1, f2, f3, f4 ] )

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


Re: [sage-devel] [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Jonathan Bober
On Mon, Feb 6, 2012 at 3:05 PM, Dr. David Kirkby wrote:

> On 02/ 5/12 10:16 PM, Jonathan Bober wrote:
>
>  Never mind all that: the gsl implementation is not very good at all,
>> whereas the libc implementation on my machine seems quite good. Old
>> (libc):
>>
>
> If that's the case, why not report the fact to the appropiate mailing list
> - bug-gsl at gnu.org?
>
> dave
>

Well, I just sort of assume that the gsl developers have some idea how
accurate their gamma function is and perhaps they consider their
implementation just fine. It might not be a bug --- it might just be a
design decision. Instead of "not very good" I should have said "not as
accurate as eglibc".

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 6/12 09:09 AM, Jeroen Demeyer wrote:

On 2012-02-06 09:33, Dr. David Kirkby wrote:

I think trying to replicate autotools would be just silly.

That's what PARI tried and they are probably the spkg with the *most*
patches to the configuration system.



More fool them.

SCons is another attempt at a build system, but I was not keen on it. I noticed 
another Sage developer removed it from some package, as he too found it 
frustrating.


I think autoconf/automake is very convenient for users, though it is not the 
easiest program for developers.


I pretty much re-wrote the "prereq" script from scratch, as that was written to 
use autoconf, but whoever wrote it did not read the autoconf documentation. They 
just started coding, which is very unwise with autoconf.


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


[sage-devel] Re: [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread rjf
to quote from the Kahan/Darcy paper..

http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf

Strictly speaking, a number can possess neither precision nor
accuracy.
A number possesses only its value.
Precision attaches to the format into which the number is written or
stored or rounded. Better ( higher or wider )
precision implies finer resolution or higher density among the numbers
representable in that format. All three of
3 3.0 E0  3.0 D0
have exactly the same value though the first is written like a 2-byte
INTEGER in Fortran or int in C, the
second is written like a 4-byte REAL in Fortran or 8-byte double in C,
and the third is written for 8-byte
DOUBLE PRECISION in Fortran. To some eyes these numbers are written in
order of increasing precision. To
other eyes the integer “ 3 ” is exact and therefore more precise than
any floating-point “ 3.0 ” can be. Precision
( usually Relative precision ) is commonly gauged in “ significant
digits ” regardless of a number’s significance.
Many a textbook asserts that a floating-point number represents the
set of all numbers that differ from it by no
more than a fraction of the difference between it and its neighbors
with the same floating-point format. This
figment of the author’s imagination may influence programmers who read
it but cannot otherwise affect computers
that do not read minds. A number can represent only itself, and does
that perfectly.

-- 
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] The failed numerical tests only show the tests are bad!

2012-02-06 Thread rjf


On Feb 6, 9:00 am, Julien Puydt  wrote:
>
...

> 0.0 is a range of numbers, and zero is in that range, and I think they
> shouldn't be considered equal.

That is your opinion.  People have other opinions. Some programming
languages
implement 0.0 numerically equal to (integer) 0. For example, ANSI
standard common lisp.
Ordinarily, object equality would work only for items of the same
type, though
inheritance and such muddies the water.

I think that numerical analysts' most useful view is that the floating
point number
0.0 is a representation of the exact number zero, and no other number
or range.

The view that floats are ranges leads to a host of really bad designs.
Like, can
you construct an interval as a pair of floats?  Uh, no, because the
upper and lower
bounds are themselves floats, which are themselves intervals...

>
> I know most compilers/interpreters in most languages will tell
> otherwise, but it is a lie,

That is your opinion, and not commonly shared by persons skilled in
the art.

> and some languages *do* refuse such
> comparisons, so the idea isn't unhelpful ; it's a design choice that
> others made.

I am not aware of any programming languages that refuse to test for
equality of floating-point numbers.  It is a useful operation in some
cases, e.g. did an iterative refinement leave a floating-point number
unchanged?  Time to exit the loop.


>
> Even if the ARM eglibc has precision issues, the fact that sage makes
> float computations then tests with an equality is still wrong (worse,
> it's converting them to strings then testing that for equality!)

I expect that Sage (and Sage testing) does a large number of things
wrong.
There is a large literature on testing of numerical software, and I
daresay
that none of it suggests converting numbers to strings to test for
equality.


>: that
> makes those tests portable essentially to x86_64/linux, x86_64/mosx,
> x86_64/win32...
>
> > I suggest you become better informed on the topic.
>
> I'm conscious of the difference between an exact computation
> and a numerical computation, which I think is a pretty good start, even
> if I admit (again) it isn't perfect.

You may be mistaken in your understanding.
>
> > In order to keep this note from being complete snark,
>
> I chose my nickname years ago in reference to "The hunting of the
> snark", by Lewis Carroll (see [1]); and since I'm not a native english
> speaker, I wasn't (back then) even aware of the word/meaning you just
> used. Now I do know it, and I find you choice of words quite petty.

Quite petty? How kind of you. In referring to my own comments as
snark, I was characterizing them as sarcastic/abusive.
>
> > let me suggest
> > you (and others concerned about these matters look at this)
> >http://www.cims.nyu.edu/~dbindel/class/cs279/dsb-bib.pdf
>
> It is a nice list of references ; if you could have a look at [2], I
> think you would see that the problem isn't as simple as you think it
> is. The first two paragraphs will be enough.

I am well aware of the distinction between the precision of a double-
float
and a double-float-extended.  That does not alter the fact that 0.0 in
double
or double-extended is numerically equal to 0.  For a dissertation on
the
problems caused by the interaction of language designers,
 compilers and arithmetic systems that either allow or forbid double-
extended
and its affect on programming language implementation, see

http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf

 If the tests are performed all on the same machine with the same
arithmetic, it would make sense to check various identities such as
sin^2+cos^2==1, or gamma(5.0)==24.0  rather than reading in a text
string.
>
> Still, I'm glad you think the problem is trivial/doesn't exist : that
> means you'll be able to provide a nice patch real soon.
>
> Looking forward for your fix, thanks for your suggestions,
I wasn't offering a patch. The problem is a PICNIC.
== Problem in Chair not in Computer.
RJF

>
> Snark on #sagemath
>
> [1]http://en.wikipedia.org/wiki/The_Hunting_of_the_Snark
> [2]http://www.network-theory.co.uk/docs/gccintro/gccintro_70.html

-- 
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] [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Dr. David Kirkby

On 02/ 5/12 10:16 PM, Jonathan Bober wrote:


Never mind all that: the gsl implementation is not very good at all,
whereas the libc implementation on my machine seems quite good. Old (libc):


If that's the case, why not report the fact to the appropiate mailing list - 
bug-gsl at gnu.org?


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


[sage-devel] Re: sage -b compiler/linker flags

2012-02-06 Thread Volker Braun
Cython uses the distutils CFLAGS by default:

sage: from distutils import sysconfig
sage: sysconfig.get_config_var('CFLAGS')
'-fno-strict-aliasing -g -O2 -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes'

-- 
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: Programming animation

2012-02-06 Thread kcrisman


On Feb 6, 2:58 pm, Socius  wrote:
> On 6 Feb, 18:57, LFS  wrote:
>
> > I have to admit that I use GeoGebra for almost everything not 3d. It
> > is absolutely fantastic (I do videos on the youtube.com/
> > geogebrachannel and have a wiki and a moodle on ggb.)
>
> > But sage is great (and I have started a youtube.com/sagemath  channel
> > and a sage wiki, but they are in their infancy.)
> > (a) for 3d and
> > (b) for creating "solvers" because of its linearity which helps kids
> > focus on the steps.
> > (c) I really like the "organization" in sage with the text fields and
> > sage fields.
>
> > (I also use scratch to teach my kids to test their probability
> > results).
>
> Hi Linda.
> Congrats for your activities with Geogebra and now Sage. Do you
> publish videos on the official Youtube geogebra channel? I often visit
> the channel, and I am surely interested also in new videos about Sage.

So you did
http://www.youtube.com/sagemath
?  Very interesting!  Jason Grout has already been singing your 3D
worksheets' praises.

We do post a lot of videos from Sage Days at YouTube (see
http://www.youtube.co/user/wstein389, William's posted videos), but I
didn't realize someone (LFS) had started a channel.  That could be
useful.  cc:ing sage-devel - there should be some coordination here
among people who upload videos.

> Actually my secret (not so) dream is a program with all the modules of
> Sage, the simplicity and interactivity (also for animations) of
> Geogebra, and a free structure notebook-style as Mathcad. I hope that
> both GG and Sage (maybe together one day?) will develop towards that
> goal.

Could be hard!  But at least you can use Geogebra from within Sage to
some extent because of the web start for GG.

http://flask.sagenb.org/home/pub/87/

A longer-term ticket, with a lot of work on it done already:
http://trac.sagemath.org/sage_trac/ticket/7489

- kcrisman

-- 
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: Unifying Command line options

2012-02-06 Thread David Roe
That SEP suggests adding subcommands similar to what Andrew suggested.  But
I don't agree with removing sage -t etc because you can get the same
functionality with make.
David

On Mon, Feb 6, 2012 at 05:08, Keshav Kini  wrote:

> I just found this SEP (Sage Enhancement Proposal), which one might want to
> take a look at: http://wiki.sagemath.org/UnifiedCommandLineSEP
>
>
> -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
>

-- 
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 -b compiler/linker flags

2012-02-06 Thread Jeroen Demeyer
Where does "./sage -b" get its compiler/linker executable name and flags
from?  I'm not talking about module-specific options, but the general
ones like "-O2 -g".

-- 
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: Should we slowly move the .py files to .pyx files now that we have iterators ?

2012-02-06 Thread Jason Grout

On 2/5/12 1:25 AM, Keshav Kini wrote:

I remember being told that [the owner field] is meaningless now and we should CC
someone if we want them to see the ticket.


Yes, that is pretty much still the situation.

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] Sage Days 38 in Montreal : First Announcement

2012-02-06 Thread Sébastien Labbé
PLEASE ADVERTISE WHERE APPROPRIATE

Prière de diffuser cette information le plus largement possible.
L'annonce en français suit l'anglais.


Sage Days 38

First Announcement
CRM, Montreal, May 7--11, 2012


Sage (www.sagemath.org) is a mathematics software package,
developed by and for the mathematics community. It aims to
become a viable alternative to commercial software packages
on the basis of an open-source model.

This workshop will be a 5-day intensive workshop to serve
both as introduction to Sage and as an open developers
meeting. The event will include a combination of
mathematical talks, tutorials, demonstrations of Sage
functionality as well as time spent on Sage development. The
principal focus of the developers meeting is algebraic
combinatorics and the representation theory of algebras.

Further information is available at the following websites:

   http://wiki.sagemath.org/days38


INVITED SPEAKERS

* Meinolf Geck, University of Aberdeen
* Florent Hivert, LRI, Université Paris-Sud
* Anne Schilling, University of California Davis
* Øyvind Solberg, Norwegian University of Science and Technology
* Nicolas Thiéry, LMO, Université Paris-Sud


WHO SHOULD ATTEND

You! A specific goal of the workshop is to provide a venue
for faculty, graduate students and undergraduate students to
learn more about the software. This will make it accessible
to researchers at all levels, *even those without any prior
experience with Sage*. Since it will be held in May, it is
an excellent opportunity for undergraduate students
embarking on summer research projects and graduate students
looking to incorporate scientific computation into their
research projects.


REGISTRATION AND FINANCIAL SUPPORT

Online registration will be available starting at the end of
February through the official CRM website. In the meantime,
you can express your intention to participate by completing
the following questionnaire:

http://goo.gl/q8o9j

A limited amount of financial support is available for
students, postdocs, and researchers without grants. You
can register and apply for financial support through the
conference website once the forms become available.

Sincerely Yours,
The organizing committee

Srecko Brlek, Université du Québec à Montréal
Sébastien Labbé, Université du Québec à Montréal
Franco Saliola, Université du Québec à Montréal




Sage Days 38

Première annonce
CRM, Montréal, du 7 au 11 mai 2012


Sage (www.sagemath.org) est un logiciel libre de mathématiques
développé par et pour la communauté mathématique visant à
devenir une alternative viable aux logiciels commerciaux tels
que Magma, Maple, Mathematica et Matlab.

La conférence prendra la forme d'un atelier intensif de cinq
jours et servira à la fois d'introduction au logiciel Sage
et de réunion pour les utilisateurs et les développeurs.
La conférence comprendra des présentations mathématiques, des
tutoriels sur Sage et ses fonctionalités ainsi que des séances
de développement de Sage. Le thème principal de la réunion des
développeurs est la combinatoire algébrique et la théorie des
représentations des algèbres.

Information supplémentaire est disponible sur les pages web
suivantes:

   http://wiki.sagemath.org/days38


CONFÉRENCIERS INVITÉS

* Meinolf Geck, University of Aberdeen
* Florent Hivert, LRI, Université Paris-Sud
* Anne Schilling, University of California Davis
* Øyvind Solberg, Norwegian University of Science and Technology
* Nicolas Thiéry, LMO, Université Paris-Sud


QUI DEVRAIT PARTICIPER ?

Vous! Un objectif spécifique de l'atelier est de fournir un
lieu pour les professeurs et les étudiants du premier cycle
et des cycles supérieurs pour apprendre à utiliser Sage. Il
sera accessible aux chercheurs et enseignants de tous les niveaux,
*même ceux sans aucune expérience avec Sage*. Comme il sera tenu
en mai, il sera une occasion en or pour les étudiants de
premier cycle qui se lanceront dans des projets de recherche
à l'été 2012 et pour les étudiants des cycles supérieurs
qui cherchent à incorporer le calcul scientifique dans leurs
projets de recherche.


INSCRIPTION ET AIDE FINANCIÈRE

L'inscription en ligne sera disponible à partir de la fin du mois
de février sur le site web officiel du CRM. En attendant, vous
pouvez exprimer votre intention de participer en remplissant le
questionnaire ci-dessous:

http://goo.gl/q8o9j

Une aide financière est disponible pour les étudiants, post-docs
et chercheurs sans subventions. Vous pouvez vous inscrire et
demander l'aide financière à partir du site web de la conférence
(lorsque les formulaires seront disponibles).


Cordialement,
Le comité d'organisation

Srecko Brlek, Université du Québec à Montréal
Sébastien Labbé, Université du Québec à Montréal
Franco Saliola, Univ

[sage-devel] Re: VirtualBox

2012-02-06 Thread Volker Braun
On Monday, February 6, 2012 3:23:13 AM UTC-8, Emil Widmann wrote:
>
> > VBscript is an ugly abomination, nobody in his right mind will 
> voluntarily 
> > use it. 
> Lots of people (windows folks) use it even voluntarily


They even use Windows voluntarily ;-)

My first thought was it might be overkill to ship a complete 
> programming language and a Gui frontend [...]


I agree that when you just need a shell script then VBscript is the path of 
least resistance.

But I'm talking about a non-trivial app that drives VBoxManage through a 
pexpect interface, network access, GUI, maybe even wrap a browser component.

-- 
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] small MAX_MODULUS in modular matrix charpoly computation

2012-02-06 Thread John Cremona
On 6 February 2012 17:21, John Cremona  wrote:
> Thanks!
>
> Barinder has  genuine matrices A, B which give a representation of A_4
> in 26 dimensions over Q(zeta_11), i.e. A^2=I and B^3 = I and some
> commutator relation holds.  I was surprised when he told me that
> A.eigenspaces_right() had beeen running for 2 days (though it turned
> out that that A was wrong, it did satisfy A^2=I).
>
> My example was random:  I took J=diag(1,1,...,1,-1,-1,...,-1) with 13
> +1's and 13 -1's and conjugated by a random M (which was
> unsurprisingly invertible) to get an Q whose char poly was (X-1)^13 *
> (X+1)^13.    Using algorithm='pari' gave that correctly, but took
> quite a while (the time has scrolled off my screen, it was > 2000s I
> think).  But in our computation we know that A and B both have +1 as
> an eigenvalue and we only want their +1-eigenspaces, which (for my
> random A) only takes 87s.
>
> The matrix is in sagemath:/home/cremona/M26.sobj if you want to play
> with it;  but remember that this is a random M with M^2=I, not one we
> actually want for real.
>

Sorry I mixed up notation.  The conjugating matrix (now lost) was
random;  the result of conjugating is the one called M, which I saved,
and it does satisfy M^2=I with char poly (X-1)^13*(X+1)^13.

John

> John
>
> On 6 February 2012 17:01, William Stein  wrote:
>> On Mon, Feb 6, 2012 at 6:49 AM, John Cremona  wrote:
>>> I was trying to find eigenspaces of a 26x26 matrix over Q(zeta_11)
>>> (for a modular forms application) and ran into:
>>
>> Can you make your matrix available, e.g., as an sobj on sage.math (or
>> somewhere) that I can download.
>> It's possible that the real problem is a bug in the echelon routine,
>> not the size of the modulus.
>> If the multimodular echelon fails to stabilize -- due to a bug -- then
>> the consequence is that eventually
>> the primes would run out.  However, this is highly unlikely to happen
>> in practice unless the entries of
>> the answer are truly gigantic.
>>
>>  -- William
>>
>>>
>>> RuntimeError: we ran out of primes in multimodular charpoly algorithm
>>>
>>> which on investigation led me to the following lines in
>>> sage/ext/multi_modular.pyx:
>>>
>>> # We use both integer and double operations, hence the min.
>>> # MAX_MODULUS = min(int(sqrt(int(MOD_INT_OVERFLOW))-1), int(2)**int(20))
>>>
>>> # Hard coded because currently matrix_modn_dense is implemented using C ints
>>> # which are always 32-bit.   Once this gets fixed, i.e., there is a better
>>> # matrix_modn class, then this can change.
>>> MAX_MODULUS = 46341
>>>
>>> so I am just wondering if anyone out there has this on their to-do
>>> list.  Meanwhile using algorithm='pari' will have to do, though it is
>>> slow
>>>
>>> This is a small trial run.  We'll be doing a 50x50 over Q(zeta_13) for 
>>> real
>>>
>>> John
>>>
>>> --
>>> 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

-- 
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] small MAX_MODULUS in modular matrix charpoly computation

2012-02-06 Thread John Cremona
Thanks!

Barinder has  genuine matrices A, B which give a representation of A_4
in 26 dimensions over Q(zeta_11), i.e. A^2=I and B^3 = I and some
commutator relation holds.  I was surprised when he told me that
A.eigenspaces_right() had beeen running for 2 days (though it turned
out that that A was wrong, it did satisfy A^2=I).

My example was random:  I took J=diag(1,1,...,1,-1,-1,...,-1) with 13
+1's and 13 -1's and conjugated by a random M (which was
unsurprisingly invertible) to get an Q whose char poly was (X-1)^13 *
(X+1)^13.Using algorithm='pari' gave that correctly, but took
quite a while (the time has scrolled off my screen, it was > 2000s I
think).  But in our computation we know that A and B both have +1 as
an eigenvalue and we only want their +1-eigenspaces, which (for my
random A) only takes 87s.

The matrix is in sagemath:/home/cremona/M26.sobj if you want to play
with it;  but remember that this is a random M with M^2=I, not one we
actually want for real.

John

On 6 February 2012 17:01, William Stein  wrote:
> On Mon, Feb 6, 2012 at 6:49 AM, John Cremona  wrote:
>> I was trying to find eigenspaces of a 26x26 matrix over Q(zeta_11)
>> (for a modular forms application) and ran into:
>
> Can you make your matrix available, e.g., as an sobj on sage.math (or
> somewhere) that I can download.
> It's possible that the real problem is a bug in the echelon routine,
> not the size of the modulus.
> If the multimodular echelon fails to stabilize -- due to a bug -- then
> the consequence is that eventually
> the primes would run out.  However, this is highly unlikely to happen
> in practice unless the entries of
> the answer are truly gigantic.
>
>  -- William
>
>>
>> RuntimeError: we ran out of primes in multimodular charpoly algorithm
>>
>> which on investigation led me to the following lines in
>> sage/ext/multi_modular.pyx:
>>
>> # We use both integer and double operations, hence the min.
>> # MAX_MODULUS = min(int(sqrt(int(MOD_INT_OVERFLOW))-1), int(2)**int(20))
>>
>> # Hard coded because currently matrix_modn_dense is implemented using C ints
>> # which are always 32-bit.   Once this gets fixed, i.e., there is a better
>> # matrix_modn class, then this can change.
>> MAX_MODULUS = 46341
>>
>> so I am just wondering if anyone out there has this on their to-do
>> list.  Meanwhile using algorithm='pari' will have to do, though it is
>> slow
>>
>> This is a small trial run.  We'll be doing a 50x50 over Q(zeta_13) for 
>> real
>>
>> John
>>
>> --
>> 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

-- 
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] small MAX_MODULUS in modular matrix charpoly computation

2012-02-06 Thread William Stein
On Mon, Feb 6, 2012 at 6:49 AM, John Cremona  wrote:
> I was trying to find eigenspaces of a 26x26 matrix over Q(zeta_11)
> (for a modular forms application) and ran into:

Can you make your matrix available, e.g., as an sobj on sage.math (or
somewhere) that I can download.
It's possible that the real problem is a bug in the echelon routine,
not the size of the modulus.
If the multimodular echelon fails to stabilize -- due to a bug -- then
the consequence is that eventually
the primes would run out.  However, this is highly unlikely to happen
in practice unless the entries of
the answer are truly gigantic.

 -- William

>
> RuntimeError: we ran out of primes in multimodular charpoly algorithm
>
> which on investigation led me to the following lines in
> sage/ext/multi_modular.pyx:
>
> # We use both integer and double operations, hence the min.
> # MAX_MODULUS = min(int(sqrt(int(MOD_INT_OVERFLOW))-1), int(2)**int(20))
>
> # Hard coded because currently matrix_modn_dense is implemented using C ints
> # which are always 32-bit.   Once this gets fixed, i.e., there is a better
> # matrix_modn class, then this can change.
> MAX_MODULUS = 46341
>
> so I am just wondering if anyone out there has this on their to-do
> list.  Meanwhile using algorithm='pari' will have to do, though it is
> slow
>
> This is a small trial run.  We'll be doing a 50x50 over Q(zeta_13) for 
> real
>
> John
>
> --
> 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: [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Julien Puydt
Le Mon, 6 Feb 2012 07:45:49 -0800 (PST),
rjf  a écrit :
> 
> On Feb 5, 3:02 am, Julien Puydt  wrote:
> > Le 04/02/2012 23:11, Robert Bradshaw a crit :
> >
> > .
> 
> > I think cos(0.0) != 1.0 isn't bad, since 0.0 isn't zero anyway, and
> > 1.0 isn't one anyway. In fact, I would welcome if using strict
> > comparisons on floats triggered an exception.
> >
> > And this monotonicity condition in numerical approximations is new
> > to me... do you have a reference handy? I always thought the only
> > condition was on relative error.
> >
> Given your admitted ignorance on the topic of numerical
> approximations,

I admit again that I don't know enough details to be confortable with
it -- or I wouldn't call for feedback and help here : I would just
provide a nice patch!

> how much weight should we give to your expressed thought that 0.0
> isn't zero
> and 1.0 isn't one?  (etc.) Hint:  your thoughts are unhelpful.

0.0 is a range of numbers, and zero is in that range, and I think they
shouldn't be considered equal.

I know most compilers/interpreters in most languages will tell
otherwise, but it is a lie, and some languages *do* refuse such
comparisons, so the idea isn't unhelpful ; it's a design choice that
others made.

Even if the ARM eglibc has precision issues, the fact that sage makes
float computations then tests with an equality is still wrong (worse,
it's converting them to strings then testing that for equality!): that
makes those tests portable essentially to x86_64/linux, x86_64/mosx,
x86_64/win32...

> I suggest you become better informed on the topic.

I'm conscious of the difference between an exact computation
and a numerical computation, which I think is a pretty good start, even
if I admit (again) it isn't perfect.

> In order to keep this note from being complete snark,

I chose my nickname years ago in reference to "The hunting of the
snark", by Lewis Carroll (see [1]); and since I'm not a native english
speaker, I wasn't (back then) even aware of the word/meaning you just
used. Now I do know it, and I find you choice of words quite petty.

> let me suggest
> you (and others concerned about these matters look at this)
> http://www.cims.nyu.edu/~dbindel/class/cs279/dsb-bib.pdf

It is a nice list of references ; if you could have a look at [2], I
think you would see that the problem isn't as simple as you think it
is. The first two paragraphs will be enough.

Still, I'm glad you think the problem is trivial/doesn't exist : that
means you'll be able to provide a nice patch real soon.

Looking forward for your fix, thanks for your suggestions,

Snark on #sagemath

[1] http://en.wikipedia.org/wiki/The_Hunting_of_the_Snark
[2] http://www.network-theory.co.uk/docs/gccintro/gccintro_70.html

-- 
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] The failed numerical tests only show the tests are bad!

2012-02-06 Thread rjf


On Feb 5, 3:02 am, Julien Puydt  wrote:
> Le 04/02/2012 23:11, Robert Bradshaw a crit :
>
> .

> I think cos(0.0) != 1.0 isn't bad, since 0.0 isn't zero anyway, and 1.0
> isn't one anyway. In fact, I would welcome if using strict comparisons
> on floats triggered an exception.
>
> And this monotonicity condition in numerical approximations is new to
> me... do you have a reference handy? I always thought the only condition
> was on relative error.
>
Given your admitted ignorance on the topic of numerical
approximations,
how much weight should we give to your expressed thought that 0.0
isn't zero
and 1.0 isn't one?  (etc.) Hint:  your thoughts are unhelpful.

I suggest you become better informed on the topic.
In order to keep this note from being complete snark, let me suggest
you (and others concerned about these matters look at this)
http://www.cims.nyu.edu/~dbindel/class/cs279/dsb-bib.pdf

RJF

-- 
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] small MAX_MODULUS in modular matrix charpoly computation

2012-02-06 Thread John Cremona
I was trying to find eigenspaces of a 26x26 matrix over Q(zeta_11)
(for a modular forms application) and ran into:

RuntimeError: we ran out of primes in multimodular charpoly algorithm

which on investigation led me to the following lines in
sage/ext/multi_modular.pyx:

# We use both integer and double operations, hence the min.
# MAX_MODULUS = min(int(sqrt(int(MOD_INT_OVERFLOW))-1), int(2)**int(20))

# Hard coded because currently matrix_modn_dense is implemented using C ints
# which are always 32-bit.   Once this gets fixed, i.e., there is a better
# matrix_modn class, then this can change.
MAX_MODULUS = 46341

so I am just wondering if anyone out there has this on their to-do
list.  Meanwhile using algorithm='pari' will have to do, though it is
slow

This is a small trial run.  We'll be doing a 50x50 over Q(zeta_13) for real

John

-- 
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: Saving GAP objects across sessions

2012-02-06 Thread Simon King
Hi Javier,

On 6 Feb., 14:34, David Joyner  wrote:
> There is a way to save the gap workspace. I think it is
> explained in the gap interface module somewhere.
> That might help.

But, as much as I know, one can not save individual GAP objects. Note
that in some cases (e.g., Permutation Groups) you can work around the
problem by saving the string representation of the GAP object, and
reconstruct the object from that string representation.

That won't always work (and I think this is quite a weakness of GAP),
but in your example it does work:

sage: G = gap.SymmetricGroup(4)
sage: G
SymmetricGroup( [ 1 .. 4 ] )
sage: s = repr(G)
sage: tmp = tmp_filename()
sage: save(s,tmp)
sage: gap(load(tmp))
SymmetricGroup( [ 1 .. 4 ] )

Cheers,
Simon

-- 
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] Saving GAP objects across sessions

2012-02-06 Thread David Joyner
On Mon, Feb 6, 2012 at 7:46 AM, javier  wrote:
> Hi all,
>
> is there a way of saving (a list of) GAP objects so that they can be
> recovered in a different session?

There is a way to save the gap workspace. I think it is
explained in the gap interface module somewhere.
That might help.


>
> This is a minimal example of what we get right now. In my particular
> situation, the group(s) are obtained from the Small Group Library
> (contained in the database-gap optional package) so they cannot be
> easily converted to sage groups:
>
>
> sage: G = gap.SymmetricGroup(4)
> sage: save(G, "Ggap")
> sage: exit
>
> And after opening sage again:
>
> sage: H = load("Ggap")
> sage: H
> ---
> ValueError                                Traceback (most recent call
> last)
>
> /Users/javier/code/ in ()
>
> /Applications/sage/local/lib/python2.7/site-packages/IPython/
> Prompts.pyc in __call__(self, arg)
>    550
>    551             # and now call a possibly user-defined print
> mechanism
>
> --> 552             manipulated_val = self.display(arg)
>    553
>    554             # user display hooks can change the variable to be
> stored in
>
>
> /Applications/sage/local/lib/python2.7/site-packages/IPython/
> Prompts.pyc in _display(self, arg)
>    576             return IPython.generics.result_display(arg)
>    577         except TryNext:
> --> 578             return self.shell.hooks.result_display(arg)
>    579
>    580     # Assign the default display method:
>
>
> /Applications/sage/local/lib/python2.7/site-packages/IPython/hooks.pyc
> in __call__(self, *args, **kw)
>    139             #print "prio",prio,"cmd",cmd #dbg
>
>    140             try:
> --> 141                 ret = cmd(*args, **kw)
>    142                 return ret
>    143             except ipapi.TryNext, exc:
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/misc/
> displayhook.pyc in result_display(ip_self, obj)
>    148     # IPython's default result_display() uses the
> IPython.genutils.Term.cout stream.
>
>    149     # See also local/lib/python2.6/site-packages/IPython/
> hooks.py.
>
> --> 150     print_obj(IPython.genutils.Term.cout, obj)
>    151
>    152 def displayhook(obj):
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/misc/
> displayhook.pyc in print_obj(out_stream, obj)
>    140             if _check_tall_list_and_print(out_stream, obj):
>    141                 return
> --> 142     print >>out_stream, `obj`
>    143
>    144 def result_display(ip_self, obj):
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
> gap.pyc in __repr__(self)
>    714             2
>    715         """
> --> 716         s = ExpectElement.__repr__(self)
>    717         if s.find('must have a value') != -1:
>    718             raise RuntimeError, "An error occurred creating an
> object in %s from:\n'%s'\n%s"%(self.parent().name(), self._create, s)
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
> interface.pyc in __repr__(self)
>    869
>    870     def __repr__(self):
> --> 871         self._check_valid()
>    872         try:
>    873             if self._get_using_file:
>
> /Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
> expect.pyc in _check_valid(self)
>   1157                 raise ValueError, "The %s session in which
> this object was defined is no longer running."%P.name()
>   1158         except AttributeError:
> -> 1159             raise ValueError, "The session in which this
> object was defined is no longer running."
>   1160         return P
>   1161
>
> ValueError: The session in which this object was defined is no longer
> running.
>
> --
> 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: VirtualBox

2012-02-06 Thread Emil Widmann
> disagrees with the current behavior of
> `sage -upgrade`, which tries to merge any committed changes into the
> new version you're upgrading to. That doesn't make sense IMO but there
> you are.

Do avoid another misunderstanding:
Of course I don't  suggest that sage -upgrade should have a different
behaviour. It will work with the compressed filesystem.
On the other hand, doing lots of upgrades leads the concept of the
layered filesystem ad absurdum, because then you have the old version
in the squashfile, and great parts of the new version uncompressed on
the disk.

I was specifically referring about the proposed possibility to
exchange the whole squashfs with a new version.  It is asking for
trouble to pull out the old base.
It is not guaranteed that the overlay of changes will work correctly
with the new version.  If one does lots of upgrades or have changes in
the original sage directory tree, then a normal filesystem is better.
On the other hand, if one "just uses" sage, and does just "clean"
updates between major versions, then I see no problem in using and
exchanging sage as a whole in a new compressed file.

Now I don't know if "sage -upgrade" is mostly painless, or if there
are caveats or problems hiding around the corner which might hit
unexpecting and innocent windows users. So replacing sage as a whole
(either the complete VM or just the sage inside the VM) might be the
easier and save option for real users.

And another clarification: I think at the moment the existing Fedora
VM should be used as reference, which has an uncompressed filesystem.
The actual implementation of the VM is a - still rather important -
detail.

> .. _py2exe:http://py2exe.org/
> .. _PySide:http://pyside.org/

Yes I was thinking on rather shipping binaries instead of the whole
python bundle.
I saw that PySide uses the Qt toolkit which is rather heavy, but I
think whoever decides to work on this should choose the toolchain he/
she likes.

> Maybe you just
> meant that it is a built-in scripting language in Windows, which is
> true, but as you said, there's no problem in shipping binaries for
> Windows.

You can explain better what I mean than myself. That's quite
embarrassing, but well ...
Thanks
emil

-- 
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: Unifying Command line options

2012-02-06 Thread Keshav Kini
I just found this SEP (Sage Enhancement Proposal), which one might want to 
take a look at: http://wiki.sagemath.org/UnifiedCommandLineSEP

-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] Saving GAP objects across sessions

2012-02-06 Thread javier
Hi all,

is there a way of saving (a list of) GAP objects so that they can be
recovered in a different session?

This is a minimal example of what we get right now. In my particular
situation, the group(s) are obtained from the Small Group Library
(contained in the database-gap optional package) so they cannot be
easily converted to sage groups:


sage: G = gap.SymmetricGroup(4)
sage: save(G, "Ggap")
sage: exit

And after opening sage again:

sage: H = load("Ggap")
sage: H
---
ValueErrorTraceback (most recent call
last)

/Users/javier/code/ in ()

/Applications/sage/local/lib/python2.7/site-packages/IPython/
Prompts.pyc in __call__(self, arg)
550
551 # and now call a possibly user-defined print
mechanism

--> 552 manipulated_val = self.display(arg)
553
554 # user display hooks can change the variable to be
stored in


/Applications/sage/local/lib/python2.7/site-packages/IPython/
Prompts.pyc in _display(self, arg)
576 return IPython.generics.result_display(arg)
577 except TryNext:
--> 578 return self.shell.hooks.result_display(arg)
579
580 # Assign the default display method:


/Applications/sage/local/lib/python2.7/site-packages/IPython/hooks.pyc
in __call__(self, *args, **kw)
139 #print "prio",prio,"cmd",cmd #dbg

140 try:
--> 141 ret = cmd(*args, **kw)
142 return ret
143 except ipapi.TryNext, exc:

/Applications/sage/local/lib/python2.7/site-packages/sage/misc/
displayhook.pyc in result_display(ip_self, obj)
148 # IPython's default result_display() uses the
IPython.genutils.Term.cout stream.

149 # See also local/lib/python2.6/site-packages/IPython/
hooks.py.

--> 150 print_obj(IPython.genutils.Term.cout, obj)
151
152 def displayhook(obj):

/Applications/sage/local/lib/python2.7/site-packages/sage/misc/
displayhook.pyc in print_obj(out_stream, obj)
140 if _check_tall_list_and_print(out_stream, obj):
141 return
--> 142 print >>out_stream, `obj`
143
144 def result_display(ip_self, obj):

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
gap.pyc in __repr__(self)
714 2
715 """
--> 716 s = ExpectElement.__repr__(self)
717 if s.find('must have a value') != -1:
718 raise RuntimeError, "An error occurred creating an
object in %s from:\n'%s'\n%s"%(self.parent().name(), self._create, s)

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
interface.pyc in __repr__(self)
869
870 def __repr__(self):
--> 871 self._check_valid()
872 try:
873 if self._get_using_file:

/Applications/sage/local/lib/python2.7/site-packages/sage/interfaces/
expect.pyc in _check_valid(self)
   1157 raise ValueError, "The %s session in which
this object was defined is no longer running."%P.name()
   1158 except AttributeError:
-> 1159 raise ValueError, "The session in which this
object was defined is no longer running."
   1160 return P
   1161

ValueError: The session in which this object was defined is no longer
running.

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

2012-02-06 Thread Keshav Kini
On Mon, Feb 6, 2012 at 20:03, mmarco  wrote:
> I have little experience with pyqt, and i am not sure that would be
> the way to go. A windows user that would want to use a pyqt program
> would need to have installed in his system: python, pyqt and qt. The
> offline windows installer of qt is 1.3 gigs. That's overkill for a
> simple gui app. There must be a simpler way to do it.
>
> I haven't used pyside, but for what i see in the documentation, it
> follows the same approach than pyqt.

This is 100% avoidable. Here is an example of a standalone Windows
executable which is written in Python using PyQt: http://ankisrs.net/
After installation it is a couple dozen megabytes, and this is a
full-featured application that does a bunch of stuff including
audio/video playback, HTML rendering, network connectivity, sqlite
data storage, etc. etc.

I'm not sure exactly how it is done but I assume it uses some
combination of py2exe and Qt tools. (Taking a look in the source code
should prove enlightening: http://github.com/dae/ankiqt ). After
installation there are some Qt-named DLL files sitting in the
program's directory. You absolutely do not need the Qt SDK, or a copy
of Python, or a copy of PyQt to run such an application. To develop
the application is a different story of course.

-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] Re: Should we slowly move the .py files to .pyx files now that we have iterators ?

2012-02-06 Thread Dima Pasechnik


On Monday, February 6, 2012 7:22:46 PM UTC+8, Nathann Cohen wrote:
>
> > Please stop spreading such paranoid rumours. Nathann didn't look at your
> > patch, there is nothing to suggest he "refused to" or even that about 
> you.
>
 
Paranoia is a local favourite kind of illness... Sorry. Perhaps even 
contagious. :)  


> Ahem. There actually is no patch on the ticket, as Dima waits for me to 
> write it.
>
> The point is that I am at Cernay with the combinat team and already spent 
> several hours trying to write it. It involves messing with categories and 
> coercion as the <= and >= operators of the symbolic variables I use are 
> overridden by Sage's coercion system. I do not know how to solve it for the 
> moment and decided to do more rewarding things (than fighting with 
> exceptions I do not understand) in the meantime.
>

well, sure, it's not such a big rush - but at least this needs to be 
documented.
I cc:'d you on another LP-related ticket that is more fun :)

 

>
> Dima, feel free to give it a try too !
>

I wish I could feel free now :-)
 

>
> Nathann 

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

2012-02-06 Thread mmarco
I have little experience with pyqt, and i am not sure that would be
the way to go. A windows user that would want to use a pyqt program
would need to have installed in his system: python, pyqt and qt. The
offline windows installer of qt is 1.3 gigs. That's overkill for a
simple gui app. There must be a simpler way to do it.

I haven't used pyside, but for what i see in the documentation, it
follows the same approach than pyqt.


On 6 feb, 12:22, Keshav Kini  wrote:
> On Mon, Feb 6, 2012 at 17:20, Emil Widmann  wrote:
> > I think the unionfs is a well tested technology now, but a clean
> > solution would be that in case of such an replacement/upgrade of the
> > sage squashfs the whole sage directory tree in the save directory is
> > deleted too - then the user starts with a "fresh" install.
>
> That's what I think too, but it disagrees with the current behavior of
> `sage -upgrade`, which tries to merge any committed changes into the
> new version you're upgrading to. That doesn't make sense IMO but there
> you are.
>
> > Sounds great!
> > This could be just a small application in the beginning with the sage
> > logo and a start button , but can be expanded later.
> > I am not sure if it is necessary to write this in python - that is
> > another dependency.
> > Why not use VBscript or precompile it? Distribution of binaries on
> > windows should be no problem.
>
> Python programs can be made into Windows binaries with py2exe_, a
> distutils extension. GUIs can be made relatively easily with PySide_,
> or so I've heard - haven't gotten around to trying it myself yet.
>
> .. _py2exe:http://py2exe.org/
> .. _PySide:http://pyside.org/
>
> I wonder why you suggest using VBscript. It's not exactly a majority /
> serious language among Windows developers as I recall and certainly
> nobody on Mac or Linux uses it. I think we should stick to Python if
> possible for widest familiarity among our developers. Maybe you just
> meant that it is a built-in scripting language in Windows, which is
> true, but as you said, there's no problem in shipping binaries for
> Windows.
>
> -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: VirtualBox

2012-02-06 Thread Emil Widmann
> A launcher written in Python could be used on other OS'es, too.
good point

> VBscript is an ugly abomination, nobody in his right mind will voluntarily
> use it.
Lots of people (windows folks) use it even voluntarily - I will not
speculate on their (or my) state of mind ...

>Not to mention that we have lots of people with Python skills.
good point

My first thought was it might be overkill to ship a complete
programming language and a Gui frontend  for the sake of writing a
small launcher application (or "rewrite" parts of the VirtualBox
control GUI). But OK, this goes into the same line as the "size of the
VM" discussion - I won't argue about pulling in additional 1 or 2
MB's ;-).

For anybody interested, this is the code (VBscript ) of the NSIS Sage-
Virtualbox Windows installer.
http://boxen.math.washington.edu/home/emil/Win-Inst/SageWinInstBuildDir/main.nsi
It mostly brings up some Messageboxes or calls VBoxManage with
"ExecWait", no rocket science involved. So it might be an abomination
but one could manage.

-- 
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: Should we slowly move the .py files to .pyx files now that we have iterators ?

2012-02-06 Thread Nathann Cohen
> Please stop spreading such paranoid rumours. Nathann didn't look at your
> patch, there is nothing to suggest he "refused to" or even that about you.

Ahem. There actually is no patch on the ticket, as Dima waits for me to
write it.

The point is that I am at Cernay with the combinat team and already spent
several hours trying to write it. It involves messing with categories and
coercion as the <= and >= operators of the symbolic variables I use are
overridden by Sage's coercion system. I do not know how to solve it for the
moment and decided to do more rewarding things (than fighting with
exceptions I do not understand) in the meantime.

Dima, feel free to give it a try too !

Nathann

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

2012-02-06 Thread Keshav Kini
On Mon, Feb 6, 2012 at 17:20, Emil Widmann  wrote:
> I think the unionfs is a well tested technology now, but a clean
> solution would be that in case of such an replacement/upgrade of the
> sage squashfs the whole sage directory tree in the save directory is
> deleted too - then the user starts with a "fresh" install.

That's what I think too, but it disagrees with the current behavior of
`sage -upgrade`, which tries to merge any committed changes into the
new version you're upgrading to. That doesn't make sense IMO but there
you are.

> Sounds great!
> This could be just a small application in the beginning with the sage
> logo and a start button , but can be expanded later.
> I am not sure if it is necessary to write this in python - that is
> another dependency.
> Why not use VBscript or precompile it? Distribution of binaries on
> windows should be no problem.

Python programs can be made into Windows binaries with py2exe_, a
distutils extension. GUIs can be made relatively easily with PySide_,
or so I've heard - haven't gotten around to trying it myself yet.

.. _py2exe: http://py2exe.org/
.. _PySide: http://pyside.org/

I wonder why you suggest using VBscript. It's not exactly a majority /
serious language among Windows developers as I recall and certainly
nobody on Mac or Linux uses it. I think we should stick to Python if
possible for widest familiarity among our developers. Maybe you just
meant that it is a built-in scripting language in Windows, which is
true, but as you said, there's no problem in shipping binaries for
Windows.

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

2012-02-06 Thread Volker Braun
On Monday, February 6, 2012 1:20:13 AM UTC-8, Emil Widmann wrote:
>
> Why not use VBscript or precompile it? Distribution of binaries on 
> windows should be no problem. 
>

A launcher written in Python could be used on other OS'es, too. And 
VBscript is an ugly abomination, nobody in his right mind will voluntarily 
use it. Not to mention that we have lots of people with Python skills.

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

2012-02-06 Thread Emil Widmann
@mmarco
>I use unionfs to mix the squashed filesystem with a directory to save
>the changes. Maybe that would be a source of errors if somebody makes
>changes in his sage directory and then upgrade by replacing the
>compressed file.
I think the unionfs is a well tested technology now, but a clean
solution would be that in case of such an replacement/upgrade of the
sage squashfs the whole sage directory tree in the save directory is
deleted too - then the user starts with a "fresh" install.

> > I was recently thinking about our options for a Sage launcher program This
> > would be a relatively small program that controls VirtualBox, hiding the
> > normal VirtualBox gui. This is pretty easy using the VBoxManage utility. The
> > Sage launcher program could then
> >   * download new Virtual Machines if necessary
> >   * let the user choose between different versions of the Sage VM
> >   * diagnose port / firewall issues
> >   * automatically export notebooks from the VM using a bundled ssh client
> >   * write the launcher in Python (which we also include) using some Python
> > GUI toolkit (included, too)

Sounds great!
This could be just a small application in the beginning with the sage
logo and a start button , but can be expanded later.
I am not sure if it is necessary to write this in python - that is
another dependency.
Why not use VBscript or precompile it? Distribution of binaries on
windows should be no problem.

> Big +1.
>
> I'm curious if anybody else has ever written such a program for
> another project?   If anybody out there is particularly good at
> searching for such things, could you look?  It's not inconceivable
> there's something out there we can learn from.
>
>  -- william

Essentially the documentation of the vboxmanage command shows, that a
very detailed control of the VM is possible.
As an example the commands "VBoxManage controlvm  setlinkstate/
nic" lets you switch on/off network or switch to different network
types like "nat/bridged"
Or the command "VBoxManage guestcontrol execute" lets you start
programs on the guest from the hostmachine.

As I am on it let me share some thoughts - some of those may be in the
category "premature optimization", but just ignore those you don't
like:

Autoimport of virtual machines "ovas" is possible, however it might be
worth considering to not "import" machines, but to create the VM at
runtime and attach the VM on premade bootable vdi harddisk.
Advantages: it is possible to create the machine according to the host
specs (memory, processor). Attaching disks is much faster than
importing ovas (can take minutes).
Disadvantage: Autoimport ova is tested - autocreation of VM and
attaching of virtual disk is not coded and not tested (maybe 20 lines
of VBScript code)

Set the Virtual machine Folder to a path where all users can reach the
sage VM . Currently the Virtualbox default is to store the ova in the
user space, so other accounts cannot use the sage VM. We had at least
one support/ask sage question about this. A possible solution would be
to have the Virtual Machine available public, but use VBoxManage /
Guestadditions to mirror an unique .sage folder in each user
directory.

The hardware specs of the host machine (processor) are mapped to the
VirtualBox - so what policy should apply here? - There could be 1
minimal machine which was compiled for low specs (32 bit,
FAT_BINARIES, 1 processor ...), so that it should run on widest range
of possible hardware. And maybe a 64bit version with complete modern
processor instruction set and more turbo specs available.

I found the following links:
http://www.virtualbox.org/manual/ch08.html
Example GUI: https://github.com/c0state/VirtualBox-Snapshot-Deletion-GUI
web interface:  http://code.google.com/p/phpvirtualbox/
commercial: http://onapp.com/cloud/how-it-works/control-panel/
http://en.wikipedia.org/wiki/VBScript
Python Compiler(?): http://nuitka.net/blog/
VirtualBox/Multiuser environment: http://vu1tur.eu.org/vboxctrl

cheers

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Jeroen Demeyer
On 2012-02-06 09:33, Dr. David Kirkby wrote:
> I think trying to replicate autotools would be just silly.
That's what PARI tried and they are probably the spkg with the *most*
patches to the configuration system.

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 6/12 08:17 AM, Julien Puydt wrote:

Le Mon, 06 Feb 2012 07:58:28 +,
"Dr. David Kirkby"  a écrit :

It must be said, writing configure.ac makefile.am is not the easiest
task - the language is not as intuitive as some. But it does work
well, if implemented properly.


It is indeed not trivial, but doable, and in any case :

(1) trying to replicate the autotools won't be easier than just using
them ;

(2) trying to replicate the autotools would mean you lose the
experience gained by their developpers (autotools cover a lot of
terrible situations...) ;

(3) trying to replicate the autotools would mean you take the burden of
maintenance instead of their developpers ;

(4) using the autotools there is documentation out there
(real-world examples, books, forums, irc channels) ;

(5) using the autotools there are people with experience with it out
there which could lend a hand.

Snark on #sagemath



I agree with all of them.

I would add, the autoconf mailing list is very active, and questions are 
answered timely.


I think trying to replicate autotools would be just silly.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

--
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] use "./configure; make" for Sage?

2012-02-06 Thread Jeroen Demeyer
On 2012-02-05 22:23, John H Palmieri wrote:
>  [ ]  Switch to autoconf
>  [ ]  Keep the current build system
[X] In theory, autoconf is a good idea.  But regarding the build system,
I think there are other priorities for the moment.

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Julien Puydt
Le Mon, 06 Feb 2012 07:58:28 +,
"Dr. David Kirkby"  a écrit :
> It must be said, writing configure.ac makefile.am is not the easiest
> task - the language is not as intuitive as some. But it does work
> well, if implemented properly.

It is indeed not trivial, but doable, and in any case :

(1) trying to replicate the autotools won't be easier than just using
them ;

(2) trying to replicate the autotools would mean you lose the
experience gained by their developpers (autotools cover a lot of
terrible situations...) ;

(3) trying to replicate the autotools would mean you take the burden of
maintenance instead of their developpers ;

(4) using the autotools there is documentation out there
(real-world examples, books, forums, irc channels) ;

(5) using the autotools there are people with experience with it out
there which could lend a hand.

Snark on #sagemath

-- 
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] [ARM] The failed numerical tests only show the tests are bad!

2012-02-06 Thread Julien Puydt
Le Sun, 5 Feb 2012 20:03:48 -0800,
Jonathan Bober  a écrit :
> The source code does say:
> 
>In extensive but non-exhaustive
>random tests, this function proved accurate to within <= 10 ulps
> across the
>entire float domain.  Note that accuracy may depend on the quality
> of the system math functions, the pow function in particular.
> 
> So if the accuracy of pow() in eglicb relies on long doubles, then
> there may be a problem, but maybe it will work well there.

Within 10 ulp? Look at the comment at the start of [1],
where they explain how they compute things, then explain the accuracy:
 * Accuracy: Gamma(x) is accurate to within
 *  x > 0:  error provably < 0.9ulp.
 *  Maximum observed in 1,000,000 trials was .87ulp.
 *  x < 0:
 *  Maximum observed error < 4ulp in 1,000,000 trials.

This looks pretty good!

Snark on #sagemath

[1]
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/lib/libm/noieee_src/n_gamma.c

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Burcin Erocal
On Sun, 5 Feb 2012 13:23:19 -0800 (PST)
John H Palmieri  wrote:

> Various aspects of building Sage might be cleaner if we used autoconf:
> 
>   ./configure  OPTIONS
>   make
> 
> OPTIONS could include a location to install Sage, various flags for 
> building ATLAS, and other options which we currently control by
> setting environment variables. For typical users, we should aim for
> 
>   ./configure
>   make
> 
> to work. We should also continue to use the current environment 
> variables--no need to remove them, just provide another way of
> setting them. Should we vote?
> 
>  [ ]  Switch to autoconf
>  [ ]  Keep the current build system

There was a similar discussion earlier:

http://groups.google.com/group/sage-devel/t/b2ece135b42b5d98

The SEP Ralf wrote is also mentioned in that thread:

http://wiki.sagemath.org/AutoToolsSEP


IMHO, moving the checks from prereq to a top level configure file makes
sense. I used a waf script to handle this in lmonade:

https://bitbucket.org/burcin/lmnd-prefix/src/tip/scripts/wscript


Cheers,
Burcin

-- 
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] use "./configure; make" for Sage?

2012-02-06 Thread Dr. David Kirkby

On 02/ 5/12 09:36 PM, William Stein wrote:


An intermediate option might be of interest to people who have
actually tried to write build systems using autoconf, a.k.a.,
"autohell":


I think "autohell" happens when you can't be bothered to read the documentation 
and examples. The syntax is not the easiest, but nor is particularly difficult 
if you read the manual.


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