Hi Chris,

On 2012-06-08, Chris Hall <[email protected]> wrote:
> ------=_Part_17_4419140.1339191929831
> Content-Type: text/plain; charset=ISO-8859-1
>
> I know this is a broad question.  What are the existing 'serious' 
> alternates to the 'usual' browser-based interface to sage?

For me, the "usual" interface is the command line interface. I hardly ever
use the notebook (except for teaching). Note that apparently one can
also use Sage in emacs (there is sage-mode), but I have never tried.

> I'm used to the usual interface, and most of the time it suffices for what 
> I want.  Alas, when it comes to developing serious modules or worksheets, 
> it's not powerful enough.  My usual development cycle looks something like:
>
> 1) (re)start the sage notebook server;
>
> 2) edit a worksheet;
>
> 3) edit a module (e.g. foo.py or bar.pyx);
>
> 4) goto 1 (or restart sage if get a .pyx).

I don't know why you need to refresh a worksheet or restart the notebook
server or even Sage, if you just change a .py or .pyx attachment. Anyway,
if you attach code to a command line session then it is automatically
updated (i.e., recompiled if we talk about a .pyx attachment). No need
to restart anything.

Hence, if I want to develop a new module foo.pyx, my development cycle is
roughly like this:

1. The Python prototype
 a) Open foo.py in emacs or vim
 b) Star a command line session and do
      sage: attach "path/to/foo.py"
 c) Test the code.
 d) Edit the code according to the test results. After
    saving the changes, it is *automatically* updated in
    Sage. Goto 1.c)

2. The Cython module
If the code essentially works but could use Cython to get more speed,
I'd move it to foo.pyx.
 a) Open foo.pyx in emacs or vim
 b) In the still running command line session from 1.b),
    do
      sage: attach "path/to/foo.pyx"
 c) Test the code and the performance
 d) Edit the code and save the changes. Goto 2.c) (need
    to wait a few seconds since the code is automatically
    recompiled).

Note that I don't need to restart Sage in the whole process. Perhaps it
should also be noted that if the module provides a class Foo and one does
tests with an interactively defined instance X of Foo then of course X
needs to be recreated after changing foo.py(x) before repeating the tests.

Conclusion: If it is really the case that the notebook ignores changes
in an *attached* file (note the difference between a loaded and an
attached file), then I'd say it is a bug. It does work in the "usual"
command line interface.

Best regards,
Simon

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

Reply via email to