Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A lisp newbie example app.

3 views
Skip to first unread message

Asbjørn Bjørnstad

unread,
Jan 2, 2006, 11:11:12 AM1/2/06
to

With little to do over the holiday period, I wrote up the process of
writing a trivial little game. And I do mean trivial.
If you got nothing better to do either, you can find it here:
http://www.jalat.com/the-game.html
--
-asbjxrn

Kenny Tilton

unread,
Jan 2, 2006, 3:09:06 PM1/2/06
to

Very nice write-up. This is a nice contrib. Makes me think it is better
for newbies to learn from each other than from us dinosaurs.

kt

ogliomus

unread,
Jan 2, 2006, 9:08:44 PM1/2/06
to

Very nice and "clean". I did not look carefullly at the code yet - it
take some times for a "yet another newbie" like me, but i appreciate
it.
GC

Brian Downing

unread,
Jan 3, 2006, 10:22:45 AM1/3/06
to
In article <5o8xtyy...@kuusi.ifi.uio.no>,

One slight nitpick - consider replacing (:add-use-defaults t) with
(:use :common-lisp) in the portable (non-CAPI) section -
:add-use-defaults seems to be a Lispworks-specific thing marring what
is otherwise perfectly portable code.

-bcd
--
*** Brian Downing <bdowning at lavos dot net>

Asbjørn Bjørnstad

unread,
Jan 3, 2006, 11:21:09 AM1/3/06
to
Brian Downing <see-si...@lavos.net> writes:

> In article <5o8xtyy...@kuusi.ifi.uio.no>,


> Asbjørn Bjørnst ad <asb...@ifi.uio.no> wrote:
> > With little to do over the holiday period, I wrote up the process of
> > writing a trivial little game. And I do mean trivial.
> > If you got nothing better to do either, you can find it here:
> > http://www.jalat.com/the-game.html
>
> One slight nitpick - consider replacing (:add-use-defaults t) with
> (:use :common-lisp) in the portable (non-CAPI) section -
> :add-use-defaults seems to be a Lispworks-specific thing marring what
> is otherwise perfectly portable code.

Agreed, and done.

--
-asbjxrn

Fred Bayer

unread,
Jan 3, 2006, 6:54:45 PM1/3/06
to

Asbjørn Bjørnstad wrote:

Another one:
Write

(defun print-grid (grid)
(format t "~{~{ ~a~}~%~}~%" (loop for i on grid by 'cdddr
collect (list (first i) (second
i) (third i)))))

instead of

(defun print-grid (grid)
(format t "~{~{ ~a~}~%~}~%" (loop for i on currentpos by 'cdddr
collect (list (first i) (second
i) (third i)))))

and perhaps (logxor p m) instead of (mod (+ p m) 2) in apply-move

Ciao, Fred

nall...@gmail.com

unread,
Jan 3, 2006, 7:54:13 PM1/3/06
to

very cool, asbjxrn

Nick

Asbjørn Bjørnstad

unread,
Jan 4, 2006, 7:56:51 AM1/4/06
to
Fred Bayer <ne...@bayerf.de> writes:

> Another one:
> Write
>
[..]

A bug! And I thought I'd tested everything so thoroughly.

> and perhaps (logxor p m) instead of (mod (+ p m) 2) in apply-move

Maybe next time.
--
-asbjxrn

Asbjørn Bjørnstad

unread,
Jan 4, 2006, 11:00:25 AM1/4/06
to
F...@while.it.lasted.invalid (Asbjørn Bjørnstad) writes:

Thanks to all the nice feedback, I got encouraged to write another piece,
so if you want me to stop, you now know how. :-)

This time I didn't write a program, I just tried to give an impression
of how I (ab)use the REPL.

Warning: my way of using the REPL could seriously offend your sense of
estetics. Ugly code has a main part in this episode:

http://www.jalat.com/back-of-the-envelope.html
--
-asbjxrn

0 new messages