PROGRAMMING IN LISP ON THE MSCC MACHINES
Note: This is only a start-up for using Lisp on the MSCC. For more information on the computing environment of MSCC, you should refer to the various handouts in the lab rooms in Thompson hall.
First of all, you need to get a Unix account on the MSCC. The instruction on getting an account is on the slips I passed out in class last week. If you lost it or did not get one, send mail to me. Even if you just want to use the Macs, you still want to have a unix account. Logging on the accounts on the Macs enables you to print and store your files on line.
There is a sub-directory in your home directory, My-Mac-Files, that can be made visible on the Macintosh. This is where your Mac files can be stored. Following is a basic explanation of where to find Lisp on the Unix machines and on the Macintoshes
MACS:
There is a program, MCL (Mac common Lisp) on the Macs. You can find it by pulling down the Apple menu. To do that, click on the apple logo on the top left corner of the screen and choose the item MCL.
Here's a brief summary on how to store your Mac files:
1.Go to Chooser, click on AppleShare, make sure the Zone is MSCC.
2.Click on the MSCC File Server
3.Enter your login name and password when prompted
4.You will then be asked which folder you wish to access. You can choose My-Mac-Files for you own storage space or ClassFolder into which various class files will be placed. You should highlight your choices, don't check the boxes.
5.The items you choose can now be accessed.
The My-Mac-Files that you mount from the Macintosh is the same as the My-Mac-Files in your UNIX home directory.
Using MCL:
Choose "new listener" from the menu. Just type in commands. For example:
> (car ‘(a b c)) RET
a //result
You can save the demo window into a file. I believe it should be saved as a text file, but I need to verify that. In cases where you want to write functions, you will want to save your work in a file. MCL has a built in editor. Just choose new (file) from the menu and edit your function definitions in the editor. When you are done editing or ready for testing, just choose load from the menu to load the file (you just edited.) Then all the functions in the file are ready to use and you can test them out in the listener.
* To look up the definition of a command:
UNIX:
On the UNIX machines we have Allegro CL 4.1. It is invoked by typing cl. There is documentation for cl in the MSCC lab.
A note about the MSCC machines is that they are load sharing. That means that when you type cl, it will probably execute on a different machine. Please note that to kill the process, you have to kill it on the machine from which the process is originated. Type "man lsf" for more information on load sharing and how to disable it. Please do not leave idle jobs lying around, because it takes up useful and scarce CPU time.
After you have typed "cl", a listener session starts up, you can type commands as you would do with the Macs. There are some commands that are particularly important:
current directory is ~Kitman/
cl
> :ld "cse341/hw1/hw1.cl" //the path is relative to the current directory
To check the current path, use ":pwd"; to see more info on commands use ":help"
To write function definition and save them in a file, you need to use some kind of editors. You have a choice from any editors available on the MSCC machines. As far as I know, they should have Emacs, Pico and Vi.
If there is any thing unclear please send mail to your TA.