Functional Problem Solving (CSC 151 2014S) : Reference
If you follow along with the normal class schedule, you should set up the environment by doing the labs. You will install standard programs in the introductory Linux lab. You will set up some custom libraries in the lab on drawings as values (and be reminded of how to do so in some subsequent labs). This document provides a bit more background and a bit more detail.
CSC 151 uses two “off the shelf” programs, the GNU Image Manipulation Program (GIMP) and DrRacket. It also uses some libraries GIMP and DrRacket to allow the two programs to communicate with each other. (Both the programs and the libraries also rely on a host of standard Linux software installed in the MathLAN.) Hence, to configure your MathLAN account to work in CSC 151, you should install icons for GIMP and DrRacket if you don't have them already. You will also need to tell each application where to find the libraries. You'll also need to know how to tell the applications to communicate.
To install an icon, you simply need to click and drag it from the applictions menu (in the lower-left-hand corner of your screen) into the task bar (at the bottom of your screen). GIMP is in thesubmenu. DrRacket is in the the submenu.
You can just type
to install these plugins.
GIMP allows programmers (and users) to extend it using small programs
called “plugins”. We've written plugins that allow GIMP
to communicate over DBus and to add a few more features. Many GIMP
plugins are installed in a common system area. However, we don't
have permissions to install them there, and we anticipate updating the
plugins. Hence, we have you install the plugins in your own account.
All of the plugins that you will use are stored in
gimp-dbuspermits the GIMP to communicate over DBus.
ggimp-irgb-newhelp GIMP deal with an integer RGB representation that's faster for DrRacket to process.
ggimp-rgb-parseprovide mechanisms for getting color names and converting color names to integer RGB representation.
There are a variety of ways to install personal
GIMP plugins, but all of them put the plugin in
Since we may be updating these plugins, we have you install “soft
First, we make sure that the directory exists.
mkdir -P /home/user/.gimp-2.8/plug-ins
Next, we create soft links for each of the plugins.
ln -s /glimmer/share/gimp/plugins/plugin /home/user/.gimp-2.8/plug-ins
By the way, if you want to see the source code to these plugins, it lives on github at https://github.com/GlimmerLabs/gimp-dbus.
You can just type
to install these libraries.
We use two libraries for Racket in CSC 151. The louDBus library allows Racket to communicate with a variety of other programs using the DBus protocol. The Glimmer Improved GIMP Library for Scripting (or gigls) adds specific resources for communicating with GIMP and making it easier to program GIMP.
On most MathLAN workstations, louDBus is installed in
/glimmer/lib/louDBus and gigls is installed in
/glimmer/lib/gigls. (If they are not installed, you
should let us know ASAP.)
To tell Racket where to look for libraries, you use the
link command. Hence, you could type the following (without
the dollar sign prompts).
raco link /glimmer/lib/louDBus
raco link /glimmer/lib/gigls
But most people will find it easier to just use the script we've written.
It turns out that DrRacket can support a variety of programming languages (most of them variants of Scheme). We'd like to configure DrRacket so it's easy for us to tell it what language to use. In the Use the language declared in the source. Then click . Finally, click . That should be it - you're ready to go.menu, select . In the dialog box that appears, click on
Samuel A. Rebelsky, email@example.com
Copyright (c) 2007-2014 Janet Davis, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials are copyright by John David Stone or Henry Walker and are used with permission.)
This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.