Last month, I introduced you to Felix Winkelmann, creator of one of my favorite programming languages: CHICKEN Scheme, a mature, high-performance implemention of Scheme that compiles to C code.
In addition to using SPOCK to generate client-side scripts, both examples use CHICKEN Scheme to generate the HTML pages that house the scripts. Indeed, using the many CHICKEN Scheme extensions for web programming, databases access, and more, it’s possible to use CHICKEN Scheme to create and serve full-featured web apps, complete with client-side scripting!
Given Scheme’s extraordinary flexibility and CHICKEN’s solid performance and native library support, this could become a compelling toolchain for web developers willing to venture beyond the familiar landscapes of PHP, Ruby on Rails, CoffeeScript, and the like.
Read on as Felix tells us more about SPOCK, why he created it, how it relates to CHICKEN, and the curious origins of the names “CHICKEN” and “SPOCK”.
Let’s talk about SPOCK. What is it? Is it ready for people to use? Why would someone want to use it?
The interesting bit is that the distinction between server-side and client-side gets fuzzier — a Scheme server can emit Scheme code to run on the client, and Scheme’s powerful syntactic extension mechanisms can make this look like a single piece of code. SPOCK is not what I’d call ready for production yet. But I’d say there is potential.
What motivated you to create SPOCK?
Have you used it for any projects yet?
I have only done experiments with it. I’d love to do more, but I severely lack the experience in web programming.
You mentioned that CHICKEN and SPOCK both use Henry Baker’s “Cheney on the M.T.A.” compilation strategy. How much did your experience developing CHICKEN help with creating SPOCK? Are the implementations similar?
What’s next for SPOCK? Are you going to continue developing it?
Currently, I’m just waiting for people to use it. ;-)
But, SPOCK is clean enough to be grokked by whoever wants to hack on it. It is not under active development at the moment, but it has a reasonable size and complexity, which makes it easier to maintain than, say, CHICKEN. It would be interesting to see how people use it, and I’ll be available in case something breaks.
Both CHICKEN and SPOCK are open source. If someone is interested in contributing, what is the best way to get started?
Just give it a try. Play with it, learn about it, write something useful, or even something useless. Then get in touch with the community, ask questions on the mailing list, or enjoy the daily fun on our IRC channel. Submitting a new CHICKEN library or extension module is very easy. There are endless things to do, even if it is just testing, and we are happy about every little bit of help we can get, and happy to provide help to those that need it themselves. Every line of code contributed makes CHICKEN better, increases our corpus of testing code, or at least gives us something to think about.
One last question: What inspired the names CHICKEN and SPOCK? Do they mean anything, aside from the bird and the well-known Star Trek character?
That question always comes up, sooner or later. ;-)
I had a plastic toy of Feathers McGraw on my desk, the evil penguin (disguised as a chicken!) from the Wallace and Gromit movie, “The Wrong Trousers.” Looking for a preliminary working title for the compiler, I used the first thing that came to my mind that day. I’m somewhat superstitious about names for software projects, and things were progressing well, so I didn’t dare to change the name.
Also, there is the old philosophical question: which came first, the chicken or the egg? This applies to CHICKEN, too. The compiler is written in Scheme, so you need CHICKEN in order to compile CHICKEN.
For SPOCK, the story is not that interesting. I just like whacky names, and it seemed nice to have some sort of “persona” to associate with the compiler. Like CHICKEN, “Spock” was just the first thing that came to mind.
Felix, it has been a pleasure. CHICKEN and SPOCK definitely seem to have a lot of potential. Thanks for taking the time to tell us more about them.
You’re very welcome.