Saturday, November 13, 2010

Norvig Scheme

Peter Norvig's Paradigms of Artificial Intelligence Programming (PAIP, for short) currently sits at the top of my reading list. Some readers will have heard of it before now; for those who have not, PAIP is a classic text in practical computer science. It no longer represents the cutting edge of artificial intelligence, but it treats many classic programs in the field, and propounds many generally-applicable programming techniques.

My current interest in PAIP lies in the pedagogical Scheme implementation contained therein. I have -- as I referenced previously -- become interested in programming languages in their own right, but until recently, I knew nothing about their design or implementation. I know more now about the design of a programming language (enough, at least, to admire the simplicity and elegance of R5RS Scheme) but still little of their implementation. That deficiency is now being rectified. I am working through the first interpreter that Norvig presents -- a very simple one, implementing only a skeletal Scheme. Macros and the attendant control structures come next.

Once I have mastered these implementations of Scheme (and there is also a byte-code compiler presented in PAIP!), then -- perhaps -- I can continue on to the wealth of detail contained in Lisp in Small Pieces, and after that, to the Scheme literature; my ultimate goal is to author a modern implementation that compiles to LLVM.