November 17, 2007

On the Importance of Programming Language Popularity

Filed under: Scheme — bnsmith @ 6:20 pm

I recently decided to learn Scheme. I’ve only just begun this journey, but already I’ve learned a great deal, some of which has nothing to do with Scheme programming.

My first step in learning Scheme was to choose an implementation. I knew that there were numerous Scheme implementations to choose from, as one would expect, given how easy it is to implement the language. This was, in fact, one of the things that drew me to the language in the first place. I was still just starting to learn Scheme, so I figured that it wouldn’t really matter which implementation I selected. As long as I was just playing around and not implementing real software, I could always switch later with relative ease.

So I installed MIT Scheme, fired up the interpreter and started typing in my first tentative lines of code:


It worked! I had successfully calculated that seven times two is fourteen! I was clearly well on my way to becoming an omnipotent programmer deity. Now, how about changing that first line to use the number 13 instead of 3? I tapped the up-arrow key on my keyboard and:


Well, apparently the MIT Scheme interpreter doesn’t support that. This discovery gave me pause. I really like learning with an interactive interpreter, and not having the ability to bring back the previous line would make things much more difficult. No worries though; there are plenty of other Scheme implementations out there. There has to be at least one that does what I want. Chicken Scheme seemed pretty popular. Trying the same code again:


And the up-arrow:


Chicken Scheme’s interpreter has the same problem. I also tried MZScheme, Scheme48 and Guile, with the exact same result. Five Scheme implementations, and they all suffer from this same issue.

And then it hit me. This is the sort of thing that causes newbies like me to give up and move on to something else. In fact, I think that I may have actually done just that after a previous attempt at learning Scheme, months ago.

Well, I didn’t give up this time, and I eventually found a Scheme implementation that supports my beloved arrow keys in its interpreter. And the winner is: Gambit Scheme. This excellent implementation seems to have been influenced by the “batteries included” philosophy that I love about Python. And given the state of the programming language world right now, I don’t think that “batteries included” is optional anymore. For a language to win users, and all of the benefits that a large community brings, at some point someone must create a polished implementation without the rough edges that I had to wrestle with. To some degree, this is a chicken and egg problem. On one hand, you must deal with all of the boring little details to grab users and build a big community. On the other hand, a big community will mean more contributors willing to tackle the boring details. I suppose that the polish of the implementation and the size of the community must move in lock-step. The only thing that anyone can do to speed this process is to adhere to the “batteries included” philosophy and encourage others to do the same.

If you’re thinking about learning Scheme, I highly recommend that you give Gambit a try. My next posting will explain how to install Gambit and set up the SLIB libraries on Ubuntu 7.10.



  1. It sounds like you need readline. I know that Chicken Scheme has an “egg” (an extension module) that it can install to give you readline support (history, backspacing, everything you have come to expect from a terminal emulator).

    More than being a downside of individual implementations, I think it’s a reflection of the minimalism that is Scheme.

    All that having been said, thank you for sharing your thoughts on Gambit. I will take your suggestion and give it a spin.

    Comment by Mychael — February 13, 2008 @ 4:36 pm

  2. Hmmm… the minimalism of the interpreter reflects the minimalism of the language. That thought hadn’t occurred to me, but it makes sense. After writing this, I learned that there is actually a program that you can run on the command-line to give readline support to another program (which is pretty neat), but I had no idea that such a thing existed, and I’ve been using Linux for years. My main concern is just that things are made as easy as possible for newbies.

    Comment by bnsmith — February 13, 2008 @ 4:52 pm

  3. There is a great tool you can use in Linux: rlwrap. This wraps the input to programs in order to provide history and friendly readline capabilities. “rlwrap” is probably the program that bnsmith is referring to. To use rlwrap, just run it like this, e.g.,

    rlwrap csi

    Comment by David Baird — April 12, 2008 @ 10:14 pm

  4. I’m not certain, but I think readline is not included by default because of licensing stuff – the implementors don’t want to be locked into GPL just to because of readline

    Comment by Ali — December 22, 2008 @ 12:27 pm

RSS feed for comments on this post.

Blog at

%d bloggers like this: