Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kjwierenga/649919 to your computer and use it in GitHub Desktop.
Save kjwierenga/649919 to your computer and use it in GitHub Desktop.
Getting up and running with OS X, Textmate & Scheme
===================================================
SCHEME
======
I ran across two implementations of Scheme which appear to work well with OS X.
mit-scheme & PLT Scheme.
I was able to install mit-scheme from darwin ports ( sudo port install mit-scheme)
and PLT Scheme as an OS X download from http://download.plt-scheme.org/
mit-scheme took forever to compile and I had to upgrade to the latest version of
darwin ports to get it work with OS X 10.6.2
PLT Scheme just worked. Drop the files somewhere to your choosing and add
${PLT Scheme INSTALL DIR}/bin to your environment path. Placing it in your
path is important judging from the Textmate scheme bundle source. The
Bundle makes a couple of references like "IF TM_SCHEME_INTERPRETER == mzscheme"
but more on that later.
The Textmate bundle seems to have better support for PLT Scheme so I'll most likely
end up using that one.
The PLT Scheme interpreter is mzscheme. If you fire that up, you can exit the interpreter
with (exit) - took me a few minutes to figure that one out.
TEXTMATE
========
First, go grab the scheme bundle and install it...
cd ~/Library/Application Support/TextMate/Bundles # create the Bundles directory if it doesn't exist
svn co http://svn.textmate.org/trunk/Bundles/Scheme.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'
Your mileage may vary with the last osascript. The alternative is to fire up Textmate and from the menu
choose Bundles => Bundle Editor => Reload Bundles
One last thing is a Textmate variable to tell Textmate what the scheme interpreter is.
From the Textmate menu, choose
Textmate => Preferences => Advanced and click on the Shell Variables tab.
Add a new environment variable: TM_SCHEME_INTERPRETER = mzscheme
That should be all you need to do to get OSX/Textmate/Scheme working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment