% Class 5: She Cells C Shells
% David Evans
% 2013-09-12

<!--
Title: Class 5: She Cells C Shells
Date: 2013-09-12
Category: Classes
Tags: operating systems, processes, shell, bash, Wahoowa
Author: David Evans
Slug: class5
-->

<!-- **[PDF version for
printing](|filename|../../static/classes/class4/class5.pdf)** -->

## Action Items

<div class="startaction"></div>

**You should have a teammate for PS2 by now.  If you don't, hang around
after class to find one.**

<div class="endaction"></div>

## Course Philosophy

What is my goal for the lectures?

<div class="gap">
#
</div>

What are my academic goals for the course?
<div class="gap">
#
</div>

\footnotesize
_We wish to establish in the upper country of Virginia, and more
centrally for the State, a University on a plan so broad and liberal and
modern, as to be **[worth patronizing with the public support](http://www.cavalierdaily.com/article/2013/09/access-uva-petition-gains-ground)**, and be **a
temptation to the youth of other States to come and drink** of the cup of
knowledge and fraternize with us._ (Thomas Jefferson's letter to Joseph
Priestly, 1800)
\normalsize

If this doesn't coincide with your personal goals, what should you do?
<div class="gap">
#
</div>

\footnotesize
_Thomas Jefferson enrolled in the College of William and Mary on March
25, 1760, at the age of 16... By the time he came to Williamsburg, the young scholar was proficient in
the classics and able to read Greek and Latin authors in the original...
He was instructed in natural philosophy (physics, metaphysics, and
mathematics) and moral philosophy (rhetoric, logic, and ethics). A keen
and diligent student, he displayed an avid curiosity in all fields and,
according to family tradition, he frequently studied fifteen hours a
day._ (From [_Jefferson's College Life_](http://www.wm.edu/about/history/tjcollege/tjcollegelife/).)
\normalsize

What is my goal for the assignments?  What should your goal be?
<div class="gap">
#
</div>

Some professors who want to minimize grading time have the misfortune of
teaching as schools without strong honor systems like UVa.  This forces
them to adopt other solutions, like the "Tiger Professor" approach:
[_Severe CS 161 syllabus provokes controversy among
students_](http://www.dailycal.org/2013/09/03/despite-changes-original-cs-161-syllabus-prompts-controversy/)
(The Daily Californian, 3 September 2013)


## Danny Lewin

_Danny was killed on September 11.  He was on  American Flight 11 on his way to meetings in California when his plane
was hijacked. In true Danny form, he fought back against the terrorists in an effort
to defend the stewardesses and the cockpit. To this day, those of us who
knew him well can’t figure out how only five terrorists managed to
overpower him. During his short life, Danny made extraordinary
contributions to the internet and to computer science through his work
in algorithms and complexity theory. The impact of his work will be felt
throughout the hi-tech industry for many years to come._ 

[Tom Leighton's remarks  naming of the STOC Best Student Paper Award in honor of the late Daniel 
Lewin](http://www.egr.unlv.edu/~bein/SIGACT/lewin.html)

- [Consistent
  Hashing](http://www.cs.virginia.edu/~evans/cs1120-f11/all/2011/class-9-consistent-hashing)
  (Lecture from my cs1120 course, 12 September 2011) 
- [_A Lost Spirit Still
  Inspires_](http://www.boston.com/business/technology/articles/2011/09/04/akamai_thrives_in_the_spirit_of_its_lost_founder/?camp=pm)
  (Boston Globe, 4 September 2011)
- [What Things were like in September
  2001](http://www.cs.virginia.edu/~evans/cs588-fall2001/) (Note that
  the University didn't cancel classes on Sept 11, 2001 or on Sept 12,
  2001, but did for the week or so after that.)

## Rust Docs

If you are interested in using and contributing to the Rust
documentation Jordi is developing, they are at
[http://seld.be/rustdoc/](http://seld.be/rustdoc/).  (Note that these
are targeting the latest version, so may not be entirely consistent with
version 0.7, but its also fine if you want to upgrade to using the
latest version.)  If you are also interested in contributing to
improving them (instead of [competing with my daughter's
efforts](http://www.dorina.org/pubs/strings.html)), visit [this github
page](https://github.com/cmr/rustdoc_ng) and `#rustdoc-wg` on
`irc.mozilla.org`.

## Shell Code

```rust
use std::{io, run};

fn main() {
    static CMD_PROMPT: &'static str = "gash > ";
    
    loop {
        print(CMD_PROMPT);
        let line = io::stdin().read_line();
        let mut argv: ~[~str] = line.split_iter(' ').filter(|&x| x != "")
                                    .transform(|x| x.to_owned()).collect();
        if argv.len() > 0 {
            let program = argv.remove(0);
            match program {
                ~"exit"     => { return; }
                _           => { run::process_status(program, argv);}
            }
        }
    }
}
```
