Scheme + OS X + Textmate - How to get up and running

278 views
Skip to first unread message

Doug Bryant

unread,
Feb 27, 2010, 12:49:03 PM2/27/10
to lambda-lam...@googlegroups.com
I spent some time this morning getting Textmate integrated with Scheme and wrote some notes in case it would be helpful for any others.

See also github gist at http://gist.github.com/316840

Doug


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
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.


Reply all
Reply to author
Forward
0 new messages