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: Bill Page
Subject: [Texmacs-dev] Re: TeXmacs interface to OpenAxiom
Date: Tue, 29 Sep 2009 10:07:41 -0400

On 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'

address@hidden:~$ ls /usr/share/texmacs/TeXmacs/plugins/axiom/progs
axiom-input.scm  init-axiom.scm
address@hidden:~$ 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"))
address@hidden:~$

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:
>>
>> 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 ...
>

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:

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

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

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




reply via email to

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