Nathann Cohen wrote:
> Hello everybody !!!!
> 
> An intern in my lab just finished his project, which consisted in both a 
> theoretical work and a lot of Java source code, meant to simulate 
> various things...
> - He had to work on networks, and so had to define a library with Graphs 
> to work with ( already defined in Sage )
> - He had to solve linear programs, and so had to build links between 
> Java and a LP solver ( being reviewed at the moment )
> - He also had to do a lot of computations, sometimes having problem with 
> numerical precision ( much easier in Sage ), he had to plot things, etc, 
> etc...
> 
> I thought it would be a good idea to ask his advisor to have the next 
> intern work on Sage instead of Java as it would save them a lot of time 
> and make their code much more efficient, BUT :
> 
> The thing is that he also wrote in Java an interface for all of his 
> computations ( a very neat thing ), and this is something I would not 
> know how to do in Sage. He had a lot of buttons starting/stopping 
> computations, logs printed everywhere, etc.
> Well, I obviously couldn't have asked him to do THIS in sage.
> 
> So my question is the following : there seem to be ways in Sage to 
> compute things remotely, as we already have a notebook which uses Sage 
> to computes its result. Then, there should be a not-so-different way for 
> external applications to call Sage and use its results ?
> 
> In this situation, the intern would just have to build the interface, 
> then compute all which is needed with the help of Sage, benefiting from 
> all that is already inside it !
> 
> There should be an easy way to send/receive informations with this 
> server for Sage to be a good alternative...


There is a simple HTTP interface for executing Sage commands on a remote 
server.  See devel/sage/sage/server/simple/twist.py for the 
implementation, including some documentation on it working.


> 
> Well, perhaps the "server" mode is not the best idea, and perhaps the 
> would be a way to use Sage as a library... I don't know and I trust you 
> for this.... If I am just asking for something that is already 
> available, though, it seems clear we need a very good documentation 
> about it !!! :-)


You could also use Sage as a library.  Any python program can do:

from sage.all import *

and instantly they have the full Sage namespace at their command.

Or you could just write the GUI in something like PyQT (a Python-QT 
interface) and then have Sage actually run it.

Of course, for the GUI suggestions, you need to have Sage running on the 
local computer, so you'd need to not be running Windows.  The remote 
server option is the only workable solution for all of Sage on a Windows 
platform.

Jason


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

Reply via email to