There is a printer in the small room adjoining the classroom/lab; it's
name is mcs_next_lab
, so if you need to select a printer to
print to, that is the one you should use when in this area.
Each Gustavus student has been given a computer account; this handout assumes that you already have read your account letter and changed your password. If not, and you need help with this, let one of us know. It does not matter which workstation you log into; you will have access to all your files on all computers, since they are stored on a central ``file server.''
The following instructions assume some familiarity with such terms as double-click and drag which refer to the use of the mouse (the small doohickey next to the keyboard). If you don't understand something or if the instructions seem impenetrable, don't worry. These are examples of things better shown than described in words. Ask your lab instructor or one of the tutors to explain it to you. Also, feel free to talk with your fellow students. Computers are unfortunately fraught with many arcane terms, and defining them all would unduly clutter these handouts. Fortunately, if you are not shy about asking someone when you have a question, you should get the hang of it fairly quickly.
Use your username and password. There may be a delay after you enter your username before the computer asks for your password; this is normal if the computer hasn't been in use for a while.
The Unix computers on campus (among which are the SGIs and NeXTs) have a tree structured file system. This means that the files on the computers are located in directories, which may themselves include files and subdirectories, which may contain files and other subdirectories, .... When your account was created, you were given a home directory in which you can store and create files and subdirectories. You can view your home directory by selecting the ``Desktop/Home Directory'' submenu item in the ``Desk 1'' menu, as described in more detail below. Do so and see what it shows you. One important note on the detailed instructions below: whenever a mouse action is called for, use the left mouse button. Unless told otherwise, you should assume this throughout.
You can access most of the applications on the SGIs using the ``Desk 1'' menu in the upper left-hand corner of your screen. If you click on the ``Desktop'' item in this menu, you will see a submenu that includes ``Home Directory.'' After clicking on that submenu item, the directory window will appear on the screen. It will initially just be an outline, which you can position wherever you'd like it. Click the mouse button when the outline is where you want it. You can later reposition the window by dragging the bar at the top of the window while holding down the left mouse button. You can resize the window by dragging its extreme outer edge.
There are two especially useful buttons on the top of (nearly) every window: in the top left is a button which allows you to close the window and stop the application; simply double-click on this button if you want to do this. The other useful button, which is nearly in the top right-hand corner, allows you to miniaturize the window. Click on this button. A small icon will be created which, when clicked on, will pop the window back up. The SGIs allow you to have many applications running simultaneously, and miniaturization lets you keep your computer ``desktop'' (the main portion of the computer's screen) reasonably clean.
Rather than storing all the files you create directly in your home directory, it is much better to take organize the files in subdirectories. For example, you can create a subdirectory called ``MC27'' for this course by selecting the ``New Directory'' menu item in the ``Selected'' menu in the home directory viewer. Do this. Notice that a new directory called ``empty.dir'' is created in your home directory. You can change the name of this directory to ``MC27'' by directly selecting and changing its name, ending with the Enter (carriage return) key. Do this as well.
You can open up a separate file viewer for the MC27 subdirectory by double clicking on the MC27 icon. Alternatively, you can zoom in the focus of your existing viewer from the home directory to the MC27 subdirectory by dragging the MC27 icon onto the open file foler at the top of the viewer. Either way, once you have a viewer for the MC27 subdirectory, you can create a new directory inside it and rename it Lab0.
Next, you need to add a program called SchematiX to your desktop. chematiX is the programming environment you will be using in MC27, on the SGIs. To add SchematiX to your desktop, select the ``Find/An Icon'' submenu item in the Desk 1 menu. Point the mouse arrow into the pink area of the ``Find an Icon'' window and type ``SchematiX'' there. A white, roughly kite-shaped, icon should appear in the blue square to the left of the pink area where you're typing. (See the illustration that follows: .) That is the SchematiX icon; drag it using the mouse to any vacant area on the desktop, i.e., the blank background of the screen. (Do not drag it into your folder in the file viewer, or onto your folder's icon on the desktop background. That would make your own copy, which is undesirable. Just drag SchematiX into blank background space.) You can now make the ``Find an Icon'' window go away if you want, by double-clicking on the horizontal bar that is to the left of the title ``Find an Icon.''
Your account is now set up. Whenever you login, all you need to do to start SchematiX is to double-click on its icon; the rigamarole of finding it is over. At least, that is true on this one SGI, and it can be true on all the SGIs if you want. All you have to do is the first time you log in on a new SGI that you haven't used before, respond to the panel that pops up upon login by saying that you want to ``share'' the same desktop. (Ask for help with this the first time you login on a different SGI if you need it; for now it isn't an issue.)
Start SchematiX by double-clicking on its icon. Wait for a
while for SchematiX to finish starting up; you'll know its done when
it prints out a line starting with ;SchematiX Gambit
. Try
evaluating some expressions, such as those on pages 15--17 of the
text. To evaluate an expression, you just type it in and then press
the
(+ 5 12)and then press the
;Value: 17What happens if you try to evaluate just a plain number? Try several expressions, of varying degrees of difficulty. Try some nested expressions. Try breaking a big complicated nested expression into several lines to see how the automatic indentation works. To break onto a new line, use the the normal carriage-return key (also labeled ``Enter'') on the main part of the keyboard.
By the way, there are other ways you can evaluate as well, as
alternatives to the
You can create a new file in SchematiX by selecting the ``File/New'' submenu item. A new window will pop up for this file, which is not yet named. You can name it by selecting the ``File/Save'' submenu item, and then saving it as ``lab0'' in the MC27/Lab0 subdirectory (note that ``.scm'' is automatically appended at the end, indicating this is a Scheme file).
Notice that the output goes to the interaction window even when the evaluated expression is in another window.
Select the ``File/Print'' submenu item and, when asked for the
printer, select mcs_next_lab
.
Sometimes Scheme can't understand your request or carry it out. For
example, if you try to evaluate (/ 1 0)
an Error panel
will appear, telling you that division by 0 is an error. (Try this.)
Often you won't understand the messages in error panels; in these
cases ask your lab instructor or assistant. For now, the rule
for how to respond to an error is simple: ``just say yes.'' In other
words, always click the Yess button telling Scheme to abort out
of the erroneous computation. Later we'll tell you when and why you
might want to use the ``no'' option, but for now, just say yes.
Try using define
to
define some names and then use those names in other expressions. What
happens if you use a name that you haven't defined?
Make sure you are comfortable with Scheme's prefix notation by finding the value of (3 * 5 - 6 * 2) * 5 and other expressions like that. Also, do exercise 1.1 from the book (page 17), predicting each answer before you try it out on the computer.
If you have additional time after completing the tasks above, you may want to use some of your time to work through the examples from section 1.2 of the text or to try out your solutions to the first homework assignment. Also, feel free to come back at another time to get better acquainted with the SGI computers and the SchematiX programming environment. The hours are posted outside the lab. Another possibility would be to let this lab 0 spill over a bit into Thursday, when we'll be starting lab 1.
First, use the icon-finder to find the program netscape, and move its icon to your desktop. Launch netscape. The first time you launch netscape you'll need to agree to a contract and ok some suggestions. In short, the contract says, ``Don't take advantage of the Gustavus' site-license agreement.''
Locate the Gustavus Adolphus College homepage by entering
http://www.gac.edu/
in the Location box and pressing Enter.
Since you may not want to remember this address for next time, select
``Add Bookmark'' under the Bookmarks menu. Next time you want to find
the Gustavus homepage, select ``Gustavus Adolphus College Homepage''
under the Bookmark menu.
Now, navigate to Max Hailperin's homepage. Hint: First click on ``People'' in the Gustavus's homepage; this is called following a link. As you work your way towards Max Hailperin's homepage and from there to the page of MC27L materials, try clicking the ``Back'' and ``Forward'' along the top row of buttons. Once you find the homepage, you may want to add another Bookmark. Find the MC27L course materials and look at a copy of this lab assignment.
A panel will pop up asking whether you want to save the interaction window. (If you modified the lab0.scm file after saving it, you'll be asked about it as well.) After choosing one of the options (excepting Cancel, which puts you back in SchematiX), you can then logout. The logout option is again in the Desk 1 menu's Desktop submenu. Be sure to respond to the ``Do you want to log out now?'' confirmation panel by clicking the ``Yes'' button.
One problem you will encounter is how to make yourself aware of all of the applications available to you. This is a rather daunting task, and one which we will not directly address in this course. Instead, we suggest that you make use of the main source of useful computer arcana and trivia we have found, namely your fellow computer users. We are always learning new things from our students. So don't be shy!