@device(imprint10)
@make(report)
@definefont(Userfont, 1=<Typecase ComputerModernBold10R36>,
                      2=<Typecase ComputerModernBold10R14>,
                      3=<Typecase ComputerModernBold10R9>,
                      4=<typecase computermodernbold10R12>,
                      5=<typecase computermodernbold10R10>,
                      6=<typecase computermodernbold10R20>)
@modify(programexample, above 1, below 1)
@modify(CopyrightNotice, Fixed -1 inch, Flushright)
@Modify(Titlebox, Fixed 1.5 inches)
@modify(hd2, leftmargin -2)
@MODIFY(example, above 1)
@Style(Font computermodernroman11)
@Style(spacing 1,indent 0)
@Style(leftmargin 1.0inch)
@Style(Linewidth 6.5inches)
@begin(Titlepage)
@Begin(Titlebox)
@begin(MajorHeading,Flushright,Font Userfont, FaceCode 1, below .2inches)
Project Athena
Newsletter
@end(majorheading)
@begin(majorheading,flushright,font userfont, facecode 6,above 0)
April 1, 1985
Volume 2, No. 4
@end(Majorheading)
@End(Titlebox)
@CopyrightNotice(Massachusetts Institute of Technology)
@end(titlepage)
@newpage
@blankspace(5 inches)
@begin(Heading,flushleft, font userfont, facecode 6)
Editorial Policy
@end(heading)
@begin(quotation,indent 0)
The @i[Project Athena Newsletter] is the official publication of Project
Athena, a five-year experiment in the use of computer technology to
improve the education of students at the Massachusetts Institute of
Technology.  The @i[Newsletter] prints articles of interest to members
of the MIT community who participate, or who are interested, in the
Project.  These articles present the general purpose, philosophy,
technical development, and direction of Project Athena, and specific
news items about Project Athena facilities and projects.  We encourage
article submissions from the community and publish appropriate
contributions whenever possible.
@begin(format)
@tabset(2.6 inches)
If you have any comments or questions on the newsletter--
Contact:@\Linda B. Merims
@\Editor
@\Project Athena Newsletter
@\MIT E40-431
@\Cambridge, MA  02139
@\(617)253-1368
@end(format)
@end(quotation)
@newpage
@set(page=1)
@Begin(MajorHeading,Flushright, below .2inches)
Project Athena
Newsletter
@end(MajorHeading)
@begin(majorheading,flushright,font userfont, facecode 4,above 0)
April 1, 1985
Volume 2, No. 4
@end(Majorheading)
@begin(majorheading, flushright, above .75 inch)
General News
@end(majorheading)
@Pageheading(left "4/1/85",
	center "Project Athena Newsletter", right "4/1/85")
@pagefooting(Immediate, left "Project Athena Newsletter",
	center <@value(page)>, right "Volume 2, No. 4")



@section(Project Athena Rules of Use)

MIT students and faculty use
Athena facilities very heavily for
curriculum development, course-related work, text processing, and
electronic mail.  In several facilities, resources are stretched to their
limits. @i(We need your help to keep things from getting out of hand.)


With this in mind we set forth the following general rules.  These rules
will be
posted in all Athena facilities.  The list
highlights areas that have been be the source of the
most problems.  This list will be developed and modified over time.  It
is also likely that some Athena facilities will develop additional
local rules to meet the needs of that local facility.

We do not intend to police Athena facilities to enforce these rules.  We
expect voluntary compliance and we believe that group pressure will be
the most effective enforcement mechanism.


@b(1.  No smoking, eating, or drinking in Athena terminal rooms.)

Smoking is not allowed because it affects other users.  Eating and
drinking are not allowed because they can potentially damage the
equipment.  


@b(2.  Do not reconfigure the terminal rooms.)


At various times, often in the dead of night, our terminals acquire
hands and feet. They switch places with one another and rewire
themselves in the process.  Please don't make this situation worse by
helping them.  If you move equipment it often results in
catatonic, mislaid, malfunctioning terminals.  

If you believe the configuration of the room needs to be changed, 
please call us at 3-1410 to discuss it.


@b(3.  Do not lend your Athena account to a friend.)

Giving someone else your account is like lending the key to your
house or giving away your charge card.
If you do lend
your account make sure you change the password
afterwards.

Why do we care?  Your account identifies you to the
Athena user community.  If your account is
used in an abusive manner, you will be the first one blamed.
We have had
incidents of misuse of the mail system involving people using other
people's accounts to send abusive communications.

Every undergraduate student who wants an account can get one.
Accounts are also available for interested
faculty.


@b(4.  If the terminal cluster is busy, do not
 login to machines outside your local facility.)

Most users have to use their assigned machine's terminal cluster; they
can't use any other.
If the terminal room is crowded and you are using @i(telnet, rlogin) or the
@i(login server) to login to a machine outside of your local facility,
then you are preventing someone else from accessing his/her account
on a local machine.  Please move to the other facility.


@b(5.  Don't play games if
the terminal cluster is busy, or if the system slow.)

Games are the lowest priority software on the system.  
They are great fun, but the most popular games (like @i(rogue))
are "system hogs" that
slow down the system for everybody else.

Don't play games if:
@itemize[
You see that other people are using the system and the room is crowded.

You notice the system is slow.

If another user asks you to stop.

And @p(never) play games over the dial-up lines.
]
It is your responsibility to monitor the load
average with the @i(uptime) command
and to stop playing games when it rises above 2.0.  Please
don't  put our consultants into the position of being system policemen.


@b(6.  Don't be a "computer hog".)


Until we begin to use workstations as part of Project Athena (later in
1985) we are sharing computing resources with each other in the typical
timesharing mode, and these resources are limited.


Certain programs such as @i(lisp) and @i(scribe) consume vast
amounts of memory and CPU
resources.   If you are doing some interesting work that
you know is consuming lots of computer cycles, consider doing it during
off-hours when the terminal room is not crowded.  (Mornings are usually great!)
You can also use the @i(nice) program to give your jobs lower priority.

If you are interested in what other programs hog
system resources, ask a consultant.


@b(7.  Do not use Athena printers as copy machines.)

The Athena printers should only be used for the first one or two copies
of a document.  Please use copy machines for additional copies.

Please do not print a
document longer than 40 pages at one time.  On the laser printer this
will take approximately 5 minutes.  After this point you become a
"printer hog".

Our DEC LN01 laser printers are printing more pages than they were
designed to.  DEC Field Service has identified this as the reason
they are breaking down so much.
Consider using the line printer (as in @i(lpr -P @p[lp] filename)) instead
of the default laser printer.  It is usually less busy.


@b(8.  Priorities)


If the terminal room is crowded, @i(highest priority )
goes to Athena
curriculum development and course-related work;
@i(middle priority)
to
text processing, sending mail, exploring the system, or just hacking; and
the @i(lowest priority) goes
to game playing.  Remote login is not allowed if the
terminal room is crowded.

@b(Thank you for your cooperation!)

@section(Print Output on Any Athena Printer)

@i(Jim Fulton, System Development)

On April 15, Athena plans to install a variety of changes to our printing
software that will
make it possible for you to easily send output files to any 
printer in the Athena system.
If you have an account on more than one machine, you
might find this very useful.  

This is how it works:

The normal way to send output to a printer is the @i(lpr) command.
By default, @i(lpr) always prints your output on the laser printer
for your machine's cluster.  The @i(lpr) command has
the @b(-P) option that  you can use  to pick @i(which) printer
in your machine's cluster to use (-P ln or -P laser for the laser printer,
or -P lp for the line printer).  

We have added a @p(.clustername)
suffix to the printer name the lets you specificy
@i(which cluster's) laser or line printer you want your output to
come out on.

The clusternames are generally of the
form @b[bldg@p{X}] where @p{X} is the number of the
building containing the cluster (e.g. @i{bldg11} and @i{bldgw20}).

Thus, to print your output on the building 1
line printer @p[lp], you would type the following line on any
machine in the Athena network:
@begin(programexample)
myhost% lpr -P lp.bldg1  yourfile
@end(programexample)
There are
also some less verbose or more descriptive aliases for the clusternames.
For example:
@begin(programexample)
myhost% lpr -P lp.1  yourfile
@end(programexample)
would work just like the previous example.

This feature was implemented by using the new @i(clustertab) cluster 
information database described below.   The clusternames are
defined the database file @i(/etc/athena/lib/clustertab).  The
new @i(gci) ("get cluster information") command can be used to
find out what's in the database.

For more information, see the manual pages for
@i{lpr(1)} and @i{gci(1)} after April 15.  In addition to adding
this output routing feature,  many other bugs in the line
printer spooling system have been fixed to improve reliability.
These modifications
do @B[NOT] change how the software is used, so you will not have to modify any
programs that use @i{lpr} or any of its related utilities.

@section(MIT Scribe Thesis Format)

On April 15, we plan to install a new, experimental Scribe document
type in the @i(/usr/unsupported/thesis) directory that will produce output
in the proper MIT thesis format.

The new thesis type is not integrated into the rest of Scribe.  It
is not yet supported, except by its creator.  We are putting it out as the
the best available solution to an immediate need.  To find out how to
use it, look in the file:
@begin(programexample)
/usr/unsupported/thesis/README
@end(programexample)



@section(No More @i(fortune) at Login)

Most of you have noticed the "fortune cookie" that you receive every
time you login.  This is the little saying, comment, or joke that
appears just before the first system prompt.

You get this fortune cookie because there is a line @i(/usr/games/fortune)
in the @i(.login) file that Project Athena gives all new users.  The
@i(.login) file
is executed everytime you login and this command
triggers the fortune.

Athena has begun to receive complaints about the nature of some of
these fortunes.  Much of the material in the database that supplies
@i(fortune)'s material could be interpreted as prejudiced or in
plain bad taste.  Rather than try to edit the database for offensive
material, and because most new users aren't aware of their
@i(.login) file, what it does, nor the fact that they can change it,
we have decided to just do away with @i(fortune)s at login 
altogether.  The change will occur on about Monday,
April 15.

The exact mechanism of @i(fortune)'s demise will
be:
@begin(itemize)
The file @i(/usr/games/fortune) will be made a "no op," that is,
the file will still exist but it won't do anything.  This way, we
won't break the @i(.login) files of the thousands of existing
usernames.

The @i(fortune) program itself will migrate to the file 
@i(/usr/unsupported/sipb/fortune). 
@end(itemize)
The Student Information
Processing Board (sipb)
has volunteered to assume responsibility
for @i(fortune).  If you  like getting @i(fortune)s, you can
continue to receive them if you edit the fortune cookie line
in your @i(.login) file to read:  @i(/usr/unsupported/sipb/fortune)

@newpage
@begin(majorheading, flushright, below 1 inch)
Languages
@end(majorheading)


@section(Lisp Support Plan)

@i(Jerome Saltzer, Technical Director)

Project Athena has identified two dialects of Lisp that it intends to
support on all Athena workstations:  Scheme and Common Lisp.

Since Scheme is the language of 6.001, much of the student body is
familiar with it.  As long as 6.001 continues to teach a substantial
number of students this language, Project Athena will support Scheme,
encourage further implementation efforts, and encourage vendors to
provide supported versions.

In the case of Common Lisp no implementations are currently available,
but there seem to be several projects underway at various potential
suppliers.  As implementations of Common Lisp become available, they
will be evaluated with the intent of making them standard on Athena as
soon as possible.  Project Athena will encourage suppliers, but it is
not directly supporting any development efforts.

Until Common Lisp implementations are widely available, Athena will
continue to support the Franz Lisp dialect that came with VAX Unix 4.2.
Once Common Lisp becomes available under VAX Unix it is expected that
current users of Franz Lisp will make plans to convert their
applications to Common Lisp or to Scheme.  Users of Franz Lisp who do
not convert should expect that eventually they will have to provide
their own support for continued operation of the Franz Lisp system in
the face of system changes.



@section(Scheme)

@i(Mark Levine, Applications Consultant)

On April 15, Project Athena plans to release CScheme, an interpreter
for the Scheme dialect of Lisp.  Scheme was developed
in the MIT Department of Electrical Engineering and Computer Science
as a Lisp teaching tool for the popular course 6.001, "Structure
and Interpretation of Computer Programs."  Scheme is a "lexically-scoped"
dialect of Lisp.  In this respect, it is closer to Common Lisp
than the "dynamically-scoped" Franz Lisp that Athena already supports.@foot(
"Lexically-scoped" means that Scheme's variables follow the standard
block-structured language
rules for scoping, where variables declared in a main
procedure are global, and variables declared in subprograms are
local to the subprograms.  Duplicate variable names cause no problems
because the rules of precedence are well-defined.  "Dynamically-scoped"
means that, by default, all variables become global once they are
declared, and any precedence rules are programmer-defined and controlled.)

CScheme is compatible with the "Chipmunk" Scheme students in 6.001
learn, except that it has a few additional primitives to
ease communication with the Unix system and improve graphics.
CScheme will support
graphics on all Athena DEC graphics terminals:  the VAXstation 100,
and the DEC VT125, VT240, and Pro350 terminals.

As its name hints, CScheme's kernel is largely written in C.  It is
designed to be portable to other systems.

Scheme is actively supported by Project Athena.  It is intended to
be available for faculty curriculum development projects, as well
as student use.

Scheme is documented in four pieces:
@description[
@i(man scheme)@\typed at a terminal after login will explain how to
start up Scheme.

@i(Essential Scheme, A User's Guide to CScheme)@\explains how to run the
Scheme interpreter on Athena systems.  It is the Athena-equivalent of
the 6.001 "Don't Panic" document.  
This free document will be available in
terminal clusters by April 15.

@i(Scheme Manual, Seventh Edition)@\is the "language reference" manual
for Scheme.  It documents all Scheme features.  This manual is
for sale at the IS Publications Office in 11-209.
6.001 students should already have this manual.

@i(Structure and Interpretation of Computer Programs)@\by
Abelson and Sussman teaches programming using the Scheme language.
This book (the text for 6.001) is for sale at the MIT Press
bookstore and the Tech Coop for $32.50.
]




@section(Calling C, Fortran, and Pascal from Franz Lisp)

@i(Mark Levine, Applications Consultant)

Athena machines have a new
directory added to @i(/usr/include).  The directory, @p(/usr/include/lisp),
contains header files for the Franz Lisp system that allow
you to write Lisp-callable subroutines in C (or Fortran or Pascal).
These header files also
make it possible to call Franz Lisp functions from C code.

To use these header files, you need to place the line:
@begin(format)
#include <lisp/global.h>
@end(format)
into a C code source file.  This will make the definitions of
C structures for Lisp data types available and allow you to create or
manipulate Lisp objects in C.  The Lisp function @I(cfasl)
is used to link C (and with greater difficulty, Pascal) code with
Franz Lisp.  The Lisp function 
@I(ffasl) is
used to link  f77 code with Franz Lisp.

Interfaces to the @I(curses) and @I(termcap) libraries to support
terminal-independent screen management have been written for Franz
using these techniques.  A sample interface to Penplot is also
available to support graphics.  If you are interested in these, contact
Mark Levine (yba@@mit-jason, x3-1528, E40-437).

(For more information on
screen management, see
the article "Screen Updating and Cursor Movement Optimization: A
Library Package", by Ken Arnold in Athena @i(Unix Programmer's Guide) and
@i[termcap(3X)] in the Athena @i(Unix Commands)
manual; the @i[Athena Guide to Using the Penplot Graphics
Library] contains more information on Penplot; and section 8.5 of Athena
@i(Franz Lisp) manual
has further details on calling C and Pascal from Lisp).

@newpage
@begin(majorheading, flushright, below 1 inch)
For System Developers
@end(majorheading)

@section(Clustertab, Cluster Information Database)

@i(Jim Fulton, System Development)

A new database package for obtaining information about the resources available
in a cluster of Athena machines 
will be available April 15.  The @i{clustertab} database and
supporting library routines will be installed on all Athena machines.  While
the @i{clustertab} is intended primarily
to be used by system software, the database 
@i[/etc/athena/lib/clustertab] does provide interesting information about the 
organization of the Athena subset of the MIT network.

For more information, see the manual pages @i{clustertab(5)} for a description
of the clustertab database @i[/etc/athena/lib/clustertab] and @i{clustertab(3)}
and @i{gci(1)} for information on how to access the @i{clustertab}.


@section(@i(ndbm), New @i(dbm) Database Routines)

@i(Jim Fulton, System Development)

On April 15,
@i{ndbm}, a new, object-oriented version of the @i{dbm} keyed database 
library should be available.  The major differences between the two libraries 
are:
@begin(itemize)
More than one database can be used at a time.  @i{Dbm} limits a program to one
database; @i{ndbm} has no limit.  

The names of the routines have been changed in @i{ndbm} so that there is no
conflict with the old @i{dbm} routines.

Error handling has been
improved in the new version.
@end(itemize)
For all intents and purposes, @i{dbm} is obselete; programs that work with
keyed databases should use @i{ndbm}.  

Like @i{dbm}, @i{ndbm} only has a C language interface.  To use @i{ndbm} you 
must use include the file @b[ndbm.h] in your program as follows:
@begin(programexample)
#include <ndbm.h>
@end(programexample)
In addition, you must use the the @b[-lndbm] flag when 
compiling or link/loading your program.

For more information see the manual page @i{ndbm(3x)} after April 15.


@newpage
@begin(majorheading, flushright, below 1 inch)
Consultant's Corner
@end(majorheading)

@section(Putting the Unix Pieces Together:
Pipes, Filters, and I/O Redirection)

@i(Win Treese, Student Consultant)
@tabclear()
@tabset(2 inches)
@tabset(3 inches)

One of Unix's most useful features is its ability to @i(send) output
from one program into a file, or even to another program.  Conversely,
you can direct the program to read input data @i(from) a file or another
program, when the program would normally get its input from the
terminal.  This means that you can take, say, your lab data and process
it sequentially with several different programs, much in the same way as
you might run a liquid through several filters to purify it.  You
can do this without making any temporary files to hold intermediate
results.


@subsection(I/O Redirection)

Suppose we had a file like the one below, with some
information about students and faculty at MIT and Harvard (we will use
this file for several later examples):

@begin(format, leftmargin +0.5 inches)
% @b[cat datafile]
Paul@\student@\harvard
John@\faculty@\mit
George@\student@\mit
Ringo@\faculty@\harvard
%
@end(format)

Now, suppose we want to get a list of people associated with MIT, and we want
this list sorted by the person's first name.  The Unix program @b(grep)
can be used find all the lines with the string "mit" in them.  We
can use the @b(<) character to direct the input to @b(grep) from the file
@i(datafile).   Now, instead of reading from the terminal, @b(grep) will
get its input from a file.
If you typed this, you would see something like:

@begin(format, leftmargin +0.5 inches)
% @b[grep mit < datafile]
John@\faculty@\mit
George@\student@\mit
%
@end(format)

You can think of the @b(<) symbol as an arrow
pointing @i(from) a file @i(to) a program.

The @b(>) character will do the opposite: that is, send the output from a
program into a file (think of an arrow pointing @i[from] a program @i[to] a
file).  Using @b(>)
we can use @b(cat) to copy one file to another.
Since @b(cat) normally prints on your terminal, this example shows how
to put that output in another file.  Then, if we @b(cat) the output
file, we see that it is a copy of the original @i(datafile).

@begin(format, leftmargin +0.5 inches)
% @b[cat datafile > moredata]
% @b[cat moredata]
Paul@\student@\harvard
John@\faculty@\mit
George@\student@\mit
Ringo@\faculty@\harvard
%
@end(format)

You can also combine < and >, redirecting
input and redirecting output,
in the same command.  Hence, if we wanted to save the list of
people associated with MIT in another file and then sort this list, we
could type:

@begin(format, leftmargin +0.5 inches)
% @b[grep mit < datafile > mitpeople]
% @b[cat mitpeople]
John@\faculty@\mit
George@\student@\mit
% @b[sort < mitpeople]
George@\student@\mit
John@\faculty@\mit
%
@end(format)

@subsection(Pipes and Filters)

The > and < operators send data between @i(programs) and @i(files).
The Unix system also provides the ability to send output from one
@i(program) to another @i(program).
By doing this, we can do the @b(grep) and the
@b(sort) in a single line.  This output redirection is denoted by the
character @b(|), known as a "pipe" since it "pipes" the output from one
program to the input of another.  On the keyboard it looks a vertical
bar.  (On the VT125 and VT100 terminals, it is next to the
return key on the right; on the VT220, VT240, and VS100 terminals, it
is next to the return key on the left, and on IBM PC/XT's, it is between
the left shift key and the "z".)

Now the  example above becomes:

@begin(format, leftmargin +0.5 inches)
% @b[grep mit < datafile | sort]
George@\student@\mit
John@\faculty@\mit
%
@end(format)

The output of @b(grep) flows along the "pipe" to @b(sort), which then
prints its output on the terminal.
We can hook together
several programs to form one of these "pipelines" (as they are
called), so that each program selects and transforms
some desired subset of the data.  If we
only wanted a sorted list of faculty members from Harvard, we could type:

@begin(format, leftmargin +0.5 inches)
% @b[grep harvard < datafile | grep faculty | sort]
Ringo@\faculty@\harvard
%
@end(format)

Here the sorting is not too useful, because we only have one line of
output. In general, however, using pipes can be a quick and efficient
way to filter a file full of data.  One common filter is @b(more),
which prints a screenful of output at a time.  Thus, if you were sorting
a large file, you might pipe the output to @b(more) so you could see it
screen by screen.  In this case, @i(datafile) is small, so @b(more)
doesn't do anything besides display the lines of the file.

@begin(format, leftmargin +0.5 inches)
% @b[sort < datafile | more]
George@\student@\mit
John@\faculty@\mit
Paul@\student@\harvard
Ringo@\faculty@\harvard
%
@end(format)

@subsection(Standard Input and Standard Output)

Most  commonly-used Unix programs will accept input and redirect
output in this way.  In the documentation, this is referred to as
"reading from the standard input" and "writing to the standard output".
Normally, the "standard input" is your terminal, and programs that read
it will expect you to type something.  For example, if you type only
@b[grep mit], @b(grep) will wait for you to type some text.  When you are
done, type CTRL-D, to signal this to the program.  Then @b(grep)
will print the lines you typed that contained the string "mit".  When
you type @b[grep mit < datafile], the C shell changes where @b(grep)
thinks its input is coming from, so it doesn't read from your terminal.
Similarly, the "standard output" is also normally your terminal, so using
the > character makes the output go into the file you specify.  The
same comments apply to pipes, except that the standard input of one program
is connected to the standard output of the preceeding one in the pipeline.

@subsection(Redirecting Standard Error Output)

There is another method of output available to programs: the "standard error"
output.  It is commonly used for error and diagnostic messages that
should not be mixed with the regular output of the program.  Usually these
are printed on your terminal even if you are redirecting the standard output,
but it is possible to redirect both.  To do this, put an & character directly
after the > or | characters in your command, as in

@begin(format, leftmargin +0.5 inches)
% @b[sort < datafile >& outputfile]
%
@end(format)

In this example, if @b(sort) printed any error messages, they would be recorded
in @i(outputfile) along with the usual output from @b(sort).  Unfortunately,
there is no way to redirect only the standard error output.

@subsection(For More Information)

The best way to understand how these 
<, >, |, and >&  operations work is to try them out
with different files and programs.  For more information, see the
manual page for the C shell by looking under
"csh" in the Athena @i(Commands) manual, or 
the document @i(An Introduction to the C
Shell),
both of which are in the document racks in the Project Athena
terminal rooms.  You can also read the C shell manual page online,
just like all other manual pages, by typing @b(man csh).  If you
need help or have questions, ask a student consultant.


@section(Newsletter Deadlines)
@b(The deadline for submitting articles and article ideas for the May 6, 1985
newsletter is 5 p.m. on Friday, April 19.

The deadline for submitting articles and article ideas for the June 3. 1985
newsletter is 5 p.m. on Friday, May 17.)
