CSC151 2009F, Class 43: Higher-Order Procedures, Revisited Admin: * Reading for Wednesday: Searching. * I'll reserve some time at the start of class for questions and comments on the project proposals. * EC for ... * Attending the swim meet on Friday. * Once again, I'm trying for no lecture (beyond the stuff above); only Q&A prior to lab. Overview: * Followup on Campus Climate Survey * Project proposals * Questions about the reading? Followup on Campus Climate Survey * Comment from student: Should have told us to do "the reading" in advance. * Comment from student: Noted that Grinnell is doing better than some institutions, where "only 2% of people experience harassment". * I'm not sure why that's better. * I do know that it's better that the majority of Grinnellians are at least aware that harassment occurs, since it's a starting point. * Comment from student: Groups at Grinnell are very insular. Does that contribute to the problem? Is that something we can change? Project Proposals * An unacceptable proposal: "We plan to utilize all the techniques we have learned to create images that explore uses of colors and shapes. The images we create will span a wide variety of image types and artistic aesthetics. We will utilize everything from shapes on a white background to complex multicolored color blends." * Reusing existing images: ;;; Procedure: ;;; image-copy-and-paste! ;;; Parameters: ;;; source, an image ;;; target, an image ;;; Purpose: ;;; Copies the selected region of source and pastes it into ;;; the selected region of target ;;; Produces: ;;; [Nothing; called for the side effect] ;;; Preconditions: ;;; Both images are valid. ;;; Both images have selected regions. ;;; The source and target regions are the same size (may not ;;; be necessary). ;;; Postconditions: ;;; The selected region of target now contains the same ;;; stuff as the selected region of source. ;;; Nothing is selected in target. (define image-copy-and-paste! (lambda (source target) (gimp-edit-copy (image-get-layer source)) (gimp-edit-paste (image-get-layer target) FALSE) (gimp-image-flatten target))) * General note: Almost everything described in the Procedure Browser is available. * Some of the procedures refer to a 'drawable' * 'drawables' are layers and other similar things. * You can access the current 'drawable' on an image with (image-get-layer IMAGE) * Questions * Can I use a big cond? * Yes * Can I PLEAASE make it representational * Sure. However, experience suggests that the non-represntational ones are generally more interesting * Can I reuse code from a homework * Yes. * What if we can't reach our aspirations? * We'll be sad * You'll revise your statement * What percent of our grade will be determined by Prof. Kluber? * None * You just experience public praise or humiliation (or both) LAB! (define dot-product (lambda (lst1 lst2) (apply + (map * lst1 lst2))))