home—lectures—recipe—exams—hws—D2L—breeze (snow day)
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.
- Aug.27: Why study programming languages?
- Aug.29: video: course-info & syllabus (18m09s);
video: finish Why-Study-Programming-Languages (20m02s)
- Aug.31: racket call-function examples and syntax; signatures
(func-call-and-sigs-before.rkt,
func-call-and-sigs-after.rkt)
- Sep.03,05: The Design Recipe: unit-tests (pizza-area)
(before lecture (started),
after lecture (completed).)
A fritzy projector slowed Sep.05 to just barely complete the above file.
- Sep.07: discuss hw01 (review #1 soln; briefly discuss remainder);
Reading: Scott §1.1–1.3
- Sep.10:
20min mention of hw02-soln;
Quiz:;
Start:
Union types (intro)
(finish at: first time writing cond)
- Sep.12:
Continue
Union types (intro)
and the design recipe.
- Sep.14:
Finishing union-type-intro-after.rkt is covered in:
video: numeric-intervals as union type (taxable-income) (30m34s)
video: nested union types (11m12s)
video: further examples, and how we coped in Java (9m30s).
- Reading: §1.61, and skim the rest of Chpt.1 (§1.4–1.7).
Do look at
how Figures 1.21 (GCD program in C)
and 1.22 (its tokenized version)
have counterparts in
1.25 (its parse tree) (a big diagram, but don't be intimidated).
- Sep.17: Families of languages
- Sep.19: start structs intro
(up through steps 1,2 of design-recipe only, and signatures of constructor/getters)
- Sep.21 no in-class lecture Friday; instead watch:
language vocabulary and concepts (video and slides)
- Sep.24: finish structs intro
despite a missing video-cable from the podium, grr
(template for compound-types; examples of programs; got through enbiggen but not
derive-from
or Java comparisons.)
- Sep.26,28:
Design exercise: a GUI textbox:
internal representations & functions
(following the design recipe).
See textbox-demo.rkt
and textbox-demo-v2.rkt.
- Oct.01 (Mon):
Source of the terms "union type" and "product type" (cross-product);
review textbox-demo-v2.rkt and the big-bang at its end;
Cf. Design recipe in Java, with Book.java (constructor, .equals).
- Reading: § 2.1: Grammars.
- Oct.03 (Wed):
Discuss hw04-soln (design of (video-game) objects, case study);
last 10min finish grammar for FieldDecl
- Oct.05 (Fri):
continue Grammars: vocabulary, trees, start grammar for FieldDecl
- Oct.08 (Mon):
Discuss hw04-soln (design of (video-game) objects, case study);
last 10min finish grammar for FieldDecl
(some re-factorying; ε as empty-string; a rule InitMaybe).
- intro grammars/BNF
and
grammars, cont.
- Oct.17 (Wed): union-of-structs
- Oct.19 (Fri): list introduction
- Oct.22 (Mon): continue list introduction
- Oct.24 (Wed): exam01
- Oct.26 (Fri):
Reading: for the next lectures: §10 up through §10.3.2
my-max.rkt:
my-max's use of let* (and digress on its hacky empty-case-value of -inf.0).
- Oct.29 (Mon): scope-let-let*.rkt
- Oct.🎃 (Wed)
write tee;
write & step through string-append-whoa and observe the O(n) pending calls,
from tail-recursion-before.rkt.
Soln in tail-recursion-after.rkt.
- Oct.26 (Fri) in class:
Mention
hw05 issues;
discuss hw06-soln;
any hw06 notes (incl. overlap.rkt),
review another linear-recursive data-defn.
- Oct.29 (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.12 (Wed):
defining ancestor trees in Java (composite pattern)
and
several AncTree methods.
Then, look at T0.rkt:
data-def'n for an expression,
examples of the data,
test cases for parse! and expr->string,
and the code for
expr->string.
-
Decide on our language's
T0 syntax and internal representation of Exprs/parse-trees.
-
Nov.16 (Fri): exam01-redemption.html.
The displaced lecture-material is about explaining the code
(incl. recursive-descent parsing, and (optionally) some of the tricks used in the accompanying test-harness).
See the videos at the bottom of Interpreting T.
-
turkey lurkey weekey
Upcoming Lectures (any dates are very approximate)
-
Nov.26 (Mon):
prolog intro
-
Nov.28 (Wed):
prolog practice
-
Dec.30 (Fri):
Prolog: recursive relations
-
Dec.03 (Mon):
Review S4-soln, and
lists in prolog
-
Dec.05 (Wed):
Finish lists in prolog.
Start looking at: implementing objects-with-let-over-lambda.rkt (pretty much).
-
Dec.07 (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
-
For how racket was used by some developers at Naughty Dogs’The Last of Us and
other application,
here's
- a talk by Naughty Dog’s lead programmer — more polished; doesn't focus on racket-by-name,
but does show several slides of a domain-specific NPC-scripting-language implemented in racket.
- A reddit-thread
with links
to the above, as well as more industrial-uses of racket.
- a RacketCon Talk on the use
of racket in The Last of Us
but not as polished a talk as others (e.g. it takes fully 2min for the talk to actually get started);
- (the RacketCon page which includes the above presenter's slides,
links to another entertainment-industry talk, and other racket (non-entertainment) talks.)
home—lectures—recipe—exams—hws—D2L—breeze (snow day)
This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |
|