[sage-devel] cython Debian package

2007-11-13 Thread Ondrej Certik

Hi,

I created a Cython Debian package, which you can download from my repository:

http://debian.certik.cz/

It works, information how to easily use it on Debian is in
README.Debian, but it still needs some work until it could be uploaded
to unstable (man page, copyright etc.), but those are mostly cosmetic
changes.
I will do this later.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: plotQt.c with Qt 4.3.2 + GUI for pari/gp

2007-11-13 Thread Ondrej Certik

> Hello,
>
> I have to agree with Martin on this. I see little advantage in
> shipping a Qt application with Sage, especially since Qt4 static or
> dynamic adds easily 10 mb compressed. I have also written similar code
> (also qt 4.2.3 based)  that has the added capability to wrap just
> about any open source math system text interface and run an arbitrary
> number of sessions in parallel. That code base is actively maintained
> (fact is I get paid to do so) and will be release to the public under
> the GPL in December or so.
>
> But: There isn't a reason to optionally have this interface, but the
> default supported mode of Sage on Windows is the browser interface.
> There are plenty of open tickets to improve that interface, and a
> single 1.0.0 release 1.5 years ago doesn't exactly give a lot of
> confidence. I would be glad if Ring would add a Sage mode and start to
> improve the software, but that has to happen on his end unless
> somebody here will step up and help out.


I also think only the notebook interface should be the default. Just
one way of doing things and doing it well. Everything else optional.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Calculus in SAGE, motivations

2007-11-15 Thread Ondrej Certik

Hi,

I would like to discuss how to improve calculus in SAGE.

I know, that currently, most of the developers need other things more
urgently, but I think calculus will be the most frequently used part
in SAGE. For example all my friends and colleagues cannot really use
SAGE at the moment, because it cannot yet compete with Mathematica in
calculus. I would like this to be changed.

Ways to progress that come to my mind:

1) Expose as much Maxima functionality as possible (one example is
substitution of other things besides symbols).
2) It's important to allow users to create their own functions and the
calculus package should be able to work with them. Maybe it will by
possible to hack the Maxima interface even more to allow this somehow.

However, I think that in the long run, the main engine of calculus
should be in Python + Cython (maybe also in C/C++), not in LISP.
Because that will allow SAGE to extend it with new features and make
it play nicely with the rest of SAGE.

So my idea is to

3) Integrate SymPy and make it play nicely with the rest of SAGE. I
made a some progress on SD6, will send patches soon, together with a
new release of SymPy, but more work needs to be done.

Unfortunately, 3) will not solve all problems, at least not for now,
because first, there are still much more bugs in SymPy than in Maxima
(this should improve in time), and second, SymPy is slower (this could
be handled by Cython, or rewriting some parts to C/C++).


So I think the best way is to do 1), 2) and 3) in parallel and see. Is
there any other approach that I missed?

I would like to clear this out, so that I am working on something that
makes sense and is good for SAGE.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Calculus in SAGE, motivations

2007-11-16 Thread Ondrej Certik

On Nov 16, 2007 9:50 AM, Fabio Tonti <[EMAIL PROTECTED]> wrote:
> So basically, on the long run, you would like to use SymPy together with
> everything rewritten in Cython? Did I get it correctly?

Not necessarily. In the long run I want to have a very simple but fast
calculus engine, which people can easily understand and extend.

One option is to use Cython, other option is to even write it in C and
there are other options. Everything that operates nicely with Python
is an option, so LISP is out.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: More potential GPL issues with Singular

2007-11-16 Thread Ondrej Certik

On Nov 16, 2007 5:20 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 16, 5:03 pm, Martin Albrecht <[EMAIL PROTECTED]>
> wrote:
> > On Thursday 15 November 2007, mabshoff wrote:
> >
> > > Searching some debian mailing lists I came across:
> >
> > > "Re: Advice on packaging SAGE" - see
> > >http://lists.debian.org/debian-mentors/2007/06/threads.html
>
> Hello Martin,
>
> >
> > We liberated omalloc at Sage Days 2 by tracking down the original author. 
> > All
> > components of Singular are now released under the GPL.
> >
>
> I know about omalloc, but the discussion isn't so much about Singular
> being GPL, but:
>
> From http://lists.debian.org/debian-mentors/2007/06/msg00025.html:
> [begin quote]
> > I don't think that is part of the license.
>
> I don't know, but I think that at least a clarification from the
> authors is
> needed. Citing the license [1]:
>
> "This program is free software; you can redistribute it and/or modify
> it
> under the terms of the GNU General Public License as published by the
> Free Software Foundation ( version 2 of the License ); with the
> following additional restrictions (which override any conflicting
> restrictions in the GPL):"
>
> Note especially the last two lines.
>
> > After the license there is
> > first a request to send in comments and bugs to a specific address,
> > then a request to register yourself as user, then this
> > request:
>
> No, that's not after the license, but after the blurb which seems to
> state
> that those requests are additional restrictions. (Actually they
> contradict
> the GPL...)
>
> But I agree that the intention is likely as you interpret it, so it
> should
> not be difficult to get a clarification.
>
> Regards,
>
> Marcus
> [end quote]
>
> If we want to get Singular into unstable these issues will most likely
> be raised again, so resolving them now rather than later should be a
> good thing.
>
> I agree with you that despite those 2 lines in question Singular is
> licensed under the GPL, but I am not the one making the decision for
> Debian ;)

Yes, this will definitely be raised again. And I like it, that Debian
is very strict about this. :)

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] My SAGE Days 6 final notes

2007-11-16 Thread Ondrej Certik

Hi,

thanks William, John and Martin for organizing SD6 and everyone else
to make this a very nice week. Here is my wrap-up:

http://ondrejcertik.blogspot.com/2007/11/sage-days-6.html

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] patch to improve integration of SymPy and SAGE

2007-11-16 Thread Ondrej Certik

Hi,

my patches and spkg from SD6 is here:

http://sagetrac.org/sage_trac/ticket/1189

Ondrej

P.S. Can I have an account on sagemath please? So that I can leave new
spkgs in there (currently I link to my own server for that).

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch to improve integration of SymPy and SAGE

2007-11-17 Thread Ondrej Certik

> Please tag a ticket against a milestone. I assume you want this to go
> into 2.8.13. It would also be nice to have a small changelog attached
> to the the ticket so we know what is new and mention it in the release
> notes.

Done. Did you send this email 22 hours ago? I got it just now.


Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: interactive widgets in the notebook

2007-11-18 Thread Ondrej Certik

On Nov 17, 2007 6:29 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> Hi everyone,
>
> I've been thinking about how to implement interactive widgets in the
> notebook.  Things like sliders, buttons, etc., that allow interactivity
> like Maplets in Maple or the Manipulate command in Mathematica 6.

This functionality will be very useful indeed.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Calculus in SAGE, motivations

2007-11-18 Thread Ondrej Certik

> > > 1) Expose as much Maxima functionality as possible (one example is
> > > substitution of other things besides symbols).
>
> We've definitely laid the foundations for that step very very well.

Yes, nice work.

> > > 2) It's important to allow users to create their own functions and the
> > > calculus package should be able to work with them. Maybe it will by
> > > possible to hack the Maxima interface even more to allow this somehow.
> >
> > Yep, that sounds good to me.
>
> Actually, what exactly do you mean by "users to create their own functions"?
> Could you give a concrete example of what you mean by this?

Yes, let's discuss some particular examples:

1)  so let's say I want to extend the current default SAGE calculus
with the Order symbol. In the soon to be released SAGE, you will be
able to do:

sage: e = sin(x)
sage: taylor(e, x, 0, 6)
x - x^3/6 + x^5/120


sage: import sympy
sage: e = sympy.sin(x)
sage: e.series(x, 6)
x - 1/6*x**3 + (1/120)*x**5 + O(x**6)
sage: sympy.O(x**4)-sympy.O(x**3)
O(x**3)
sage: f = sympy.cos(x**2)
sage: print f.series(x, 2)
sage: print e.series(x, 6) * f.series(x, 2)
sage: print (e.series(x, 6) * f.series(x, 2)).expand()
1 + O(x**2)
(1 + O(x**2))*(x - 1/6*x**3 + (1/120)*x**5 + O(x**6))
x + O(x**3)


This works in SymPy, but I would like this to be working in SAGE by
default. How could I do that?

2) let's say I want to define my super new function like this:

class my_function(SingleValuedFunction):
nofargs = 1

def fdiff(self, argindex = 1):
return cos(self[0])

@classmethod
def canonize(cls, arg):
arg = sympify(arg)
if arg == 0:
return sympify(0)


and then I want to call

my_function.series(x, 6)

and it will return the same series as for sin, because you notice that
my_function is a disguised sin (the same derivative, the same function
value at x=0).

Then let's say I would like to know the limit

limit(my_function(x) / x, x=0)

and it should just work. This is possible in SymPy (ok, technically
right now, it's a little more complex in SymPy, but we are going to
simplify it), but how could I do this
with the maxima interface?

After talking at SD6, maybe it could be possible to do it by creating
some maxima code behind the scene, so that maxima is able to calculate
with my new function.

>
> > > However, I think that in the long run, the main engine of calculus
> > > should be in Python + Cython (maybe also in C/C++), not in LISP.
> > > Because that will allow SAGE to extend it with new features and make
> > > it play nicely with the rest of SAGE.
>
> Personally I would prefer Python + Cython more than C/C++ just for
> ease of reading.

Yes, me too, Cython is awesome. If together with Cython, we could
speed SymPy up to the speed of Maxima, that's the way to go.
If not, we would have to thing harder.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage-2.8.13 release cycle: request for reviews

2007-11-18 Thread Ondrej Certik

> * the new scipy.spkg does not build on sage.math in case you compile
> 2.8.12 from scratch. If you take the 2.8.12 binary from sage.math it
> does work. You are required to build the new numpy first, though. I
> tried fixing this, but after 8 hours I have given up. Once the new
> scipy failed even installing the old numpy doesn't make the old scipy
> compile. I ended up building the sources completely from scratch 4 or
> 5 times - imagine my happiness level going down rapidly.

Where is the problem exactly? Is it the scipy 0.6.0? Those build
issues are annoing.
I don't have experience with numpy, but if you need help with scipy, I
am one of the Debian maintainers of it.

> * Ondrey's sympy patch touches coerce.pyx and that part of the patch
> causes segfaults all over the map, so I backed it out of alpha0 for
> now.

More details in:

http://sagetrac.org/sage_trac/ticket/1189


Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Finally: 2.8.13.alpha0 :)

2007-11-19 Thread Ondrej Certik

On Nov 19, 2007 12:14 AM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
> I opened tickets for the doctest failures:
>
> #1202: sqlite-3.5.2.p1.spkg segfaults sage/databases/database.py
> #1203: 2.8.13.alpha0: flint doctest failures
> #1204: libs/cremona/constructor.py doctest failures
>
> You should comment on the ticket or pop into irc if you plan to work
> on a ticket.

I think this bug should be fixed before a release:

http://sagetrac.org/sage_trac/ticket/1076

because this affects all of us and it's annoying.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Open source math on Slashdot

2007-11-19 Thread Ondrej Certik

> Yep.  Somebody mentioned Mathomatic there, which I don't ever
> remember scouring to see if it has anything at all to contribute to Sage:
>
>http://www.mathomatic.org/math/index.html
>
> It is GPL'd.  I just downloaded it and built it from source on my mac in
> literally a few seconds, and it seems to work.   A 30 second perusal
> suggests mathomatic doesn't do very much, compared to say Maxima,
> but it might be worth looking into further...

Well, I did, you can see links to all the other software I tried on
sympy's webpage:

http://code.google.com/p/sympy/

interesting is for example eigenmath:

http://eigenmath.sourceforge.net/

written in pure C, etc.

And the answer is they cannot do much more than SAGE can already do,
but I sometimes look into them how things are solved in there. Maxima
is the best one, so SAGE should bet on it and do as much as it can
using maxima imho, to build on the shoulders of giants, so to say.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage math app

2007-11-19 Thread Ondrej Certik

> > How are you planning to change the interface?
>
> We haven't exactly decided yet.  For starters we at least want to make sure
> Sage can compute many integrals that Maxima can't (but say Maple and/or
> Mathematica can compute).I've cc'd this email to sage-devel, so maybe 
> people
> there (e.g., Ondrej Certik) will say more about what they're interested
> in doing.

See all the relevant discussion here:

http://groups.google.com/group/sage-newbie/browse_thread/thread/20283412c7064512

and here:

http://groups.google.com/group/sage-devel/browse_thread/thread/2308561f175a0674/906f9b991c68de06

and feel free to join and tell us your opinion about it.

>
> > Perhaps making a syntax compatible with Mathematica's??
>
> No, that's definitely not planned.
>
> > I've been thinking about this myself for a while.  Sage could definitely
> > make up their own syntax.
>
> We already did make up our own syntax, which fits most naturally with
> how Python works.
> In many cases it turns out to be exactly the same as Mupad and very
> similar to Maple.

As to syntax, I think in Python we could use:

>>> integrate(x**3, (x, -1, 1))
0
>>> integrate(sin(x), (x, 0, pi/2))
1
>>> integrate(cos(x), (x, -pi/2, pi/2))
2

as in SymPy, instead of


sage: integral(x/(x^2+1), x, 0, 1)
  log(2)/2


as in SAGE currently, to be close to Mathematica. Because then you can
use the syntax:

integrate(cos(x*y), (x, -pi/2, pi/2), (y, 0, pi))

for multiple integrals. But anyway, it's just a cosmetic issue.

> Having some sort of compatibility layer, e.g., a function that takes an almost
> arbitrary mathematica expression and converts it to a sage expression *is*
> on our todo list, so at least one could do, e.g.,
> from_mathematica('Sin[x^2]')
> and get Sage's sin(x^2).  We can already do this with almost arbitrary Maxima
> expressions.  If we could also do it for Mathematica, then we could actually
> use Mathematica as a backend for sage's symbolic simplication, integration,
> etc., as an option.  This has been on the todo list for a while, but nobody 
> has
> tackled implementing it.  Are you interested in trying?

In SymPy we were discussing how to write a Mathematica parser:

http://code.google.com/p/sympy/issues/detail?id=161

you can find relevant links to some code and papers in there. I think
it would be very worthy to have it - to feed in (almost) any
Mathematica program and SAGE will know how to execute it using SAGE as
a backend.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage math app

2007-11-20 Thread Ondrej Certik

On Nov 20, 2007 8:17 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Nov 20, 2007 11:10 AM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > > As to syntax, I think in Python we could use:
> > > >>> integrate(cos(x), (x, -pi/2, pi/2))
> > >  Because then you can
> > > use the syntax:
> > >
> > > integrate(cos(x*y), (x, -pi/2, pi/2), (y, 0, pi))
> > >
> > > for multiple integrals. But anyway, it's just a cosmetic issue.
> >
> > When I commended Sage's syntax I was assuming you were using this
> > Mathematica like syntax already.  I agree with Ondrej and think his
> > suggestion above is the way to go.
>
> So do I.  I think we should change that functions as suggested.  Anybody
> want to submit a patch?  Ondrej, could you create a trac ticket making precise
> what you want, etc.?

http://sagetrac.org/sage_trac/ticket/1221

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage math app

2007-11-20 Thread Ondrej Certik

On Nov 20, 2007 11:44 PM, Stephen Forrest <[EMAIL PROTECTED]> wrote:
>
> On Nov 20, 2007 2:10 PM, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
>
> [snip]
> > >  Because then you can
> > > use the syntax:
> > >
> > > integrate(cos(x*y), (x, -pi/2, pi/2), (y, 0, pi))
> > >
> > > for multiple integrals. But anyway, it's just a cosmetic issue.
> >
> > When I commended Sage's syntax I was assuming you were using this
> > Mathematica like syntax already.  I agree with Ondrej and think his
> > suggestion above is the way to go.
>
> This probably goes without saying, but presumably after the change one
> will still be able to use the syntax 'integrate(sin(x),x) ' for
> indefinite integration?  That is, the second argument may be a triple
> or a symbol?

Exactly as you say.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] please wait less than a minute -> please wait around 6 minutes

2007-11-22 Thread Ondrej Certik

Hi,

I just downloaded the 2.8.13 version and it says:

$ ./sage
--
| SAGE Version 2.8.13, Release Date: 2007-11-21  |
| Type notebook() for the GUI, and license() for information.|
--
The SAGE install tree may have moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait less than a minute)...
Please do not interrupt this.


But I had to wait for 6 minutes on my quite fast Intel Core Duo computer.
How long does it take for you? If around the same, then I suggest to change
the phrase to wait around 6 minutes.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: please wait less than a minute -> please wait around 6 minutes

2007-11-22 Thread Ondrej Certik

> so startup + relocation takes 12 seconds. So there are maybe some
> problems on your end :(

I downloaded the binary version: sage-2.8.13-i686-Linux-debian32.tar.gz

I tried that on my laptop and it indeed took only 57s, which is less
than a minute. So there are probably some problems on my end.

Thanks,
Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] sage on sagemath

2007-11-22 Thread Ondrej Certik

Hi,

on sage.math, am I supposed to use:

http://sagemath.org/SAGEbin/linux/64bit/sage-2.8.13-x86_64-use_this_only_on_the_computer_sage_dot_math-Linux.tar.gz

? I tried that and this is what I got:

$ wget 
http://sagemath.org/SAGEbin/linux/64bit/sage-2.8.13-x86_64-use_this_only_on_the_computer_sage_dot_math-Linux.tar.gz
$ tar xzf 
sage-2.8.13-x86_64-use_this_only_on_the_computer_sage_dot_math-Linux.tar.gz
$ cd sage-2.8.13-x86_64-Linux
$ time ./sage
--
| SAGE Version 2.8.13, Release Date: 2007-11-21  |
| Type notebook() for the GUI, and license() for information.|
--
The SAGE install tree may have moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait less than a minute)...
Please do not interrupt this.
---
   Traceback (most recent call last)

/home/ondrej/sage-2.8.13-x86_64-Linux/local/bin/ in ()

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/preparser_ipython.py
in ()
  6 
###
  7
> 8 import sage.misc.interpreter
  9
 10 import preparser

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/interpreter.py
in ()
102
103 import os
--> 104 import log
105
106 import remote_file

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/log.py
in ()
 51
 52 import interpreter
---> 53 import latex
 54 import misc
 55

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/latex.py
in ()
 41 import random
 42
---> 43 import sage.plot.all
 44
 45 from misc import tmp_dir

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/plot/all.py
in ()
  2   text, circle, disk, hue, graphics_array,
  3   list_plot, networkx_plot, parametric_plot,
  4   polar_plot, contour_plot, arrow,
  5   plot_vector_field, matrix_plot, bar_chart,
  6   is_Graphics,

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/plot/plot.py
in ()
126 

127
--> 128 from sage.structure.sage_object import SageObject
129
130 ## IMPORTANT: Do *not* import matplotlib at module scope.  It takes a

: libcsage.so: cannot open shared
object file: No such file or directory
WARNING: Failure executing code: 'import sage.misc.preparser_ipython;
sage.misc.preparser_ipython.magma_colon_equals=True'
---
   Traceback (most recent call last)

/home/ondrej/sage-2.8.13-x86_64-Linux/local/bin/ in ()

/home/ondrej/sage-2.8.13-x86_64-Linux/local/lib/python2.5/site-packages/sage/misc/misc.py
in ()
334 return 0
335
--> 336 from sage.misc.misc_c import prod
337
338 # alternative name for prod

: libcsage.so: cannot open shared
object file: No such file or directory



So I think it's better to build it from source, right?

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: please wait less than a minute -> please wait around 6 minutes

2007-11-22 Thread Ondrej Certik

On Nov 22, 2007 1:37 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> > so startup + relocation takes 12 seconds. So there are maybe some
> > problems on your end :(
>
> I downloaded the binary version: sage-2.8.13-i686-Linux-debian32.tar.gz
>
> I tried that on my laptop and it indeed took only 57s, which is less
> than a minute. So there are probably some problems on my end.

Just for a reference, I just tried that on Intel Core Quad:

$ time ./sage
--
| SAGE Version 2.8.13, Release Date: 2007-11-21  |
| Type notebook() for the GUI, and license() for information.|
--
The SAGE install tree may have moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait less than a minute)...
Please do not interrupt this.
/home/ondra/ext/sage-2.8.13-i686-Linux/local/bin/sage-sage: line 149:
6136 Alarm clock "$SAGE_ROOT/local/bin/"sage-location

Automatically updating the cached Gap workspace:
/home/ondra/.sage//gap/workspace-468476148
sage:
Exiting SAGE (CPU time 0m0.01s, Wall time 0m52.95s).
Exiting spawned Gap process.

real7m7.078s
user0m3.428s
sys 0m1.164s

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: please wait less than a minute -> please wait around 6 minutes

2007-11-22 Thread Ondrej Certik

> The time has everything to do with filesystem speed (and sytem load),
> and very little to do with CPU speed.  It literally takes only a few seconds
> on most unloaded modern systems with a good hard drive, since all it
> is doing is looking at a bunch of files and in some cases making some
> changes to them (mainly in Python's site-package).
>
> Maybe your machine has a really slow filesystem driver or was doing
> something else at the same time or something.
>
> In any case, it would likely be easy to rewrite this functionality to
> give some sort
> of progress meter.  If that sounds like a good idea to you, feel free to open
> a trac ticket and it will eventually happen.


The machines were not loaded, but I am using XFS. I think that could
be the problem. I have several issues with that:

http://wiki.debian.org/cowbuilder_benchmark

and it seems to me that ext3 is much faster than xfs. I was using XFS
when it was basically the best choice, but it seems to me that ext3 is
the best choice now.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage on sagemath

2007-11-22 Thread Ondrej Certik

On Nov 22, 2007 5:12 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Nov 22, 2007 5:20 AM, mabshoff
> <[EMAIL PROTECTED]> wrote:
> > > : libcsage.so: cannot open shared
> > > object file: No such file or directory
> > > 
> > >
> > > So I think it's better to build it from source, right?
> >
> > libcsage.so is missing in the binary, "sage -b" fixes that.
>
> That's very weird.  In fact, there's libcsage.dylib instead included
> in that tarball!
> There was probably a problem with the script that determines whether
> to build a dylib or so file.   Anyway, I'm rebuilding the sage for 
> sage_dot_math
> binary tarball right now and will post it later.

BTW, the sage -b fixed the problem. And I actually also installed from
source, works fine.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: sage - good stuff

2007-11-24 Thread Ondrej Certik

> Thanks!   By the way, your Python library
>
> http://www.soton.ac.uk/~juzi/software_povraython.html
>
> looks very interesting, and might make sense for inclusion in Sage.
> How does it work?  Does it write a scene description file and call povray?

Povray is not open source (so it has to be in Debian non-free), so I
don't think SAGE should depend on or use povray.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyx

2007-11-25 Thread Ondrej Certik

On Nov 25, 2007 5:19 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Some of the Sage developers are considering including Pyx
> (http://pyx.sourceforge.net/)
> in Sage (http://sagemath.org).One issue is that I think Pyx is
> currently licensed GPL v2 only.
> Unfortunately Sage will soon have to start including several new
> versions of GNU programs
> such as GMP, GNUTLs, GSL, etc., and these are all licensed under "GPL
> v3 or greater".
> Also PolyBoRi (http://polybori.sourceforge.net/) will soon be in Sage,
> and it is also "GPL v3"
> licensed.  Unfortunately, it is a copyright violation to combine GPL
> v2 and GPL v3 software
> together and redistribute it, since the FSF decided to make GPL v3 be

If it is true that SAGE is legaly unable to include GPL v2 only and
GPL v3 only programs, not modifying them, not relicensing them, but
just
calling them from Python, then FSF did a terrible move, against the
free software and against the end users, which GPL is supposed to
protect.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Talk about SAGE at Les Trophees du Libre 2007 competition

2007-11-25 Thread Ondrej Certik

> > cetril.pdf is the presentation, SAGE_Demo.sws the demo worksheet, and
> > SAGE_Demo.pdf the PDF version of that demo. The target audience is a group 
> > of
> > people who want to promote open-source but probably are not into mathematics
> > at all. So presenting that we have a very sophisticated model for p-adic
> > arithmetic and comparing Sage with Magma might not do the trick. (but Sage 
> > is
> > in the 'scientific software' section, so it is okay to talk a little about
> > mathematics ;-))


I think it looks very good. Just one idea to the point you already
made - I myself haven't heard of magma, before SAGE mentioned it.

I've heard about Matlab, I myself used it a lot, but Python + NumPy +
SciPy can do everything I myself needed in Matlab.

So where SAGE really competes from my point of view is in the
Maple/Mathematica area. This is what should be stressed imho.

Also, that SAGE has a web interface - the notebook() - with sharing
abilities, SSL encryption, etc. So that you can run SAGE on the server
and use it from anywhere. This is something, that Maple/Mathematica
don't have. Neither Giac (also in the final) has it imho.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Talk about SAGE at Les Trophees du Libre 2007 competition

2007-11-25 Thread Ondrej Certik

> I think it looks very good. Just one idea to the point you already
> made - I myself haven't heard of magma, before SAGE mentioned it.
>
> I've heard about Matlab, I myself used it a lot, but Python + NumPy +
> SciPy can do everything I myself needed in Matlab.
>
> So where SAGE really competes from my point of view is in the
> Maple/Mathematica area. This is what should be stressed imho.
>
> Also, that SAGE has a web interface - the notebook() - with sharing
> abilities, SSL encryption, etc. So that you can run SAGE on the server
> and use it from anywhere. This is something, that Maple/Mathematica
> don't have. Neither Giac (also in the final) has it imho.

Another very important point - you just download SAGE, run it and it just works.

You download Giac, and it doesn't work. It cost me many hours to even
compile it, I had to ask the author of Giac to fix the problems (but
he did so quickly), but still, it was like a week, from the first
download, to a running version.

They gave ease of installation a coefficient 1, but it should be 15
instead. If you cannot run it, it doesn't exist.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Talk about SAGE at Les Trophees du Libre 2007 competition

2007-11-25 Thread Ondrej Certik

On Nov 25, 2007 5:06 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> > I think it looks very good. Just one idea to the point you already
> > made - I myself haven't heard of magma, before SAGE mentioned it.
> >
> > I've heard about Matlab, I myself used it a lot, but Python + NumPy +
> > SciPy can do everything I myself needed in Matlab.
> >
> > So where SAGE really competes from my point of view is in the
> > Maple/Mathematica area. This is what should be stressed imho.
> >
> > Also, that SAGE has a web interface - the notebook() - with sharing
> > abilities, SSL encryption, etc. So that you can run SAGE on the server
> > and use it from anywhere. This is something, that Maple/Mathematica
> > don't have. Neither Giac (also in the final) has it imho.
>
> Another very important point - you just download SAGE, run it and it just 
> works.
>
> You download Giac, and it doesn't work. It cost me many hours to even
> compile it, I had to ask the author of Giac to fix the problems (but
> he did so quickly), but still, it was like a week, from the first
> download, to a running version.

Here is what I had to do to get Giac running, in February this year:

http://www.google.com/notebook/public/10576738713475585694/BDQIIQwoQ37HuuIsi

especially browse the old instructions. So you should stress that you
download SAGE, type make and that's it. Or even download the binary,
type ./sage and it runs. When I downloaded the binary of giac (beause
I couldn't make it compile), it didn't run, because they linked to
older versions of libraries than I had.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Talk about SAGE at Les Trophees du Libre 2007 competition

2007-11-25 Thread Ondrej Certik

> And i would add a simple image : OpenOffice means that "anybody in the
> world" can have access to an "office" suite, which covers 99% of
> anybody's need. It's obvious that OpenOffice is NOT the best office
> suite and has some limitations.
> SAGE might soon be (maybe I'm wrong but...) usable by ANYBODY who
> needs to compute maths... or learn maths.
>
> And, IMHO, that should be emphasised ! (how many people in the
> audience (not to speak of the jury member's)) have had a bad
> experiment in maths and would have loved to use such a software during
> their studies or work...

Agree. This boils down to calculus, so calculus ought to work really
well in SAGE.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Licensing issues (was: Re: pyx)

2007-11-25 Thread Ondrej Certik

Starting a new thread about licenses, so that those not interested
could skip that.

On Nov 25, 2007 11:53 PM,  <[EMAIL PROTECTED]> wrote:
>
> > If it is true that SAGE is legaly unable to include GPL v2 only and
> > GPL v3 only programs, not modifying them, not relicensing them, but
> > just
> > calling them from Python, then FSF did a terrible move, against the
> > free software and against the end users, which GPL is supposed to
> > protect.
> >
> > Ondrej
>
> Yes.  And disturbingly, they are wholly unapologetic about the entire ordeal, 
> and suggest that sign everything as "GPL v2 or later", ensuring that any v2+ 
> software is "locked" into v4, v5, etc., no matter what draconian changes are 
> made to the license.  And if you don't like it, you can rewrite your entire 
> project, from the ground up.  RMS is very much taking the path of every 
> "communist leader" who came before him (y'know, except without the shooting 
> people).

Yep. Communist leaders never shoot people themselves. But they impose
their idealism above what people really want/do/need/think and do not
hesitate to use force (activism) to do it. And that always have very
bad consequences, in reality doing the opposite than what they wanted
to achieve in the first place.

I strongly disagree with licensing my programs with something like "v2
or later, at *your* option". That's not a license. I want exact terms
and conditions under which my program can be used. So at the beginning
I was unsure about moving from GPL to BSD in SymPy, but now I am
convinced it was a very good move.

As to RMS - I think the idea behind GPL 2 is marvelous, because it
works, as shown empirically. But it only works when everyone is using
either GPL 2, or non copylefted licenses. By introducing GPL 3 it
stops working. I read on RMS's web page, that he is using the
gnewsense distribution, because Debian is not free enough, as one can
read in the FAQ here:

http://www.gnewsense.org/FAQ/FAQ

particularly: Neither Debian nor Ubuntu are fully free. Ubuntu
installs non-free software by default. Debian provides non-free
software through its repositories and includes non-free kernel
drivers.

The reason why Debian is keeping the non-free section is here:

http://www.debian.org/vote/2004/non_free_amendtment_rationale

and as to the non-free kernel drivers, that's basically that someone
needs to take it out of the kernel and because it sucks, Debian
decided to make an exception until Linus solves the problem upstream:

http://www.debian.org/vote/2006/vote_007

And now the funny thing - RMS doesn't use Debian because of the
"problems" above, but he has no problems with the GNU Documentation
license, which is not free according to Debian (it doesn't obey the
Debian Free Software Guidelines) and that's a real problem.

I also read some of his political texts, and you are right, that he
has a left wing thinking. He only wants to see some facts, but that's
a very bad way of making decisions in real life. One should ask: if I
do this (create GPL3), it will trigger these, these and these
consequences (artificially creating a barrier to combine some open
source programs, maybe protecting some open source programs more), and
if I do this (stick to GPL 2), it will have these, these and these
consequences. And then one should decide. But deciding only because of
some idealism, that's almost always a bad decision. Imho.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] patch for SymPy <--> SAGE conversion, please review

2007-11-25 Thread Ondrej Certik

Hi,

I fixed my bad patch, now it passes all tests in 2.8.14:

http://sagetrac.org/sage_trac/ticket/1189

the main patch (also linked from the ticket) in text form browsable over web:

http://sagetrac.org/sage_trac/attachment/ticket/1189/sympy2.patch

Could someone familiar with coerce.pyx review it please? It's actually
a very simple patch, but it could possibly cause troubles later
(mabshoff knows:).

Thanks a lot,
Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

On Nov 26, 2007 5:15 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Nov 25, 2007 6:33 PM, David Roe <[EMAIL PROTECTED]> wrote:
> > Addition not commuting there bothers me.  I can see why it's happening: a
> > SymPy object doesn't call into the coercion system.  One possible solution
> > is to have coercion map sage objects into sympy, so both s+o and o+s (in
> > line 134 and 135 of test_sympy.py) would be SymPy objects.  Is SymPy and the
> > SymbolicRing canonically isomorphic?  Can every SymbolicRing element be cast
> > into SymPy?
>
> I don't think so, since probably sage/maxima have special functions
> sympy doesn't.  And even if it could be, the functions provided by
> SymPy are different
> than the ones provided by SymbolicRing.
>
> If sympy('x') + x and x + sympy('x') are totally different in Sage I
> will be unhappy about
> that.Either the result has to always be in SymPy or always in Sage
> or we have to get
> an error and request that the user explicitly do a coercion.
>
> We have to decide on a canonical map in exactly one direction, and I prefer
>
> SymPy ---> SymbolicRing,
>
> just because SymbolicRing is more native in Sage, and probably could be 
> improved
> so it would support any SymPy expression (yes -- I know this isn't
> true now, unfortunately).

David Roe:

> I would prefer that direction too.  In order to make that happen, the SymPy
> __add__ function has to recognize a sage element and call its __add__ method
> instead.  This sounds like it should be doable.

I am not sure it's a clean solution. Ideally, neither SAGE nor SymPy
should know about each other - of course both of them need to
implement the
_sage_ and _sympy_ methods (that of course need to know about the
other), but that should be it. Then you could plug any other library
in SAGE, not just SymPy and it will work. If you look at the patch
above:

373 elif isinstance(x, sympy.Basic):
374 #elif hasattr(x, "_sage_"):
375 # if "x" implements the _sage_() method, let's use
it to convert
376 # the expression to a SAGE expression (for example
SymPy provides
377 # _sage_() methods, some other libraries can too)
378 #
379 # unfortunately, the hasattr() above doesn't work 
(infinite
380 # recursion), so we check for SymPy directly.
381 
382 return self(x._sage_())

It should work just by checking for the _sage_ method, not trying if
it is a SymPy object. Currently it doesn't, I get an infinite
recursion, so it's commented out (but I consider this a bug).

as to sympy('x') + SR(x) and SR(x) + sympy('x'):

it can be more complicated, like this:

SR(x) + SR(y) + sympy(x)  and sympy(x)+sympy(y)+SR(x)

so you propose, that whenever there is some SAGE expression inside the
sympy expression, the result should be a SAGE expression? That seems
reasonable, but how about this:

sympy.sin(SR(x))

should it be a SAGE expression? How about sympy functions that are not
in SAGE/Maxima? This assumes that anything in SymPy can be converted
to SAGE, but that's not true, for example the real spherical harmonics
(there only seem to be complex harmonics in Maxima [1]), lucas
numbers, harmonic numbers, dirichlet eta function and any other
function, that the user creates himself, see [2] how to do it - he
just provides a simple class and then it works inside the SymPy
calculus natively. So I think the user would like to accept SAGE
expression inside his class and use it (if sympy supports all the
functions that are in the SAGE expression). With the current
behaviour, this will be possible.

One option would be to leave the current behaviour but redefine
commutative operations in SymPy to return SAGE expression if possible,
but I don't think it's a very clean solution either. BTW, this can be
done for example by patching the SymPy classes on the fly, or by some
other technique, so definitely there are technical means how to do it.

So I think for now, we should just convert to that expression, that
started the statement. i.e sympy(x)+SR(x) will convert to sympy and
SR(x)+sympy(x) will convert to SAGE. The user can always use SR() and
sympify() to convert to SAGE/SymPy explicitely. So we start with the
current behavior, which is imho a progress from the old behavior, and
then improve it iteratively.

> Now that I read through #1189 patch, I'm uncomfortable with
>
>return _verify_canonical_coercion_c(x,y)
>
> The function _verify_canonical_coercion_c is supposed to be like
>
>assert(parent(x) is parent(y))
>
> it's *never* supposed to be called when the parents are different -- if it is,
> that means there is a bug.  However, you're using it to test whether the
> parents are different, and if so do some other behavior (i.e., eventually 
> raise
> a TypeError).   So that makes me nervous.  It would be bett

[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

> I want results of operations with sage objects to be sage objects.  This is
> the same as it is with python objects now:
> sage_int+python_int=python_int+sage_int=sage_int
> Very simply, this is because I'm a sage user not a sympy user.  I think that
> the sage SymbolicExpressionRing needs to have the extra functionality to
> properly wrap (i.e. in a sage-ish way) the sympy functionality.  If we want
> to use sympy as a back-end to implement these things (much like we do with
> maxima), that's great.  I realize that this is probably a longer term goal.
> If we need a sub-optimal fix along the journey to get there, that may be
> fine.

I agree with this, that working in SAGE should produce SAGE objects,
not sympy objects.
I am just thinking how to do it cleanly.

> Sorry Ondrej, I certainly don't mean this as a strike against sympy.  I think
> it's a great project and I want sage and sympy to co-exist.  However, one of
> the beautiful things about sage (to me at least) is the pristine consistent
> object hierarchy which neatly masks the many pieces behind it.  I don't want
> that compromised.
>
> (In reality, I think that sympy and sage should simply merge.  However, I
> don't know enough about sympy to know how feasible that is.  I put this in
> parenthesis, because I fear it's kind of a demeaning thing to say.  I don't
> mean it that way though.  It just feels like they are natural complements of
> each other.  The whole would be greater than the sum of it's parts.)

The problem with SAGE is that it is huge. And for many people it is
just too huge.
So finding ways to create SAGE more modular is the way to go imho. And
it will happen -
the notebook and maxima wrappers will eventually be released
separately. So I myself
definitely don't want to create something, so that users would need to
choose - either SAGE or
sympy. That would be very, very bad. But on the other hand, I want to
have a small library for calculus,
easy to use and easy to install and especially easy to extend. To give
you another application, right now we are discussing how to
do symbolic finite elements with sympy:

http://groups.google.com/group/sympy/browse_thread/thread/f73b00d1bdf0255a

using SAGE for it is not an option, as long as it is 150MB install.
However, the whole thing
can of course be included in SAGE.

And honestly, I don't think SAGE calculus can be based on sympy
anytime soon, it's just too slow. But I still
believe sympy is the way to go in the long term, otherwise I wouldn't
be doing it, right. :) So maxima should be
default in SAGE, while sympy being an option for people who want to
try it, if it works for them better than maxima.

BTW, I am still waiting for an answer to this:

http://groups.google.com/group/sage-devel/browse_thread/thread/2308561f175a0674/906f9b991c68de06?lnk=gst&q=sympy#906f9b991c68de06

the two examples at the end - those are things that I don't know how
to do easily in maxima.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

> Well, if I had to pick a nasty point to sage I would agree that it's huge-ness
> is seriously annoying.  The slow import of "sage.all" really kills the
> pleasure for writing python programs which you want to use from bash, but I

That's exactly how I want to write Python programs. And I am sure many
other users too.
And I think SAGE will eventually get there. The speed of import can be
cured, by importing
things on the fly, etc. etc.

> realize that I'm a bit unusual to actually use it that way.  I would love
> more modularity, but I'm not convinced it's possible.  I mean, this huge-ness
> is a wart in many ways, but quite frankly I've not seen any other mathematics
> package which I would look forward to using for a lifetime of mathematics (at
> all levels).  I say that statement for mathematica as well as OSS
> alternatives (just try writing a mathematica script to call from bash!).  I
> think the hugeness might just be an acceptable trade-off since making modular
> software is much more difficult to make enjoyable to use.

Agree.

> I am wondering though what kind of support for matrices and polynomials (for
> examples) you might envision with sympy.  I see that you currently have
> support listed for these things, but if it's pure python the sage equivalents
> are going to be much faster.  It seems that you could gain so much by sharing
> these goals with sage.

It has a huge advantage to have something lightweight in pure Python,
for many purposes.
And for many purposes, the speed is enough. For many purposes it
isn't. Because SAGE
has other good algorithms for polynomials, there's no point of using
the slow ones in sympy.
As to matrices, for pure numerics, one can use numpy, or some other
things that SAGE is using.
But for symbolic matrices - I think you can just use Maxima in SAGE.

As to gaining - it really depends on the application.

> On the flip side though, maxima is a gigantic ill-tempered beast to work with
> and we really need a symbolic alternative -- sympy seems just the thing.  I
> think sage's symbolic side should be strong enough that we really shouldn't
> have to break out the special polynomial declarations unless you are doing
> something very special purpose.  This might require a very very smart
> symbolic engine to detect when it is working with polynomials and use
> polynomial algorithms behind the scenes instead of more generic symbolic
> ones.  I think if we could pull that off, then even the number theorists
> might find themselves working with the symbolic expressions.  This would be a
> huge step towards mathematica level friendliness imo.

Agree.

Those are my goals and I think also of other developers of SAGE.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

On Nov 26, 2007 7:36 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 25, 2007, at 8:15 PM, William Stein wrote:
>
> > On Nov 25, 2007 6:33 PM, David Roe <[EMAIL PROTECTED]> wrote:
> >> Addition not commuting there bothers me.  I can see why it's
> >> happening: a
> >> SymPy object doesn't call into the coercion system.  One possible
> >> solution
> >> is to have coercion map sage objects into sympy, so both s+o and o
> >> +s (in
> >> line 134 and 135 of test_sympy.py) would be SymPy objects.  Is
> >> SymPy and the
> >> SymbolicRing canonically isomorphic?  Can every SymbolicRing
> >> element be cast
> >> into SymPy?
> >
> > I don't think so, since probably sage/maxima have special functions
> > sympy doesn't.  And even if it could be, the functions provided by
> > SymPy are different
> > than the ones provided by SymbolicRing.
> >
> > If sympy('x') + x and x + sympy('x') are totally different in Sage I
> > will be unhappy about
> > that.Either the result has to always be in SymPy or always in Sage
> > or we have to get
> > an error and request that the user explicitly do a coercion.
> >
> > We have to decide on a canonical map in exactly one direction, and
> > I prefer
> >
> > SymPy ---> SymbolicRing,
> >
> > just because SymbolicRing is more native in Sage, and probably
> > could be improved
> > so it would support any SymPy expression (yes -- I know this isn't
> > true now, unfortunately).
>
> If the canonical map goes this direction, then the __add__ method of
> SymPy objects needs to detect sage objects. I.e.
>
> if isinstance(other, SageObject):
>  return self._sage_() + other
> ...
>
> However, one cannot assume that SageObject is importable (nor does
> one want to try and import it at every step, though this is much
> faster than importing sage.all). I'm not sure the cleanest way to do
> it. Perhaps there could be a method is_SageObject(x) that, at first
> call, tries to import sage.structure.sage_object and on success
> returns isinstance(x, SageObject) and on failure returns False. The
> result of this import would be cached.
>
> Alternatively, the root SageObject type could have an attribute that
> one could look up to test its "sage-ness"
>
> > Now that I read through #1189 patch, I'm uncomfortable with
> >
> >return _verify_canonical_coercion_c(x,y)
> >
> > The function _verify_canonical_coercion_c is supposed to be like
> >
> >assert(parent(x) is parent(y))
> >
> > it's *never* supposed to be called when the parents are different
> > -- if it is,
> > that means there is a bug.  However, you're using it to test
> > whether the
> > parents are different, and if so do some other behavior (i.e.,
> > eventually raise
> > a TypeError).   So that makes me nervous.  It would be better to just
> > directly do a call to the have_same_parent function, like in the
> > implementation
> > of _verify_canonical_coercion_c in coerce.pxi.
> >
> > In summary, the way the code is written now will work fine now, but
> > seems
> > a little abusive.
>
> I think the code here should simply be
>
>  330 if PY_TYPE_CHECK(xp, type) or PY_TYPE_CHECK(yp,
> type):
> 331 if hasattr(x, "_sage_") and hasattr(y, "_sage_"):
> 332 return  canonical_coercion_c(x._sage_
> (),y._sage_())

That was my original patch, as seen here:

http://sagetrac.org/sage_trac/attachment/ticket/1189/sympy.patch

and it doesn't work, because sometimes SAGE puts "x=5" and
"y=something else" in, and expects to receive a TypeError, otherwise
it segfaults.

That's why the workaround.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

> I'm not seeing clearly what the problem is, could you please clarify
> some more. Thanks.

If you apply my first patch, you will get these segfaults:

sage -t  devel/sage-main/sage/schemes/generic/spec.py   sh: line
1:  2816 Segmentation fault
/home/ondrej/ext/sage-2.8.13-x86_64-Linux/local/bin/python
.doctest_spec.py >.doctest/out 2>.doctest/err

A mysterious error (perphaps a memory error?) occurred, which may have
crashed doctest.


The problem, as it turns out, is on the line 97 in spec.py:

sage: Spec(QQ) == 5
False

which goes into my patch, with x==Spec(QQ) and y==5, it pass all my
ifs, and then it segfaults. The workaround is to check that they have
the same parent, or just call _verify_canonical_coercion_c, that does
exactly that for me.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

>   $ sage -ipython
>   >>> import sage.all
>
> I've done this in the past several times and each time greatly sped things up.

We did it too several times already in SymPy.

> When I'm actually doing real work, research, teaching, etc. this
> hugeness is not a wart to me at least in any way at all.  It means that
> the resources are there to do what I want.  Instead of hunting around for,
> installing, building, learning new programs, I get work done.To quote
> Michael Stoll when he switched from lots of little tools to Magma 10 years
> ago: "it is very nice to have everything under one roof".  He cares about
> getting research done. Period.  And could care less about "unix philosophy".
> At the end of the day, I tend to agree.

It really depends what you want to do. From your prospective (research
mathematics), this is exactly what you need.
>From my prospective (using SAGE in my own programs), this isn't
exactly what I need, but fortnuately, this will improve,
when SAGE becomes more famous, and more people like Michael Abshoff
are going to join. I am looking forward to a time,
when I do in Debian:

$ apt-get install sage
$ python
Python 2.5.1 (r251:54863, Aug 17 2007, 00:51:07)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sage.all import *
>>> print x**2

And I could use anything that SAGE wraps. Everything under one hood. Period.

> > and we really need a symbolic alternative -- sympy seems just the thing.  I
> > think sage's symbolic side should be strong enough that we really shouldn't
> > have to break out the special polynomial declarations unless you are doing
> > something very special purpose.  This might require a very very smart
> > symbolic engine to detect when it is working with polynomials and use
> > polynomial algorithms behind the scenes instead of more generic symbolic
> > ones.  I think if we could pull that off, then even the number theorists
> > might find themselves working with the symbolic expressions.  This would be 
> > a
> > huge step towards mathematica level friendliness imo.
>
> You're right.  In fact I already work with symbolic expressions
> frequently, when it makes sense to do so.  :-)
>
> But personally my first priority is creating a viable alternative to
> the big systems, before
> trying to do some sort of open ended research system that's really
> hard to write.

Agree.

>
> It is wrong / abusive to call _verify_canonical_coercion_c because that
> function is never supposed to fail.  You should check that the parents
> are the same explicitly and if not pass through to the next case.

Agree. That's why I am proposing the fix here (at the end of the message):

http://groups.google.com/group/sage-devel/msg/752742fd202f6868

as opposed to Robert's proposal here:

http://groups.google.com/group/sage-devel/msg/d0aab9c309a3aa29

So if there are no more objections (Robert?) I'll implement my
proposal and the patch will be ready.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-26 Thread Ondrej Certik

> > $ apt-get install sage
> > $ python
> > Python 2.5.1 (r251:54863, Aug 17 2007, 00:51:07)
> > [GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> from sage.all import *
> > >>> print x**2
> >
> > And I could use anything that SAGE wraps. Everything under one hood. Period.
>
> Indeed!  This will be even better in the direction I like.  The key
> thing you (=Ondrej)
> want really is that it is all under *your* existing roof (i.e., Debian) too.

Yes, that's true that all I really care about is Debian on my
computers. But fortunately by the spirit of Debian,
if it works nicely in there, it's (usually) not a big problem to get
it work elsewhere, the same nicely.

> I did a sage -upgrade and am waiting for it to finish building...
> When that finishes I'm going to check out your segfault with Spec(QQ)
> == 5. (If it doesn't finish soon I'll be on my way to campus, but
> will get back to you tonight at the latest) This should not segfault,
> but if it does I think it is due to an error elsewhere. Also, I think
> we should only be callling _sage_ if one of the objects is not a
> SageObject, rather than if one of the objects is not an Element. The
> requirement would be that _sage_ MUST return an instance of
> SageObject to avoid infinite recursion.
>
> I still think _verify_canonical_coercion_c is the wrong thing to use
> here, there is no reason that x._sage_() and y._sage_() should have
> the same parent (e.g. one could be an element of SR, the other a sage
> Integer), and at this point we should be able to succeed even if they
> don't have the same parent by (re-)calling the Sage coercion model on
> the Sage elements.

Yes, I also think it's a bug somewhere else in SAGE. If you are able
to figure it out,
I am curious about it. Try my first patch, that will segfault. My
second patch passes fine.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: patch for SymPy <--> SAGE conversion, please review

2007-11-27 Thread Ondrej Certik

On Nov 27, 2007 5:44 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 26, 2007, at 8:23 PM, William Stein wrote:
>
> >>
> >> See
> >>
> >> http://sagetrac.org/sage_trac/attachment/ticket/1189/sympy-
> >> coerce.patch
> >>
> >> This on top of 2.8.14 + sympy.patch works great. (I wasn't able to
> >> cleanly apply sympy2.patch which looks like it had some useful non-
> >> coercion stuff in there as well.) I'm curious about your infinite
> >> recursion bug for looking up the _sage_ attribute...
> >
> > This is getting discussed to death but wouldn't it make more sense
> > to replace:
> >
> > if not PY_TYPE_CHECK(x, SageObject) or not PY_TYPE_CHECK(y,
> > SageObject):
> >   x = x._sage_()
> >   y = y._sage_()
> >   return self.canonical_coercion_c(x, y)
> >
> > by
> >
> > cdef bint tx = PY_TYPE_CHECK(x, SageObject)
> > cdef bint ty = PY_TYPE_CHECK(y, SageObject)
> >
> > if not tx or not ty:
> >  x = x if tx else x._sage_()
> >  y = y if ty else x._sage_()
> >  return self.canonical_coercion_c(x, y)
> >
> > Since otherwise you're very likely calling _sage_() on a sage
> > object (in your
> > version of the code).
>
> Yes, this would be a bit faster, and could even be optimized further
> knowing that exactly one of x and y is a non-sage object. However,
> for sage objects the _sage_ method is fairly fast (return self,
> though it is a python call), probably dwarfed by the other's _sage_
> method.

Thanks for your patch. So I'll implement the revised William's
version. I'll have a bier
once this "ondrej's #broken" get's accepted.

Ondra

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Breaking News: Trophees du Libre

2007-11-29 Thread Ondrej Certik

On Nov 29, 2007 8:41 PM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> Martin Albrecht wrote:
> >  we won!
> >
> > Cheers,
> > Martin

Congratulations!

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: vtk, tvtk and VPython lookalikes

2007-11-29 Thread Ondrej Certik

On Nov 29, 2007 6:34 PM, Jaap Spies <[EMAIL PROTECTED]> wrote:
>
> Today I installed vtk_meta-1.spkg.
>
> I'm searching for a replacement in SAGE for VPython (an amazing (teaching) 
> tool).
> http://www.vpython.org/
>
> Remembering a note on the VPython mailing list brought me here:
>
> http://www.aero.iitb.ac.in/~prabhu/Software
> https://svn.enthought.com/enthought/wiki/TVTK
>
> This looks very interesting.

It's currently pain to install, but with the help of Prabhu and Gael I
created Debian packages for those (traits, tvtk, mayavi2), you can get
them from:

http://debian.certik.cz/

just do "apt-get install mayavi2" and you get everything installed.


Or just download the sources and do it by hand on your distribution.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Trophees Du Libre 2007 Wrap-Up

2007-12-01 Thread Ondrej Certik

Thanks for the summary.

I think that the native Windows port is very important, many
scientists use windows, especially those not that much computer
oriented.

As to the Debian - I have a very strict opinion on this - I think if
some program (project) cannot enter Debian unstable, for whatever
reasons,
something is wrong with that project. But SAGE will get there, eventually. :)

The windows port is imho a priority.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] broken atlas packages on Debian

2007-12-03 Thread Ondrej Certik

Hi,

because SAGE uses atlas packages and because many people run SAGE on
Debian, the native atlas Debian package should work, but currently
it's broken, as Michael Abshoff knows very well.

So when Michael finds some time, please send this email to
"[EMAIL PROTECTED]":

Package: atlas3-base
Version: 3.6.0-20.6
Severity: normal

--- Please enter the report below this line. ---

Describe the problems with atlas packages here.

--- System information. ---
Architecture: i386
Kernel:   Linux 2.6.21-1-686

Debian Release: lenny/sid
  500 unstableftp.cz.debian.org

--- Package information. ---
Depends  (Version) | Installed
==-+-===
libc6 (>= 2.3.6-6) | 2.7-3
libg2c0 (>= 1:3.4.4-5) | 1:3.4.6-6
debconf  (>= 0.5)  | 1.5.17
 OR debconf-2.0|






Just describe all things that are broken. Then later we may append
more information, for example how to fix it.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Building Amayavi2, TVTK, etcetera

2007-12-03 Thread Ondrej Certik

> Let us for instance install mayavi_2.0.1b1, traits, tvtk, etcetera:
>
> $ sudo easy_install -f dist -H dist enthought.ma* enthought.t*
>

Nice job Jaap. Thanks for sharing the instructions.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Crunchy - Python in a browser

2007-12-06 Thread Ondrej Certik

Hi,

an interesting project to know about, related to SAGE notebook, is Crunchy:

http://code.google.com/p/crunchy/
http://crunchy.sourceforge.net/

especially watch the screencast in there:

http://showmedo.com/videos/video?name=143&fromSeriesID=143

I tried that half a year ago and it was quite impressive. Maybe you
can learn from Crunchy how to do some cool things in the browser.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Let's involve SAGE in the Google Highly Open Participation Contest

2007-12-06 Thread Ondrej Certik

Hi,

in case you don't know about the Google Highly Open Participation
Contest (GHOP), read this:

http://code.google.com/opensource/ghop/2007-8/

There are plenty of tasks in SAGE that could be handled by high school
students (any thoughts on that Timothy?).
The SAGE notebook has a lot of things to improve, the documentation
needs to be improved, etc. etc.

Unfortunately I am busy to involve SAGE in that myself, but I really
strongly suggest someone to do it. :)

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Crunchy - Python in a browser

2007-12-06 Thread Ondrej Certik

> I just tried downloading it, starting it by just immediately doing
> sage -python crunchy.py
> in the unzip directory, and it is an interactive Python tutorial.
> However, if you type something that results in an infinite loop
> into there i/o boxes you'll just freeze the whole server.   You can
> go back and edit inputs either.   You can use os.system(...)
> to execute arbitrary commands, so it's not at all a secure python
> shell or something...
>
> It reminds me of a much prettier version of the very first version
> of the notebook that we wrote and demoed at Digipen last year.

Yes, Crunchy is a playground, SAGE notebook is actually solving real
problems. I guess the same difference between pyrex and Cython.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Let's involve SAGE in the Google Highly Open Participation Contest

2007-12-06 Thread Ondrej Certik

> I'm not sure how Sage could participate, since it's not one of the
> list of software projects Google chose (Google chose what they
> viewed as the best of the Google Summer of Code projects).
>
> The only possible way I could think of for Sage to be involved would
> be to go here:
>
> 
> http://code.google.com/p/google-highly-open-participation-psf/issues/list?q=label:thirdparty
>
> then somehow add Sage projects, under the premise that they are
> somehow really "Python projects".   I don't know if just anybody can
> add projects or not.

Yes, I was meaning through Python projects. The tasks can be offered
on the mailinglist. At least we can try,
in the worst case they will refuse to accept it.

SAGE brought fair amount of people to Python, right? So I think it's
perfectly suitable for PSF.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Let's involve SAGE in the Google Highly Open Participation Contest

2007-12-06 Thread Ondrej Certik

>
> SAGE brought fair amount of people to Python, right? So I think it's
> perfectly suitable for PSF.


I forgot to mention that Crunchy is also involved in that, so SAGE
notebook can be too.

I mentioned SAGE notebook to Crunchy in May already.

http://groups.google.com/group/crunchy-discuss/browse_thread/thread/24d49061b5acb6ec/

So they must know about it. But SAGE is evolving very fast, so what I
wrote there is no longer true, now Crunchy seems slower than SAGE
notebook to me.

I think SAGE is bringing dozens of completely new people to Python
(and numpy and scipy), that wouldn't use it otherwise, especially on
windows imho. So I think SAGE is a Python project in a way.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] PDE toolbox

2007-12-07 Thread Ondrej Certik

Hi,

On Dec 7, 2007 6:50 AM, Joshua Kantor <[EMAIL PROTECTED]> wrote:
>
> I would be interested in helping with a PDE toolbox. I didn't want to
> work on it alone as I'm pretty sure I'd make some stupid design
> choices. It would be nice to start some work on PDE functionality in
> SAGE.

I would be very interested in this. Especially with finite elements
solver. SciPy has some solvers, but even producing the element
matrices would
be enough.

See also:

http://groups.google.com/group/sympy/browse_thread/thread/f73b00d1bdf0255a
http://groups.google.com/group/sympy/browse_thread/thread/6b8b4cbaa1914c45

and the project SymFe:

http://code.google.com/p/symfe/

Basically, the way the equation is defined just need SAGE.calculus.
But I would very much like this to be modular, so that we can use both
maxima and sympy as a backend, so that I can use this in my own
programs, because depending on the whole SAGE would be too much.

However, it's a huge task. There are many related projects, mainly:

http://www.fenics.org/wiki/FEniCS_Project
http://www.fenics.org/wiki/SyFi

But let's discuss at least the design. Let's use the same design as in:

http://www.mathworks.com/products/pde/

or is there a better product out there?

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] having authors names in .py files

2007-12-07 Thread Ondrej Certik

Hi,

currrently *.py files in SAGE usually contain names who wrote them.
The famous Karl Fogel's Producing  Open Source Software discourages
that:

http://producingoss.com/en/managing-volunteers.html#territoriality

mainly:

People sometimes argue in favor of author or maintainer tags in source
files on the grounds that this gives visible credit to those who have
done the most work there. There are two problems with this argument.
First, the tags inevitably raise the awkward question of how much work
one must do to get one's own name listed there too. Second, they
conflate the issue of credit with that of authority: having done work
in the past does not imply ownership of the area where the work was
done, but it's difficult if not impossible to avoid such an
implication when individual names are listed at the tops of source
files. In any case, credit information can already be obtained from
the version control logs and other out-of-band mechanisms like mailing
list archives, so no information is lost by banning it from the source
files themselves.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: having authors names in .py files

2007-12-07 Thread Ondrej Certik

On Dec 7, 2007 1:32 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> I am certainly happy to share credit with anyone on any file I work on.
> IMHO, anyone who does anything non-trivial has the write to put their
> name on a xyz.py file, at least if they are happy to cede their copyright to
> William Stein. In fact, for licensing issues, I would think it is useful to 
> know
> who worked on which files.
> If the concern is that it is hogging docstring real estate, then maybe
> a new xyz.history file could be created which would have all this info in it?

I think the idea of the OSS book (and also mine) is to use the
Mercurial revision history for tracking who wrote each line.
It's the psychology, for example when I modified the calculus.py, by
adding a new function and a few lines, I don't feel I should add
myself at the top of the file. When another 15 people like me are
going to modify calculus.py, the authors will be quite misleading. The
Mercurial nevertheless provides exact history who wrote what.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: PDE toolbox

2007-12-08 Thread Ondrej Certik

> For variational problems, I've already written code in Maple to derive
> the element matrices. I presented a paper on in at the Maple 2005
> Conference. Unfortunately, I've been having a difficult time translating
> some of the things I did from Maple to Sage. It was only for 1D problems
> (since that was all I needed), but it is modular enough to extend
> to others. The code derives the mass and stiffness matrices and then
> outputs them as MATLAB functions. I wrote the code because I needed
> something that can handle rotating flexible beams.

Is your matlab code available? Where did you have problems translating
it to Python?

> I know about both of these, but I had never heard of the symfe work.
> Interesting, since my Maple toolbox is called SFEM.

That's because we started symfe a week ago. :) Just experimenting.

> There is also a package for Maple called femLego:
>
> http://www.mech.kth.se/~gustava/femLego/
>
> It's design is about solving the PDE once it has been derived. It
> uses Maple to write Fortran code, and compiles it with its own code.
> I nearly ended up using this, but see below.
>
> > But let's discuss at least the design. Let's use the same design as
> > in:
> >
> > http://www.mathworks.com/products/pde/
>
> There are some problems with its design. It is basically an early
> version

Are you talking about the femLego, or pde from mathworks?

> of FEMLAB, and it puts its focus strictly on solving PDEs once the
> formulation of the PDE has already been done. If a Ritz approach is
> used,
> the formulation of the PDE is never explicitly done and this design
> can't
> handle it. Plus, for systems with multiple coupled variables, the
> Galerkin
> approach becomes very complicated. I know because my SFEM package was
> originally an attempt to derive the weak form for use in FEMLAB.

Where is the SFEM package? Is it this:

http://people.civil.gla.ac.uk/~bordas/sfem.html

?

> > or is there a better product out there?
> >
> > Ondrej
>
> The difficulty is that most products seem to be trying to replace the
> major
> FE packages, but even those who do symbolic work, don't put any focus on
> the derivation. If one is going to use the weak formulation, this can be
> difficult.

I don't understand what you mean by "the derivation" - like taking the
differential equation and constructing the corresponding integral
(variational) formulation?

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: having authors names in .py files

2007-12-08 Thread Ondrej Certik

On Dec 8, 2007 10:34 AM, Martin Albrecht <[EMAIL PROTECTED]> wrote:
>
> > Recall: we are not the borg. We all have names. What is the real
> > objective here? I'd like to help develop the best math software in the
> > world, and get credit for it. In the kind of job market many of us
> > face, this is what differentiates different people vying for the same
> > job. Ownership and credit are very different things. Tell me this- why
> > are we so worried about owning something that is free, that anyone can
> > change and distribute, and whose goal is to be available to everyone?
>
> Hi,
>
> I don't think Ondrej's suggestion was to remove attribution it was more to
> change the technique how to write it down, wasn't it? My initial consent was
> based on the impression that the current attribution scheme doesn't always
> give credit because people forget to add themselves.

Yep, exactly this. It's not about forgeting. When making a small
change, people don't add them deliberately, because they feel they
didn't do enough (which they didn't imho). But if a file was originaly
written by one or two authors, but then completely refactored by 15
different authors, so that later the file doesn't really resemble the
original one, do the original authors deserve to be on top of the
file? I think it's a fair question to ask.

There is no doubt credit needs to be given. Also noone will remove
authors field from files without permission of the author, at least I
would consider this to be very impolite.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: PDE toolbox

2007-12-08 Thread Ondrej Certik

> My MATLAB code isn't available at the moment. It shouldn't be a
> problem translating it to Python. The problem is translating the Maple
> code that derives the element matrices to Sage. I'm not exactly thrilled
> with the design of the MATLAB code, but it works for my problems. I'd
> probably make it object-oriented when converting it to Python.

And which exact symbolic features are still missing in Sage, if any? I
mean, was the problem just that python is
different than Matlab, or just because something in Sage should be improved?

> What I mean by the derivation is the steps to get the finite element
> approximation. There are two basic approaches to this.
>
> 1. Galerkin method - Convert the PDE to the weak form.
>
> 2. Ritz method - Requires a variational statement for the underlying
> physical problem (e.g., Hamilton's Principle). The PDE is never
> explicitly
> formed since the FE approximation is used directly in the variational
> statement.
>
> The Ritz method is less general, since you need an underlying
> variational
> principle, but it is easier to handle coupled equations. Getting the
> weak form of the equations is difficult if the equations are coupled.
> None of the introductory FE textbooks that I've seen covers it. Examples
> always seem to use only one variable or multiple decoupled variables.
>
> For my problems, the Ritz method is applicable so I use it.
> Unfortunately,
> most packages assume you use Galerkin. In addition, they assume you
> already
> have the weak equations and like I've stated, getting them can be
> challenging.
> So, given that this is part of a symbolic package, there should be some
> support for that.

I got it now. Yes, I only need the Galerkin method. I have the
equation, I have the weak form. Now I want to solve it, on a general
geometry with general boundary conditions. I use libmesh for that:

http://libmesh.sourceforge.net/

it's a very good FEM library. But still maybe it could be done
simpler, using the SyFi approach or similar.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: having authors names in .py files

2007-12-07 Thread Ondrej Certik

> > Again I strongly disagree with removing all the AUTHOR: blocks from
> > the Sage docstrings.  I think doing this would
> >(1) stupidly ignore a huge amount of what makes Sage work,
> >(2) removes a valuable mechanism for getting a quick sense of
> > who the main people are who consider themselves serious contributors
> > to a file or function,
> >(3) raises the barrier to *giving* people credit for their work.
> >(4) completely goes contrary to the tradition in mathematics, where
> > credit is everything -- which
> > is why most mathematical objects are named after people (e.g.,
> > Bernoulli numbers, Tate curves,
> > etc.).  When some random mathematician, say, types
> > sage: bernoulli_mod_p?
> > I get
> >...
> > AUTHOR:
> > -- David Harvey (2006-08-06)
> >This tells me something very useful immediately - that there's a
> > real specific
> > person behind this code, maybe somebody I'll see at a conference soon and
> > thank for their function, ask further questions about it, etc. etc.
> > If as a random
> > mathematician I had to rely on clicking around with Mercurial to get info 
> > like
> > that it would never happen, and I probably wouldn't trust what I see 
> > anyways.
> >
>
> I agree!

I think I don't agree with this, but it's true that I am not doing
mathematics. I think if someone devises something new, some new
algorithm, or something, it's fine to put his name on it, but if it's
just a code, I see it just as a code, nothing more. Clearly there are
successful projects, like apache, that use this strategy (see that
link I posted in my first email), so I don't think those people are
stupid. I think both ways can work, so I just wanted to discuss this.
I myself don't list my name in any functions or files I do, nor in
SymPy or other projects. Mainly because I believe it's a work of many
people and it's not fair to list just some. But anyway, I just wanted
to know what you think about it.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: SAGE made it to SlashDot

2007-12-08 Thread Ondrej Certik
On Dec 8, 2007 4:13 PM, Ismail Dönmez <[EMAIL PROTECTED]> wrote:
>
> http://science.slashdot.org/article.pl?sid=07/12/08/1350258 wow! :)

Ah, that's why http://sagemath.org/ is down. :)

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: PDE toolbox

2007-12-08 Thread Ondrej Certik

> EulerLagrange := proc(Lagrangian::anything, variables::list)
> local num_list, qv_name, vel_var, qv_subs, qv_unsubs, Lagrange_subs1,
> Lagrange_subs2, dL_dqv1, dL_dqv2, dL_dqv, dL_dqvt, dL_dq, dL_dq1,
> dL_dq2, dL_dq3, q_name, q_subs, q_unsubs:
> # create a list of indices from 1 to the number of variables
> # used in the formulation
> num_list := [seq(i,i=1..nops(variables))]:
>
> # Define a list of generalized velocity and position variables
> qv_name := map2(cat,qv,num_list):
> q_name := map2(cat,q,num_list):
>
> # Equate the time derivatives of the system variable to the
> # generalized velocities and also define the reverse mapping
> vel_var := map(diff,variables,t):
> qv_subs := zip(equate,vel_var,qv_name):
> qv_unsubs := zip(equate,qv_name,vel_var):
>
> # Equate the generalized positions to the system variables
> # and define the reverse mapping
> q_subs := zip(equate,variables,q_name):
> q_unsubs := zip(equate,q_name,variables):
>
> # Convert the Lagrangian to the generalized position and velocity
> variables
> Lagrange_subs1 := subs(qv_subs,Lagrangian):
> Lagrange_subs2 := subs(q_subs,Lagrange_subs1):
>
> # Differentiate the Lagrangian with respect to the
> # generalized velocities and positions
> dL_dqv1 := map2(diff,Lagrange_subs2,qv_name):
> dL_dq1 := map2(diff,Lagrange_subs2,q_name):
>
> # Revert back to the system variables
> dL_dq2 := map2(subs,qv_unsubs,dL_dq1):
> dL_dqv2 := map2(subs,qv_unsubs,dL_dqv1):
> dL_dqv := map2(subs,q_unsubs,dL_dqv2):
> dL_dq := map2(subs,q_unsubs,dL_dq2):
> dL_dqvt := map(diff,dL_dqv,t):
>
> # Return the two components of the Euler-Lagrange Equation
> return (dL_dqvt, dL_dq):
> end proc:
>
> The equate function used in zip is defined as:
> equate := (x,y)->x=y:
>
> I used it over `=` because it is slightly faster since Maple doesn't
> have
> to convert equate to a function.
>
> I'm happy to work with someone to convert things over to Sage, but I
> can't
> seem to find a number of things I'm used to in Maple.

Awesome, nice application. Could you please post here some examples of
usage? Correct input and output, for three or four cases, so that I
can easily see what exactly the input and output should look like.

I'll then think how to port this to Sage. Note: I'll be on mountains
the next week, so I might do it later.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Let's involve SAGE in the Google Highly Open Participation Contest

2007-12-08 Thread Ondrej Certik

On Dec 8, 2007 6:57 AM, Ted Kosan <[EMAIL PROTECTED]> wrote:
>
> Timothy wrote:
>
> > Just 8/9 minutes after sending my letter to Python GHOP two mentors
> > wrote back that they would love to have Sage tickets. In fact Titus
> > Brown says he has heard good things about Sage.
> >
> > http://groups.google.com/group/ghop-python/browse_thread/thread/247ff27b799d4c39
>
> Wow, that was quick!  It looks like your 11 hour investment of time paid off 
> :-)
>
> I will try to send you some tickets this weekend which are related to
> adding problem solving examples to the Newbies book.

Great job Timothy. GHOP is something that Sage shouldn't miss, this
will create publicity and also bring new people to it.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: blog and rss

2007-12-08 Thread Ondrej Certik

Yes, I was just going to say the same thing. planet.sagemath.org is
the way to go. Besides developers blogs, there can also be an official
blog (with several core sage developers having a write access to),
where official things will be announced.

Its true, that writing a blog requires time, but it's worthy and necessary.

Ondrej

On 12/9/07, alex clemesha <[EMAIL PROTECTED]> wrote:
> On Dec 8, 2007 8:09 PM, Yi Qiang <[EMAIL PROTECTED]> wrote:
>
> >
> > Actually, depending on how many SAGE developers blog at all, we should
> > consider a planet.sagemath.org style blog.  The idea is the planet.*
> > is an aggregator of blogs it subscribes to and publishes blogs with
> > specific tags.  For example, planet.sagemath.org would subscribe to
> > Mike Hanson, Martin Albrecht, and Ondrej Certik's blog. Each time
> > those people post something to their own blogs with the 'sage' tag, it
> > will show up on planet.sagemath.org.  Many open source communities use
> > this. See the urls below for examples.
> >
> > The software that makes it happen is called PlanetPlanet
> > (http://www.planetplanet.org/)
> >
> > Some projects that use this include:
> >
> >* Planet GNOME (planet.gnome.org)
> >* Planet Debian (planet.debian.org)
> >* Planet Twisted (planet.twistedmatrix.org)
> >
> > etc..You can see a more complete list at planetplanet.org.
>
>
> Hey Yi, that's a really good idea.
>
> Even Python has their own planet:
>
> planet.python.org
>
> and on the side bar of that page there is a link to
> a bunch more planets ... basically there's a lot of gravity to this idea ;)
>
> Alex
>
>
> >
> >
> > On Dec 8, 2007 7:05 PM, William Stein <[EMAIL PROTECTED]> wrote:
> > >
> > > On Dec 8, 2007 7:03 PM, Bobby Moretti <[EMAIL PROTECTED]> wrote:
> > > >
> > > > At the very least, I think it would be a good idea to use a content
> > > > management system for the website.
> > >
> > > That's a really good idea.  Mike Hansen has been getting really
> > > into Django lately, so maybe he can help with that.  Using Django
> > > would probably make a lot of sense.
> > >
> > > > The front page could be blog-like, containing mostly news, updates,
> > > > info, and releases.
> > >
> > > Yep.
> > >
> > > > Then if someone has a personal blog entry that says something
> > > > interesting about Sage, we can just link to it from the front page as
> > > > a news story. This way everything would be archived, etc.
> > >
> > > I like this idea.
> > >
> > > William
> > >
> > >
> > > >
> > > > On Dec 8, 2007 6:59 PM, didier deshommes <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > 2007/12/8, William Stein <[EMAIL PROTECTED]>:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > My brother suggests that a "Sage blog" be somehow created (see
> > below).  It's
> > > > > > a good idea.  Any ideas about what this might entail?   Weekly
> > developer
> > > > > > summaries?  A "cool trick"?  Little articles?  Etc.   I have never
> > blogged
> > > > >
> > > > > +1
> > > > > This could also be good to announce new versions, improvements,
> > papers
> > > > > written in Sage, etc. Developers blogging about Sage could be fun:
> > it
> > > > > would expose how some other parts of the Sage code works (this would
> > > > > also help Bus Days). For example, when I wrote QDRF, I blogged about
> > > > > what one would need to do in order to implement (floating-point)
> > > > > fields in Sage since I had learned a great deal about this part of
> > the
> > > > > code.
> > > > >
> > > > > Of course, the thing with blogging is time :) . If you're blogging,
> > > > > you're not writing code and sometimes you just can't afford that ;).
> > > > >
> > > > > didier
> > > > >
> > > > >
> > > > > > at all, but I know some of you (e.g., Martin Albrecht and Ondrej
> > Certik)
> > > > > > are old pros at blogging.  Thoughts?
> > > > > >
> > > > > >
> > > > > > -- Forwarded message --
> > > > &

[sage-devel] Re: Fwd: blog and rss

2007-12-10 Thread Ondrej Certik

On Dec 9, 2007 10:26 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi bobby, What didier said is right.
> I know that blogs based on wordpress allow this - I don't have much
> experience in other platform to tell about them (but my guess is - it
> will be possible).

Yes, I use it regularly on my own blog - entries that I want to get
into planet.debian.org I just mark with "debian", so for
planet.sagemath.org I'd mark them with "sage" and that's it. Only
those will be visible for the respective planet.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: tgdaily: "It is for this reason I don't really see much validity in Stein's first point."

2007-12-10 Thread Ondrej Certik

> As one advances through graduate school and beyond, computers become an
> indispensable part and parcel of learning and research. Undergraduate
> students are taught the theory of the subject "by doing everything
> long-hand" and the computer is often not used as a tool to further
> learning. It appears that the author's opinion is purely based on his
> experience as an undergraduate student and should be discounted for being
> ill-formed.

Disclaimer: I am not a mathematician, I am only a theoretical physics
graduate student.

I think the author is actually right about this. I always found this
argument about "seeing inside the code to beleive a mathematical
proof" weak.

For me, the major point about Sage is:

  * open source (free) alternative to Mathematica/Maple/Matlab
  * you can implement you own favourite thing that you need (be it
number theory, or some other things, or something in calculus, or
whatever) and Sage will include it, if it works and it's useful
  * done be people, who now how to run opensource projects - release
early, release often, easy to install, easy to run, discussions in
public, etc. etc.

I don't like the whole tone of the article though. Maybe Sage is
complex, but it's best as it could be and especially better than
anything else out there (opensource). So either we can do nothing and
continue using non-free Mathematica, or we can actually try something.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: tgdaily: "It is for this reason I don't really see much validity in Stein's first point."

2007-12-10 Thread Ondrej Certik

On Dec 10, 2007 8:37 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> > As one advances through graduate school and beyond, computers become an
> > indispensable part and parcel of learning and research. Undergraduate
> > students are taught the theory of the subject "by doing everything
> > long-hand" and the computer is often not used as a tool to further
> > learning. It appears that the author's opinion is purely based on his
> > experience as an undergraduate student and should be discounted for being
> > ill-formed.
>
> Disclaimer: I am not a mathematician, I am only a theoretical physics
> graduate student.
>
> I think the author is actually right about this. I always found this
> argument about "seeing inside the code to beleive a mathematical
> proof" weak.

Maybe I should elaborate on this one: of course you need the source
code to do some serious calculation, or mathematical proof. But even
if Mathematica released all relevant source code needed to
understand/fix the calculation, I don't really care. It's the open
source (free) thing, that is important to me.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: SAGE

2007-12-10 Thread Ondrej Certik

> -1
>
> Thanks for your perspective.  However, I tend to disagree.
>
> The whole Sage development model is built on cooperation
> and to a huge extent that means trusting other people to help out,
> deciding on what people are good at and encouraging them
> to do just that, etc.   When somebody
> comes to me and wants to contribute to Sage my top priority
> is to understand precisely what they love and are good at,
> instead of preaching to them about how everything is going
> to be their job.Here's a verbatim log from an irc session 2 hours ago
> to illustrate exactly:


Yes, that's true. But Tim point was that the opensource project, if it
wants to be successful, needs to do "boring" stuff, like releases,
documentation, easy to install, easy to run, etc. etc., otherwise, it
will die (am I correct Tim?). But I don't think printing CD belongs to
this cathegory these days with internet. And Sage is doing the other
things really, really well.

> Look left. Look right. Ask the net. See any volunteers? No?
> Then the task is on your desk.

> Is it important for the project? No? Ignore it. Yes? Do it.

> It's ALL your job.

I think I agree with this - but as I said, printing CD's belongs to "No".

I think opensource project, if it wants to be successful, must do
things exactly as William has said. On the other hand, I think the
project also need people very motivated for the project to succeed
(and Sage has many imho). If there are still important jobs to be done
and no volunteer wants to do it, well, then some motivated people
behing Sage need to do it. But I am really not worried about this
aspect, what I saw on Sage Days 6, Sage is in good hands and so it
will imho succeed.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: blog and rss

2007-12-10 Thread Ondrej Certik

On Dec 10, 2007 8:07 PM, Bobby Moretti <[EMAIL PROTECTED]> wrote:
>
> Very cool. Now I just need to find time to blog! :)

And that's exactly the point of the planet, you don't have to find
time to blog regularly. If there are enough people on it, and if the
atmosphere is that they mark by "sage" only post about Sage and not
some stupid things, then planet always contains some interesting info,
and it's really cool to read it as a user.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: tgdaily: "It is for this reason I don't really see much validity in Stein's first point."

2007-12-10 Thread Ondrej Certik

> It is an argument that is *only* for research pure mathematicians.  For
> them it actually is _very_ important.  For everybody else the whole
> idea of mathematical proof is somewhat irrelevant, and that's fine
> with me (I understand it -- I do both pure and applied math, and
> enjoy both and see them as separate complementary pursuits).

Agree. It depends what Sage wants to be. If only for pure
mathematicians (as it started imho), then it's fine.
If for everyone, maybe that point could be reformulated, something like

If you are a pure mathematician, you will especially enjoy that with
Sage you can finally do your proofs in the computer and see inside the
calculation.

(you can write it better)

I think the main point is, that even though your own research is
mostly in pure math, that's why you need Sage primarily (am I right?),
Sage is done in a way, so that other people, needing it for their
stuff, completely unrelated to pure math, can just implement it and
feel that Sage solves their problems (and don't care about pure math).

That's what I like on opensource, that if it does 95% things for me, I
can just fix those 5% (maybe the original authors are not at all
interested in my 5%), but if they accept the patch, then I feel the
program is "mine" (in fact it is, it's like if I wrote it all by
myself and used the same licenses as Sage, except that someone else
has spared me 10 years of work). I don't have this feeling with any
non-free program.

> calculations done by MATLAB through independent means. However,
> if I had access to the source code, I might have been able to
> correct the problems.

As I wrote in my second email, the source code is important, but not
the main point behind Sage. But open source is the main point. (even
if Matlab gave you all the sources under the terms, that you can look
into it, maybe you can even compile it, but if you show them to anyone
else, we will put you in jail, that's not what I want)

Ondrej

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: SAGE

2007-12-10 Thread Ondrej Certik

> Re-reading Tim's post I think you're right, and that I misunderstood
> what Tim was writing.  I certainly agree that it's important to do the
> "boring" stuff, though I think the best strategy is to find people for whom
> the boring things are NOT boring, e.g., you cite doing releases as
> boring, but I assure you certain people -- e.g., Michael Abshoff --
> find them to be extremely exciting "I was born to do releases", he
> said in irc yesterday; and documentation, that may be boring to
> you, but David Joyner passionately loves writing good documentation,
> and I've seen other people, e.g., Emily Kirkman put quite a bit of
> passion into creating various nice docs for Sage.

Yep, I've never seen anyone like Michael Abshoff before, he is a real guru
and a huge help for Sage. Sage managed to attract really cool and very
different sorts of people, even retired ones. :) That's what I like
about Sage too.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: blog and rss

2007-12-10 Thread Ondrej Certik

On Dec 10, 2007 9:53 PM, Bobby Moretti <[EMAIL PROTECTED]> wrote:
>
> I think there are two steps:
>
> 1) start a blog - wordpress is frickin' easy to set up. For that, you'd go to
>
> http://wordpress.org/download/
>
> - grab the software, untar, set up apache to serve the directory (so
> perhaps you would want something like http://wstein.org/blog)
>
> - pt-get install mysql and php.
>
> - follow the instructions here:
> http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install

Either that, or I just go to:

http://www.blogger.com

and setup your blog in there in two minutes. Generally it's maybe
better to manage everything on you own, but sometimes I am just too
lazy, so I use gmail and I use blogger (which uses google's accounts
and like any other google service, it's easy to work with and it just
works).

>
> 2) set up planet.sagemath.org
>
> - I'm not so knowledgeable about this one, but the instructions look
> pretty straightforward, and it's written in python.

This will need some setup, I cannot do it now, I have a slow internet
connection now for a week. But I suggest you William to create a blog
(either way), and put in there the things. Then when we setup the
planet, it will end up there. Is anyone willing to setup the
planetplanet?

http://www.planetplanet.org/

I've never done it, but it should be easy to setup - probably it
should run on sage.math?

And yes, those things you want to write about are exactly things that
should go there. I am myself interested.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] pyglet for 3D graphics

2007-12-10 Thread Ondrej Certik

Hi,

just letting you know about one great project -- pyglet:

http://pyglet.org/

we use it for 3D graphics in SymPy, it is a pure python library, that
uses ctypes for binding to directx on win, opengl on linux and
something in mac os x. I am not an expert in 3D,
I just need something that just works and pyglet is it.

Some examples:

http://code.google.com/p/sympy/wiki/PlottingModule

and you can find a lot of examples on the pyglet webpage.

I am not sure it can be useful for Sage, since Sage is using the
notebook (mostly), but still it's a nice thing that one can finally
(after so many years) just write a simple Python program
and it can do 3D things (fast) on all platforms and all in pure Python.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Fwd: SAGE

2007-12-10 Thread Ondrej Certik

On Dec 10, 2007 11:19 PM, root <[EMAIL PROTECTED]> wrote:
>
> >Re-reading Tim's post I think you're right, and that I misunderstood
> >what Tim was writing.  I certainly agree that it's important to do the
> >"boring" stuff, though I think the best strategy is to find people for whom
> >the boring things are NOT boring, e.g., you cite doing releases as
> >boring, but I assure you certain people -- e.g., Michael Abshoff --
> >find them to be extremely exciting "I was born to do releases", he
> >said in irc yesterday; and documentation, that may be boring to
> >you, but David Joyner passionately loves writing good documentation,
> >and I've seen other people, e.g., Emily Kirkman put quite a bit of
> >passion into creating various nice docs for Sage.
>
> Ah, documentation. Axiom has the "30 year horizon" view and one of
> the critical points is that the mathematics needs to be documented
> (literate programs, ala Knuth is our choice). I see a lot of python
> code that I can reach with
>   foo??
> but it seems to have 2 flaws. The first is that I don't see any
> documentation of the mathematics or the algorithms except for the code
> (THIS is computational mathematics?). The second is that a lot of the
> code I've looked at is simply cover functions for other, undocumented
> code (e.g. set up the parms and call pari).
>
> Coming back to my original point, the mathematicians don't feel it
> is THEIR job to document their mathematics or their code. If you're
> lucky (and it is poor luck anyway) you might find a reference to a
> published paper. However, the paper does not describe the implementation,
> it is likely published in a pay-per-use publication, and it has the
> copyright tied up so nobody can use it to document the code. The
> academic mathematician, having gotten his "publish", gives the code
> away. Many years later nobody has a clue why it works or doesn't work.
> How can we expect to maintain and extend such code in 30 years?
>
> We need to raise the level of quality for computational mathematics
> so that we EXPECT a computational mathematician to fully document the
> mathematics and the source code. We need to create the expectation
> that the documentation IS part of the JOB. This isn't a job "for
> somebody else". And it is critical to the long term success of the
> project.
>
> And we won't even mention regression test cases, identifying boundary
> conditions, estimating the time and space complexity, or any of the
> other primary tasks of computational mathematics.
>
> If the mathematics isn't documented then the job falls on your desk.
> Good luck with that.
>
> Tim

speaking for myself only:

I think Sage is documented as best as it could - but of course
doctests should be improved and more documentation written. But as to
literate programming, it's a social thing - if people don't want to
use that (for whatever reason), one should be very, very careful when
imposing it. I think it's essential that people feel motivated to work
on Sage, and I think they are.

Also, one should imho learn from very successful projects, like the
kernel of linux. I love Linus quotes:

http://en.wikiquote.org/wiki/Linus_Torvalds

My favourite is:

Talk is cheap, show me the code.

But the one that applies to the sittuation you are writing about is this:

Nobody should start to undertake a large project. You start with a
small _trivial_ project, and you should never expect it to get large.
If you do, you'll just overdesign and generally think it is more
important than it likely is at that stage. Or worse, you might be
scared away by the sheer size of the work you envision. So start
small, and think about the details. Don't think about some big picture
and fancy design. If it doesn't solve some fairly immediate need, it's
almost certainly over-designed. And don't expect people to jump in and
help you. That's not how these things work. You need to get something
half-way _useful_ first, and then others will say "hey, that _almost_
works for me", and they'll get involved in the project.


Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-10 Thread Ondrej Certik

On Dec 10, 2007 11:03 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> On Dec 10, 2007 4:58 PM, William Stein <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 10, 2007 1:39 PM, David Joyner <[EMAIL PROTECTED]> wrote:
> > >
> > > The plots look really nice. Thanks for posting this.
> > > Since pyglet depends on it, I'm curious what people think of opengl.
> >
> > Try this in Sage right now.  It might work for you.
> >
> > (1) From the command line, type
> >
> > sage -sh
> >
> > (2) Type
> >
> >bash$pythonw
>
>
> "pythonw" gave "command not found". If you meant "python", I got a
> segfault:
>
>
> [EMAIL PROTECTED]:/mnt/drive_hda1/sagefiles/sage-2.8.13.alpha1$ python
> Python 2.5.1 (r251:54863, Nov 26 2007, 13:44:20)
> [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from sympy import symbols, Plot
> >>> x,y,z = symbols('xyz')
> >>> Plot(x*y**3-y*x**3)
> [0]: x*y**3 - y*x**3, 'mode=cartesian'
> >>> Window initialization failed: No conforming visual exists
> Segmentation fault (core dumped)

It needs fixing to work from Sage notebook, there is some pythonw
exception, but I have no idea what pythonw is. As to the segfault, it
is probably a bug in pyglet, I just updated to the newest one and
released sympy with that a few days ago. But ubuntu should work out of
the box (if you are using ubuntu).

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-10 Thread Ondrej Certik

Yep. As I said, either use a newer version of sympy, or install pyglet
directly. I don't want to upgrade sympy in sage yet, until my patch
gets accepted, so that no more problems are introduced. But I'll look
why pyglet isn't working from the notebook. As to opengl, I am not
sure it works out of the box on windows and mac os x. Pyglet does.
Ondrej

On 12/11/07, Carl Witty <[EMAIL PROTECTED]> wrote:
>
> > > On Dec 10, 2:03 pm, "David Joyner" <[EMAIL PROTECTED]> wrote:
> > > > [EMAIL PROTECTED]:/mnt/drive_hda1/sagefiles/sage-2.8.13.alpha1$ python
> > > > Python 2.5.1 (r251:54863, Nov 26 2007, 13:44:20)
> > > > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> > > > Type "help", "copyright", "credits" or "license" for more
> information.>>> from sympy import symbols, Plot
> > > > >>> x,y,z = symbols('xyz')
> > > > >>> Plot(x*y**3-y*x**3)
> >
> > > > [0]: x*y**3 - y*x**3, 'mode=cartesian'>>> Window initialization
> failed: No conforming visual exists
> >
> > > > Segmentation fault (core dumped)
> >
> > > > This is on an ubuntu 64 bit machine.
>
> OK, this is a bug in the version of pyglet shipped with SymPy
> (apparently 1.0 alpha 2).  It's fixed in the latest version of pyglet,
> 1.0 beta 3.
>
> Carl Witty
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 9:26 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> This seems to be similar to SDL (which has a python wrapper: pygame).
> I am worried about yet another "multimedia framework". We should have
> less of those instead of more.

I think you can just do 2D things easily in pygame. Pyglet is for both
2D and 3D things. It's a pure python, no difficult compilation of
modules. Also I think more choices are better rather than less
choices.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 5:20 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> On Dec 11, 2007 9:26 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > This seems to be similar to SDL (which has a python wrapper: pygame).
> > I am worried about yet another "multimedia framework". We should have
> > less of those instead of more.
>
> I think you can just do 2D things easily in pygame. Pyglet is for both
> 2D and 3D things. It's a pure python, no difficult compilation of
> modules. Also I think more choices are better rather than less
> choices.

See also this post why pyglet is better than pygame:

http://aroberge.blogspot.com/2007/08/pyglet-and-pygame-which-one.html

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] syntax for .subs(t=1) vs .subs(t, 1)

2007-12-11 Thread Ondrej Certik

Hi,

there is an inconsistency problem with subs:

sage: e = x**2 + 1
sage: e
x^2 + 1
sage: e.subs(x= x**2)
x^4 + 1
sage: e.subs(x**2= x)

   File "", line 1
: keyword can't be an expression
(, line 1)

sage: e.subs(x**2, x)
---
 Traceback (most recent call last)

/home/ondra/ext/sage-2.8.13-i686-Linux/ in ()

/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/calculus/calculus.py
in subs(self, *args, **kwds)
   2506
   2507 def subs(self, *args, **kwds):
-> 2508 return self.substitute(*args, **kwds)
   2509
   2510 def _recursive_sub(self, kwds):

: substitute() takes at most 2 arguments (3 given)


Clearly, there is no way how to substitute for x**2 with the current
syntax, since we are abusing Python keywords arguments. I propose not
to use .subs(x=1), but only .subs(x, 1), because it's clean and it
will work when we implement substituting for x**2 (not yet in Sage). I
think you will disagree with an argument, that mathematicians are used
to writing .subs(x=1), well, I disagree with that,
I think mathematicians are very clever people and they will be able to
handle that, but as a compromise, .subs() should be able to accept
both.

BTW, this is how this works in SymPy:

In [1]: e = x**2 + 1

In [2]: e
Out[2]:
 2
1 + x

In [3]: e.subs(x, x**2)
Out[3]:
 4
1 + x

In [4]: e.subs(x**2, x)
Out[4]: 1 + x


Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: a recent bug in symbolic calc

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 5:53 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 11, 2007 8:39 AM, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I've noticed a very recent regression -- it worked 2 months ago.
> >
> > sage: t=var('t')
> > sage: f=t*cos(0)
> > sage: float(f(1))
> > 1.0
> > sage: f=t*sin(0)
> > sage: float(f(1))
> > Traceback...
> > : float() argument must be a string or a number
> >
> > --
>
> It is actually hard to decide how to fix this.   This is a result of
> several significant fixes
> and optimizations recently.  What is happening is that for t*sin(0)
> the simplified
> form is 0, so (t*sin(0)).variables() is [].
>
> sage: t=var('t')
> sage: f = t*cos(0)
> sage: f.variables()
> (t,)
> sage: g = t*sin(0)
> sage: g.variables()
> ()
> sage: float(f(1))
> 1.0
> sage: float(g(t=1))
> 0.0
>
> Both f(1) and g(1) are formal products.  However:
>
> sage: g(1)._operands
> [t, 0]
> sage: f(1)._operands
> [1, 1]
>
> Notice the [t, 0].
>
> One possible solution would be to call simplify before
> doing float(...) -- but that could greatly slow symbolic calculus
> down in some cases.   Another possibility would be to change
> the definition of variables() to return all variables, even the ones
> that are simplified away:
>
> sage: (x - x).variables()   # fake
> (x,)
>
> That would be very confusing.
>
> A third possibility would be to make implicit calling use variables
> in the unsimplified expression if the simplified expression has
> no variables.  This would cleanly deal with your case above.
>
> Thoughts?

First I cannot reproduce it on 2.8.14 (so it's probably only a bug in 2.8.15?):

$ ./sage
--
| SAGE Version 2.8.14, Release Date: 2007-11-24  |
| Type notebook() for the GUI, and license() for information.|
--

sage: t = var("t")
sage: f = t*cos(0)
sage: f
t
sage: f(1)
1
sage: f = t*sin(0)
sage: f
0
sage: f(1)
0
sage: float(f(1))
0.0
sage: (t*sin(0)).variables()
()


Second, I find the f(1) syntax very confusing. Exactly because it's
not clear what is substituted for. Why isn't the syntax:

f.subs(t, 1) enough?

sage: f.subs(t, 1)
---
 Traceback (most recent call last)

/home/ondra/ext/sage-2.8.13-i686-Linux/ in ()

/home/ondra/ext/sage/local/lib/python2.5/site-packages/sage/calculus/calculus.py
in subs(self, *args, **kwds)
   2506
   2507 def subs(self, *args, **kwds):
-> 2508 return self.substitute(*args, **kwds)
   2509
   2510 def _recursive_sub(self, kwds):

: substitute() takes at most 2 arguments (3 given)
sage: f.subs(t=1)
0


Yeah, I mean f.subs(t=1), I am going to write a separate email about
this problem.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 8:18 PM, Jason Grout <[EMAIL PROTECTED]> wrote:
>
>
> Ondrej Certik wrote:
> > On Dec 11, 2007 5:20 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> >> On Dec 11, 2007 9:26 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >>> This seems to be similar to SDL (which has a python wrapper: pygame).
> >>> I am worried about yet another "multimedia framework". We should have
> >>> less of those instead of more.
> >> I think you can just do 2D things easily in pygame. Pyglet is for both
> >> 2D and 3D things. It's a pure python, no difficult compilation of
> >> modules. Also I think more choices are better rather than less
> >> choices.
> >
> > See also this post why pyglet is better than pygame:
> >
> > http://aroberge.blogspot.com/2007/08/pyglet-and-pygame-which-one.html
>
>
> I haven't had a mac for a bit, but when I did, I found the
> something-like-2-line patch to make pygame work on a mac.  It's pretty
> trivial (there are I think two places with font calls that need to have
> slightly different parameters).  With that minor change, pygame worked
> great on the mac.  I haven't looked at it very much since the beginning
> of the year, though.
>
> Also, you can use opengl with pygame.  I know there's been huge
> discussions on the mailing list about using opengl python bindings
> instead of the SDL 2d built-in capabilities.  On the side, I've been
> helping develop a pygame game and I looked at using opengl instead of
> SDL.  I thought that pygame was a pretty nice framework.
>
> That said, pygame seems pretty stagnant.  They've been advertising the
> next release for a long time (I think 1.8 was originally due last
> December).  The current release was done in 2005 and their last commit
> to the subversion repository seems like it was several months ago.  Last
> year I emailed the developers about the issue with a mac and I thought
> they applied the patch, but I don't know, maybe not.
>
>
> I don't know anything about pyglet, so I can't compare the two
> frameworks very well.  In looking through some pyglet examples, though,
> it seems like pygame is a more comprehensive framework.

Thanks for a thorough analysis. I'll ask the author of pyglet to
comment in this thread, maybe
he has something interesting to say.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: syntax for .subs(t=1) vs .subs(t, 1)

2007-12-11 Thread Ondrej Certik

Hi,


> > How do you know that I didn't want to view f more like g?  What if I 
> > simplify g
> > or do something else that rewrites g in some equivalent form that doesn't 
> > show
> > the x^2 quite so obviously.
> >
> > I think this might be able to be carefully defined from a computational
> > standpoint, but I think it is on tremendously shaky ground mathematically.

what Joel says is completely correct and I agree with it. But it's
needed. See below.

> Yes, but symbolic calculus is the part of Sage that does computer algebra
> (like they do in Maple and Mathematica), you know, that crazy "meaningless"
> stuff that 99% of the world finds incredibly useful, and which makes us
> mathematicians get stomach aches.

Well, it's always the same thing. I view mathematics purely as a tool that only
has a meaning if a computer can do it too. So if I can define
substitution (by a python program for example),
then it makes sense and that's all I want. If computer cannot do it,
then it's an art, not a science.
I like citations, so here is what I think:

In his introduction to the book A=B Donald Knuth wrote:

Science is what we understand well enough to explain to a
computer. Art is everything else we do. During the past several
years an important part of mathematics has been transformed from
an Art to a Science

So to answer your question about rewriting g - yes, of course you can
rewrite it, but CAS is not the same as mathematics. For example
if some expression is zero cannot be decided in full. But I don't
care, as long as it does the right thing in all cases that are
relevant for me.

It's related to pattern matching, you can match syntactically, or
semantically, Maple has two functions for that.

> That Maxima does this and Sympy does it, and probably every other CAS does,
> strongly suggests Sage better too.  I know it's needed to implement certain
> algorithms.   I think the main issue is that as mathematicians, we would be 
> much
> happier if the documentation were to clearly spell out precisely what
> the definition
> of this funny subst thing is.  I.e., what does this mean to you Ondrej (and to
> the millions of other people who are fine with this)?
>
> sage: e = x + x^2
> sage: SR(e._maxima_().subst('x^2 = x'))
> 2*x
>
> Even Maple does this:
>
> sage: maple.eval('subs(x^2=x, x^2 + x)')
> '2*x'
>
> As does Mathematica:
>
> sage: mathematica.eval('x^2 + x /. x^2 -> x') # slashdot :-)
> 2 x

It's a substitution of a subexpression in an expression. Nothing more,
nothing less, it's perfectly clear to me.

> I don't understand why this is as it is:
>
> sage: maple.eval('subs(x^2=x, x^4 + x^2)')
> 'x^4+x'
> sage: mathematica('x^4 + x^2 /. x^2 -> x')
> x + x^4
> sage: maxima('x^4 + x^2, x^2 = x')
> x^4+x

Hm, SymPy behaves differently here:

In [5]: e = x**4 + x**2

In [6]: e.subs(x**2, x)
Out[6]: x + x**2

In [7]: e.subs(x**2, y)
Out[7]: y + y**2

I don't understand this either and it's ambiguous, it should be fixed.
But what is needed in limits for example is a substitution of a full
subexpression,
i.e. not x**2 but x**4 in the above example.

It's really a question of the particular application - it needs to do
the right thing.

> In the interest of "show me the code", I've implemented maxima-based
> substitution
> in Sage and posted it as a trac patch here:
>
> http://trac.sagemath.org/sage_trac/ticket/1461
>
> It's only a few lines of code, and the following then works:
>
> EXAMPLES:
> sage: f = x^2 + 1
> sage: f.subs_expr(x^2 == x)
> x + 1
>
> sage: var('x,y,z'); f = x^3 + y^2 + z
> (x, y, z)
> sage: f.subs_expr(x^3 == y^2, z == 1)
> 2*y^2 + 1
>
> sage: f = x^2 + x^4
> sage: f.subs_expr(x^2 == x)
> x^4 + x
> sage: f = cos(x^2) + sin(x^2)
> sage: f.subs_expr(x^2 == x)
> sin(x) + cos(x)
>
> sage: f(x,y,t) = cos(x) + sin(y) + x^2 + y^2 + t
> sage: f.subs_expr(y^2 == t)
> (x, y, t) |--> sin(y) + cos(x) + x^2 + 2*t
>
> The following seems really weird, but it *is* what maple does:
> sage: f.subs_expr(x^2 + y^2 == t)
> (x, y, t) |--> sin(y) + y^2 + cos(x) + x^2 + t
> sage: maple.eval('subs(x^2 + y^2 = t, cos(x) + sin(y) +
> x^2 + y^2 + t)')
> 'cos(x)+sin(y)+x^2+y^2+t'
> sage: maxima.eval('cos(x) + sin(y) + x^2 + y^2 + t, x^2 + y^2 = 
> t')
> 'sin(y)+y^2+cos(x)+x^2+t'
>
> Actually Mathematica does something that makes more sense:
> sage: mathematica.eval('Cos[x] + Sin[y] + x^2 + y^2 + t /.
> x^2 + y^2 -> t')
> 2 t + Cos[x] + Sin[y]

Wow, that is really awesome! I only talk, which is cheap.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECT

[sage-devel] Re: a recent bug in symbolic calc

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 9:48 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 11, 2007 12:17 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
> >
> > On Dec 11, 2007, at 8:53 AM, William Stein wrote:
> >
> > > One possible solution would be to call simplify before
> > > doing float(...) -- but that could greatly slow symbolic calculus
> > > down in some cases.
> >
> > This could be attempted only on failure, which wouldn't have a
> > performance impact in most cases.
> >
> > > Another possibility would be to change
> > > the definition of variables() to return all variables, even the ones
> > > that are simplified away:
> > >
> > > sage: (x - x).variables()   # fake
> > > (x,)
> > >
> > > That would be very confusing.
> > >
> > > A third possibility would be to make implicit calling use variables
> > > in the unsimplified expression if the simplified expression has
> > > no variables.  This would cleanly deal with your case above.
> >
> > Anther option would to make zero-variable expressions ignore the
> > (single) input value, and return itself (behaving as the constant
> > function) or itself evaluated on that value (e.g. if it were an un-
> > evaluated trig, sqrt, etc.). This might be a way to remedy the confusing
> >
> > sage: f = sin + cos
> > sage: f(3)
> > sin + cos
> >
> > too.
>
> Keep in mind
>   http://trac.sagemath.org/sage_trac/ticket/553
> I.e., students who forget to put a * in get very confused by this:
>
>   sage: (5 + 2^(1/3))(x^2 + 1)
>   2^(1/3) + 5
>
> ?!  It would be better to get an error...

Exactly. That's why I don't like all this playing with (). And why I
don't like with playing with .subs(x=2), because .subs(x**2=2) gives
confusing error too. Using .subs(x==2) is ok to me though. (even
though I still prefer .subs(x, 2), but I know I am in minority here)


> Maybe it is.   I've been thinking about removing the f(1) syntax,
> *unless* something is
> a "callable symbolic expression", e.g.,
>
> sage: f(t) = t*sin(0)
> sage: f(1)
> 0
> sage: float(f(1))
> 0.0
>
> A drawback though is that if we do this then all of the following break, which
> will confuse new users:
>
> sage: f = x^2 + x + 1
> sage: f(5)
> 31
> sage: show(plot(f, -2, 2))
> sage: show(plot(sin(x)*cos(x^2), -pi, 3*pi))

I don't think so, e.g. in SymPy you can do:

In [1]: f = x**2 +x +1

In [3]: Plot(f, -2, 2)
Out[3]: [0]: 1 + x + x**2, -2, 2, 'mode=parametric'

(Currently the plot of this seems kind of broken - as to plotting, I
don't like devising our new plotting library, I'd rather reuse
something existing, but we didn't find anything useful, mathplotlib 3D
stuff is very bad - but maybe we could integrate our pyglet plotting
stuff into matplotlib)

Here is a relevant part from the Plot docstring:

Variable Intervals
==

The basic format is [var, min, max, steps], but the
syntax is flexible and arguments left out are taken
from the defaults for the current coordinate mode:

>>> Plot(x**2) # implies [x,-5,5,100]
>>> Plot(x**2, [], []) # [x,-1,1,40], [y,-1,1,40]
>>> Plot(x**2-y**2, [100], [100]) # [x,-1,1,100], [y,-1,1,100]
>>> Plot(x**2, [x,-13,13,100])
>>> Plot(x**2, [-13,13]) # [x,-13,13,100]
>>> Plot(x**2, [x,-13,13]) # [x,-13,13,100]
>>> Plot(1*x, [], [x], mode='cylindrical')
... # [unbound_theta,0,2*Pi,40], [x,-1,1,20]



>
> For the first, you just suggest in the error message to do either
> f(x=5) or f(x,5) or
> f(x) = ...;  for the second, we can modify plot to optionally work like this:
>
>
> sage: show(plot(f, x, -2, 2))
>
> (actually the above already works)
>
> or
>
>
> sage: show(plot(f,  (x, -2, 2)))

Either that, or just use the same way as in SymPy, see above, or actually both.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-11 Thread Ondrej Certik

On Dec 11, 2007 9:40 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> No offense! I have no strong feelings on this issue.
> But I am always worried when I see a new 1.0 open source project. It
> seems people
> prefer to start from scratch rather than enhancing an existing mature
> project.

Agree.

> I see that python-opengl now uses ctypes as well. So it should work on
> any distribution.

That's a valid point. I wrote to the pyglet mailiglist if they could
write here some replies:

http://groups.google.com/group/pyglet-users/browse_thread/thread/b7a19498d0d3cace/

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: pyglet for 3D graphics

2007-12-12 Thread Ondrej Certik

Posting another reply of Alex, the author of pyglet:

On Dec 12, 2007 10:20 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:

> Thanks for your reply. So pygame+pyopengl is more or less equivalent
> to pyglet? I.e. it runs on win, linux, mac and it allows you to do
> basically the same things?

Well, see the respective feature lists for the differences; they are
equivalent if _all_ you want to do is render to a single opengl
context.

> I am interested in reasons you stared pyglet, instead of improving
> pygame+pyopengl - pyglet must have some advantages. For example being
> a small, pure python library.

PyGame is fundamentally limited by SDL; a feature addition (such as
adding support for multiple windows) would require a modification to
SDL, to the PyGame DLL and to the PyGame Python modules.
Incidentally, the PyGame DLL is not required now that ctypes is
available; I rewrote PyGame to use ctypes last year but the then
maintainers were not interested in making the switch.

Because pyglet doesn't use SDL it can have include many features that
PyGame cannot (yet).

Alex.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Announcing planet.sagemath.org!

2007-12-13 Thread Ondrej Certik

On Dec 13, 2007 7:44 PM, Yi Qiang <[EMAIL PROTECTED]> wrote:
>
> Just a heads up, for people who are blogging about Sage, please tag
> your posts with 'sage'. This way we can keep the noise to signal ratio
> down on planet.sagemath.org.

Yes, this is imho very important. If there is a need, there can also
be another planet, that will gather all blogs, so that people could
see what the people around Sage are doing, even not related to Sage.
But the planet.sagemath.org should be about Sage only imho.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: chemist rock -- amazing 3d java graphics

2007-12-14 Thread Ondrej Certik

On Dec 14, 2007 12:30 PM, William Stein <[EMAIL PROTECTED]> wrote:
> On Dec 14, 2007 3:14 AM, Robert Bradshaw <[EMAIL PROTECTED]> wrote:
> >
> > I am extremely impressed! It seems to be specifically optimized for
> > rendering molecules, but I'm going to write an exporter for our 3d
> > shapes as meshes and see how well it does.
>
> There is an amazing amount of mathematics, especially combinatorial
> structures, etc., for which those sorts of things might be quite
> good for us.

Yes, jmol is good, I wrote some parsing of cif crystal formats in
jython into it (3 years ago) and the source code is quite
understandable. But I hate java, that's why I used jython, but jython
was quite slow to load at that time.

Something like jmol is the way to go imho.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] documenting Python

2007-12-14 Thread Ondrej Certik

Hi,

how is the SAGE API reference done? Using docutils?

I am looking for some  tool for documenting SymPy and so far I tried:
epydoc, pygment, pudge, apydia and all fail for sympy producing some
error.

So I am curious what your experience with such tools are and what is
your favourite?

The SAGE API reference is nice, the only thing I am missing in there
is the actual corresponding Python code (epydoc provides it, if it
works).

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: documenting Python

2007-12-14 Thread Ondrej Certik

On Dec 14, 2007 7:37 PM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 14, 2007 5:11 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > how is the SAGE API reference done? Using docutils?
>
> No.  It doesn't use docutils.
>
> > I am looking for some  tool for documenting SymPy and so far I tried:
> > epydoc, pygment, pudge, apydia and all fail for sympy producing some
> > error.
>
> Gees -- just on sympy they fail. Wow.  I tried them all on Sage also and
> they failed to.  So I wrote my own somewhat different doc tool, which

I don't understand how anyone can be using those tools. But I found pydoctor:

http://codespeak.net/~mwh/pydoctor/

and it managed to produce quite nice docs of sympy:

http://sympy.googlecode.com/svn/api/sympy.html

> also deals with Cython code.  The entire thing is just the 500-line script:
>
>  SAGE_ROOT/devel/doc/ref/update_script.py
>
> What it does it generate *latex* directly from a chosen subset of the
> Sage source code (the code that is sufficiently stable to be in the
> reference manual).   Then I run the standard Python documentation
> system tools on the result.   I.e., I took the documentation that comes
> with Python, which is written in latex, and adapted it for Sage,
> and in the case of the reference manual -- which I adapted from
> the Pythoh Library Reference, made it mostly autogenerated
> from source code.
>
> The file update_script.py above is fairly hackish, but it gets the
> job done, actually works, and deals with Cython too (very important).

Yes, if we are ever going to use some C, we will use Cython too. I am
surprised, that you had to write your own solution... Thanks for the
tip.
I quite like epydoc 3.0 output - especially that you can see the
source code of any function (this really helps for small, undocumented
or not so well documented functions), I am missing this in other tools
and also in Sage. But epydoc is very fragile and it doesn't work for
me, I reported bugs, they fixed some, I reported more and they didn't
even answer the bug report.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: "a long, long way to go before it offers serious competition to Matlab."

2007-12-15 Thread Ondrej Certik

On Dec 14, 2007 7:37 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
>
>
> On Dec 14, 7:12 pm, "Fabio Tonti" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> > Hmm... the author of this post doesn't seem to realize what Sage is
> > about, correct me if I'm wrong!?!
>
> I am under the impression that the author expected something more like
> an IDE, which the notebook clearly isn't. Sage can't be everything to
> everybody [at least for now], so I guess there is little we can do.
> Sage's goal isn't to be a Matlab clone anyway, but if we ever do a
> mode IDE like environment we can certainly take a trick or two from
> the Matlab IDE.

Well, Sage is supposed to be an alternative to Matlab (among other
things). So maybe it should be stated on the front page, that it is
not exactly going to be the same as IDE for matlab.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Google search for "sage"

2007-12-19 Thread Ondrej Certik

I think google makes it user specific, since I just tried that on
another computer and there sagemath is the first result for "sage"!

Ondrej

On Dec 18, 2007 11:21 PM, Bill Hart <[EMAIL PROTECTED]> wrote:
>
> Half way up page two in Australia. So in the rankings that really
> count we still have a way to go. ;-)
>
> Bill.
>
>
> On 18 Dec, 18:00, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote:
> > Wow, that's amazing.  Just two or three days ago I checked and it was about 
> > #5!
> > That progress is looking good to displace sagepub.com soon!
> >
> > --
> > Joel
> >
> > On Tue, Dec 18, 2007 at 08:48:21AM -0800, William Stein wrote:
> >
> > > Hi Sage-Devel,
> >
> > > On Irc I noticed:
> >
> > > 02:27 < ondrej> hi mabshoff - sage is second in my google search in 
> > > Prague. :)
> >
> > > So in the US I just did a Google search for "sage", and
> > > our Sage math software project is now number 2 in
> > > google searches.
> >
> > >  -- William
> >
> > > --
> > > William Stein
> > > Associate Professor of Mathematics
> > > University of Washington
> > >http://wstein.org
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Google search for "sage"

2007-12-19 Thread Ondrej Certik

Yes, I am sure. :) It's because I was logged into my gmail account and
the google search results then show how many times I visited each
page.
sagemath 40x times, other sage pages 0 times. So he gives me sagemath
as the first one.

Ondrej

On Dec 19, 2007 7:01 PM, John Cremona <[EMAIL PROTECTED]> wrote:
>
> Are you sure that you haven't got your Google search bar set to "Sage search"?
>
> John
>
> On 19/12/2007, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> >
> > I think google makes it user specific, since I just tried that on
> > another computer and there sagemath is the first result for "sage"!
> >
> > Ondrej
> >
> > On Dec 18, 2007 11:21 PM, Bill Hart <[EMAIL PROTECTED]> wrote:
> > >
> > > Half way up page two in Australia. So in the rankings that really
> > > count we still have a way to go. ;-)
> > >
> > > Bill.
> > >
> > >
> > > On 18 Dec, 18:00, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote:
> > > > Wow, that's amazing.  Just two or three days ago I checked and it was 
> > > > about #5!
> > > > That progress is looking good to displace sagepub.com soon!
> > > >
> > > > --
> > > > Joel
> > > >
> > > > On Tue, Dec 18, 2007 at 08:48:21AM -0800, William Stein wrote:
> > > >
> > > > > Hi Sage-Devel,
> > > >
> > > > > On Irc I noticed:
> > > >
> > > > > 02:27 < ondrej> hi mabshoff - sage is second in my google search in 
> > > > > Prague. :)
> > > >
> > > > > So in the US I just did a Google search for "sage", and
> > > > > our Sage math software project is now number 2 in
> > > > > google searches.
> > > >
> > > > >  -- William
> > > >
> > > > > --
> > > > > William Stein
> > > > > Associate Professor of Mathematics
> > > > > University of Washington
> > > > >http://wstein.org
> > > >
> > >
> >
> > >
> >
>
>
> --
> John Cremona
>
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: SymbolicEquation type error

2007-12-19 Thread Ondrej Certik

On Dec 20, 2007 8:18 AM, Carl Witty <[EMAIL PROTECTED]> wrote:
>
> On Dec 19, 4:50 pm, "Ted Kosan" <[EMAIL PROTECTED]> wrote:
> > The following code works in version 2.8.13 of SAGE:
> >
> >  a = (16*x - 13)/6 == (3*x + 5)/2 - (4 - x)/3
> >
> > But when I execute it in version 2.9, the following error is generated:
> >
> > Traceback (most recent call last):
> >   File "", line 1, in 
> >   File "/home/tkosan/.sage/sage_notebook/worksheets/admin/0/code/7.py",
> > line 4, in 
> > a = (Integer(16)*x - Integer(13))/Integer(6) == (Integer(3)*x +
> > Integer(5))/Integer(2) - (Integer(4) - x)/Integer(3)
> >   File 
> > "/home/tkosan/download/sage-2.9-debian-32bit-i686-Linux/local/lib/python2.5/site-packages/sympy/plotting/",
> > line 1, in 
> >
> >   File "element.pyx", line 785, in 
> > sage.structure.element.ModuleElement.__sub__
> >   File "coerce.pyx", line 272, in
> > sage.structure.coerce.CoercionModel_cache_maps.bin_op_c
> > TypeError: unsupported operand parent(s) for '-': '' and
> > 'Integer Ring'
>
> It works for me (in Sage 2.9):
> sage:  a = (16*x - 13)/6 == (3*x + 5)/2 - (4 - x)/3
> sage: a
> (16*x - 13)/6 == (3*x + 5)/2 - (4 - x)/3
>
> Is there any chance that you've assigned a value to x earlier in your
> session, so that x is no longer a symbolic variable?
>

Works for me too:

$ ./sage
--
| SAGE Version 2.9, Release Date: 2007-12-16 |
| Type notebook() for the GUI, and license() for information.|
--

sage: a = (16*x - 13)/6 == (3*x + 5)/2 - (4 - x)/3
sage: a
(16*x - 13)/6 == (3*x + 5)/2 - (4 - x)/3
sage:

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-20 Thread Ondrej Certik

On Dec 20, 2007 9:39 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Hi,
>
> today I was attending a Lie group lecture and the teacher Karel Houfek
> wrote the attached program in Mathematica
> to calculate some Lie groups generators etc. So my first question was
> if I can make it public
> and with his permission I am sending it here.
>
> I think Sage should be able to do it as well, only it has to be
> rewritten in Python. I think William was
> asking me what kind of stuff people do in Mathematica. So this kind of stuff.
>
> However, the biggest problem is the 2GB space for the windows wmware
> image. (Yes, all people I know that
> use Mathematica, use it from windows). Two of my friends told me Sage
> is just too big for them and I agree.
> If Michael and others succeed in a native Windows port, needing just
> couple hundreds MB, then Sage
> will be a killer app.
>
> Mainly because of bringing a matlab/mathematica like Python IDE to all
> those people at universities.
> Sage is really doing a fantastic job to the whole Python community. So
> I hope it will be accepted under
> the umbrella of PSF for the google summer of code.

If not as a standalone mentor organisation. You should definitely try
it again William.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Sage vs Octave

2007-12-20 Thread Ondrej Certik

> >  (a) eternal peace and prosperity for mankind
> >  (b) infinite personal power and wealth
> >  (c) having the people responsible for designing Fortran run time
> > libraries and linker modes/modules beamed into space
> >
> > I would choose (c) without having to think about it.
>
> I don't know if you guys have yet a little weekly summary of sage
> happenings.  If you do, it would be nice to have a QOTW (Quote of the
> Week) feature, and if you implement it, I heartily vote  for this one
> to be nominated as Sage QOTW :)

Mabshoff have some other cool remarks too. :)

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: Notebook listing usernames

2007-12-21 Thread Ondrej Certik

On Dec 21, 2007 9:33 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 20, 2007 11:33 PM,  <[EMAIL PROTECTED]> wrote:
> >
> > That was my initial reaction, too.  In a closed system, it makes sense --
> > for the public notebook, it doesn't immediately seem like such a bad thing, 
> > but it lends to a scary attack.
> >
> > Robert makes an account on the public notebook.
> > Robert sees William's account on the failure page, so creates an account -- 
> > then from the notebook, Robert launches a zero-latency brute-force attack 
> > to discover William's password.
> > Now, Robert logs into William's account.  From there, he inserts malicious 
> > javascript into William's most-recently edited worksheet.
> > Next time William opens his favorite worksheet, Robert pwns his machine, 
> > logs in, and edits the grade chart for William's Math 581 class, scoring 
> > himself a well-deserved 4.1...
> >
> >
>
> Some remarks:
> Above Robert has an account on the public notebook already, so there are
> many ways he find my login name -- there is no need to view the failure page.
> Anyway, my login name is very easy to guess -- it is always either
> was, wstein, or
> william_stein.  You're assuming my password is easy to brute-force
> crack.  Since it was actually
> just generated randomly, this assumption is perhaps not valid.
>
> With wiki's user names are also very easy to see, since edits to the
> changelog are
> annoted by user names.  Likewise with mailing lists, the trac server, etc.
>
> It would be a really good idea to put an n-second pause in after a failed 
> login
> attempt and/or to even put a simple math problem in...  :-)  This would 
> provide

Yes, like factoring some huge integer, that can only be done through Sage.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-21 Thread Ondrej Certik

On Dec 21, 2007 11:56 AM, harald schilly <[EMAIL PROTECTED]> wrote:
>
>
>
> On Dec 20, 9:39 pm, "Ondrej Certik" <[EMAIL PROTECTED]> wrote:
>
> > If Michael and others succeed in a native Windows port, needing just
> > couple hundreds MB, then Sage
> > will be a killer app.
>
> But please don't forget, sage is about open source - and windows is
> the complete opposite. Supporting all modules native for win32 is
> impossible, drains off a lot of worktime and using cygwin as an
> intermediate solution makes it slow, besides additional constant
> work!
> So i would suggest an additional workstation and run the linux version
> and access it over the local network. Therefore nobody has to install
> an application in windows and the entry level is 0.

Those people will imho not install a linux anytime soon. But after
discussing this on #sage-devel,
a reasonable compromise is to provide small wmware image, full wmware
image, and of course,
optionally a native windows port - but as you say, it drains off resources.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-21 Thread Ondrej Certik

On Dec 21, 2007 1:18 PM, mabshoff
<[EMAIL PROTECTED]> wrote:
>
> On Dec 21, 11:56 am, harald schilly <[EMAIL PROTECTED]> wrote:
> > On Dec 20, 9:39 pm, "Ondrej Certik" <[EMAIL PROTECTED]> wrote:
> >
> > > If Michael and others succeed in a native Windows port, needing just
> > > couple hundreds MB, then Sage
> > > will be a killer app.
> >
>
> Hi,
>
> > But please don't forget, sage is about open source - and windows is
> > the complete opposite.
>
> [begin rant] Well, we support OSX, too, and that isn't exactly Open
> Source either. While Apple itself is somewhat more friendly to the
> Open Source idea than Microsoft on the software side you shouldn't
> forget that Apple is the company which brought you DRM and
> "unprotected" tracks which just happen to contain a number that tracks
> individual users via iTunes. The iPod isn't exactly a poster child for
> openness, either. I could bash Apple for another couple paragraphs,
> but I am sure you get my point.
>
> There are different opinions about what Open Source constitutes, but a
> lot of people like William and me think for example that Firefox has
> done more for the Open Source idea to the layperson than Linux ever
> will. I am a huge supporter of Linux and Open Source in general,
> having first installed Linux from a set of roughly 50 floppy discs
> pulled over many nights via a 14.4KB download link in the early to mid
> nineties and running it as my primary desktop OS to this day. Having
> cross platform applications is a big plus, but more on that below.
> What is the point in telling people not to use Windows, but to lock
> them into Linux or OSX on the other hand?
>
> > Supporting all modules native for win32 is
> > impossible, drains off a lot of worktime and using cygwin as an
> > intermediate solution makes it slow, besides additional constant
> > work!
>
> Cygwin is certainly a crutch, but a native port has many advantages,
> namely 64 bit support. Just ask for example the Singular team if they
> want a 64 bit native port of their application using MSVC. I can
> assure you that they would be quite happy if somebody did the work. If
> things work out as planned on my end I will certainly try to make that
> happen. In the end we will all win if Sage and its components work
> well on *all* operating systems.
>
> > So i would suggest an additional workstation and run the linux version
> > and access it over the local network. Therefore nobody has to install
> > an application in windows and the entry level is 0.
>
> The vast majority of users on the desktop use Windows and do not have
> access to Linux or OSX. Probably most of them don't even want to
> switch.  The VMWare image to run Sage on Windows is fine for many
> users, but many people will not use it because they lack the skill to
> even set up networking and run a VMWare machine. Windows has excelled
> at being good enough, and Microsoft will be *the* dominating desktop
> operating system for easily the next decade. While the install base of
> Linux is growing quicker in relative terms the absolute increase of
> Windows desktops each year *dwarfs* the Linux desktop install base. So
> while some people do extrapolate those exponential growth rates for
> the Linux desktops a couple years into the future the server market
> has clearly shown that those exponential growth rates fairly quickly
> turn into an linear increase fairly quickly. So world domination for
> Linux on the Desktop any time soon? I don't think so.
>
> I like to point out that extrapolation without understanding the
> situation is very dangerous. By that measure the Women's world record
> for the 100 meter dash will be lower than the Men's record by the
> middle of this century assuming linear extrapolation of the
> performance over the last two decades or so. One can easily see that
> this is unlikely to happen and the main reason behind the relative
> better improvements on that particular benchmark is either a
> professionalization of Women's field & track [in relative terms] or
> that doping with steroids has a larger affect on Women in that
> particular discipline. The truth probably lies somewhere in the
> middle. But eventually the improvements on the Women's side will level
> off just like it happened for the Men. And even today it is in my not
> so humble opinion impossible to lower that record for either sex
> without massive doping, but I don't want to rant on about that topic
> here.
>
> To get somewhat closer to on-topic again: Another target group for
> Sage is the general educational sector [by which I me

[sage-devel] Re: latex functions in SAGE?

2007-12-21 Thread Ondrej Certik

On Dec 21, 2007 1:35 PM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> Hi:
> I wonder what SAGE developers think of the following idea:
> to include in SAGE some functions which make the
> creation of latex structures easier (for the purpose of
> writing papers, etc). I'm thinking of two things:
> (a) outputting a tabular environment (with options for
> left, center, right justifications),
> (b) outputting a commutative diagram,
> (c) outputting a simple picture environment (possibly even a 3d one),
> I'm not sure how to do these, I was just wondering if this
> seems interesting to others. I think in my case, it would make
> some latex typesetting easier.
> - David Joyner


I think a) and c) would be interesting to me too.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-21 Thread Ondrej Certik

> >
> > The vast majority of users on the desktop use Windows and do not have
> > access to Linux or OSX.
>
> The vast majority of users on the desktop give a damn of calculating
> anything!! ;)

Well, yes, but all people I know of that use Mathematica use Windows
on the desktop. Those are kinds of people Sage is
interested in.

> I don't see the need for such an extreme view of competition. If there
> are 98% happy with buying windows, being passive users and being
> experts at software-firewall-workarounds-registry-hacking-anti-virus-
> xyz - have fun. They are also happy buying "state of the art" software
> like mathematica or matlab.

I don't think so. They run windows because they had to, or just
because they do, it doesn't really matter. Windows will be there with
us,
at least in the next decade, and it will be the major system on
desktops as it is now (maybe not 95%, maybe only 60%).

I don't think they are happy buying expensive software and also that
their students had to either steal mathematica, or
not being able to do calculations at home.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Cython is in Debian

2007-12-22 Thread Ondrej Certik

Hi,

as a Christmas present from me, Cython made it to Debian couple of hours ago:

http://packages.debian.org/sid/cython

Could you please Robert release a new version with the automatic
range() conversion? I'll package it.
I could of course take the hg changeset and patch the debian package,
but I think it's better if you just make a regular release.

For those not yet using Cython - it's really an extremely good piece
of software. It leaves me the full power like if I used
the Python C/API by hand, but it's imho even easier to use than SWIG
(and of course the output is incomparable - SWIG
creates a slow bloated interface, Cython create the same as you would
by hand - fast, simple, robust interface). It
allows my to call C from Python or Python from C, whatever I want.

The only area, where SWIG may be easier to use, is wrapping external
C++ code. But in my own projects, that use SWIG, I
actually always write a simplified C++/C for the external library
first and only that wrap it using SWIG.

I also tried to rewrite some code in fortran and wrap it using f2py,
and then just took the original python code and Cythonized it (using
numpy arrays), and I could
easily achieve the same speed (actually 2x faster than f2py, but I
will post a new email about that with all details, it could be a
mistake on my side).

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-22 Thread Ondrej Certik

On Dec 23, 2007 12:05 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Dec 21, 2007 6:54 PM, Ted Kosan <[EMAIL PROTECTED]> wrote:
> > William wrote:
> >
> > > MISSION STATEMENT:  Provide as soon as possible a viable free
> > > open source alternative to Maple, Mathematica,  Magma, and Matlab.
> >
> > When I read this mission statement, what doesn't come to mind is
> > trying to convince people who are currently using these applications
> > to switch to SAGE.  My thought is that most users of these
> > applications are perfectly happy with them.
>
> You're right.  At the beginning of Sage I worried a lot about converting
> existing users and it is frustrating and pointless, especially given how
> many potential new users there are.   I went to several major bookstores
> during the last few days as part of my vacation and searched for any
> books that had anything to do with math software -- there was exactly
> one in all the bookstores, which was some "Absolute Beginner's
> Guide to Matlab."   I think "mathematics software" is a market that in
> some sense hasn't even begun.   I'm not talking here about the existence
> of books -- but about books one actually finds on an everyday basis in
> bookstores in America...
>
> My main goal is to at least give current users who *wish*
> they could use free open source alternatives an alternative.  3 years
> ago I really wanted an alternative to the Ma*'s, even if it is a lot
> more work to use, and there wasn't one; there wasn't anything that
> was even close.
>
> > The way I view this mission statement is the same way the Ford Model T
> > was a less expensive alternative to expensive American automobiles and
> > the way the original Volkswagen "People's car" Beetle was a less
> > expensive alternative to expensive German automobiles.  Both of these
> > automobiles were designed to allow the millions of people at that time
> > who could not afford an automobile at all to finally afford one.  The
> > Beetle still holds the record for the highest production numbers for a
> > single model, and the Model T holds second place.  With this analogy,
> > the M's will get you there in luxury but SAGE will get you there too.
> > What I like about SAGE is it has the potential to allow orders of
> > magnitude more people to get "there" than has been possible before.
>
> Yes, I agree.
>
> > Here is a pie chart I created a while ago which shows this concept 
> > graphically:
> >
> > http://sage.math.washington.edu/home/tkosan/misc/sage_potential_target_audience.png
> >
> > It is my opinion that most of the people in the purple part of the pie
> > chart will be notebook users.
>
> I thought that chart was crazy until a few days ago when I visited a friend
> of my wife who lives in Phoenix who teaches high school and community
> college mathematics (he is a Russian with a masters from U of A).
> The world of "math computation" for them is whatever
> a TI-83 calculator can do -- seriously.  And when we talked about
> Sage, he immediately thought of how useful it could be -- as a web service --
> in the context of the classes he teaches.

It's all about calculus. I am willing to make a bet that 90% of Sage users will
only need calculus. So it ought to work really, really well. It's
still a long way though.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] Re: example of a Mathematica program from my lecture

2007-12-23 Thread Ondrej Certik

Hi Tim!

> >Me too. I've been struck by the fact that most of the people that
> >I've talked to about Sage, including graduate students (in other
> >fields), are most interested in the calculus kind of stuff.
>
> Axiom implements the Risch Algorithm for elementary functions.
> If it returns the answer as an unevaluated integral that is a proof
> that there exists no integral that can be expressed in elementary
> terms. In addition, Axiom implements many of the extended cases of
> the algorithm for non-elementary functions.

Excellent. We were playing with the Risch algorithm in SymPy too.
If axiom could be installed in matter of minutes (last time I tried
it was 10 hours and it failed[1], in April), maybe it could be
considered as a base for a good integrator in Sage. But
currently it's imho much better to use Maxima's, because
Maxima is alreay in Sage and there are Python wrappers for it. And in the long
term, it's imho better to rewrite the algorithm in Python, for
readibility. SymPy shows, that it is possible.

> >I was tired of no one else doing any thing about that, and had two
> >people tell me just a week ago that they'd probably use Sage if it
> >had symbolic matrices.
>
> Axiom implements symbolic matrices.

SymPy too and Maxima too.
Sage has symbolic matrices for a long time through SymPy,
but it needs to be integrated
tightly with the rest of Sage and currently Sage uses maxima
(more tested, more robust, faster),
so someone had to write a patch for it.

> >Probably 2d and 3d visualization are also at least as important as
> >calculus to the target audience we are talking about.  Linear algebra
> >and numerical solving is also extremely important...  (thanks mike and
> >robertwb for implementing symbolic matrices for 2.9.1)
>
> In the Axiom tree distribution is a function called viewalone.
> It is a standalone C program that implements 2D and 3D graphs
> with many features including shading, scaling, rotation, and
> printing the results as postscript files. The program can also
> be called from within Axiom.
>
> To try the viewalone program look for directories with the extension .view
> Invoke viewalone on the directory and you should see a live graph that
> you can manipulate.
>
> This could easily be packaged separately from Axiom as a standalone
> part of Sage.

That's interesting, I didn't know about it. In Sage there are quite a lot
of programs for 3D things, but I think Robert was talking about using 3D
things from the notebook (from the browser).

Ondrej

[1] I reported the problems on Axiom mailinglist and you (or someone else)
promptly offered help how to fix it, so in the end I managed to
compile everything.
But it's important that this works out of the box, on all linuxes, Os
X, and Solaris.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



[sage-devel] gfortran/g77+f2py vs gcc+Cython speed comparison

2007-12-23 Thread Ondrej Certik

Hi,

I needed to write 2D Ising model simulation into my school and I
decided to compare the two possible solutions how to do it, so I of
course wrote
it in Python, then rewrote it in Fortran + f2py, and also Cython. What
is better? Read below. :)  But for the impatient, I am going to use
Cython, reasons below.

CCing to Cython, numpy (f2py is discussed there), and sage-devel
(there are people there who could be interested in these kinds of
comparisons).

The code is available at:

http://hg.sharesource.org/isingmodel/

How to play with that - just do this (after installing Mercurial):

$ hg clone http://hg.sharesource.org/isingmodel/
[...]
$ cd isingmodel
$ hg up db7dd01cdc26 # just to be sure
that we are talking about the same revision / code
$ make
[...]
$ time python simulate.py
[...]
real0m2.026s
user0m1.988s
sys 0m0.020s

This runs Cython code. Then apply this patch to run fortran code instead:

$ hg di
diff -r db7dd01cdc26 simulate.py
--- a/simulate.py   Sun Dec 23 02:23:30 2007 +0100
+++ b/simulate.py   Sun Dec 23 02:24:33 2007 +0100
@@ -31,8 +31,8 @@ def MC(mu = 1, temp = 2, dim = 20, steps
J=1 #coupling constant
k=1 #Boltzman constant

-#from mcising import mc
-from pyising import mc
+from mcising import mc
+#from pyising import mc
B = D1(A)
mc(B, dim, steps, temp, H, mu, J, k)
return D2(B)


And then again (and apply the patch below, otherwise it might not work for you):

$ time python simulate.py
[...]
real0m3.600s
user0m3.528s
sys 0m0.052s

So it's a lot slower.

We are comparing many things here - wrappers, my fortran coding skills
vs Cython C code generation and gcc vs gfortran. So I wrote to numpy
mailinglist. First Travis (the author of numpy) suggested:

"
My experience with similar kinds of comparisons is that gnu fortran
compilers are not very good, especially on 2-d problems. Try using a
different fortran compiler to see if speeds improve.
"

Then Pearu (the author of f2py) suggested:

"
Though the problem is 2D, your implementations are essentially
1D. If you would treat the array A as 2D array (and avoid calling
subroutine p) then you would gain some 7% speed up in Fortran.

When using -DF2PY_REPORT_ATEXIT for f2py then a summary
of timings will be printed out about how much time was spent
in Fortran code and how much in the interface. In the given case
I get (nsteps=5):

Overall time spent in ...
(a) wrapped (Fortran/C) functions   : 1962 msec
(b) f2py interface,   60 calls  :0 msec
(c) call-back (Python) functions:0 msec
(d) f2py call-back interface,  0 calls  :0 msec
(e) wrapped (Fortran/C) functions (acctual) : 1962 msec

that is, most of the time is spent in Fortran function and no time
in wrapper. The conclusion is that the cause of the
difference in timings is not in f2py or cpython generated
interfaces but in Fortran and C codes and/or compilers.

Some idiom used in Fortran code is just slower than in C..
For example, in C code you are doing calculations using
float precision but in Fortran you are forcing double precision.

HTH,
Pearu

PS: Here follows a setup.py file that I used to build the
extension modules instead of the Makefile:

#file: setup.py
def configuration(parent_package='',top_path=None):
   from numpy.distutils.misc_util import Configuration
   config = Configuration('',parent_package,top_path)
   config.add_extension('mcising', sources=['mcising.f'],
define_macros = [('F2PY_REPORT_ATEXIT',1)]
)
   #config.add_extension('pyising', sources=['pyising.pyx'])
   return config
from numpy.distutils.core import setup
setup(configuration = configuration)
"

and then quickly added

"
When using g77 compiler instead of gfortran, I get a speed
up 4.8 times.

Btw, a line in a if statement of the fortran code
should read `A(p(i,j,N)) = - A(p(i,j,N))`.
"

(btw I have no idea how it could work for me without the A(p(i,j,N)) =
- A(p(i,j,N)) fix, quite embarassing)

So then we discussed it on #sympy IRC:

* Now talking on #sympy
 hi pearu, thanks a lot for testing it!
 4.8 speedup, jesus christ. so the gfortran sucks a lot
 hey ondrej
* ondrej is trying g77
 gortran has advantage of being Fortran 90 compiler
 g77 is depricated in Debian and dead upstram (imho)
 yes but I guess those guys who are maintaing g77/gfortran,
those do not crunch numbers much;)
 g77 has a long development history and is well optimized
 I fear the fortran is a bad investment for new projects
 I know g77 is well optimized, but it's dead
 gfortran is a write from scratch and is too young
 do you think many people still write fortran? I use it just
because g77 was faster than gcc
 g77 is certainly not dead, scientist use it a lot because of its speed
 btw`A(p(i,j,N)) = - A(p(i,j,N))`.
 means my fortran code was broken
 doesn't it?
 some think that fortran is a dead language, some use it a

[sage-devel] Re: gfortran/g77+f2py vs gcc+Cython speed comparison

2007-12-24 Thread Ondrej Certik

> I am quite shocked that g77 is that far ahead on the performance
> curve. I am sure I would have heard about it by now if that was the
> general case, but is there any chance your code might hit some corner
> case in gfortran? Which gfortran did you use exactly? Does using g95

$ gfortran --version
GNU Fortran (GCC) 4.2.3 20071123 (prerelease) (Debian 4.2.2-4)
Copyright (C) 2007 Free Software Foundation, Inc.

> make a difference?

As discussed in the IRC session attached in the previous email, the
pure difference is just 1.0 (g77) vs 1.3s (gfortran), so not that big.
One problem was in the random() function, being fast in glibc, slower
in g77 and the slowest in gfortran.

I didn't try g95, as it is not in Debian. I believe in standard tools
and "official" ways of doing things,
which currently is gfortran in Debian. Of course, if there are some
very good reasons, not to follow the
same way as the majority of other people, we can do that, i.e. package
g95 for Debian, recompile
debian packages with g95, instead of gfortran (currently Debian uses
g77, but it's moving to gfortran),
find a way how to ship both binary packages in Debian (compiled with
both gfortran and g95) etc.

But I am not really looking into speeding up this particular code, but
just finding ways what people
use and are going to use. Fortran will definitely not die (at least
not soon), but I still feel that C
is much more widespread language, with comparable speed.

Ondrej

--~--~-~--~~~---~--~~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~--~~~~--~~--~--~---



  1   2   3   4   5   6   7   8   >