Displaying posts tagged: lisp

Base fun

No Comments
The Lisp reader interprets tokens consisting exclusively of numeric characters as integers. For instance (READ-FROM-STRING "25") returns the integer 25, just as you would expect. But the dynamic environment can trump even such cast iron expectations. The number radix used by the reader equals the prevailing value of the *READ-BASE* variable. So binding that to 8 ...

Drawing with CAPI

No Comments
I have been learning a little about CAPI, the GUI library that comes with LispWorks. I particularly wanted to find out how to draw graphics primitives inside a window, as I wanted to modify Paul Graham's toy ray-tracer to display images on screen. CAPI offers essentially the same 2D graphics programming model as the Java toolkits ...

Erik Naggum, 1965-2009

No Comments
I started reading comp.lang.lisp daily around 1997, and Naggum's articles were the main reason. He wrote so, er, persuasively on Lisp and related subjects. I hoped that he would pull through his prolonged illness, but it was not to be.

Street Numbers solved!

No Comments
In my drive to optimize the performance of the Street Numbers problem solver, I had not taken the time to look at how others had attacked the problem. This was somewhat deliberate on my part, as I didn't want to 'peek at the answer' before having given it my best shot. But recently I came across ...

The straight 'root'

No Comments
The previous algorithm I wrote for the Street Numbers problem was unable to decide, in a constant number of steps, whether a given street number contained a solution (house.) It needed to amble down the street for some distance before being able to tell for sure, and this distance would increase for higher street numbers. So ...