On Dec 26, 2009, at 12:42 PM, Martin Rubey wrote:
> William Stein <[email protected]> writes:
>
>>> I admit however, that calling FriCAS from sage is very awkward,
>>> since
>>> the interface is absolutely dumb.
>>
>> Could you please give constructive criticism instead? I for one
>> appreciate the work Bill Page did at Sage Days 2 to write an axiom
>> interface. I think enumerating some specific criticism of it would
>> be
>> more useful. If you've already done so, maybe you could post a link?
>
> I also think that Bill Page did and does a good job.
>
> The main thing that's missing is a proper way to translate between
> fricas and sage types.
Yes.
> Eg: (without understanding the issues involved...)
>
>>> sage: fricas.integrate('sec(t)*tan(t)','t=0..%pi/3','"noPole"')
>>> 1
>
> why is it, that I can't write
>
> fricas.integrate(sec(t)*tan(t),(t,0,%pi/3),"noPole")
You can do fricas.eval("...any valid fricas command..."), though
fricas.integrate(...) and integrate(..., algorithm='fricas') should
work much better.
> (and I think that "SegmentBinding", i.e., something of the form
>
> t=a..
>
> or
>
> t=a..b
>
> is something missing from sage. On the other hand, "=" seems to be
> reserved for keyword arguments and assignment in python, except that
> sage uses it at least in "limit" also in the sense of an equation.
Yes, that is correct. The decision to stay close to Python is a
constraint in some ways, but in many others is a huge benefit.
> I would have expected "==".)
> FriCAS has a type called InputForm, which (in an ideal world) captures
> the semantics of any given object. (I guess, it's somewhat similar to
> the pickle mechanism?)
Sage has an input form as well:
sage: R.<t> = QQ[]
sage: sage_input(t^3-t)
R.<t> = QQ[]
t^3 - t
sage: R.<t> = GF(101)[]
sage: sage_input(random_matrix(ZZ, 2, 2) + t)
R.<t> = GF(101)[]
matrix(R, [[t, 1], [96, t + 98]])
Pickling is a binary representation, more optimized for compactness
and speed (and also may store pre-computed cached data).
> I think we would need a FriCAS-SAGE programmer, who implements a
> dictionary style translation between the two type systems. But maybe
> I'm too optimistic here...
Well, I'm pretty sure there's not a FriCAS equivalent of every Sage
type, and vice-versa, but even doing a little better would be very
useful (right now, it doesn't do anything that's not just passing
strings back and forth.
- Robert
--
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