|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
|
|
|
Re: Re: TeXmacs interface to OpenAxiomOn Tue, Sep 29, 2009 at 03:35:46AM -0500, Gabriel Dos Reis wrote:
> > I did a little testing. First I did 'apt-get install texmacs' on my > > Debian 5.0 system where I have all three of Axiom, OpenAxiom and > > FriCAS installed. Starting texmacs I tried to 'Insert/Session" but I > > noticed that the 'Axiom" option was not present. So I did a little > > digging and found that the tm_init script is looking for a specific > > file named '/usr/bin/axiom'. I created a symbolic link from > > /usr/bin/axiom -> /usr/local/bin/open-axiom and then I was apparently > > able to start an "Axiom" session but I got symptoms very similar to > > what you described - except worse. I had to enter something 5 or 6 > > times before it produced any output and then sometimes it still did > > not work. > > I build and installed TeXmacs from the sVN source. Curiously, I would not > find trace of the 'tm_init' program in the destination (for me, it is > /usr/local) by a recursive `find'. Joris, is that program supposed to be > installed through special incantation? No, there is no such program in TeXmacs. This is probably something someone wrote for the Axiom side. > I think looking for the hard path "/usr/bin/axiom" is a mistake. That should be > looked for only if a relative serach from PATH fails. Once, I understand > the intricacies of the plugins (yes. I've read the doc), I'll contribute code > for looking for OpenAxiom. But, right now, it looks as if half of the TeXmacs > helper programs were never installed when I issued `make install'. TeXmacs has no special logic to search for plug-ins (except testing whether a file exists or whether a file exists in a path, such as $PATH). It is the responsability of the plug-in to find the corresponding program, if it is installed. For most plug-ins (see the other plug-ins) it indeed suffices to check whether the program is in the path. Notice that this point may also require special treatment on Windows. > > Instead of starting texmacs to test, you can run tm_axiom filter > > directly like this: > > > > /usr/lib/texmacs/TeXmacs/bin/tm_axiom For debugging, you can also launch TeXmacs using texmacs --debug-io Best wishes, --Joris _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
|
|
Re: TeXmacs interface to OpenAxiomReplying to this thread is getting complicated, but I'll try :-)
Gabriel Dos Reis wrote: > Bill, thanks for this detailed inverstigation. See my comments below. > > On Mon, Sep 28, 2009 at 9:15 PM, Bill Page <bill.page@...> wrote: >> On Mon, Sep 28, 2009 at 7:24 PM, Bill Page wrote: >>> I know that OpenAxiom has introduced it's own "driver" programmed >>> called open-axiom to replace the old shell script called 'axiom'. I am >>> not familiar with how open-axiom hands-off the input-output to sman, >>> clef and AXIOMsys. �Perhaps Gaby can help here. �But I wonder if all >>> of these layers do not somehow interfere with the tm_axiom >>> communication protocol. > > Indeed, the OpenAxiom driver is a native C program so that the > same source code is used on Windows and Unix systems. > Invoking OpenAxiom as > > open-axiom --no-server > > will disable sman (e.g. equivalent to old -nosman). It is also > the prefered way to invoking AXIOMsys directly -- there are more > setups automatically handled by the open-axiom driver that is > not done by AXIOMsys. Ideally, users should not have to know > about the existence of AXIOMsys. > >>> Kostas wrote: >>>> Removing the Windows-specific stuff from the TeXmacs interface that >>>> comes with OpenAxiom seems more difficult to me. >>>> >>> You should be able to get the old tm_axiom code to work. �The first >>> thing that I would try is to call AXIOMsys directly instead of >>> open-axiom. �(Or perhaps Gaby can suggest some command line options >>> for open-axiom that will result in the same thing.). �If you do call >>> AXIOMsys directly you will have to deal with the fact that AXIOMsys >>> only returns one >>> >>> �(1) -> >>> >>> prompt while calling open-axiom (and fricas and the original axiom >>> script) return this prompt twice because internally sman starts a new >>> "frame". > > 'open-axiom --no-server' does not show that annoying problem. Indeed. I tried that, and the Axiom interface that comes standard with TeXmacs 1.0.7.2 works beautifully. Thanks very much. As far as I'm concerned, the TeXmacs interface issue for OpenAxiom is solved. > >>> If some of these details don't mean much to you right now, please just >>> ask. I would be glad to help you get this working properly but I am >>> reluctant to spend much time on it for my own purposes. >>> >> I did a little testing. �First I did 'apt-get install texmacs' on my >> Debian 5.0 system where I have all three of Axiom, OpenAxiom and >> FriCAS installed. Starting texmacs I tried to 'Insert/Session" but I >> noticed that the 'Axiom" option was not present. �So I did a little >> digging and found that the tm_init script is looking for a specific >> file named '/usr/bin/axiom'. In my TeXmacs 1.0.7.2 there is no tm_init. I created a symbolic link from >> /usr/bin/axiom -> /usr/local/bin/open-axiom and then I was apparently >> able to start an "Axiom" session but I got symptoms very similar to >> what you described - except worse. I had to enter something 5 or 6 >> times before it produced any output and then sometimes it still did >> not work. > > I build and installed TeXmacs from the sVN source. Curiously, I would not > find trace of the 'tm_init' program in the destination (fro me, it is > /usr/local) > by a recursive `find'. Joris, is that program supposed to be installed > through special incantation? I agree that looking for /usr/bin/axiom is bad, but this is not what's happening in TeXmacs 1.0.7.2, the latest stable release, so it's not really an issue. > I think looking for the hard path "/usr/bin/axiom" is a mistake. That should be > looked for only if a relative serach from PATH fails. Once, I understand > the intricacies of the plugins (yes. I've read the doc), I'll contribute code > for looking for OpenAxiom. But, right now, it looks as if half of the TeXmacs > helper programs were never installed when I issued `make install'. > > >> Instead of starting texmacs to test, you can run tm_axiom filter >> directly like this: >> >> � /usr/lib/texmacs/TeXmacs/bin/tm_axiom >> >> This should start '/usr/bin/axiom', issue a prompt to what it thinks >> is texmacs (but really is your consol), and then wait for input. >> Everything you type will be sent to the "axiom" and the result >> returned. I tried typing >> >> �)version >> �)version >> �)version >> ... >> >> and eventually got a response. >> >> Oddly using a link to my Axiom installation >> >> �/usr/bin/axiom -> /usr/local/bin/axiom >> >> also did not work and produced very similar results. >> >> So I tried the following instead. I deleted the symbolic link and >> created a file named >> >> �/usr/bin/axiom >> >> with the contents >> >> �fricas -nosman >> >> and made it executable. �Now running tm_axiom as above produced the >> following result: >> >> wspage@debian:~$ /usr/lib/texmacs/TeXmacs/bin/tm_axiom >> verbatim:channel:promptlatex:\red$\rightarrow$\ verbatim:)version >> Value = "Monday September 14, 2009 at 20:50:41 " >> channel:promptlatex:\red$\rightarrow$\ verbatim:)quit >> latex:\red The end\blackwspage@debian:~$ >> >> And I found that everything worked in texmacs! >> >> The option '-nosman' in FriCAS is equivalent to running AXIOMsys >> directly. I think the same thing is OpenAxiom is >> >> �open-axiom --no-server > > yes, open-axiom --no-server is the command to issue. > > >> I tried this but I got >> >> wspage@debian:~$ open-axiom --no-server >> Segmentation fault (core dumped) This works fine for me, with SVN version of OpenAxiom as of a few days ago, on OpenSolaris. > Huh? I do not seem able to reproduce that on my GNU/Linux and > windows systems. I do not have access to Debian box. > >> Oddly, repeating this several times sometimes started OpenAxiom >> successfully but most times it did not. I don't know what the problem >> is. > > yeah, that looks very curious. I don't have access to a Debian > system, and I can't reproduce it on my linux boxes, so ... > >> This is with OpenAxiom built using sbcl from >> >> wspage@debian:~/open-axiom-src$ svn info >> Path: . >> URL: https://open-axiom.svn.sf.net/svnroot/open-axiom/trunk >> Repository Root: https://open-axiom.svn.sf.net/svnroot/open-axiom >> Repository UUID: f499efd5-9937-0410-b36a-d3739c31ded8 >> Revision: 1283 >> Node Kind: directory >> Schedule: normal >> Last Changed Author: dos-reis >> Last Changed Rev: 1283 >> Last Changed Date: 2009-09-16 02:20:06 -0400 (Wed, 16 Sep 2009) >> >> Gaby, what do you think? >> >> Regards, >> Bill Page. >> > > -- Gaby > _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
|
|
Re: TeXmacs interface to OpenAxiomOn Tue, Sep 29, 2009 at 4:35 AM, Gabriel Dos Reis wrote:
> Bill, thanks for this detailed inverstigation. See my comments below. > > On Mon, Sep 28, 2009 at 9:15 PM, Bill Page wrote: >> I did a little testing. First I did 'apt-get install texmacs' on my >> Debian 5.0 system where I have all three of Axiom, OpenAxiom and >> FriCAS installed. Starting texmacs I tried to 'Insert/Session" but I >> noticed that the 'Axiom" option was not present. So I did a little >> digging and found that the tm_init script is looking for a specific >> file named '/usr/bin/axiom'. I created a symbolic link from >> /usr/bin/axiom -> /usr/local/bin/open-axiom and then I was apparently >> able to start an "Axiom" session but I got symptoms very similar to >> what you described - except worse. I had to enter something 5 or 6 >> times before it produced any output and then sometimes it still did >> not work. > > I build and installed TeXmacs from the sVN source. Curiously, I would > not find trace of the 'tm_init' program in the destination (for me, it is > /usr/local) by a recursive `find'. Joris, is that program supposed to be > installed through special incantation? > Sorry, my mistake. The file to which I was referring to is 'init-axiom.scm' wspage@debian:~$ ls /usr/share/texmacs/TeXmacs/plugins/axiom/progs axiom-input.scm init-axiom.scm wspage@debian:~$ cat /usr/share/texmacs/TeXmacs/plugins/axiom/progs/init-axiom.scm ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; MODULE : init-axiom.scm ;; DESCRIPTION : Initialize axiom plugin ;; COPYRIGHT : (C) 1999 Joris van der Hoeven ;; ;; This software falls under the GNU general public license and comes WITHOUT ;; ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details. ;; If you don't have this file, write to the Free Software Foundation, Inc., ;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define (axiom-initialize) (import-from (utils plugins plugin-convert)) (lazy-input-converter (axiom-input) axiom)) (plugin-configure axiom (:require (url-exists-in-path? "/usr/bin/axiom")) (:initialize (axiom-initialize)) (:launch "tm_axiom") (:session "Axiom")) wspage@debian:~$ Of course the paths my differ on non-Debian systems. > I think looking for the hard path "/usr/bin/axiom" is a mistake. That > should be looked for only if a relative serach from PATH fails. Agreed. > Once, I understand the intricacies of the plugins (yes. I've read the doc), > I'll contribute code for looking for OpenAxiom. But, right now, it looks as > if half of the TeXmacs helper programs were never installed when I issued > `make install'. > I have not built TeXmacs for source lately. >> >> Instead of starting texmacs to test, you can run tm_axiom filter >> directly like this: >> >> /usr/lib/texmacs/TeXmacs/bin/tm_axiom >> >> This should start '/usr/bin/axiom', issue a prompt to what it thinks >> is texmacs (but really is your console), and then wait for input. >> Everything you type will be sent to the "axiom" and the result >> returned. >> >> ... I created a file named >> >> /usr/bin/axiom >> >> with the contents >> >> fricas -nosman >> >> and made it executable. Now running tm_axiom as above produced the >> following result: >> >> wspage@debian:~$ /usr/lib/texmacs/TeXmacs/bin/tm_axiom >> verbatim:channel:promptlatex:\red$\rightarrow$\ verbatim:)version >> Value = "Monday September 14, 2009 at 20:50:41 " >> channel:promptlatex:\red$\rightarrow$\ verbatim:)quit >> latex:\red The end\blackwspage@debian:~$ >> >> And I found that everything worked in texmacs! >> >> The option '-nosman' in FriCAS is equivalent to running AXIOMsys >> directly. I think the same thing is OpenAxiom is >> >> open-axiom --no-server > > yes, open-axiom --no-server is the command to issue. > >> >> I tried this but I got >> >> wspage@debian:~$ open-axiom --no-server >> Segmentation fault (core dumped) > > Huh? I do not seem able to reproduce that on my GNU/Linux > and windows systems. I do not have access to Debian box. > >> >> Oddly, repeating this several times sometimes started OpenAxiom >> successfully but most times it did not. I don't know what the >> problem is. > > yeah, that looks very curious. I don't have access to a Debian > system, and I can't reproduce it on my linux boxes, so ... > Is there anything in particular that you would like me to test? I modified my '/usr/bin/axiom' script to call OpenAxiom's AXIOMsys binary directly instead of using 'open-axiom --no-server' like this: wspage@debian:~$ cat /usr/bin/axiom export AXIOM=/usr/local/lib/open-axiom/i686-pc-linux/1.4.0-2009-09-16 $AXIOM/bin/AXIOMsys #open-axiom --no-server #fricas -nosman --- Now '/usr/bin/axiom' reliably starts OpenAxiom wspage@debian:~$ /usr/bin/axiom GCL (GNU Common Lisp) 2.6.7 CLtL1 Sep 1 2008 14:01:57 Source License: LGPL(gcl,gmp), GPL(unexec,bfd,xgcl) Binary License: GPL due to GPL'ed components: (XGCL READLINE BFD UNEXEC) Modifications of this banner must retain notice of a compatible license Dedicated to the memory of W. Schelter Use (help) to get some basic information on how to use GCL. Temporary directory for compiler files set to /tmp/ OpenAxiom: The Open Scientific Computation Platform Version: OpenAxiom 1.4.0-2009-09-16 Built on Wednesday September 16, 2009 at 18:06:32 ----------------------------------------------------------------------------- Issue )copyright to view copyright notices. Issue )summary for a summary of useful system commands. Issue )quit to leave OpenAxiom and return to shell. ----------------------------------------------------------------------------- (1) -> )q But the open-axiom program still causes a seg fault. wspage@debian:~$ open-axiom --no-server Segmentation fault (core dumped) With the revised script OpenAxiom works in TeXmacs. >> >> This is with OpenAxiom built using sbcl from >> Revision: 1283 Regards, Bill Page. _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
|
|
Re: Re: TeXmacs interface to OpenAxiomOn Tue, Sep 29, 2009 at 3:48 AM, Joris van der Hoeven
<vdhoeven@...> wrote: > On Tue, Sep 29, 2009 at 03:35:46AM -0500, Gabriel Dos Reis wrote: >> > I did a little testing. First I did 'apt-get install texmacs' on my >> > Debian 5.0 system where I have all three of Axiom, OpenAxiom and >> > FriCAS installed. Starting texmacs I tried to 'Insert/Session" but I >> > noticed that the 'Axiom" option was not present. So I did a little >> > digging and found that the tm_init script is looking for a specific >> > file named '/usr/bin/axiom'. I created a symbolic link from >> > /usr/bin/axiom -> /usr/local/bin/open-axiom and then I was apparently >> > able to start an "Axiom" session but I got symptoms very similar to >> > what you described - except worse. I had to enter something 5 or 6 >> > times before it produced any output and then sometimes it still did >> > not work. >> >> I build and installed TeXmacs from the sVN source. Curiously, I would not >> find trace of the 'tm_init' program in the destination (for me, it is >> /usr/local) by a recursive `find'. Joris, is that program supposed to be >> installed through special incantation? > > No, there is no such program in TeXmacs. This is probably something > someone wrote for the Axiom side. OK. > >> I think looking for the hard path "/usr/bin/axiom" is a mistake. That should be >> looked for only if a relative serach from PATH fails. Once, I understand >> the intricacies of the plugins (yes. I've read the doc), I'll contribute code >> for looking for OpenAxiom. But, right now, it looks as if half of the TeXmacs >> helper programs were never installed when I issued `make install'. > > TeXmacs has no special logic to search for plug-ins (except testing > whether a file exists or whether a file exists in a path, such as $PATH). > It is the responsability of the plug-in to find the corresponding program, > if it is installed. For most plug-ins (see the other plug-ins) it indeed > suffices to check whether the program is in the path. > > Notice that this point may also require special treatment on Windows. Indeed. Alfredo has a port for Windows. He just proposed to work it out for Unix systems too. > >> > Instead of starting texmacs to test, you can run tm_axiom filter >> > directly like this: >> > >> > /usr/lib/texmacs/TeXmacs/bin/tm_axiom > > For debugging, you can also launch TeXmacs using > > texmacs --debug-io OK, thanks! -- Gaby _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
|
|
Re: Re: TeXmacs interface to OpenAxiomDear Bill, Gabriel, Andreay, Kostas, ...,
Please let me know if I have to modify something on the TeXmacs side in order to make things work correctly. Best wishes, --Joris On Tue, Sep 29, 2009 at 10:07:41AM -0400, Bill Page wrote: [...] > Sorry, my mistake. The file to which I was referring to is 'init-axiom.scm' [...] > (:require (url-exists-in-path? "/usr/bin/axiom")) [...] > > I think looking for the hard path "/usr/bin/axiom" is a mistake. That > > should be looked for only if a relative serach from PATH fails. [...] > Agreed. [...] _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
|
|
Re: Re: TeXmacs interface to OpenAxiomOn Wed, Sep 30, 2009 at 4:22 AM, Joris van der Hoeven
<vdhoeven@...> wrote: > Dear Bill, Gabriel, Andreay, Kostas, ..., > > Please let me know if I have to modify something on the TeXmacs side > in order to make things work correctly. Hi Joris, I fixed a double prompt issue with OpenAxiom. I'm waiting for feedback, then I'll try to contribute the changes needed to get OpenAxiom and TeXmacs talk correctly. Many thanks, -- Gaby _______________________________________________ Texmacs-dev mailing list Texmacs-dev@... http://lists.gnu.org/mailman/listinfo/texmacs-dev |
| Free embeddable forum powered by Nabble | Forum Help |