From: =?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=
Subject: A lisp newbie example app.
Date:
Message-ID: <5o8xtyy5i7.fsf@kuusi.ifi.uio.no>
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
Asbj�rn Bj�rnstad 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
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
···@while.it.lasted.invalid (Asbj�rn Bj�rnstad) 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
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
In article <··············@kuusi.ifi.uio.no>,
Asbjørn Bjørnst ad <·······@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.
-bcd
--
*** Brian Downing <bdowning at lavos dot net>
From: =?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=
Subject: Re: A lisp newbie example app.
Date:
Message-ID: <5opsn9qo3u.fsf@kuusi.ifi.uio.no>
Brian Downing <·············@lavos.net> writes:
> In article <··············@kuusi.ifi.uio.no>,
> Asbjørn Bjørnst ad <·······@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
Asbjørn Bjørnstad wrote:
> Brian Downing <·············@lavos.net> writes:
>
>
>>In article <··············@kuusi.ifi.uio.no>,
>>Asbjørn Bjørnst ad <·······@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.
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
From: =?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=
Subject: Re: A lisp newbie example app.
Date:
Message-ID: <5ofyo4ywvg.fsf@kaksi.ifi.uio.no>
Fred Bayer <·····@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
From: =?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=
Subject: Re: A lisp newbie example app.
Date:
Message-ID: <5oacecyodi.fsf@kaksi.ifi.uio.no>
···@while.it.lasted.invalid (Asbjørn Bjørnstad) writes:
> Fred Bayer <·····@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.
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
>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
very cool, asbjxrn
Nick