Hello,
Le mar. 7 mai 2024 à 11:16, Ralf Hemmecke <[email protected]> a écrit :
>
> > is present in a string. Next, it's outputString in i-output.boot that
> > needs a little tweaking for me. In fact, I've bypassed the part of the
> > code that breaks lines.
>
> Well, you could set the output length to the maximum.
>
> )set output length 245
>
> There is also another option use Format2D.
>
> )set output algebra off
> )set output formatted on
> LOFC ==> List(OutputFormatterCategory)
> setFormats!([Formatter Format2D] pretend LOFC)$FormattedOutput
> pile(["long string", "another long string"])$OutputForm
It could be of use to me, yes. I am recording it it!
It requires switching off algebra though, and frankly I really like the
work done by the Julia community for outputting their objects.
No plain text mail, sorry.
>
> If you do not want to see quotes, then convert to Symbol.
>
> pile(["long string"::Symbol, "another long string"::Symbol])$OutputForm
>
> Format2D should work reasonably well maybe sometimes even better than
> i-output.boot, but it never breaks lines.
Personally, omitting the place of displayed type, time, memory usage and so
on, I prefer "data'' line cutted by the console. I am even asking myself
now if the underlying CL system does not have a way to interact with the
console for its parameters. More to look at. But, I "struggled" too much
with this, understanding the functions flows in outputting FriCAS objects,
I even loved the function 'name concatTrouble'. I'm not a big fan of coding
aesthetic things like this. Readability is also important of course and the
first time I tried Axiom, I was astonished by its 2D printing, do not take
my critics wrong.
I did not know your way of printing, I tried yesterday the formatted output
but had no output, I better understand now. The output is still buggy since
the output is no longer saved by the system command )spool, it's a pity.
There are rooms of work to do. One is using at Spad level I think #\newline
instead of letting the interpreter do all the job line by line (cutting it
etc.).
An example below with algebraic numbers à la Nemo (partially printed in
real/complex form). I really prefer your and my ways.
As one can see matrices are often very badly printed on screen, even if for
small sized matrices with small outputted elements that is a beautiful
work. Some options are available I think to better handle default mechanism
for matrices thought.
(14) -> pile([b])$OutputForm
4×4 Matrix{QQBarFieldElem}:
Root 0.472954 of 18x^2 - 36x + 13 Root 16.0000 of x - 16 Root -1.72973
of 37x + 64 Root -1.51136 of 88x + 133
Root 0 of x Root 0.500000 of 2x - 1 Root -3.31662
of x^2 - 11 Root 2.00000 of x - 2
Root 104.000 of x - 104 Root -3.72727 of 11x + 41 Root -
0.723577 of 123x + 89 Root 4.23810 of 21x - 89
Root -1.21157 of 12x^2 - 16x - 37 Root -1.44737 of 38x + 55 Root 2.25316
of 79x - 178 Root -2.80000 of 5x + 14
Type:
OutputForm
Time: 0
sec
(15) -> b
4×4 Matrix{QQBarFieldElem}:
Root 0.472954 of 18x^2 - 36x + 13 Root 16.0000 of x - 16 Root -1.72973
of 37x + 64 Root -1.51136 of 88x + 133
Root 0 of x Root 0.500000 of 2x - 1 Root -3.31662
of x^2 - 11 Root 2.00000 of x - 2
Root 104.000 of x - 104 Root -3.72727 of 11x + 41 Root -
0.723577 of 123x + 89 Root 4.23810 of 21x - 89
Root -1.21157 of 12x^2 - 16x - 37 Root -1.44737 of 38x + 55 Root 2.25316
of 79x - 178 Root -2.80000 of 5x + 14
Type: JuliaMatrix
(NemoAlgebraicNumber)
Time: 0
sec
(16) -> juliaMPrint(false)$JMATRIX(NAN)
true
Type:
Boolean
Time: 0
sec
(17) -> b
[[Root 0.472954 of 18x^2 - 36x + 13] [Root 16.0000 of x - 16] [Root -
1.72973 of 37x + 64] [Root -1.51136 of 88x + 133]]
[
]
[ [Root 0 of x] [Root 0.500000 of 2x - 1] [Root -
3.31662 of x^2 - 11] [Root 2.00000 of x - 2] ]
[
]
[ [Root 104.000 of x - 104] [Root -3.72727 of 11x + 41] [Root -
0.723577 of 123x + 89] [Root 4.23810 of 21x - 89] ]
[
]
[[Root -1.21157 of 12x^2 - 16x - 37] [Root -1.44737 of 38x + 55] [Root
2.25316 of 79x - 178] [Root -2.80000 of 5x + 14] ]
Type: JuliaMatrix
(NemoAlgebraicNumber)
Time: 0.01 (OT) = 0.01
sec
(18) -> )set out alg on
(18) -> )set out form off
(18) -> b
(18)
[
[[Root 0.472954 of 18x^2 - 36x + 13], [Root 16.0000 of x - 16],
[Root -1.72973 of 37x + 64], [Root -1.51136 of 88x + 133]]
,
[[Root 0 of x], [Root 0.500000 of 2x - 1], [Root -3.31662 of x^2 - 11],
[Root 2.00000 of x - 2]]
,
[[Root 104.000 of x - 104], [Root -3.72727 of 11x + 41],
[Root -0.723577 of 123x + 89], [Root 4.23810 of 21x - 89]]
,
[[Root -1.21157 of 12x^2 - 16x - 37], [Root -1.44737 of 38x + 55],
[Root 2.25316 of 79x - 178], [Root -2.80000 of 5x + 14]]
]
Type: JuliaMatrix
(NemoAlgebraicNumber)
Time: 0.01 (OT) = 0.01
sec
(19) -> juliaMPrint(true)$JMATRIX(NAN)
(19) false
Type:
Boolean
Time: 0
sec
(20) -> b
(20)
4×4 Matrix{QQBarFieldElem}:
Root 0.472954 of 18x^2 - 36x + 13 Root 16.0000 of x - 16 Root -1.72973
of 37x + 64 Root -1.51136 of 88x + 133
Root 0 of x Root 0.500000 of 2x - 1 Root -3.31662
of x^2 - 11 Root 2.00000 of x - 2
Root 104.000 of x - 104 Root -3.72727 of 11x + 41 Root -
0.723577 of 123x + 89 Root 4.23810 of 21x - 89
Root -1.21157 of 12x^2 - 16x - 37 Root -1.44737 of 38x + 55 Root 2.25316
of 79x - 178 Root -2.80000 of 5x + 14
Type: JuliaMatrix
(NemoAlgebraicNumber)
Time: 0
sec
(21) ->
As you can see, I have the same output Ralf.
And sorry again for the non plain text mail.
- Greg
P.S.: I use cut and paste console text in a themed editor before pasting
it here. This allows me to easily bypass the line cut done in Google Mail.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZq2ikq6sk_cwVYYbzjGgUTUZDiSGt1RPp%2Brsf%2BhPGFVQ%40mail.gmail.com.