Le mar. 7 mai 2024 à 13:41, Ralf Hemmecke <r...@hemmecke.org> a écrit :

> On 5/7/24 13:22, Grégory Vanuxem wrote:
> >> )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 requires switching off algebra though,
>
> Why would that be a problem?
>

No problem at all. In fact I did not know how to use the mode as explained
in your mail.


> > and frankly I really like the work done by the Julia community
> > for outputting their objects.
>
> But hey, that was exactly, why I gave you the "pile" function above.
> Assuming that you get the julia output as a list of lines/string, you
> just have to convert them to a list li of type List(Symbol) and form the
> OutputForm for that result by saying pile(li). And then let Format2D do
> the rest (which basically just prints that OutputForm without any
> modification as in Julia). Other FriCAS stuff is still printed very
> similar to the original algebra output of FriCAS. Try it out.
>

Of course, I did, and will  test it more for sure. But the code is almost
done, it was the first time I used AI generated code. By inadvertence
Copilot  gave me a piece of AI generated Julia code, even better than what
I was finding about redirecting IO etc.
I also asked if it can code in FriCAS Spad, and after a topo on FriCAS and
Spad, it responded yes, I just had to fix it, FriCAS from my voice is
interpreted as fricassée ;). Not as good as Julia but that's a beginning. I
asked it to code a factorial function, it gave me a FACTORIAL domain with
factorial in it. The future is already here. Highly based on your github.io
work from what I have seen ;)

To come back to this discussion, I really need a string representation to
conform to FriCAS "conventions, and I do not like using Julia to print
something on the terminal, I was doing that. Moreover I have added some
times ago some code to use the PCRE library so  I can catch a regular
expression, do some replacements, etc. So having a string is very important
to me to output it. I even plan unless it is available in FriCAS to add a
'split" function, this is always handy.


However, I am not sure whether a normal user would actually want
> "julia-tagged" values look different from equivalent FriCAS values. On
> the other hand, the type decides how its elements are printed. So, why not.
>

I dislike that a lot, but, "julia-tagged" wording is good to me. I am in
the process of removing it as a collateral task. With more improvement in
this direction.

- Greg

PS: I forgot to send this email...

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAHnU2dZ9f9RYKyc9eXYqFaPC_zWPwKuZagOnZtBatEZgUUe1qg%40mail.gmail.com.

Reply via email to