PL: Resources

Class Notes

These are the class notes files. They are not a substitute for taking your own notes in class, and they certainly cannot compensate for not coming in.

Lecture #1
    Tuesday, January 8th
Intro to CS4400/CS5400
Intro to Programming Languages
Lecture #2
    Tuesday, January 8th
Intro to Racket
Side-note: “Goto Statement Considered Harmful”
Quick Intro to Racket
Lists & Recursion
Some Style
Tail calls
Lecture #3
    Tuesday, January 15th
Note on Types
Side-note: Names are important
BNF, Grammars, the AE Language
Lecture #4
    Tuesday, January 15th
Simple Parsing
The match Form
Semantics (= Evaluation)
Side-note: Compositionality
Implementing an Evaluator
Implementing The AE Language
Lecture #5
    Tuesday, January 22nd
Intro to Typed Racket
Bindings & Substitution
WAE: Adding Bindings to AE
Lecture #6
    Tuesday, January 22nd
Evaluation of with
Formal Specs
Lazy vs Eager Evaluation
de Bruijn Indexes
Functions & Function Values
Lecture #7
    Tuesday, January 29th
Implementing First Class Functions
The FLANG Language
Lecture #8
    Tuesday, January 29th
Introducing Racket’s lambda
Using Functions as Objects
Using Higher-Order & Anonymous Functions
Side-note: “Point-Free” combinators
This is not Runtime Code Generation
Substitution Caches
Implementation of Cache Functionality
Lecture #9
    Tuesday, February 5th
Formal Rules for Cached Substitutions
Evaluating with Substitution Caches
Dynamic and Lexical Scopes
Dynamic versus Lexical Scope
Lecture #10
    Tuesday, February 5th
Implementing Lexical Scope: Closures and Environments
Lecture #11
    Tuesday, February 12th
Fixing an Overlooked Bug
Lexical Scope using Racket Closures
More Closures (on both levels)
Types of Evaluators
Feature Embedding
Recursion, Recursion, Recursion
Recursion without the Magic
The Core of make-recursive
Denotational Explanation of Recursion
The Y Combinator
The main property of Y
Yet another explanation for Y
Typing the Y Combinator
Lecture #12
    Tuesday, February 19th
Lambda Calculus — Schlac
Church Numerals
More Encodings
Alternative Church Encoding
Recursive Environments
Recursion: Racket’s letrec
Implementing Recursion using letrec
Implementing rec Using Cyclic Structures
Boxes and Mutation
Lecture #13
    Tuesday, February 26th
Types for Boxes
Boxof’s Lack of Subtyping
Implementing a Circular Environment
Lecture #14
    Tuesday, February 26th
Variable Mutation
State and Environments
Implementing Objects with State
The Toy Language
Lecture #15
    Tuesday, March 12th
Compilation and Partial Evaluation
Lecture #16
    Tuesday, March 12th
Lazy Evaluation: Using a Lazy Racket
Lazy Evaluation: Some Issues
Lazy Evaluation: Shell Examples
Lazy Evaluation: Programming Examples
Lecture #17
    Tuesday, March 19th
Side Note: Similarity to Generators and Channels
Call by Need vs Call by Name
Example of Feature Embedding
Implementing Laziness (in plain Racket)
Sloth: A Lazy Evaluator
Getting more from Sloth
Lecture #18
    Tuesday, March 19th
Implementing Call by Need
Side Effects in a Lazy Language
Designing Domain Specific Languages (DSLs)
Lecture Notes, single file
    Tuesday, March 19th
If you find a single file format more convenient.
(Also, as a plain text file.)
The rest of the notes
    Wednesday, March 20th
Note that this can change once we go over it in class.




We will use the Racket environment extensively. DrRacket, the major component of Racket, will be used to develop code, debug, and submit homework. CCS computers have an updated version installed (available on both Unix and Windows). To use it on your own machine, get it from the Racket website. Binary installers exist for all major operating systems, and the course work will be platform independent.

Racket has a system for distributing software bundles that will be used to get a course-specific plugin. This packages both specific functionality for each homework, and an integrated tool for homework submissions. Once you have Racket installed, start DrRacket, use the “Install .plt File” in the File menu and enter — and restart DrRacket after it is installed. You can also use the “Setup PLT” application to install it if you want to do an off-line installation.

Note: The handin server uses a dedicated port for communication. You need to work from a network that does not restrict this port — for example, if you use Northeastern’s ‘NUwave-guest’ network, then you will not be able to connect to the server. ‘NUwave’ (which requires you to authenticate through myNEU) does not have this restriction.

To set-up your account:

Additional software may be used later in the course.

Piazza Group

There is a piazza group for this course at The piazza group is the main medium for discussions, questions, announcements etc. You should use it if you have any questions, so others can benefit from the discussion as well. If you want to ask a question that involves showing your solution code, make sure that you choose the “private” option. Do not to post any homework code on the piazza group without using the “private” option. Direct emails to the course staff should be your last resort. Consult the Email and Piazza Group Policies handout for further details about piazza group posts and emails.

Feel free to post questions privately if you have any concerns about them, and if your question is useful for the rest of the class and we think that it is fine to do so, we will make it public.

Note that you do not need to request to be subscribed to the mailing list — you will get added after you register with the submission server.

On-line books and other materials

There are lots of Racket and Scheme books on-line, a few good ones are:

You can also find some good on-line courses:

In addition, there are lots of additional Scheme-related references at