Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-30 Thread Kurt Pagani
On 29.10.2020 18:30, Bill Page wrote:

> 
> By )gnuplot are you suggesting a new command in FriCAS with this name?

Not really. In jfricas there are some fake system commands, ")python" for
instance, which are captured and handled by the ipython interpreter. One such
command was (deactivated at the moment) ")gnuplot", that allowed to write
arbitrary GnuPlot commands into the NB cell, wherbey data comes from Fricas via
the PLOT and PLOT3D domains.

> 
> Is your idea to provide tools in FriCAS just to generate package
> independent data and then call an external package with the
> desired options/functionality to actually produce the graphics?

You hit the nail. The gle.spad that I mentioned in a former mail is quite old,
and I have a newer one (must have forgotten, although it is dated August 2020) 
here:

https://github.com/nilqed/spadlib/blob/master/gle/src/gle.spad

It requires (on debian):  apt install gle-graphics.

GLE is similar to Asymptote, https://asymptote.sourceforge.io/ , but has IMO
some advanatges.

As you indicated, data is generated by another package: PLTSPT ==> PlotSupport
is required.

https://github.com/nilqed/spadlib/blob/master/pltspt/src/pltspt.spad

I suppose this could be a path, but I have to refresh mind and do some
documentation first.

Best wishes
Kurt
> 
> Bill.
> 


-- 
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/8b4d0a90-6f83-4114-7ec0-b123ce51e360%40gmail.com.


Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-29 Thread Bill Page
Thanks for taking the bait! :-)

On Thu, Oct 29, 2020 at 12:11 PM Kurt Pagani  wrote:
> ...
> https://fricas.github.io/api/GnuDraw.html?highlight=gnudraw
>
> It seems to be the only method at the moment (besides the built-in "draw")
> that can reliably produce graphics using fricas data. It is easy to use it in
> TeXmacs. One has to define a small function which calls gnuplot and
> inserts the picture into TM (there is a package TexmacsSupport @
> https://github.com/nilqed/spadlib/tree/master/tmspt (file src/tmspt.spad)
> which may help to show how it might go (see test_gnudraw.pdf), i.e.
> one has to combine the commands into a function ...
>

I greatly appreciate the hints and examples.

> ...
> Probably the Gnuplot plugin of TeXmacs could be called from within the
> fricas plugin (the scheme commands are known), however, it seems more
> simple to me using GnuDraw and insert produced png/ps or whatever than
> using another plugin.

Maybe you are right. I just seems a bit messy to have to use a
temporary file to communicate.

> >
> > I think Kurt and Ralf are/were thinking of something like this for the
> > FriCAS Jupyter interface.
>
> We were (actually still are), but Ralf thought, it's better to start
> without graphics in the first release. He's certainly right, as there
> still is the agony of choice and lack of a reliable link to produce
> data from fricas objects.
> ...
> My favourite still is GLE (BSD, c code, only QGLE is LGPL). Provides
> really HQ (eps,pdf,...), or LaTeX/PGF/TikZ (GeoGebra, for instance,
> can export PGF).
>
> https://kfp.bitbucket.io/tmp/GLE.html
>

Looks great to me.

> You see, there are a lot of prototypes in the pipeline, however,
> without an initial impetus/decision which system to use (lcd) it
> might take ages ...
>

Let me at least add my strong encouragement for this addition to jfricas.

>
> BTW, I also find the "draw commands" not very flexible. It would be
> easy to slightly modify the draw and view2/3.spad files (as I did 4y
> ago according github;) in order to use one of the plot packages
> mentioned, but then you're sticked to those few methods/parameters.
> IMO a free format like )gnuplot or  )mplot should be used if one
> needs more than a toy.
> https://github.com/nilqed/fricas_input/tree/master/spad/draw
>

By )gnuplot are you suggesting a new command in FriCAS with this name?

Is your idea to provide tools in FriCAS just to generate package
independent data and then call an external package with the
desired options/functionality to actually produce the graphics?

Bill.

-- 
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/CAC6x94RdiSkaSJx2Uou0w33wBEt3OoUrvMC3LGMVF5-fsv6L2Q%40mail.gmail.com.


Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-29 Thread Ralf Hemmecke
> My favourite still is GLE (BSD, c code, only QGLE is LGPL). Provides really HQ
> (eps,pdf,...), or LaTeX/PGF/TikZ (GeoGebra, for instance, can export PGF).
> 
> https://kfp.bitbucket.io/tmp/GLE.html

Wow! That looks impressive. Kurt, I want that. Obviously you seem to
have connected the FriCAS drawing enginge with this to get something in
jfricas.

What exactly is needed to get this at least under jfricas?
Anything that must go into the fricas master branch?
What other prerequisites?

Kurt, you are really a great master.

Ralf

-- 
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/5d7da59e-1af6-722a-81a0-1d2a1f50476b%40hemmecke.org.


Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-29 Thread Ralf Hemmecke
> BTW, I also find the "draw commands" not very flexible. It would be easy to
> slightly modify the draw and view2/3.spad files (as I did 4y ago according
> github;) in order to use one of the plot packages mentioned, but then you're
> sticked to those few methods/parameters. IMO a free format like )gnuplot or
> )mplot should be used if one needs more than a toy.
> https://github.com/nilqed/fricas_input/tree/master/spad/draw

The graphics system of FriCAS allows to interact with the graphics. If
ever there is a replacement, it should also allow interaction. So if you
want to choose an external plotting tool, choose something that allows
interaction.

If I were much interested in graphics, I would simply choose a tool and
then write a FriCAS package that simply translates plotting commands
from the FriCAS side to the appropriate equivalent in the external
plotting tool. But hey, Kurt, that is your favourite to experiment.

I am currently much more interested in someone who is able to connect
flintlib.org to FriCAS. That would help me (and FriCAS) quite a bit.

Ralf

-- 
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/54c51a18-a7fd-031d-0dda-88342c3af857%40hemmecke.org.


Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-28 Thread Bill Page
On Wed, Oct 28, 2020 at 11:56 AM Kostas Oikonomou
 wrote:
>
> To answer your questions, I am not a very sophisticated Fricas
> user, so I don't write SPAD code.

:) Well, you are already using FriCAS so I would say that you are
rather sophisticated!

The SPAD compiler is frustrating by modern standards but the language
itself is quite straightforward, albeit a bit overly pedantic,
compared to the interpreter. I think most people could easily learn to
program in SPAD from a few basic examples.

> But, more importantly, TeXmacs is not really a programmer's editor
> like Emacs. It is an editor for scientific (technical) documents.

What I had in mind is perhaps little like the literate programming
ideal that was promulgated by the original Axiom parent project (and
still in use there). I never liked the idea much when it came to
maintaining existing Axiom system code but it still makes sense to me
in the case of the activity of scientific application programming
itself.

>  (Nevertheless, it knows how to typeset fragments of many
> programming languages so they look good when included in
> a document. By "programming languages" we also mean
> computer algebra systems.)

I agree.

> So for writing SPAD code I would use Emacs, or some other
> IDE, if you prefer.

Wel, OK.  There are valid arguments however that code and
documentation really belong together, especially in the case of
research.

What I had in mind perhaps could be done in TeXmacs by inventing a new
FriCAS session type just for the compiler. The main difference would
be that the contents of a SPAD session would be compiled instead of
being interpreted.

>
> With respect to including graphics in a document, there
> is a sophisticated interface that handles eps, pdf, png.
> You can access it by the button with the picture of a tree
> in the second row of the buttons at the top of the window.

Hmm, FriCAS does have some preliminary support for the generation of
GNUplot input data. I wonder if that could be used together with the
GNU plot plugin for TeXmacs - or some other similar graphics plugin?

I think Kurt and Ralf are/were thinking of something like this for the
FriCAS Jupyter interface.

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


Re: [fricas-devel] FriCAS and TeXmacs update

2020-10-28 Thread Kostas Oikonomou

Hi Bill,

Yes, TeXmacs has made huge progress over the last few years, and is 
continuing to do so.
Just as one example, the Fricas interface typesets the integral on p. 66 
of the Fricas book with

very nice line breaking.

To answer your questions, I am not a very sophisticated Fricas user, so 
I don't write SPAD code.
But, more importantly, TeXmacs is not really a programmer's editor like 
Emacs. It is an editor for
scientific (technical) documents.  (Nevertheless, it knows how to 
typeset fragments of many programming
languages so they look good when included in a document. By "programming 
languages" we also mean
computer algebra systems.)  So for writing SPAD code I would use Emacs, 
or some other IDE, if you prefer.


With respect to including graphics in a document, there is a 
sophisticated interface that handles eps, pdf, png.
You can access it by the button with the picture of a tree in the second 
row of the buttons at the top of the window.
To understand it in detail, the TeXmacs help system is very good, like 
that of Emacs.  E.g., Help -> Search -> Documentation, and then typing 
"picture" gives a number of hits, the relevant one being "inserting images".


Even better, if you are not adverse to reading manuals, the full TeXmacs 
manual in PDF is an excellent source:


http://www.texmacs.org/tmweb/help/learn.en.html

This contains all of the material in the "Help" menu in one document. 
For images, see sec. 5.2.


                        Kostas


On 10/27/20 1:11 PM, Bill Page wrote:

Kostas,

Thank you for the link to the updated Linux binaries for TeXmacs.
After some initial testing I think things seem to have improved
significantly since the last time I used TeXmacs and FriCAS together a
few years ago. TeXmacs seems more reliable and more responsive than it
did back then. I had no problem accessing FriCAS immediately after
installing TeXmacs and Greek characters and other special symbols
worked as expected. I will probably try using this combination for my
next FriCAS project.

I have a couple of questions. Do you also use TeXmacs to edit SPAD
code? If so, do you have any "best practices" advice about editing,
compiling and running custom SPAD code in this environment? Second, is
there some way to embed FriCAS-generated graphics/plots into TeXmacs
documents?

Maybe this is a good time to put a little more emphasis on this
alternative user interface for FriCAS.

Bill Page.

On Mon, Oct 26, 2020 at 6:43 PM Kostas Oikonomou
 wrote:

Thanks to everyone who helped resolve this problem.

As an aside, if anyone wants to try the latest TeXmacs, there are
*static* binaries for Linux now available, which should make the
installation painless:

http://www.texmacs.org/tmweb/download/linux.en.html

(There seem to be static binaries for MacOS and Windows as well.)

  Kostas


--
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/8c8b85b9-965d-526f-a0ac-dbee8707e7c6%40gmail.com.