Discussion:
[fricas-devel] TEXmacs as interface
Slawomir Kolodynski
2018-07-01 13:23:01 UTC
Permalink
I am trying to use GNU TEXmacs as interface to Fricas. I have installed
Fricas 1.3.3 by downloading the tar with binaries and the fricas script is
on PATH so I can start fricas from shell by typing "fricas". I also have
Texmacs 1.0.7.18 installed from Linux Mint repositories. I assume the
Fricas plugin is installed because I can see Fricas as one of the options
to select from the Texmacs Insert --> Session menu. However, when I select
Fricas there I get "Busy" then "Dead" indication from Texmacs.
Does Texmacs 1.0.7.18 work with Fricas 1.3.3? If not, what is a version
combination that is known to work? Should I configure Texmacs somehow to
point to the location of fricas binaries? How would I do that?

Thanks,

Slawomir
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Kurt Pagani
2018-07-01 20:55:07 UTC
Permalink
Usually this works well. However, you should check the following
items/prerequisites:

1. Where is the fricas plugin installed? (should be either local or global
but not both)
In ~/.TeXmacs/plugins/fricas/progs/ or globally, e.g.
/usr/local/share/TeXmacs/plugins/ ?

2. Does $ fricas -texmacs work?

***@nilqed:~$ fricas -texmacs

FriCAS Computer Algebra System
Version: FriCAS 1.3.3
Timestamp: Don Apr 12 19:26:08 CEST 2018
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
Value = #<INTERPRETED-FUNCTION NIL {100258211B}>
prompt#(2) -> )quit

3. In the file init-fricas.scm (folder: TeXmacs/plugins/fricas/progs/)

find the routine

(plugin-configure fricas
(:require #t)
(:launch "fricas -texmacs")
(:session "Fricas")
(:serializer ,fricas-serialize)
(:scripts "Fricas"))

and check the field :launch and :session.
In :launch you may set the full path to fricas, although not necessary.

If all these points are ok, then it should work ...
BTW: your TeXmacs versions is quite old.
I've attached my config in a pdf, maybe it will help you to find the error.
Post by Slawomir Kolodynski
I am trying to use GNU TEXmacs as interface to Fricas. I have installed
Fricas 1.3.3 by downloading the tar with binaries and the fricas script is
on PATH so I can start fricas from shell by typing "fricas". I also have
Texmacs 1.0.7.18 installed from Linux Mint repositories. I assume the
Fricas plugin is installed because I can see Fricas as one of the options
to select from the Texmacs Insert --> Session menu. However, when I select
Fricas there I get "Busy" then "Dead" indication from Texmacs.
Does Texmacs 1.0.7.18 work with Fricas 1.3.3? If not, what is a version
combination that is known to work? Should I configure Texmacs somehow to
point to the location of fricas binaries? How would I do that?
Thanks,
Slawomir
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Bill Page
2018-07-01 21:24:30 UTC
Permalink
Post by Kurt Pagani
...
I've attached my config in a pdf, maybe it will help you to find the error.
Kurt,

I took a quick look at you config file but haven't had a chance yet to
compare it to the one distributed with FriCAS. Have you made many
improvements and/or extensions? If so, it would be nice to get these
into the distribution.

Thanks.

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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Kurt Pagani
2018-07-01 22:24:25 UTC
Permalink
Post by Bill Page
but haven't had a chance yet to
compare it to the one distributed with FriCAS
Oh dear, you're right, I didn't think of that.

@Slawomir: see the official version
https://github.com/fricas/fricas/tree/master/contrib/texmacs

@Bill
I certainly added some stuff (a lot provided by you, as I remember) but I've no
clear recollection at the moment. I need to compare as well.
Post by Bill Page
Post by Kurt Pagani
...
I've attached my config in a pdf, maybe it will help you to find the error.
Kurt,
I took a quick look at you config file but haven't had a chance yet to
compare it to the one distributed with FriCAS. Have you made many
improvements and/or extensions? If so, it would be nice to get these
into the distribution.
Thanks.
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Slawomir Kolodynski
2018-07-15 16:50:20 UTC
Permalink
Post by Kurt Pagani
Where is the fricas plugin installed?
I found it in /usr/share/texmacs/TeXmacs/plugins/fricas
$> /usr/share/texmacs/TeXmacs/plugins/fricas $ ls
doc progs
Post by Kurt Pagani
2. Does $ fricas -texmacs work?
I am not sure. FriCAS seems to start, the output looks as follows

$> fricas -texmacs
Checking for foreign routines
AXIOM="/usr/local/lib/fricas/target/x86_64-linux-gnu"
spad-lib="/usr/local/lib/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result -2
FriCAS Computer Algebra System
Version: FriCAS 1.3.3
Timestamp: Mon Mar 12 21:48:52 CET 2018
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------

Value = #<INTERPRETED-FUNCTION NIL {10048BFF3B}>
prompt#(1) -> )quit

Does that "openServer result -2" suggest something is not right?

My init-fricas.scm was as follows:

(define (fricas-initialize)
(import-from (utils plugins plugin-convert))
(import-from (utils plugins plugin-cmd))
(import-from (dynamic session-menu))
(import-from (fricas-kbd))
(import-from (fricas-menus))
(lazy-input-converter (fricas-input) fricas))

(plugin-configure fricas
(:require (url-exists-in-path? "fricas"))
(:initialize (fricas-initialize))
(:launch "fricas -texmacs")
(:session "Fricas")
(:scripts "Fricas"))

I replaced it from by the one from
https://github.com/fricas/fricas/blob/master/contrib/texmacs/fricas/progs/init-fricas.scm
and now it looks like this:

(plugin-configure fricas
(:require (url-exists-in-path? "fricas"))
(:launch "fricas -texmacs")
(:session "FriCAS")
(:scripts "FriCAS"))

(when (supports-fricas?)
(import-from (fricas-kbd))
(import-from (fricas-menus))
(lazy-input-converter (fricas-input) fricas))

This did not fix the problem,

Thanks,

Slawomir
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
oldk1331
2018-07-16 01:59:27 UTC
Permalink
Hi Slawomir,

TeXmacs 1.0.7.18 was released 5 years ago, you should try more recent
version, like 1.99.7.
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Slawomir Kolodynski
2018-07-17 17:45:35 UTC
Permalink
Indeed, installing TEXmacs 1.99.7 fixed the problems.

Thank you all for help

Slawomir
Post by oldk1331
Hi Slawomir,
TeXmacs 1.0.7.18 was released 5 years ago, you should try more recent
version, like 1.99.7.
--
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+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...