The Land of Raspberry Lisp, Part 0·5.

Upon reflection, beginning this project when I did was probably not the best idea, being immediately before two holidays, a visit from the beloved and a short but successful period of job-hunting. This post comes before the second holiday, after which progress will resume properly, being a brief update to respond to some questions that were raised in Part 0, both in the comments and on r/lisp.

Regarding ECL's performance on the RasPi:

I haven't had a chance to formally test the performance of ECL on the RasPi, but I may do when I come back in a couple of weeks. For now, suffice it to say that it seems to be satisfactory. I'll switch to something else later on if needs must. Emacs also appears to run fine; with a vanilla configuration (only the modifications described in the previous instalment), startup time is actually pretty reasonable. Using my frankly monstruous config (here), it takes quite a lot longer, but it's still acceptable.

Regarding Clojure:

Much as I'd love to write about Clojure on the RasPi, its performance leaves much to be desired. The time taken from typing lein repl to being in the REPL is, if we're going to phrase it kindly, significant. To be fair, once in the REPL, or if running a JAR created with lein uberjar, performance was OK, but the startup times are frankly prohibitive. Which is a shame. I'm sure Java support for the RasPi will improve with time, but for now, Clojure is just out of reach.

Some people have tried harder than I have with Clojure on the RasPi: pelley on Reddit comments that "I got Clojure working on the Pi but due to limitations of the JVM, it doesn't support things like Graphics2D. Code still executes; you just don't see any graphics displayed. Text mode stuff works fine though."

Regarding teaching children Scheme:

My apologies, I should've been clearer than I was in the previous post regarding teaching Scheme.

I spent a sizeable chunk of last year teaching extracurricular maths to a couple of groups of Year 6 children (10-11 years old), which basically meant that I was given free reign to talk about anything I found interesting. I decided to devote a few lessons to introducing the idea of functions (complete with a cardboard 'function machine', which helped greatly), followed by simple untyped lambda calculus, just to illustrate higher-order (amongst other things) functions, and that maths could be a lot more diverse than they had experienced up to then. This led nicely into a series of lessons on Scheme, showing how what they had learned could be applied to real-life situations (i.e. programming computers). We started going through a few exercises from and based upon Friedman and Felleisen's excellent The Little Schemer. The group was small, and the lessons were primarily practical: depending on the number of computers available at the time, the pupils were either sat in front of a computer each with a worksheet, or we were all crowded around one computer, talking through how to solve problems together. As the school computers were a lethal combination of ancient and locked-down, we were stuck using BiwaScheme (IE6 can't handle repl.it as it turns out), but as we were working solely in the REPL this wasn't too much of a problem.

Sadly, these lessons were ultimately cut short by my looming finals. I'd like to do this properly and with a larger group, and, as I'm starting work in another school come September, may well run a similar course for Common Lisp, based upon the outcome of the Raspberry Lisp series.

With any luck that was a bit more enlightening. I'll try to have Part 1 up as soon as possible after I get back, but for now, happy hacking!

comments powered by Disqus