[ab] lispbuilder vs Pocessing.org
Luke Crook
luke at balooga.com
Thu Sep 7 19:24:50 CDT 2006
I've starting converting a few of the examples at processing.org to Lisp.
Take a look here:
http://www.processing.org/learning/examples/widthheight.html
The processing code is as follows:
size(200, 200);
background(127);
noStroke();
for(int i=0; i<height; i+=20) {
fill(0);
rect(0, i, width, 10);
fill(255);
rect(i, 0, 10, height);
}
While the Lisp code is as follows:
(let ((width 200) (height 200))
(sdl:with-init ()
(sdl:with-display (200 200)
(sdl:clear-display :color #(127 127 127))
(loop for i from 0 to height by 20
do (progn (sdl-gfx:draw-box (sdl:rectangle 0 i 200 10) :color #(0 0 0))
(sdl-gfx:draw-box (sdl:rectangle i 0 10 200) :color #(255 255
255))))
(sdl:with-events ()
(:quit () t)
(:videoexpose () (sdl:update-display)))))
Both have the same output. Processing looks cleaner though. I'm not too sure
too sure what to do about that.
- Luke
More information about the application-builder
mailing list