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:
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.
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.
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 "r38". If not then you may be using a texmacs plugin intended for use with a different version. Arthur
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 "This is for PSL Lisp version of REDUCE", 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:
<unnamed port>: In procedure scm-error in expression (scm-error (quote misc-error) #f …):
<unnamed port>: no code for module (texmacs plugin plugin-convert)
And, if you run the reduce command, as listed in plugins/reduce/progs/init-reduce.scm, "reduce -texmacs", then reduce responds with:
Unknown extended option "-texmacs"
Now, if i naively swap the file init-reduce.scm from the repository with the old file from TeXmacs, but keeping the line
(:launch "reduce -texmacs")
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
and TeXmacs receives no output from Reduce.
So, I'm guessing that some TeXmacs stuff was left out of the CSL reduce.
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 "reduce" 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 "r38" 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!
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 "reduce" 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????
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 "reduce -texmacs" should produce the response 'Unknown extended option "-texmacs"'? 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 "-texmacs", that should have been built-in.
Second, when you refer to running the command "r38", is there something special about running Reduce as "r38" instead of as "reduce"? I cannot find any internal reference to "r38", using "strings &lt;reduce-file>|grep r38" on any of the files in the Reduce package, or in the TeXmacs plugin/reduce files.
> Second, when you refer to running the
> command "r38", is there something
> special about running Reduce as "r38"
> instead of as "reduce"? I cannot find
> any internal reference to "r38", using
> "strings &lt;reduce-file>|grep r38" on
> any of the files in the Reduce
> package, or in the TeXmacs
> 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.
(a) When I added the response to "-help" 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 "open", and as John Fitch said, the CSL/Codemist version had its executable named "r38" where the 38 was because it was version 3.8. In the sourceforge version the executable now gets made under the name "reduce" 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.
Ok, I finally checked out and compiled revision 435 from the svn repository. Yes, that has the "-texmacs" 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 "(texmacs plugin plugin-convert)", this should be "(utils plugins plugin-convert)", where the file is "progs/utils/plugins/plugin-convert.scm", in "utils", and "plugins", with an "s".
And, where you have "menu-extend texmacs-session-help-icons", this should be "menu-extend session-help-icons", just from looking at the old texmacs init-reduce.scm.
You might also change '(:session "reduce (CSL)")' to '(:session "Reduce (CSL)")' with "Reduce" capitalized, just to be consistent with all the other applications listed, or "ReduceCSL" 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 "reduce -texmacs |cat -A >/dev/stdout", that while the output is wrapped in the texmacs DATA\_BEGIN and DATA\_END tags, "^B" and "^E", the Reduce prompts are _not_. That may be the cause of the "busy" message from texmacs, which will receive a literal "1:" 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/tmprint.red that might be of concern. There is a line 'if getenv("TEXMACS\_REDUCE\_PATH") then t;', but "TEXMACS\_REDUCE\_PATH" is not set, so not "t". Then what?
Setting TEXMACS\_REDUCE\_PATH in the environment doesn't seem to make any difference though.
Log in to post a comment.