Functional Problem Solving (CSC 151 2013F) : Reference
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [IRC] [Teaching & Learning] [Grading]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010F)] [Weinman (2012F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
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.
/home/rebelsky/bin/csc151-setup
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 the
submenu. DrRacket is in the the submenu.
You can just type /home/rebelsky/bin/csc151-setup
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
/glimmer/share/gimp/plugins
.
gimp-dbus
permits the GIMP to communicate over DBus.
ggimp-irgb-components
and ggimp-irgb-new
help GIMP deal with an integer RGB representation that's faster for
DrRacket to process.
ggimp-rgb-list
and ggimp-rgb-parse
provide
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
/home/username/.gimp-2.8/plug-ins
.
Since we may be updating these plugins, we have you install “soft
links”
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 /home/rebelsky/bin/csc151-setup
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 raco
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.
By the way, if you want to see the source code to these libraries, it lives on github at https://github.com/GlimmerLabs/louDBus and http://github.com/GlimmerLabs/gigls.
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 onPrimary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] [FAQ] [IRC] [Teaching & Learning] [Grading]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010F)] [Weinman (2012F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
Samuel A. Rebelsky, rebelsky@grinnell.edu
Copyright (c) 2007-2013 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 http://creativecommons.org/licenses/by-nc/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.