Hacker News new | ask | show | jobs
by ducktective 636 days ago
What modern scheme is best to use for these "the little x'er" book series? Some of them suggest their dialect (like learner suggests Racket I think), but what about others? In short, what scheme is the most practical and useful nowadays?

Here is the result of my research so far, in order of preference according to the above requirements:

Guile: most active community, GNU glue language, Guix

Chicken: most pragmatic one with a package manager but older

Chez: most performant one, less active community and libraries

8 comments

Racket! This is the language that the common author (Dr. Daniel Friedman) uses, and many of the Little books use custom DSLs implemented in Racket.

Racket now runs on Chez under the hood (inheriting the performance), and has a pretty decent ecosystem as far as schemes go.

(I TA for Dr. Friedman’s programming languages course)

I don't know what is the best Scheme implementation, but this book has little to do with Scheme though. Pie uses S-expressions for syntax, and happens to be implemented in Racket, but you don't interact with Racket directly.
Gerbil scheme works great with the Schemer series of books.
This one comes with its own language, "Pie", which you can use in DrRacket with #lang pie
This is the last thing I'd worry about. The series isn't about teaching you a language you can use later in industry. It's about teaching you higher-level concepts you can take with you to any languages you may encounter in the future.
Guile is great, but I think outside Guix it's pretty niche.

Racket is probably the most frequent choice. But I really like some aspects of Chicken, Gambit and Bigloo.

Even Clojure or CL could also be used, with a bit of friction of course.

A book like this doesn’t need to be “practical” and “useful” - I don’t think, say, the shortage of libraries for Chez Scheme is going to hamstring you in anyway.
Guile probably has the best Emacs integration through Geiser. While you don't really need it and you can just follow along with a terminal REPL, using something like Geiser helps keeping the experience smooth.

MIT/GNU Scheme comes with its own editor, edwin, which is a terminal-only Emacs-like. I don't know how much it complies with the various RnRSes, but I do believe it's good enough to work for the Little series.

Gauche is R7RS-small (and I believe -large up to Tangerine) compliant so it should just work. It also has fairly good Geiser support and comes with an enormous standard library, 'batteries included' as they say, though its performance is a bit lower than some of the other implementations.

Cyclone is R7RS-small compliant so it should work. It seems fairly fast and it has a package manager, but because it's fairly new I don't know how well it works with Geiser.

Loko is R6RS compliant so it should work. I believe the documentation says that it should work with Geiser using the Chez module, but I may be mistaken.

Gerbil is R7RS-small compliant (and I believe -large through Red, maybe through Tangerine?) so it should work. I believe it's also quite performant, though I haven't used it.

Kawa is R7RS-small compliant if I'm not mistaken. If so it should work for the Little series. It also has a Geiser module.

And then there are a few implementations of which I'm not entirely sure which version of the spec they comply with and how well they're supported by various editors (though I think SLIME has Scheme support, although that may only be for MIT/GNU Scheme): Gambit (I think R5RS? Gerbil is built on top of it), Bigloo (I think R6RS?), Larceny, Chibi Scheme, Biwa Scheme, S7, and IronScheme. For any of those, as long as they support post R4RS macros (so using `define-syntax' and `syntax-rules' instead of `defmacro)' they should work for the Little series without any adjustments. If they're still using `defmacro' then you'd need to translate the macro definitions from Reasoned (and later?), which isn't that hard... but if you're gonna do that you may want to read On Lisp after Seasoned.

Guile is my Scheme of choice.