texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Re: TeXmacs interface to OpenAxiom


From: Gabriel Dos Reis
Subject: [Texmacs-dev] Re: TeXmacs interface to OpenAxiom
Date: Tue, 29 Sep 2009 03:35:46 -0500

Bill, thanks for this detailed inverstigation.  See my comments below.

On Mon, Sep 28, 2009 at 9:15 PM, Bill Page <address@hidden> 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.

>>
>> 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'. 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 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:
>
> address@hidden:~$ /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 address@hidden:~$
>
> 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
>
> address@hidden:~$ 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 ...

>
> This is with OpenAxiom built using sbcl from
>
> address@hidden:~/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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]