Latest Tweets:
I dared venturing outside my lair for a nice midday session on the balcony. Sitting here, I’ve been thinking about my apparent inability to focus on a subject when the choice is free: everything is so interesting and I want it all!
It’s like a sandwich were you keep adding more and more tasty ingredients until the damn thing topples over into a pathetic mess. You might have been able to sample parts of the sandwich, but you are still hungry and not very satisfied with the arrangement.
The flip-side of the sandwich analogy is when you decide that you are only going to focus on a specific ingredient, only to find when you bite into it that it was very bland and boring. Unsatisfied, you throw the sandwich to the ducks.
Now I’ll try the intellectual equivalent to those tiny cocktail sandwiches and hope that I don’t slice my hypothetical thumb off trying to cut out the fiddly things.
Speaking of wich, it’s time for lunch!
Future Change Warning: Proposed Federal censorship regulations may prohibit us from giving you information about the possibility of calling this function. We would be required to say that this is not an acceptable way of terminating a program.
This friendly notice can be found in the section about abnormal termination in the GNU C Library Manual.
Got me thinking though: can a program be considered a human being from the moment of execution?
A while back I offered to review Nils M Holm’s book Scheme 9 from Empty Space, A Guide to Implementing Scheme in C, available on Lulu as a paperback, PDF and HTML.
It took me way too long, but here it is:
Scheme 9 from Empty Space, A Guide to Implementing Scheme in C is a thorough guide of the internals of the scheme system with the same name. It provides a detailed account of every aspect of a non-trivial interpreter, from memory management, through the implementation of primitives, all the way up to the user-level forms and functions.
I was very delighted to see the discussions about practical matters in the implementation. One such discussion is the section about memory management, where a pointer reversal algorithm is laid out in beautiful detail. This is very refreshing since many other smaller scheme systems usually implement a naïve mark-and-sweep collector and call it a day without any further motivation.
The implementation is also very faithful to the lisp tradition of building things bottom-up, which is evident in the book by the fact that you get a good mental picture from the start, despite the rather mechanical walk through of the source. (Which certainly isn’t bad: this is a documentary after all, and not a cookbook.)
I’d say that this book is for the reader with some previous experience in writing compilers and/or interpreters. For the absolute beginner, the material may come across as dry and bewildering since it presents all concepts in the same order as they appear in the source. For the programming language buff, it is a interesting behind-the-scenes tour of a real-world scheme system.
All in all, it is a good read. Many scheme implementations have been written over the years, but very few have a thorough guide of such detail as this book.