We will use various software packages this term:
We will do most programming in Racket (it has some of the best infrastructure around for courses such as this). You may use either the self-contained DrRacket IDE or your favorite editor with Racket on the command line.
Within Racket, we will use a custom language called
This provides a mechanism for defining datatypes and supports type
signature on functions (unlike in plain Racket). Download and install Racket
first. Then, go to DrRacket's File | Install Package
menu entry, and enter
plai-typed in the box and click
The plai-typed documentation contains a list of the available operators (grey column on the left side of the page) as well as a general language reference.
When you first run DrRacket, it says “DrRacket cannot process programs until you choose a programming language”: you need to tell DrRacket which dialect you want to use. Take the following steps:
In the Language menu, select Choose Language. In the resulting pop-up window, select “Use the language declared in the source”, and click OK.
The definitions window will now read
#lang racketThis tells DrRacket that you wish to write programs in the language
racket. We want to instead use the language designed for this course. Therefore, replace the first line with
#lang plai-typedThis tells DrRacket that you want the
plai-typedlanguage instead. You will need this line at the top of every file you write in this class.
Click the Run button at the top-right. Now the interactions window
will reflect that you are in the
It might be annoying to have to type the above
every time, but you can make DrRacket do it automatically. In
Language | Choose Language..., click the Show Details button. At the
bottom-right of the resulting pane, you'll see “Automatic #lang
line”. Type the
#lang plai-typed line here and click OK.
From now on, whenever you create a new tab, it will automatically
have your chosen language.
Fred (TA) has created editing configuration files for Racket for each of Emacs and Vim. Feel free to use either of these editors instead of DrRacket:
The textbook provides a crash-course in plai-typed. If you are
entirely new to Racket programming, you might want the basic
overview of Racket in the Racket Documentation. Note that this
overview does not include the typing aspects of
plai-typed -- use lecture and the textbook for those details.
Adding types affects the operators used to build lists (in section 2.4
of the tutorial): in plain Racket,
(list 1 2 3) and
'(1 2 3) are equivalent, but in
the first produces data of type
(listof number) and the
second produces data of type
s-expression. We will
discuss the difference in lecture. Unless you are writing input to a
cons to create
CaptainTeach is the peer-review system that we'll use to submit assignments and provide feedback on each others' work.
CaptainTeach uses Google for authentication, so you will need a google account to use it. You can use an existing google account or create one just for purposes of this class (we're just using it for authentication to CaptainTeach). One of the announcements on myWPI links to the wiki page where we have asked you to enter the google address that you will be using to access CaptainTeach.
When you access our course area on
CaptainTeach, you'll find a link to open
Assignments. If you click on an assignment, you'll be
taken to a page that lets you execute the next step you have to do on
that assignment. Steps include submitting work for review, writing
reviews for classmates, and submitting revised or final work. It
won't let you skip steps (so you cannot skip over writing reviews in
order to submit your own work for a later step). When reviews are
available for you to read, you will also see a link to examine your
feedback on an assignment.
We will start populating CaptainTeach with the usernames from the wiki during the first week of class.
We may add another tool later, depending on how the course and student interest evolves ...