Newbies thoughts on #drracket and #scheme in general

I have toyed with scheme/lisp in the past. Like most people, I have thought “that’s really cool,” and then gone back to programming in whatever language I was using before.

Lisp, I found, has a high barrier to entry, and requires a lot of infrastructure to get it to do something useful. Yes, of course, you could just type everything at the REPL, but you’re probably going to want to integrate it with emacs and quicklisp. It’s a little unfriendly out of the box.

DrRacket is a nice implementation, with a nice out-of-the-box experience. It’s IDE is a little clunky and a little slow, but it comes with all sorts of goodies. I was interested in fooling around with language design, which is a key feature of DrRacket.

The problem with DrRacket is that although it’s a little sluggish on my trusty old desktop, it is dead slow on my Raspberry Pi 2, even without the GUI. So I decided to do a little experimentation with Chicken Scheme.

Chicken proved to be much more to my liking speed-wise. Its libraries are nowhere near those available out of the box as with DrRacket, which of course is to be expected. What I thought to be a big flaw with Chicken was its impenetrable error messages. I had to send my definitions to the REPL function-by-function in order to find out whereabouts its was complaining.

Then we come to this little “gem”:

open-output-file: … If a file with the given name already exists, the effect is unspecified.

Really? Each Scheme implementation is allowed to just make up its mind as to what it wants to do? And the library user has to check the behaviour against each implementation?

DrRacket has the most sensible way of implementing it. The default behaviour is to raise an error, but there are optional keys for alternative behaviour, like ‘replace.

That’s good, but DrRacket’s keyword syntax is not standard Scheme. It doesn’t look like it’s in the up-and-coming R7RS, either. This means that for library writers, there’s a good chance that the code won’t be cross-implementation compatible. Considering how long R7RS seems to have been brewing, it seems to be lacking some pretty fundamental design choices.

BWTFDIK. Those guys are smarter than me. I’m just wondering if the design committee has some kind of cohesive goal for Scheme. C++ seems much more coherent in their vision.

Just my uneducated 2c.

Advertisements

About mcturra2000

Computer programmer living in Scotland.
This entry was posted in Uncategorized. Bookmark the permalink.

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