Instructor: Tim Sheard
Office: FAB 120-04
office hours: TBA
CRN 40966 CS 457 Functional Languages (4 cr) (undergraduate)
CRN 40979 CS 557 Functional Languages (3 cr) (graduate)
Time: Monday Wednesday 12:00-13:50
The Haskell programming resource page.
Syllabus. A list of coures goals, and topics covered in the course.
Text books. A listing of pertinent information about the required textbooks and readings.
Class room policy regarding the flu.
Monday January 5, 2015 Due Today: Announcements: I would like to acknowledge Mark Jones for help in preparing this course. Many of the notes, slides, exercises, and example programs were developed by Mark when we taught this class together in the Spring of 2009. Class Topic: Background questionaire Strategies for learning to program. Haskell Resource page Introductory notes (4 up pdf) (1 per page pdf) Literate Haskell source code from slides Take a look at the Haskell Cheat Sheet by Justin Bailey. Some notes on using the machines in the lab. Learn You Haskell Assigned today: Get a working copy of the Haskell Platform that you can use. see the notes on getting started with Haskell Due by class time January 10, 2015.
Wednesday January 7, 2015 Due Today: A working copy of the Haskell Platform on your machine due today. Announcements: Bring your laptop to the lab. We will have an in class exercise today! We will use D2L email to communicate in class. How to turn in assignments. Class Topic: Planet Haskell is a compilation of blogs about Haskell. Notes (pptx) (pdf) about types and Type classes as type predicates. effect on error messages. Programming outloud the stringToInt function. The code we wrote in class in 2011. The code we wrote in class in 2015. Excell Tables The Excell library The Excell crib sheet The CSV library (needed for the Excell library) In class exercises Naming values and Using types. Assigned today: Homework 1, Create an Excel-like Calendar. Due Monday Jan 12.
Monday January 12, 2015 Due Today: The Excel Calendar due today. Announcements: Winter 2015 Career Workshops. Class Topic: Work through Naming values and Using types as a class. Compositional programming -- Large data from small programs Comprehensions and lists cribsheet The Excell library revisited Creating Lists work sheet Notes on creating functions (pptx) (pdf) in Haskell The Haskell source code from the notes. Creating functions crib sheet In class exercise: Defining functions worksheet See the program design recipe Assigned today: Homework 2, writing simple functions. Due Jan 19.
Wednesday January 14, 2015 Due Today: Announcements: Class Topic: Notes on strategies for fixing broken programs Fixing errors worksheet Notes on lists and algebraic data types. In class exercise: matching on lists worksheet. See the recursive function design recipe Example use of algebraic data types. Code for defining transformations and shapes. Assigned today:
Monday January 19, 2015 Due Today: Homework 2 (because of the holiday) is due Wednesday. Announcements: Today is the Martin Luther King Holiday. No Class. We'll pick up on wednesday. Class Topic: Finding and using resources The Haskell 98 report. Justin Bailey's Haskell Cheat Sheet. GHC users guide especially the pages on using GHCI. GHC Standard Library Documentation To get a local copy, go to the wiki, and download one of the *.tar.bz2 files. In-class exercise, using online documentation worksheet. The Hackage Package database web page.. Using Cabal to install a package from the Hackage Package database into the GHC system (power point) (pdf). In class exercise, install haskore-vintage on your machine. Notes about Trees as Haskell datatypes (pdf) Haskell Code from the notes In class exercise, The defining trees worksheet. Assigned today: Homework 3, binary numbers. Due Jan. 26.
Wednesday January 21, 2015 Due Today: Homework 2 (because of the holiday) is due today. Announcements: Intel Challenge. Join us for the Intel NUC Challenge @ PSU Kick-Off Event on Saturday, January 31 from 10am to 12pm in the EB Atrium. Class Topic: Creating bit mapped graphics. Code discussed. Examples. jpg format, ppm format. Download the Colour library Download the PPM6 library A viewer that can display ppm files IrfanView (for the Mac?) Assigned today: Homework 3, binary numbers. Due Jan. 26.
Monday January 26, 2015 Due Today: Homework 3 due today. Announcements: Class Topic: Notes on folds. Powerpoint Haskore notes (pdf). Haskell source of examples from notes Some sample music. Get the haskore-vintage package from Hackage. How to install a Hackage package using Cabal (for users of the Haskell platform) (pdf). Get the music library, save in your programming work space. Timidity a linux midi player Haskore Lecture of Iavor Diatchki. In class exercise, Creating music worksheet. A familiar round ... listen to it. Assigned today: Homework 4, do something creative, make a graphics picture, or create music. Due Feb. 2.
Wednesday January 28, 2015 Due Today: Announcements: Mid term exam tentatively set for Monday Feb. 11th, 2015. Class Topic: Notes on testing in Haskell HUnit users guide The HUnit users guide on sourceforge. Quickcheck homepage and Haskell wiki page. Using HUnit to develop programs. An example. (In class we produced this.) A small program combining QuickCheck and HUnit. In class exercise using HUnit and QuickCheck. Assigned today:
Monday February 2, 2015 Due Today: Homework 4 due today. Announcements: Class Topic: Students discuss their Homework 4 artifacts. Reasoning about programs in Haskell. (6 up format) In class exercise: Laws worksheet. Notes on proofs by induction Assigned today: Home work 5: proving things about programs. Due Monday, February 9, 2015.
Wednesday February 4, 2015 Due Today: Announcements: Mid term exam set for 1 week from today! Class Topic: Notes on Type Classes, motivated by a discussion about Trees. (6-up for printing). Code from the notes. On trees, On type classes. More information about graphviz. In class exercise - Using Graphviz to draw trees. Assigned today:
Monday February 9, 2015 Due Today: Home work 5: proving things about programs due today, uploaded to D2L. Announcements: Midterm exam next class meeting! Class Topic: What might be on the exam? Sample midterm questions Notes on putting laziness to work (pdf) Haskell Code for Lazy demos Code for Depth First Search An extended example: A simple tree editor. notes, haskell code Assigned today: Final Project proposals are due Monday, Feb. 16, 2015.
Wednesday February 11, 2015 Due Today: Announcements: Mid Term Exam Today Class Topic: How to write a proposal plan In-class exercise on laziness. Assigned today:
Monday February 16, 2015 Due Today: Final Project proposals are due today. Hand them in in class! Announcements: Class Topic: Go over exam. Exam statistics. Slides about Leveraging laziness, also available in 6-up for printing. code for the rush hour problem. Play Rush Hour Why Functional programming Matters, a paper about the power of laziness. Some thoughts on laziness in Haskell (a blog post). KnotWorksheet.lhs: Some exercises in knot tying Assigned today: Homework 6, finite types. Due, Monday. Feb 23, 2015.
Wednesday February 18, 2015 Due Today: Announcements: Class Topic: Slides about IO Actions, also available in 6-up for printing. IOActions.hs Webactions.hs Treedot.lhs In class exercise on using IO actions. Assigned today:
Monday February 23, 2015 Due Today: Homework 6, finite types. Due today. Announcements: A copy of IO Action examples we created in class. Another version of the same thing created in another class, compare them! Class Topic: Feedback on Final Project Proposals returned. Continue discussion of slides about IO Actions. Simple Parsers as Monads. In class exercise . Using the do notation. Some papers on Monadic IO. Tackling the Awkward Squad. Simon Peyton Jones, 2005. Imperative Functional Programming. Simon Peyton Jones and Philip Wadler, POPL 1993. Assigned today: No more weekly homeworks. Work on project.
Wednesday February 25, 2015 Due Today: Announcements: Class Topic: Notes about more on monads. A simple reader library CSVReader.hs. A reader library with line and col information CSVReader2.hs. A third try at a reader with a simpler interface CSVReader3.hs. The Excell.hs Library The CSV.hs Library (comma separated values) In class exercise. Write a program to import an Excell table Get the excell table DemoMajors.csv to practice on. Assigned today: Work on project.
Monday March 2, 2015 Due Today: Announcements: Class Topic: Discussion about the exercise on monadic Readers for Excell. Notes on monads and interpreters. The haskell code with the examples An in class exercise. A language with mutable variables. Assigned today: Work on project.
Wednesday March 4, 2015 Due Today: Announcements: Class Topic: Discussion about the exercise on a language with mutable variables. Notes on higher order type constuctors and classes, Files, IOerrors, and Arrays. Code to go with notes. Discussion about the format of the final project Assigned today: Work on project.
Monday March 9, 2015 Due Today: Announcements: Class Topic: Discussion of oral presentations on Thursday next week. Programming a multi-core machines. Slides about Control.Parallel, also available in 6-up for printing. Using SMP parallelism on GHC Parallel programing library documentation. Documentation for Control.Parallel and Control.Parallel.Strategies Haskell code for SillyPar.hs a simple program using parallel annotations, and a version of the fractal generator that uses Control.Parallel annotations. Examples from Real World Haskell, Chapter 24. Notes on profiling Haskell (6-up for printing). Please answer the end of semester survey questions. Assigned today: Work on project.
Wednesday March 11, 2015 Due Today: Readings: Bart Jacobs and Jan Rutten A Tutorial on (Co)Algebras and (Co)Induction Class Topic: Categories, Functors, Algebras, Co-Algebras Notes from class, code from the notes. Assigned today:
Thursday March 19, 2015 Due Today: Final project reports are due today in D2L before class. Final Exam period 1230-1420. This is neither normal time or day. See PSU winter final exam schedule. Oral presentations of final projects continues. We start at 12:30 in Lincoln Hall, and at 2:20 we move to FAB 86-01 (the CS conference room in the basement). End of quarter celebration (small snack potluck?)