We will use Piazza for questions about the assignments, for students to discuss course materials, and to make announcements about the class. You are responsible for being current with the information and discussions that are posted there.
You will get an email from Piazza with a link inviting you to create an account within the first week of the term. If you haven't gotten one in that time, please contact course staff.
In addition to the web interface, there are Piazza apps for Android and iOS available for free through their respective app stores.
You can find documentation on C0 here.
First you will need the Xcode command line tools:
If you have Mavericks (10.9), you can install just the command line tools
by opening Terminal (from Applications/Utilities) and running
xcode-select --install
and then following the instructions.
If you have Mountain Lion (10.8), you can download the Xcode command line tools by getting this package.
If you have Lion (10.7), you can download the Xcode command line tools by getting this package.
If you have Snow Leopard (10.6), ask the course staff how to install Xcode for Snow Leopard with the command line tools.
/Users/YOURNAME/software/c0/
where
YOURNAME
is replaced by your OS X username in what
follows. If you don't know what your username is, open Terminal (from
Applications/Utilities) and type echo $USER
.
Open Terminal (from Applications/Utilities), and type each following commands on a line by themselves, pressing return after each one:
cd /Users/YOURNAME/ mkdir software cd software mkdir c0 cd c0After each line, you should hit enter to execute the command. mkdir makes a folder, and cd changes the folder you're in to the one specified.
/Users/YOURNAME/software/c0
:
/Users/YOURNAME/software/c0
(you can check
this by running the command pwd
)
and then run the command
tar -xkvzf cc0-*
to extract the C0 implementation.
cc0/bin/coin
. You should
see
C0 interpreter (coin) 0.3.2 'Nickel' (r349, Wed Aug 28 18:31:41 EDT 2013) Type `#help' for help or `#quit' to exit. -->Type
#quit
to exit.
Next, you will add /Users/yourname/software/c0/cc0/bin
to your
PATH environment variable. This lets you run C0 without specifying
the full location. To do this,
run the command
echo 'export PATH="/Users/YOURNAME/software/c0/cc0/bin:${PATH}"' >> ~/.bash_profile
Close the terminal window that you are using and open a new one
(use Terminal / New Window from the menu). This makes the PATH
take effect. Now you should be able to simply run coin
.
sudo /opt/local/bin/port install libpng zlib
to install these two libraries.
cc0/bin
directory in your path,
and make sure you have libpng and zlib installed.
Please consult with the course staff if you need more specific help.
Linux 3.9.3 (32 bits), created under Ubuntu 12.04 (Precise Pangolin).
Linux 3.9.3 (64 bits), created under Ubuntu 12.04 (Precise Pangolin)
Cygwin lets you do Unix-y things on Windows; it will come in handy in other CS classes. First, you need a standard Cygwin installation. Download the 32-bit Cygwin installer from http://cygwin.com/install.html (do not get the 64-bit variant). Run the installer using standard paths (should install to C:\cygwin). Eventually, it will ask you which packages to install. Search for the following packages, and for each one, click "Skip" once so a version number appears, like in the image ("Skip" means "do not install"; the version number means "install this version").
The Cygwin installer will create a shortcut on the desktop which opens a Cygwin shell. If it fails, you can create a shortcut to C:\cygwin\bin\mintty.exe and change the "Start in" field to %USERPROFILE%.
To install C0, you need to choose a location to install the C0 package. In this example, we'll use a directory we'll create called software/c0/ from your home directory. Launch Cygwin and then type the following commands.
$ mkdir software $ cd software $ mkdir c0 $ cd c0After each command, hit enter to run it. mkdir creates a new directory; cd changes the directory you're currently in.
Now download and unpack C0:
$ wget http://c0.typesafety.net/dist/cc0-v0349-cygwin-bin.tgz $ tar -xkzvf cc0-v0349-cygwin-bin.tgz
Update your PATH to make C0 available:
echo 'export PATH=$PATH:/home/YOURNAME/software/c0/cc0/bin' >> ~/.bash_profile
coin
. You should see
C0 interpreter (coin) 0.3.2 'Nickel' (r349, Wed Aug 28 18:31:41 EDT 2013) Type `#help' for help or `#quit' to exit. -->Type
#quit
to exit.
Sublime Text is available here; get version 2.
On Windows, go to the above web site and download the installer. C0 syntax highlighting seems to be included. If it isn't, follow the same instructions as under Mac below.
On Mac, you need to do the following:
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')You should be prompted to restart Sublime Text.
If you have Linux, you almost certainly have emacs installed. For Mac and Windows get:
To install C0 syntax highlighting:
echo '(setq c0-root "/Users/YOURNAME/software/c0/cc0/")(load (concat c0-root "c0-mode/c0.el"))' >> ~/.emacs
~/.emacsThis is the name of the emacs startup file.
(setq c0-root "c:/cygwin/home/YOURNAME/software/c0/cc0/") (load (concat c0-root "c0-mode/c0.el"))
Some emacs resources:
For the written assignments, you may wish to use LaTeX.
LaTeX is built from Don Knuth's TeX typesetting language, and has grown through community support to be both extremely powerful and easy to use. LaTeX is installed on the Andrew UNIX servers, and can be downloaded and installed on local machines as well. There are any number of excellent resources about how to use LaTeX; a few are listed here for your convenience.
LaTeX source files can be created with any text editor, so emacs and vim are excellent choices. There are several LaTeX specific IDEs that you may find more comfortable to use, depending on your working environment: