Software for CSE 341

Compilers or interpreters for all of the languages we'll be using this quarter should be installed on the undergrad computers on both Windows and Linux. You can also download and install them on your own machine if you have one. Specific directions for each language will be in the materials for that language.

Using Linux and Emacs in CSE 341

Reflection X

We'll use Reflection X to give you a graphical interface for your Unix session on attu.cs.washington.edu

Logging in from the basement labs

If you're going use the labs, everything is set up for you:

Working elsewhere

It's probably simpler to work in the basement labs where we have checked that the right software is already installed and the directions we provide are correct. If you're willing to put in a bit of extra work to get things set up, you have a few options:
  1. Install the necessary software on your computer. The links on the course web page should help. Make sure you get the right versions.
  2. If you want to run something on a department linux machine, use a terminal and ssh to run Haskell, Prolog, Ruby, and Java. We recommend using emacs as your editor for this option. This won't work with Racket though.

Basic Unix commands

To move around through the directory structure in your xterm window, you'll need to know a few basic Unix commands.
attu4% mkdir mydir
attu4% ls
mail  mydir
attu4% cd mydir
attu4% pwd
/homes/iws/sbfan/mydir
attu4% exit
In the above (the things within the quotation marks are commands to type, don't type the quotation marks themselves): These are just the very minimum basics, but you won't need too much more in 341. For more info on UNIX, see your ACM chapter's tutorials, this UNIX tutorial, material from the first week of CSE303, or many other good resources.

Accessing your UNIX home directories from Windows

If you're in the basement labs, your Z: drive should already be mapped to your Unix home directory. Look under for the Z: drive under "My Computer" in the Start Menu. To accesss your files, go to Z:\unix\homes\iws\userid, replacing "userid" with your own CSE account username. All the files you saved while working on Attu should be there.

If you're in the labs and your Z: drive isn't mapped, open up a Windows Explorer window (by clicking the "My Computer" from the Start Menu) and in the Tools menu item, select "Map Network Drive" and enter Z: for drive and \\ntdfs\cs for folder. Click Finish. If you're at a computer that does not use CSE's name servers, for example in Mary Gates Hall or at home, you will need to use the fully qualified name, \\ntdfs.cs.washington.edu\cs.

For more info on this, see the CSE support page that discusses Microsoft DFS, which is what we just used.

Emacs

Now that you have your xterm open, let's open Emacs.

Type "emacs &" to open emacs in a new window. Note what happens if you don't type the "&"--you can't do anything in your xterm window. The "&" runs your program, in this case, emacs, in the background.

[GNU Emacs: a labeled diagram]

Emacs uses many key combinations involving the Control and Meta keys. Such key combinations are denoted C-x (Control-x (lowercase)) or M-x (Meta-x). On keyboards that don't have Meta, Alt is usually an acceptable substitute. If Alt doesn't work, ESC-x is equivalent to M-x.

A sequence of key presses is written like C-a C-b M-x, which would mean do the three actions in sequence.

The most important keys in Emacs Some other useful keys: Getting help within Emacs: In addition to the help button on the right...
Finally, there are other resources, including the (older but not necessarily outdated) course help pages as well as the CS Lab pages.
Acknowledgment: These notes have evolved over the last few years, but the linux/emacs notes are largely based on notes originally written by Keunwoo Lee in 2001. Last updated by Alan Borning for Autumn 2015.