On Wed, Jul 9, 2008 at 10:36 AM, William Stein <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jul 9, 2008 at 1:32 AM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>> On Wed, Jul 9, 2008 at 7:27 AM, William Stein <[EMAIL PROTECTED]> wrote:
>>>
>>> On Tue, Jul 8, 2008 at 10:21 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>>> On Wed, Jul 9, 2008 at 2:29 AM, François Bissey <[EMAIL PROTECTED]> wrote:
>>>>>
>>>>> On Wed, 09 Jul 2008, Ondrej Certik wrote:
>>>>>> The only remaining annoying thing is this one LD_LIBRARY_PATH thing.
>>>>>> I'll probably put it to my .bashrc, as there doesn't seem to be any
>>>>>> way around it.
>>>>>>
>>>>> It's probably better to make a small launcher script setting the variable
>>>>> correctly. I have seen .*shrc littered with stuff (users in physical
>>>>> chemistry), in the end it is difficult to know if some settings contradict
>>>>> others.
>>>>> I now actively encourage them to write a small launcher script instead.
>>>>
>>>> I see. Well, one can just use "sage" as the launcher script. The
>>>> problem in my case was to get rid of the launcher script, so that I
>>>> can use tools
>>>> like py.test or nosetests.
>>>>
>>>> BTW, does anyone know what the:
>>>>
>>>> Falling back to a hard coded sage server in misc/hg.py
>>>>
>>>> means and how to get rid of it?
>>>
>>> It means the environment variable SAGE_SERVER isn't set.  Set it to 
>>> something.
>>
>> That worked thanks. BTW, it needs to be set to
>> "http://www.sagemath.org/";, otherwise I get this:
>>
>> Non-default server settings detected:
>>    Incoming Server = misc/hg.py/hg
>>    Outgoing Server = misc/hg.py/hg
>>
>> I updated the wiki with my new script:
>>
>> http://wiki.sagemath.org/Sage_in_systemwide_python
>>
>> it's getting quite convenient now, I only need to set the path to Sage
>> install at exactly one point in the script and it will tell me the
>> exact command to run if the sage import fails.
>
> I'm also happy to modify sage so e.g., the SAGE_SERVER
> stuff is more graceful.  I'll come up with something based
> on your wiki page above.
>
> Thanks for doing all this!  See Sage integrates into your
> environment after all :-).

Yes and it made me pretty excited!! Only it's 4x slower than sympy:

[EMAIL PROTECTED]:~/sympy$ time
LD_LIBRARY_PATH=/home/ondra/ext/sage/local/lib python s.py

                                   2
                                  x
                                  -- - log(x)
                                  3

                                            3
                                           x
                              - x log(x) + -- + x
                                           9

real    0m2.065s
user    0m1.308s
sys     0m0.280s
[EMAIL PROTECTED]:~/sympy$ time
LD_LIBRARY_PATH=/home/ondra/ext/sage/local/lib python s2.py
           2
          x
-log(x) + ──
          3
                3
               x
x - x*log(x) + ──
               9

real    0m0.454s
user    0m0.408s
sys     0m0.048s


where s.py is the script in the wiki and s2.py is this:

from sympy import *
var("x")
e = x**2/3-log(x)
pprint(e)
pprint(integrate(e, x))




But honestly, 0.5s for sympy is too much too. I wonder why it is so slow.

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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to