# Class 34: Script-Fu Basics

Lab: Getting Started with Script-Fu. Back to Introduction to GIMP. On to Complete Scripts.

Held Wednesday, April 4, 2001

Summary

Today we begin our investigations of Script-Fu, the Scheme-like language used for programming the GIMP.

Notes

• Are there questions on homework 5?
• A few of you have asked about the `sum` we did in class. We did that version of `sum` on the first day we studied recursion. The key idea was that we used a helper function that took an extra parameter that kept track of the sum of the first k numbers in the list. You can see a newer version of the code (that uses all the clever design tricks we've learned) in `sum.ss`
• Many of you were stumped by the intersection problem (number 6). My first solution used the rule that A intersect B is A-(A-B). Mr. Stone suggested that he was looking for a more elegant solution and indicated that `complement` would be useful. For a predicate, p, `complement` returns the "opposite" predicate (one that returns false when p returns true and vice versa). Here's a definition sans comment
```(define complement
(lambda (pred?)
(lambda (val) (not (pred? val)))))
```
• Here are some potentially useful links for your exploration of GIMP and Script-Fu

Overview

## History

Friday, 12 January 2001

• Created generic outline format for class.

Wednesday, 4 April 2001

• Filled in the details.

Thursday, 5 April 2001

• Updated the history for yesterday's changes.

Back to Introduction to GIMP. On to Complete Scripts.

Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This page was generated by Siteweaver on Wed May 5 12:15:05 2004.
This page may be found at `http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2001S/outline.34.html`.