On Jan 6, 2010, at 8:50 PM, William Stein wrote:

> On Wed, Jan 6, 2010 at 11:21 AM, Ivan Andrus <[email protected]> wrote:
>> I recently decided to make some OS X services which use sage e.g. to 
>> simplify an expression.  So that I can select some text, and simplify it in 
>> place.  This is ridiculously easy to do with Automator and sage -c, but the 
>> problem is that it's unbearably slow.  Part of it may be Automator, but if I 
>> run
>> 
>> time ./sage -c '1+2'
>> 
>> in a terminal it never takes less than 5 seconds real time which is clearly 
>> unacceptable for this purpose.  I do have moderate load on my machine, but 
>> CPU time is also high.  The result below is typical.
>> real    0m5.349s
>> user    0m2.876s
>> sys     0m1.747s
>> 
>> This is on OS X 10.6 where we have segfaulting problems, but I don't believe 
>> those come into play here.  Is this typical of what other people experience?
> 
> Here are some relevant tickets:
> 
>   http://trac.sagemath.org/sage_trac/ticket/7684
>   http://trac.sagemath.org/sage_trac/ticket/7351
>   http://trac.sagemath.org/sage_trac/ticket/7502
>   http://trac.sagemath.org/sage_trac/ticket/7498

Excellent.  I'll see if I can help with any of these (reviewing if nothing 
else).

>> I understand that there are lots of things that need to be done to start 
>> sage, and that it wasn't really built to do things this simple, but it would 
>> be nice if there were something faster.
>> 
>> Is there a way to query an insecure server running locally (without logging 
>> in and creating a notebook) so that I can avoid starting up a new 
>> interpreter(s) every time?  I tried to find the code that interact uses 
>> (since I assume it must do something similar), but didn't have any luck.  If 
>> I recall there was talk of adding something similar a while ago.
>> 
> Use the simple sage server api, as illustrated here:
> 
>  http://www.sagemath.org/doc/reference/sage/server/simple/twist.html
> 
> I just tried the examples out there with sage-4.3 on OS X 10.6 and it
> worked fine for me.

Perfect.  That's what I was looking for.

-Ivan
-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to