SourceForge has been redesigned. Learn more.


  • Thomas Sturm

    Thomas Sturm - 2009-03-04

    Is anybody using Texmacs? I would like to make sure that Texmacs still starts REDUCE out of the box on various systems.

    Unfortunately there is still no Texmacs for the Mac. Could someone please try in Texmacs the following:

    load_package redlog;
    rlset reals;
    rlqe ex(x,a1*x+b>0 and a2*x+b<0);

    I would like to make sure that the result is completely printed in Texmacs. There was a bug which made it end with a disjunction with some empty parentheses.



  • James

    James - 2009-10-10

    texmacs 1.0.7 on Ubuntu 8.10 running reduce-i686-pc-ubuntu8.10-20090414.

    On the command line, texmacs generates
    TeXmacs] Launching 'tm_reduce'
    and the window display command line - or whatever they call that - generates

    generic program roman 10 …reduce default session output mutator start

    The display window shows

    Reduce (Free CSL version), 14-Apr-09 …

    but then there is no command prompt from Reduce.  The program is hung.

    Any suggestions?


  • Arthur Norman

    Arthur Norman - 2009-10-10

    While I got the texmacs interface to the CSL version working at one stage I do not use texmacs myself… But before I look further can I check that you found the files in csl/cslbase/texmacs-plugin and installed them and ensured that a binary of this version of reduce was on your path under the name &quot;r38&quot;. If not then you may be using a texmacs plugin intended for use with a different version. Arthur

  • James

    James - 2009-10-10

    Ha!  No, I'm clueless!  Ok, the first thing I notice is that my version of TeXmacs, TeXmacs-1.0.7-static-gnu-linux, which is the only version I could get to work, has /opt/TeXmacs-1.0.7-static-gnu-linux/plugins/reduce/install/README, which begins:

    This is for PSL Lisp version of REDUCE

    which, conspicuously, is _not_ the version I have installed, which is
    and which I must surmise is a CSL version, since there is no mention in the tar package name, but which version can be seen in the output when Reduce is started.

    I notice that the Ubuntu version of TeXmacs _also_ has the same README, beginning &quot;This is for PSL Lisp version of REDUCE&quot;, so there is a bit of a mess there, Ubuntu TeXmacs and Ubuntu Reduce not really being compatible.  Of course, the old README is no longer correct.

    As an aside, I don't understand the CSL/PSL thing in the sense that only the CSL versions seem to be available at sourceforge.  I'm guessing that I'd have to compile the PSL version of Reduce for myself.

    So, first off, maybe a top-level README could be added to the tar packages with a few clues about the CSL/PSL thing, and about TeXmacs and plugins.  Really, just your few comments you have provided here above would suffice.

    Ok, I replaced the TeXmacs plugins/reduce with the one from the sourceforge Reduce SCM repositories.  Then, when TeXmacs starts, there is an error, if you wait a few moments:

    &lt;unnamed port&gt;: In procedure scm-error in expression (scm-error (quote misc-error) #f …):
    &lt;unnamed port&gt;: no code for module (texmacs plugin plugin-convert)

    And, if you run the reduce command, as listed in plugins/reduce/progs/init-reduce.scm, &quot;reduce -texmacs&quot;, then reduce responds with:

    Unknown extended option &quot;-texmacs&quot;

    Now, if i naively swap the file init-reduce.scm from the repository with the old file from TeXmacs, but keeping the line

    (:launch &quot;reduce -texmacs&quot;)

    then TeXmacs will start with no error message from Reduce, and Reduce will be listed in the Interactive Session menu, but, when Reduce is run, there is again the error message

    Unknown extended option &quot;-texmacs&quot;

    and TeXmacs receives no output from Reduce.

    So, I'm guessing that some TeXmacs stuff was left out of the CSL reduce.


  • Arthur Norman

    Arthur Norman - 2009-10-11

    OK, there are several things I will try to explain. Firstly the difference between PSl and CSL versions and their relative status at Sourceforge.

    Before it was Open Source Reduce was not Open Source! Historically the body of Reduce code was written carefully so a very little bit in the middle was written an a documented subset of Lisp, and after that it was written in its own language.

    Reduce had two main distributors. The first and larger was ZIB who used the PSL Lisp system. PSL had originally been developed by Griss and Hearn to support Reduce. When Griss moved to HP to took PSL with him and HP continues developing it. Only later were distribution rights passed to ZIB. The second distributor was Codemist (ie me and my friends) who developed our own Lisps ending up with CSL. We had made CSL open source several years before Reduce was put here, but when Reduce came to Sourceforge we made the CSL license match the one used here for Reduce (apart from the miserable fact that I use a library, FOX, that is subject to the LGPL, and that adds constrains that do not exist in a proper BSD world).
    So ALL the CSL sources are here. Getting the residual commercial rights to PSL properly tidied up and severed and the sources in a state suitable for everybody to work with has taken a little longer. We want to be very careful about code ownership, adherence to Sourceforge policy etc. The way this works is that right now we can not and do not put ready-build PSL binaries here (I hope this will be ready to change soon, but since I am not the one working on this I can not give you a time-frame). But if you fetch from subversion and build a PSL version that follows a route that we are 100% certain is OK - it fetches some binaries of the PSL core from the ZIB web-site (they are permitted to distribute PSL!) and it then compiles Reduce on top of that. When you should end up with is a working PSL that should do all you need, and where you can recompile any bits of Reduce you want to.

    Now the people who first made the texmacs interface for Reduce were using PSL and they submitted their plugin for incorporation with texmacs without thought for their being another version of reduce, and pre the open source version anyway.    I checked that their code could be made to work with CSL and added some CSL-specific support both there and in CSL itself. NY plugin is not distributed with texmacs. It is in the reduce-algebra subversion repository under csl/cslbase/texmacs-plugin. To use it you MUST install that plugin where texmacs can find it. Youi MUST ensure that your computer is set up so that a command &quot;reduce&quot; causes the CSL Reduce to be launched.

    I am NOT a texmacs expert or even user (perhaps because I am not an emacs person, so I do NOT find it natural to use). And I do not really know if ANYBODY other than me has even tried texmacs via the CSL version of Reduce! So it may be flakey, and with the version on sourceforge it may be necessary to set up a symbolic link or a 1-lins script so that the command &quot;r38&quot; launches reduce, or edit the plug-in to invoke it properly.

    As with any open source code, all the sources are there to let anybody join in debugging and enhancing things. I *may* have done something that has wrecked it. I do not even have texmacs installed on my machine where I am working this weekend so this message is giving you background and not base on me testing it for you!

    So GOOD LUCK and I hope this clarifies a bit of the background and will let you home in on what the issues are. In general when and if fixes are introduced they will first go into the subversion repository and you will then need to rebuild from source to get the benefit. Ready-build snapshots will be made every so often!


  • Arthur Norman

    Arthur Norman - 2009-10-11

    OK, I updates both an Ubuntu 9.04 (32 bit) and a Fedora 11 (64-bit), fetched and installed texmacs and tried to get the reduce plug-in working - and at present I can not make texmacs believe it should show &quot;reduce&quot; as an available sort of session to install. I do not understand why, so MAYBE one of the people who like and use and understand texmacs can look at the reduce plugin scripts and help sort out what I have got messed up - please????

  • James

    James - 2009-10-12

    Thanks Arthur for the PSL/CSL clarification.  I am fascinated by these genealogies.

    Let me ask for a couple more clarifications.

    First, does it make sense that simply running &quot;reduce -texmacs&quot; should produce the response 'Unknown extended option &quot;-texmacs&quot;'?  Is Reduce required to, in some sense, load some external plug-in or module before running?  From my naive point of view, it seems like my version of Reduce is missing some ability to recognize the command-line switch &quot;-texmacs&quot;, that should have been built-in.

    Second, when you refer to running the command &quot;r38&quot;, is there something special about running Reduce as &quot;r38&quot; instead of as &quot;reduce&quot;?  I cannot find any internal reference to &quot;r38&quot;, using &quot;strings &amp;lt;reduce-file&gt;|grep r38&quot; on any of the files in the Reduce package, or in the TeXmacs plugin/reduce files.



  • John ffitch

    John ffitch - 2009-10-12

    &gt; Second, when you refer to running the
    &gt; command &quot;r38&quot;, is there something
    &gt; special about running Reduce as &quot;r38&quot;
    &gt; instead of as &quot;reduce&quot;? I cannot find
    &gt; any internal reference to &quot;r38&quot;, using
    &gt; &quot;strings &amp;lt;reduce-file&gt;|grep r38&quot; on
    &gt; any of the files in the Reduce
    &gt; package, or in the TeXmacs
    &gt; plugin/reduce files.

    r38 is the binary for CSL-based Reduce.  Arthur is the author of CSL and so uses Reduce via that system, as indeed do I.

    ==John ff

  • Arthur Norman

    Arthur Norman - 2009-10-12

    (a) When I added the response to &quot;-help&quot; recently my first checkin led to a warning about an unrecognised extended option for -texmacs. That is now corrected in subversion. You checked out a version before I had spotted and fixed that!
    (b) before the code went &quot;open&quot;, and as John Fitch said, the CSL/Codemist version had its executable named &quot;r38&quot; where the 38 was because it was version 3.8. In the sourceforge version the executable now gets made under the name &quot;reduce&quot; but some notes may not have caught up. Further on sourceforge at the top level there may be bin/redcsl and bin/redpsl for trying to launch each of the csl and psl varients.

  • James

    James - 2009-10-13

    Ok, I finally checked out and compiled revision 435 from the svn repository.  Yes, that has the &quot;-texmacs&quot; switch support.

    Sorry, I still can't get the texmacs interface to work, but I did find a couple of typos in init-reduce.scm, so at least texmacs will list reduce and start the session.

    Where you have &quot;(texmacs plugin plugin-convert)&quot;, this should be &quot;(utils plugins plugin-convert)&quot;, where the file is &quot;progs/utils/plugins/plugin-convert.scm&quot;, in &quot;utils&quot;, and &quot;plugins&quot;, with an &quot;s&quot;.

    And, where you have &quot;menu-extend texmacs-session-help-icons&quot;, this should be &quot;menu-extend session-help-icons&quot;, just from looking at the old texmacs init-reduce.scm.

    You might also change '(:session &quot;reduce (CSL)&quot;)' to '(:session &quot;Reduce (CSL)&quot;)' with &quot;Reduce&quot; capitalized, just to be consistent with all the other applications listed, or &quot;ReduceCSL&quot; to make the line shorter and more the length of the other menu items.

    Note: I'm not sure how the following will display, since sourceforge tends to mangle the use of underline, less-than, greater-than, and newline.  There should be underlines, not italic print, here, mostly.  I've added backslash escapes to the underlines.  If you see backslashes, pretend they aren't there.

    Though texmacs output still does not work, I do notice, using &quot;reduce -texmacs |cat -A &gt;/dev/stdout&quot;, that while the output is wrapped in the texmacs DATA\_BEGIN and DATA\_END tags, &quot;^B&quot; and &quot;^E&quot;, the Reduce prompts are _not_.  That may be the cause of the &quot;busy&quot; message from texmacs, which will receive a literal &quot;1:&quot; when reduce starts, but then texmacs wouldn't know what to do with that, waiting for a DATA\_END tag that never arrives.  I'm just guessing.

    I'm not sure about how reduce does the texmacs stuff, but I did see something in packages/tmprint/ that might be of concern.  There is a line 'if getenv(&quot;TEXMACS\_REDUCE\_PATH&quot;) then t;', but &quot;TEXMACS\_REDUCE\_PATH&quot; is not set, so not &quot;t&quot;.  Then what?
    Setting TEXMACS\_REDUCE\_PATH in the environment doesn't seem to make any difference though.



Log in to post a comment.