Home Assignments Lecture Blog Resources Project
Tue Dec 9
- Thu demos in 3rd floor elevator lobby
- Handouts:
- garbage collection
- derived expressions (e.g. cond)
- normal vs. applicative order
- analyze
Thu Dec 4
- more on metacirc: how environments work, persistence when defining in the environment, how a primitive bottoms out as a variable lookup to a binding in the-global-environment, driving around the interpreter from the listener, how user-defined procedures work.
Tue Dec 2
- more on the metacircular evaluator: eval & apply, implementation of environments, and procedures
- PS9 assigned
- discussion of final projects
Tue Nov 25
Thu Nov 20
Tue Nov 18
- ProjectProposal
- Quiz 2 handed back & review
- Quiz 3 topics
- Project is due the last day of class, Thu Dec 11
Thu Nov 13
Tue Nov 11
Thu Nov 6
- Attach:streams-lecture-pt2.txt
- Revised PS8.
- Class final is Thu Dec 18 at 3 pm, room TBA.
- Quiz 3 is Thu Nov 20.
- No class on Tue Nov 11 - Veteran's Day.
- No class on Thu Nov 13 -- work on your projects.
Tue Nov 4
- Streams stuff! did
cons-stream
, stream-car
, stream-cdr
, stream-enumerate-interval
, stream-filter
. Saw how evaluating the stream-car forces the evaluation of the car element, and also mutates the stream. Discussed the memo-izatio process.
- Assigned PS8.
- Attach:stream-examples.ss
Thu Oct 30
Tue Oct 28
Thu Oct 23
- handed out PS7, OO notes document, PS4 & PS5 answers
- attempted to understand speaker/lecturer/arrogant-lecturer object hierarchy
- attempted missing environment diagram from OO notes document
- prepped for quiz 2
Tue Oct 21
Thu Oct 16
Tue Oct 14
Thu Oct 9
Tue Oct 7
(define (make-sum a1 a2)
(cond ((=number? a1 0) a2)
((=number? a2 0) a1)
((and (number? a1) (number? a2)) (+ a1 a2))
((and (and (symbol? a1) (symbol? a2))
(eqv? a1 a2))
(make-product '2 a1))
(else (list '+ a1 a2))))
- Also did this in
make-product
such that (* x x)
gets converted to (** x 2)
.
- Noted that directly entering expressions such as
'(+ x 3)
is an abstraction violation; e.g., one should use (make-sum 'x 3)
instead.
Thu Oct 2
Symbolic data and differentiation
Tue Sept 30
Thu Sept 25
Tue Sept 23
Thu Sept 18
- lecture notes
- scheme code
- lists, cons, car, cdr, cons cells & printed representation
- "cdr'ing down a list"
- wrote list functions: length, length-iter, nth, last, and append
- started to look at trees
- PS1 back
- PS2 collected
- PS3 out
Tue Sept 16
- clarified question 9 of PS2; added new problem 16
- discussed higher-order procedures -
sum
with a, b, term, next args
- attempted to describe how
let
can be implemented with lambda
- created
expnt
procedure, which outputs a procedure to perform exponentiation
Thu Sept 11
- discussed PS1 -- fred should fix problem 3 & substitution model
- scheme numerics (see link below)
- applicative order demo of fibonacci
- recursive vs iterative processes
- in-class working of 1st problems from PS2
- intro to python
- parens vs. indentation
- infix vs. prefix vs. postfix
- fred will post his office hrs
Tue Sept 9
- please join class google group
- introduced lists, incl. cons, car, and cdr
- introduced lambda and naming functions
- showed a function that accepts a function as input
- looked at run-away recursive example
- discussed substitution model of execution
- looked at Scheme numerics, including big numbers and rational numbers -- how does it do it? See http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2003F/Readings/numbers.html.
- PLT Scheme destroys the environment on recompile -- how can we stop this?
Thu Sept 4
- read Paul Graham's essay in class
- talked about 5 "big ideas" of the class