Martin R wrote:
>
> given the continued interest in some features of fricas from some sage
> users, I had a look at the fricas interface in sage, and I'm thinking of
> improving it.
>
> The main question is: how can sage receive the output from fricas?
>
> currently, sage essentially sends "unparse(result:InputForm)" to fricas,
> and then parses the output: it strips away the prompt and the step number
> and it looks for the type information, all using regular expressions.
>
> a first improvement I was thinking of is to use the ioHook to separate the
> algebra output from the remaining information. however, at least the step
> number appearing just before the algebra output is currently not decorated.
>
> is there a better way to get the results of computations - and also to send
> instructions to fricas?
There are many ways. Some issues were discussed few years
ago when Serge D. Mechveliani tried to create interface
between FriCAS and Haskell.
I suspect that you want to do little improvement as opposed
to major rewrite, so some ideas that _may_ be easy:
- using S-expressions to communicate with FriCAS. On FriCAS
side it is quite easy to generate textual form of S-expressions.
S-expressions were designed to be easy to parse, so handling
them on Python side should be easy too
- as Dima wrote Sage interface to Maxima works by putting Maxima
in the same process as Sage. This should be possible with
FriCAS too. I just checked that using Maxima build on to
of sbcl and 'load-fricas.lisp' both FriCAS and Maxima seem
to work in single process. So it seems that small adjustment
to build system should be enough
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.