April 7, 2005

Scheme, where should we be going?

Posted in Scheme at 9:29 pm by pmatos

Although I will be sometimes mentioning the programming language scheme on its own, my oppinion is biased towards the PLT Scheme Distribution.

I think most everyone has a my-programming-language-of-choice, at least… I do! And it is definitely Scheme. Some might say “Are you crazy, man?”, while still others say “Is that a drink???”. However, I’ve started learning Scheme many years ago with PLT Scheme distribution version 0.53 in college in my “Introduction to Programming” course which used the book Structure and Interpretation of Computer Programs as a reference. At the time I already knew fairly well BASIC, M$ Visual Basic 5.0, some Pascal and a little C. After that semester I digressed a little from Scheme to learn other languages along the courses in my college. I got to Common Lisp and then quickly back to Scheme. At this time I searched for other options to PLT Scheme. I used MIT Scheme (no development seemed to be happening at all) and Bigloo (it seems too ‘harsh’ at the time, I’ve heard it’s better now) and then back to PLT Scheme in version 100 which was much nicer compared to 0.53.

Two things always distinguished PLT Scheme from other Scheme distributions: its documentation and its mailing list support. Of course, it has many other nice features which complement the already very nice features of the Scheme language itself.
For posting on this blog I asked someone at the PLT Mailing List to talk about the history of PLT Scheme and Matthias did so. Here’s the relevant part:

PLT is the name of a research group that I founded at Rice University
some 15 odd years ago. Initially our research focus was pl theory with
an eye toward use in FP. Corky Cartwright a prof at Rice worked with us
too at that time. In the mid 1990s, I proposed to focus on
FP/Scheme/programming environments for education. You may want to look
at a talk called From POPL to the Classroom and Back, available off my
web site.

Matthew took the lead with the integration of 14 (that’s a vague
memory) packages and languages and voila` we had MrEd and soon a
DrScheme-like thing (version # in the upper 20s low 30s). I taught with
the thing, but none of the teachers from this first workshop survived
:-) Cormac Flanagan and Shriram added things to the package and before
we knew it we had a visual, static debugger and could get funding for
it. The MrEd number was in the low 40s, soon in the upper 40s. Robby
Findler joined and took over the drscheme part because it had grown
very large.

From version 0.53 to version 100’s there was a major jump in terms of funcionality, interface and MzScheme code. Just to make it clear, MzScheme is the PLT Scheme compiler and interpreter. DrScheme scheme is the MzScheme interface (PLT Scheme IDE) and MrEd is the graphical library which allows you to build GUIs in Scheme. Development has been steady and they released v200 and we are now targeting v300. Current release is v299.100 (v300 BETA version) announced on the 25th March, but there is already a v299.101 cvs version. The interface is very nice: tabs, keybindings for very much anything, code profiling visualization, very nice syntax colouring, module graphs. About the code we have a great module system, contracts, SRFI support, “traditional” object system, CLOS-like object system Swindle, a Foreign Function Library to link Scheme easily against C and literally dozens of other libraries. Oh well… Check my Scheme section on my webpage for some code.

No matter what we already have, something is missing… We have a great language and a great tool but why do we have so little people doing real (no-college stuff) programming with PLT Scheme. In Portugal we have about 10 million people, do we have what? 100 people using Scheme (max!!!). And I do think I’m being extremely kind!

One problem is advertisement… not many people talk about Scheme… why? because there are not many people programming in Scheme and not many people program in Scheme because not many people talk about it, we have to leave this cycle. Another issue is undoubtedly that Scheme is ‘different’ from C, C++, Java… it has a different syntax and that scares people… They need to learn Scheme to grasp its power and learning Scheme is not the easiest thing to do. It’s easiest to spend an afternoon learning PHP and then create a web page or something like that than learning Scheme to do that (which you can do with WebIt! for example). However the power that comes with Scheme is far stronger. Yet another issue is bad advertisement. Most students finishing the “Programming Fundamentals” course which I taught last semester think that “Scheme is only fitted for educational purposes”, and I think many others have that idea. Surely it is fitted for educational purposes, but not only for that.

However, spending some time with other languages, I still feel the need for other stuff in PLT Scheme. The future is bright and if we join forces we will surely make it brighter.
If some things are already done, please contact me or post a comment with a link to the code. Here’s a tiny list, with no special ordering, which it is by no means complete:

  • Object Relational Bridge – It would be nice to have an object relational bridge. We have an object system and we have some DataBase bindings… An Object Relational Bridge to automate object saving would be great.
  • Scheme DataBase Connectivity – A centralized way to connect Scheme to a database. We have bindings for MySQL, PostgreSQL and FireBird but no single library that does everything.
  • Frame Helper – It would be nice to have a DrScheme frame explaining the arguments and what the function returns while we are typing.
  • Documentation System – There’s already schemedoc but it needs to be updated and many more features are needed!
  • GTK+ 2 Bindings – It would be nice to have GTK+2 bindings for all reasons you might imagine.
  • GUI Builder – Something like glade would be great.
  • MzScheme Apache Module – Although we already have the scheme webserver, it’s not always easy to convince our Administrator that he should run the scheme webserver. It would be nice to have a module and say. “Hey, please, can you load this module for me?”
  • Tutorials – The manuals are just great but only people working with PLT Scheme will read the manuals… we need tutorials for those just browsing the net without anything to do or just wanting to learn something new. In-Depth tutorials on specific PLT Scheme subjects.
  • Scheme Talks – Give a talk in your school, in your college, in your house, in your street. Spread the word… talk about Scheme!!!

If you start a project with some of these aims, please post a comment with its URL… thx!

Oh well, in the end we might well thanks PLT Scheme developers for the nice software they provide (as well as the mailing list support). Thanks to Matthias, Matthew, Eli, Robby and any other I might have forgotten… :)



  1. pmatos said,

    Found the GUI Builder: MrEdDesigner


  2. Tony said,

    I just couldn’t resist posting a reply regarding the level of PLT Scheme usage.

    My own reasons for hesitating to adopt it (and I would love to, as from the little time I’ve spent with it there is a great deal to like) is:

    1. It lacks the option of static typing. I’m not so much concerned with type-safety here as performance.

    2. It lacks iterative control structures. This is a severe limitation in itself. When you further limit yourself to tail-call recursion, the result (in my opinion) is often uglier and more difficult to understand. I’m aware that this is purely subjective :)

    I know that these are issues with the Scheme standard, and not just with PLTs implementation. However, if PLT Scheme was extended to address these issues then I believe many more people would adopt it.

    I suspect the problem comes down to favouring academic elegance over real-world practicality.

    I hope that doesn’t come across as too harsh as I think in many ways it is a very nice language/implementation and I too would like to see it become more popular.

  3. pmatos said,

    Thanks for your comment, however, if you’re worried with performance I probably the best would be to program what you need in C and the use ffi to use it in DrScheme, i.e. use C for performance needy algorithms and then Scheme to do the other stuff. :)
    If you wish ‘static typing’ just for security, for example, declaring that the first argument of a function should be an integer then you probably should look at contracts. About iterative control structures, probably do is the most general of them all, what do you need? Common Lisp LOOP? If it is that then there is a SRFI to help you with that, in fact I do think that is a SRFI about iterative control structures. check srfi.schemers.org
    Oh, lately I would need a more higher level layer for shell scripting in DrScheme… I don’t like bash!!! :)

  4. […] ROOS – Rose Object Orientation for Scheme Some time ago I created a wishlist for the scheme language (particularly for the PLT Scheme implementation) and my prayers hav […]

  5. Danny Yoo said,

    About Tony’s comment about lacking iterative control structures: how about this?

    (define-syntax while
    (syntax-rules ()
    [(while test-condition body …)
    (let loop ()
    (when test-condition
    body …

    Here’s an example:

    > (define n 10)
    > (while (n . > . 0) (printf “~s~n” n) (set! n (sub1 n)))

    This is deliberarly written to make things look at C-ish as possible; PLT Scheme supports an infix-operator style if we really insist on it.

    The core idea is that if we want a control structure, we can rely on a macro to do the work for us. And PLT Scheme’s excellent module system allows us to conveniently stuff these control structures in a library. For more about this idea, see: http://www.cs.utah.edu/plt/publications/macromod.pdf.

  6. pmatos said,

    Probably I should mention the new Portuguese Scheme Portal website at schemept.org !

  7. Rose said,

    I am so happy to see something like this.

    I am an MS student

    I had a paper in scheme in my last semester and it helped me a lot. I was a beginner to programming.And before this paper I had another paper in java, but i couldn’t get all the concepts very well. But after learning scheme, I found it very easy to learn Java.

    So I feel that learning scheme can make you learn other languages very easily

    Thank you.

    And I found scheme as a sensible language.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: