Scheme references

Scheme implementations

Chez Scheme

For this course, we recommend using Chez Scheme Version 7.4d (which is installed on CS department machines) or Petite Chez Scheme Version 7.4d (which you can download here). Version 7.9.3 is the current prerelease of Chez Scheme/Petite Chez Scheme with complete support for R6RS Scheme. However, if you use Version 7.9.3, be aware that some of the tools we use in this course may be incompatible with R6RS.

  • For Windows users, here are instructions for configuring a desktop shortcut to Petite Chez Scheme.
  • SWL is integrated with Chez Scheme and includes a simple text editor. It's available on CS department machines by running swl at the command prompt. However, we recommend using a general-purpose text editor of your choice, such as Emacs or vi.

Other Scheme implementations

Fair warning: although it's up to you which Scheme you use, a few of the tools we use in this course may be incompatible with implementations other than Chez Scheme.

  • PLT Scheme is a popular Scheme implementation that includes the DrScheme programming environment, which is great for programmers who are new to Scheme.
  • Ikarus Scheme is a free optimizing compiler for R6RS Scheme created by IU alumnus Abdulaziz Ghuloum.

Scheme libraries and tools



Test macros

  • test.scm, a few macros to help test your programs.
  • A simple test (other examples in the test.scm file):
    (test "factorial-5" (fact 5) 120)
  • We recommend putting tests in a separate file, and then loading the file at the end of your code so they'll run whenever you reload your code.

miniKanren resources

If you're interested in miniKanren development, check out the project site on Google Code!

Basic miniKanren

  • mk.scm, the miniKanren source
  • mkdefs.scm, useful definitions for miniKanren (loads mk.scm automatically)
  • mktests.scm, tests for miniKanren (loads mk.scm automatically)
  • matche.scm, for pattern-matching support in miniKanren

A version of miniKanren with disequality constraints

Emacs references and tools

The course staff use and endorse the Emacs text editor.

  • A handy Emacs reference card for Schemers.
  • Instructions for installing Emacs on Windows XP.
  • A complete dot_emacs_full.txt for this course, for folks who want pretty colors, automatic paren matching, and other goodies. Remember to rename the file from dot_emacs_full.txt to .emacs before using it.
    • To use this .emacs file, you must download the file, unzip the file, and rename the resulting directory .emacs.d. You must then update the load-path in your .emacs file to point to the location of the .emacs.d directory. Contact the AIs if you cannot unzip the file, or otherwise have problems configuring Emacs.

Lecture notes, etc., on selected topics

  • Notes on recursive functions for repeated addition/multiplication/… .
  • Notes on parameter-passing variations.
  • Notes on the fixed-point combinators Y and Z.
  • A CPS Refresher on converting procedures to continuation-passing style.
  • Notes from the Feb 16, 2010 lecture on continuation-passing style.
  • Notes on versions of the product procedure written three ways: in accumulator-passing style, in continuation-passing style, and in direct style using call/cc.
  • Notes on making continuations representation-independent methodically.
  • Notes on registerization and trampolining.

Object-oriented programming materials


resources.txt · Last modified: 2010/05/21 00:14 by lkuper