On 21 July 2014 19:35, Ralf Hemmecke <[email protected]> wrote:
> On 07/22/2014 12:00 AM, Waldek Hebisch wrote:
>> ...
>> 3) I am not sure how far we should go with formatting
>>    capabilities (in particular, if OutputForm is supposed
>>    to contain yet another page description langage), but
>>    _if_ we include such things like 'center' then all
>>    formatters should make best effort to implement it.
>

I think it is correct to think of OutputForm as an intermediate
presentation language, that is what you call a "page description
language".  As you imply its purpose is to abstract formatting details
so that individual formatters can implement features appropriate to
their target environment.  But as Ralf pointed out OutputForm in
FriCAS does not currently implement center (and also left and right)
in this way.
 ...
> Looking at Aldor again... There is no OutputForm. First I had the
> impression, that everything should be done as
>
>   stdout << "blah" << someObject << newline
>
> but that's only the first impression. libalgebra in Aldor also has
> ExpressionTree and nearly every domain knows how to coerce to
> ExpressionTree. In some way, It's like OutputForm and can also be used
> like this, since there is a function
>
>   <<: (TextWriter, ExpressionTree) -> TextWriter
>
> Well, that's one-dimensional output, but basically the same idea as with
> OutputForm.
>
> Eventually, OutputForm might disappear and be replaced by a more general
> expression tree structure. That structure shouldn't know much about
> center or such, but rather just be an expression tree (which is
> basically what all the other CAS have). From that there should be
> formatters into TeX, MathML, etc. These formatters might return just
> lists of strings. Another package then takes these strings and puts them
> onto a certain stream (file or screen).

I am concerned that you are mixing the notion of presentation with
semantics.  An ExpressionTree in Aldor is similar to InputForm in
FriCAS.  We can use unparse in FriCAS to produce one-dimensional
output from InputForm.  The intention is that this one-dimensional
output should contain enough semantic information to allow the FriCAS
interpreter to unambiguously parse and interpret it as the same object
from which it was derived.  Some modern languages, e.g. Python and
therefore also Sage call this "pickling".

As a data structure for representing either InputForm or OutputForm I
do not see that ExpressionTree offers any advantages over SExpression.

> ...
> ad 3) I'm in favour of some expression format that can be shown nicely
> and also be cut&paste back as input.
>

The developers of OpenMath and MathML have worked for several years to
try to solve the problem of displaying mathematics nicely while
retaining enough semantic information to allow it to be exchanged and
cut-and-paste within and between systems.  I think that this is not a
simple problem and somewhat orthogonal to the purpose of OutputForm.

Regards,
Bill Page.

-- 
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 http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to