views:

358

answers:

3

I've gone through the academic Scheme stuff (read SICP, The Little Schemer, The Seasoned Schemer, TSPL) and been playing with Scheme as a toy for a while.

But I want to get practical. Today I needed to write a shell script to do some batch file processing, and thought "why not do it in Scheme?". I did, and it was a joy.

Now I'm forced to wonder what the best implementation is for shell script type stuff. I know all implementations differ in terms of what they implement beyond R5RS. (Basically, they differ in all the useful and practical extensions you'd want in a scripting language).

So I'd like to pick one implementation and stick to it. I'm looking for something that:

  1. Is cross platform (Linux, OS X, Windows).
  2. Has extensions that are useful in day-to-day shell scripting, and those extensions are part of the base install.
  3. Is easy to install. (e.g. there are a number of pre-built binaries, and/or it is a standard package on many distros.)
  4. Is actively developed, with an active community.
  5. Has Unicode support.

I've been using Gambit so far. It seems to satisfy the above constraints. PLT seems like overkill. Wondering about Guile, MIT/GNU, etc.

+4  A: 

Have you heard of scsh? I haven't used it, but it sounds a lot like what you want.

Nathan Sanders
Hmm... just took a look. "The latest version of scsh is 0.6.7, released May 16, 2006:"Maybe it's perfect and doesn't need an update?
z5h
This is always the case with Scheme. :)
Nathan Sanders
@Nathan Tell that to the R6RS committee.
Andrew Song
I would, but I refuse to acknowledge that R6RS exists. :P
Nathan Sanders
@z5h it still works well. It does need a few improvements maybe, but for the most part it does work well.
omouse
+3  A: 

PLT Scheme meets all of your criteria. Since it looks like you know that already, you should to use the MzScheme package. MzScheme is the runtime on top of which all of PLT is built.

If you were to download the full PLT Scheme install it would seem large as it includes a lot of documentation and an IDE in addition to the runtime.

grettke
Thanks. I was actually wondering about something like that but a link to that seems hard to find on the PLT website. In fact, knowing that it's there hasn't made it any clearer how one would find that on the PLT website if they didn't know about it.
z5h
+2  A: 

I recommend Gauche, which is:

  1. Running on Linux, OS X, Windows w/ Cygwin and some other UNIX-like platforms,
  2. The base install contains POSIX-compliant system libraries and useful modules such as network protocols, file system, DBM, multithreading, etc...
  3. Several package system such as MacPorts, apt-get, yum are available (or just say configure, make and make install),
  4. There are active English and Japanese mailing list,
  5. Supports UTF-8 as an internal encoding.
torus