Ripon Good Math (RGM)

Hi folks,

Calculus with Xlispstat is a project begun at Ripon College, Ripon, WI, USA, to aid (and with the aid of) calculus students. I call it "Ripon Good Math" (RGM). It provides many important advantages to anyone using xlispstat, however, including

and more.

A tutorial is included, accessed by typing the command (tutorial). Also I've re-written the Tierney book stuff so that it can be run from the command line using command (book). The (hulp) command is also useful, invoking the graphical help menu.

For those who are anxious to skip to the installation directions, here they are for

I've actually programmed many examples from several books: I understand by actually trying out examples, so I make these available to you.

The files that correspond to the these books are found in the examples sub-directory of the calculus directory.

The code is freely available, and has been tested for UNIX (under Sun Solaris and linux), the Mac, and Windoze. I've stolen a lot of good ideas from the usual contributors to the xlispstat discussion group, and thank them for their hard work. My posts since Ripon have also provided much "oomph" to this on-going project: thanks to Loyola and the IMSP of Benin, West Africa.

I'm not smart enough to use all the packages, provides and requires, however, so I just compile and load everything in, save a new environment, and always run from within that. Saves loading time, but makes for a big application (it used to be a monster, but nowadays lots of applications are pushing several megs big).

Someone has suggested that I try to get this working with ViSta. I can report that I can manage to load ViSta on top of RGM, but have problems when I try to do anything. I'm using a version of ViSta from 1996, so perhaps I can do better with a modern version. One of these days I'll try. The trick is to invoke (old-readtable) before loading in ViSta (which uses characters $, [, etc.): then save a new work-space.

Andy Long
Fearless Programmer
1228 McIntyre Drive
Ann Arbor, MI
48105
email: aelon@sph.umich.edu
Phone: 734-764-0195
Currently:
Post-doc, University of Michigan Department of Epidemiology, associated with BioMedware, Inc., an Ann Arbor software company.
Formerly:
Fulbright Senior Scholar, Institute of Mathematics and Physics, Benin, West Africa
Research Associate, Preventive Medicine and Epidemiology, Loyola University Chicago.
Futurely:
President of Fearless Programming, Inc. (You know those Elbonian - or whatever - programmers in the "Dilbert" comic strip? Well We Be Elbonians! Elbonians 'R' Us!)

UNIX:

  1. compiling

    If you're a unix user, and you've unpacked this stuff in the xlispstat directory (containing the file xlisp.wks) using the command

    zcat calculus.tar.gz | tar -xvf -

    simply type

    make rgm

    in the directory where you've unpacked all this stuff (RGM stands for Ripon Good Math). [Otherwise, you'll need to hardwire the path to the directory which contains xlisp.wks in the file calculus/bin/MAKE_IT.]

    After everything compiles xlispstat will generate a new workspace (.wks) file called newxlisp.wks. This file will be located in the calculus directory.

  2. running

    You should either replace your existing xlisp.wks file with this one (after first saving a copy!), or change your xlispstat command so that it loads this one in, or simply leave it where it is and, when you want to run in "calculus mode", issue the xlispstat command from the calculus directory.

    For UNIX users, there is a Tcl/Tk interface available (in the xls subdirectory) which was designed to provide something similar to the GUIs of the Mac and Windows versions. It is also very similar to running under emacs (many emacs bindings are provided), except that the input and output are separate. I'm watching the development of Tcl/Tk carefully, because one day it might provide a common interface across platforms.

    To use the Tcl/Tk interface xls, copy the file xls to a directory in your path (usually $HOME/bin), and edit the location of XLSPATH to conform to the path of your xls directory. Here's my copy of xls:

    #!/bin/sh
    XLSPATH=/home/ael/xlispstat-3-52-0/calculus/xls
    export XLSPATH
    $XLSPATH/xls.tcl &
    
    xls assumes that you invoke xlispstat with the command "xlispstat" from the command line.
  3. Documentation

    There is some useful xlisp help contained in the file xlisp.hlp in the Help directory. If you want this documentation to be active, replace your current xlisp.hlp (which should be in the same directory as the application) with this one (the new one contains everything in the old xlisp.hlp, plus some additional material and examples). You might also note that it is simple to add your own documentation to this file. Each time you do, you must re-run the compile script (especially the RGM.lsp part, where help is loaded in to create the file newxlisp.wks) in order for the new documentation to be active.

    I've rewritten the documentation in many cases to provide illustrative examples. I've used a special form which permits me to "try out" functions, macros, methods, etc. using the macro try-out.

    Try-out looks in the documentation string for a line beginning

    ;; Examples:

    and if it finds it everything following this line is evaluated. If you create functions, please add that line and some interesting examples following, so that the next person will know how to use your function and what it can do! Remember that xlispstat will try to evaluate EVERYTHING following that line, however, so your comments must all be preceded by semi-colons, etc. Have a look at some of my functions.


Mac users:

  1. Setting up

    I use stuffit expander to unwrap the calculus.zip file. Some users have had problems with the files not being written to their individual folders (there should be folders below the calculus folder, like math, etc, bin, doc, ....). If you have terrible troubles, write to me and we'll work something out.

    First of all, put the calculus folder directly below *default-path* (usually where your xlispstat application sits).

    You should copy the original xlisp.wks file to the calculus folder, and rename it to "orig.wks".

  2. compiling - this takes awhile, but saves time every time you run.

    Now click on orig.wks. Once xlispstat is running, load the re-make.lsp file by typing

    (load "re-make.lsp")

    After many minutes of compiling, xlispstat will exit.

    If you want want the help that I've created (by modifying the xlisp.hlp file), then you will want to first go to the Help sub-directory of calculus and move it to file xlisp.hlp in the directory c:\xlispsta. This makes the application a little bigger, but I think that it's worth it (see UNIX users documentation).

    Now you should fire up orig.wks again (by double clicking on it), then load the RGM.lsp file:

    (load "RGM.lsp")

    Again, xlispstat will exit when done. This will result in the creation of the file newxlisp.wks in the calculus folder, which you can either use whenever you want to run xlispstat with my extensions (by double-clicking on it), or which could replace the existing xlisp.wks file which sits in the same directory as the application (since you've backed-up the original to orig.wks). That way, xlispstat runs in "calculus mode" all the time.

  3. Change the available memory (if necessary)

    Click on the icon for xlispstat, then do an "apple-i" (that is, push the apple key and i key at the same time). This will bring up info on xlispstat, and you will see that a certain amount of memory is allocated. Jack this up to 10 Megs or so (provided you've got it: these days most folks have it to burn!).


Windoze users:

One problem seems to be getting the *default-path* to come up right, so I've explicitly added that as c:\xlispsta. If that doesn't suit you, and you want to change it, then you'll need to edit that part of the RGM.lsp file:

#+msdos (def *default-path* "c:\\xlispsta\\")

Change the name to whatever you want it to be, noting that you should use the double \\ rather than single.

The next problem is that the compiler isn't pre-loaded. I've added the line

(require 'cmpload)

to the re-make.lsp file, and I hope that that will take care of the problem. If not, let me know!

The steps are then to unzip the calculus.zip file in the default xlispstat directory (under c:\xlispsta, say), so that you have a directory called c:\xlispsta\calculus.

Compiling Ripon Good Math (RGM)

These are the steps necessary to compile RGM under Windows. I'll assume that the files are in the directory c:\xlispsta (note that there is no "t" at the end: this is because of the stupid 8 character limit, which still manages to rear its ugly head). If you wish to change that, you'll need to modify (edit) the file RGM.lsp in the calculus directory too (it contains a reference to the directory name c:\xlispsta).

NB: when I unzipped calculus.zip, some of the folders were divided in two - tutorials, math, examples (don't know why that happens, but I simply put the errant files back where they belong).

Now fire up xlispstat (note that the application is called wxls32.exe) then issue the following command in the window:

(let ()
  (set-working-directory "compiler")
  (load "cmpfront")
  (set-working-directory "c:\\xlispsta")
  (set-working-directory "calculus")
  (load "re-make"))

NB: this will automatically exit from xlispstat when it is done! If you get any errors which return you to the xlispstat prompt, exit and run the command again. It may require several passes.

If you want want the help that I've created (by modifying the xlisp.hlp file), then you will want to first go to the Help sub-directory of calculus and move it to file xlisp.hlp in the directory c:\xlispsta. This makes the application a little bigger, but I think that it's worth it (see UNIX users documentation).

Now you are ready to load in everything, and create newxlisp.wks Again, fire up xlispstat, then issue these commands:

(let ()
  (set-working-directory "calculus")
  (load "RGM"))

NB: again, this will automatically exit from xlispstat when finished, leaving the file newxlisp.wks in the c:\xlispsta\calculus directory. You should copy the old version of xlisp.wks which comes with the distribution (I stick it in a "doc" directory next to the application), then move the newxlisp.wks file to xlisp.wks, next to the application, in c:\xlispsta.

You are now ready to go! (In principle....;)


Okay, there it is. Please send me your comments, and I'll treat them with respect.
Andy Long
Academic Temp and Fearless Programmer

I'm Andy Long / Actually I'm just his web page / Applied Mathematician / longa@nku.edu