Scheme and Emacs

2014-04-18

For those who like to write Scheme without leaving Emacs, Geiser is probably the way to go.

The Racket guide for Emacs also recommends to install Quack, which I happened to try long ago for an introductory course in programming for Bioinformatics where we were using Scheme (I was using Chicken Scheme at that time).

I believe DrRacket (formerly PLT Scheme) is really a great software to learn Scheme and do serious stuff with it, including computational science. I know people would not necessarily consider Racket as a pure Scheme language. By the way, here are some of the most upvoted questions on Stack Overflow:

Beside Doug Williams science collection, Racket now includes scientific packages like plot and math/statistics.

For example, using a toy demo from Racket website, here is how it looks under the native Mac app:

racket

And here is the same script processed through Emacs Geiser:

emacs

With Emacs, you just have to M-x run-geiser to start the REPL (it is pretty fast to come up, unlike Clojure REPL). However, since Geiser targets both Racket and Guile, I decided to compile Guile. I tried to install Guile some time ago, following a suggestion on Cross Validated where I provided a brief illustration with Scheme. But it soon reached to the point where I had too much dependencies to manage and I finally gave up. This time, it works perfectly well, and I suspect that this is because I added all those dependencies in the mean time (in particular, to install mu).

guile

Finally, I recently learned about Pyret (and, as a side-effect, of Frog):

Pyret is a programming language designed to serve as an outstanding choice for programming education while exploring the confluence of scripting and functional programming.

Remarks

Emacs 24.4 is available for OS X on http://emacsformacosx.com/ (check the Nightlies builds), and it comes with pretiffy,(a) see also What's new in Emacs 24.4. By the way, I learned that Emacs 24.3 suffers from a problem when rendering sRGB color, which explains why I got some strange problems with powerline. (b)

Notes

(a) I use pretty-lambdada.el at the moment.

(b) Other issues came around when I used the solarized theme. Now, I switched to gruber-darker theme, so it doesn't bother me anymore.

---

Articles with the same tag(s):

El Capitan
Why I am still using Emacs
Tmux and OS X
OS X Yosemite
Some useful Mac Apps for data scientists
Collecting email usage statistics from mu
From Beamer to Deckset
Fixing some critical keyboard shortcuts in OS X terminal
Emacs Org-mode and literate programming
A modular configuration for Emacs

---