Menu

#4 Monospace output formatter

open
nobody
None
5
2014-04-04
2014-04-04
No

Please could you add this formatter to the next release:

https://github.com/martinbaker/multivector/blob/master/monospace.spad.pamphlet

The documentation is here:

http://www.euclideanspace.com/maths/standards/program/mycode/output/monospace/

(this contains diagrams that I can't put in the pamphlet)

Its just an optional output formatter with the same structure as the other formatters. This is designed to output to a monospace device such as the command line console.

I know you and Ralf are determined to translate i-output.boot to SPAD by a literal translation directly from the boot code (good luck with that). This code is completely independent of that, there is no suggestion here of ever making this the default console output.

The aim of this is to use as the template for more specialist monospace formatters. It would really help me develop this if you could put it in the next release.

Also you could look at this as a form of insurance, if you run into problems doing a literal transpose of i-output.boot, or if the code produced turns out to be difficult to modify or badly documented, then you would keep open the option of developing this.

As it stands I think the code here does a reasonable job of displaying all the various types of expressions in FriCAS, although it is not perfect. It does not yet handle line wrapping very well, as you pointed out this is difficult to do, but I'm not convinced that it is as difficult as you suggest. The program currently generates an array of Character and then outputs this array to the output device. I could easily check the width of this array and, if greater than the line width, choose a place to divide it that does not break apart numbers or names.

Discussion


Log in to post a comment.