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:: A quick introduction to Ruby, with an exercise leading to the definition of a method to convert temperatures from Fahrenheit to Celsius. SieveLab:: A project on the Sieve of Eratosthenes, an algorithm for generating lists of prime numbers. IterationLab:: Simple iterative algorithms for searching and sorting. RecursionLab:: More sophisticated algorithms, using a divide and conquer strategy. HashLab:: Using a hash table to represent a word list, e.g. for a crossword puzzle dictionary. BitLab:: Projects with binary encodings, including methods for simple error correction with parity bits and text compression with Huffman codes. MARSLab:: Using the game of Core War to explore the von Neumann architecture. RandomLab:: Creating lists of random numbers with a pseudo-random number generator. ElizaLab:: An introduction to issues in natural language processing, using a version of ELIZA written in Ruby. SphereLab:: Introduction to modeling and simulation, culminating in an N-body simulation of the movement of planets in the Solar System. TSPLab:: 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 http://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 http://www.cs.uoregon.edu/eic.

Feedback

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