|
|
CS 254 endgame topics (Spr 09)
|
|
|
|
Coming to the end of the semester …
|
|
|
|
we have 4 more lectures (after this, leaving one for exam review)
|
|
|
|
room for several quick overviews or one longer investigation
|
|
|
|
Haskell language issues
|
|
|
|
Interactive programming
|
|
|
|
reading input from users, printing responses, etc.
|
|
|
|
comes up in the gaming examples
|
|
|
|
Reading and writing files
|
|
|
|
(useful in any case for the HTML examples below)
|
|
|
|
Monads
|
|
|
|
probably considered the most interesting aspect of Haskell
|
|
|
|
allows for a very generic account of sequencing and similar phenomena
|
|
|
|
based on a sophisticated algebraic approach
|
|
|
|
Simple example applications
|
|
|
|
Simple functional graphics
|
|
|
|
actual student use (in lecture and lab) of Fritz's BMP-generating code
|
|
|
|
works best if we can install a more serious compiler (GHC)
|
|
|
|
Simple gaming
|
|
|
|
we can handle board games like Tic-Tac-Toe or similar
|
|
|
|
Rubik's waffle example
|
|
|
|
Richard Bird's derivation of a sudoku solver
|
|
|
|
Simple web-page generation
|
|
|
|
generate web pages from within Haskell
|
|
|
|
possibly also nice vector graphics (based on SVG)
|
|
|
|
Parsing
|
|
|
|
see textbook Chapter 8
|
|
|
|
(comes with PowerPoint presentation and code file)
|
|
|
|
sample in-class parsing problems
|
|
|
|
SSN
|
|
|
|
phone number
|
|
|
|
email address
|
|
|
|
floating-point numbers
|
|
|
|
simple English grammar
|
|
|
|
Theory issues
|
|
|
|
Type-checking
|
|
|
|
how does a Haskell system check the types of programs?
|
|
|
|
what does it mean for the types to be correct?
|
|
|
|
Monads (see above)
|
|
|
|
Bigger applications (papers)
|
|
|
|
Haskore music system (and related)
|
|
|
|
an algebraic approach to music notation, conception and production
|
|
|
|
Peyton Jones, Eber and Seward's Algebra of Financial Contracts
|
|
|