Description

RubyLabs is a collection of modules used for lab exercises in the textbook in Computing: An Introduction to Computer Science[http://www.cs.uoregon.edu/eic].

There is one module for each chapter in the text:

IntroLab[link:classes/RubyLabs/IntroLab.html]

A quick introduction to Ruby, with an exercise leading to the definition of a method to convert temperatures from Fahrenheit to Celsius.

SieveLab[link:classes/RubyLabs/SieveLab.html]

A project on the Sieve of Eratosthenes, an algorithm for generating lists of prime numbers.

IterationLab[link:classes/RubyLabs/IterationLab.html]

Simple iterative algorithms for searching and sorting.

RecursionLab[link:classes/RubyLabs/RecursionLab.html]

More sophisticated algorithms, using a divide and conquer strategy.

HashLab[link:classes/RubyLabs/HashLab.html]

Using a hash table to represent a word list, e.g. for a crossword puzzle dictionary.

BitLab[link:classes/RubyLabs/BitLab.html]

Projects with binary encodings, including methods for simple error correction with parity bits and text compression with Huffman codes.

MARSLab[link:classes/RubyLabs/MARSLab.html]

Using the game of Core War to explore the von Neumann architecture.

RandomLab[link:classes/RubyLabs/RandomLab.html]

Creating lists of random numbers with a pseudo-random number generator.

ElizaLab[link:classes/RubyLabs/ElizaLab.html]

An introduction to issues in natural language processing, using a version of ELIZA written in Ruby.

SphereLab[link:classes/RubyLabs/SphereLab.html]

Introduction to modeling and simulation, culminating in an N-body simulation of the movement of planets in the Solar System.

TSPLab[link:classes/RubyLabs/TSPLab.html]

Solving the Traveling Salesman Problem with a genetic algorithm.

The main RubyLabs module has some common methods (e.g. min and max) used throughout the book.

Installation

Install the gem:

gem install rubylabs -n .

Run the setup script (RubyLabs will be included with each new IRB session):

ruby ./lab-setup.rb

Projects that generate interactive visualizations require ActiveState Tcl, which needs to be downloaded from www.activestate.com/activetcl/downloads (install it in the default location for your operating system).

Documentation

Additional instructions for installing and trouble-shooting are in a lab manual available from www.cs.uoregon.edu/eic.

Feedback

Send e-mail with the word RubyLabs in the subject line to conery (at) cs.uoregon.edu.