home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)
Lecture notes
These lecture notes are provided as a reference (my own personal lecture-prep).
They are not intended to be a complete replacement for attending class.
Opening notes in .rkt files:
Many of the lecture-notes links are .rkt files (not .html).
You should (a) download the file (say, via right-click or save-as;
on Windows you might need to re-name the suffix to .rkt manually),
(b) start DrRacket, and then (c) choose File » Open… them.
Do not copy-paste into an empty DrRacket window —
the language-preference won't be set correctly, and the initial lines may be goofed up.
- Why study programming languages?
- The Design Recipe intro
(before lecture (started),
after lecture (completed).)
- Families of languages
- Union types (intro)
(and, cond)
- language vocabulary and concepts (video and slides)
- structs intro: incl. immutability (using racket)
- intro grammars/BNF
and
grammars, cont.
- union-of-structs
- Oct.18 (Wed) in class: list introduction
- Oct.20 (Fri) in class: my-max.rkt (local variables via let*)
- Oct.23 (Mon) in class:
Review: list-data-defn; list-template;
my-max's use of let* (and digress on its hacky empty-case-value
of -inf.0);
write tee;
write & step through string-append-whoa and observe the O(n) pending calls.
- Oct.25 (Wed) in class: tail-recursion-before.rkt
(and the completed version, tail-recursion.rkt)
- Oct.27 (Fri) in class:
Mention
hw05 issues;
discuss hw06-soln;
any hw06 notes (incl. overlap.rkt),
review another linear-recursive data-defn.
- Oct.30 (Mon) in class:
discuss hw06-soln
(incl. reflecting-on-immutable-and-on-java-syntax.rkt,
MVC, the tiling of overlap.rkt);
Scope (for fun: an abusive main.java)
- passing-functions-start.rkt (and passing-functions-done.rkt as completed
in class)
- ancestor-tree-start.rkt (and ancestor-tree-done.rkt as completed
in class)
-
Nov.15 (Wed):
defining ancestor trees in Java (composite pattern)
and
several AncTree methods.
Then, look at S0.rkt:
data-def'n for an expression,
examples of the data,
test cases for parse! and expr->string,
and the code for
expr->string.
-
Nov.17 (Fri):
In S0.rkt and S0-java/:
review how eval follows the Expr template;
discuss: Recursive Descent Parsing (by examinig parse! works).
-
turkey lurkey weekey
-
Nov.27 (Mon):
prolog intro
-
Nov.29 (Wed):
prolog practice
-
Dec.01 (Fri):
Prolog: recursive relations
-
Dec.04 (Mon):
Review S4-soln, and
lists in prolog
-
Dec.06 (Wed):
Finish lists in prolog.
Start looking at: implementing objects-with-let-over-lambda.rkt (pretty much).
-
Dec.08 (Fri):
Finish looking at: implementing objects-with-let-over-lambda.rkt (pretty much).
Wrap-up
Helpful Links
-
Other resources on learning racket/scheme.
For any of those listed resources,
please comment on the discussion boards about how helpful you do (or don't) find them,
so that I can recommend them more/less highly to others.
-
a Racket Style Guide
(sections 4 and 5 are pertinent for learners).
-
Highly recommended (but not required):
Adding type-checking:
If you want (run-time) type-checking in your Racket programs,
see contract-examples.rkt.
-
For the curious:
Understanding quote and backquote.
-
For the curious:
basic pattern-matching in racket
home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)