Posted November 05, 2024 by screwtape
#common lisp #mcclim #moonclimb #lispmoo2 #history making
It seems like last year's 50 people when my team wrote screw-logos was an outlier, and we are back down to about 20 submissions. So far as I have seen, only Andrew wrote in common lisp, though I am also excited to chez up mdhughes' cavez, which I might have to do from source due to an incompatible chezscheme build or something.
I'll try and summarise the entries on the lispy gopher climate tomorrow anyway.
Warning, I really, really like what I wrote.
LISPMOO2/MAIN> { north (:VERB COM-NORTH :DOBJ NIL :PREP NIL :IOBJ NIL :HERE START-LOCN :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x You navigate north to FOREST. (:OWNER SCREWTAPE :PARENTS ($ROOM $OBJECT) :CONTENTS NIL :INHABITANTS (DISTRESSED-PRINCESS SCREWTAPE) :EXITS ((SOUTH . START-LOCN) (WEST . CLEARING))) LISPMOO2/MAIN>
Okay, that's about one third of the whole game. I did that thing where you make nothing but an engine, but for me personally this is a terrible, just barely implemented watershed moment in my own computer history. Look at this.
LISPMOO2/MAIN> { @create $thing :named counter (:VERB COM-@CREATE :DOBJ $THING :PREP :NAMED :IOBJ COUNTER :HERE FOREST :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x ($THING) LISPMOO2/MAIN> (push 'counter (get 'forest :Contents)) (COUNTER)
LISPMOO2/MAIN> { @take counter (:VERB COM-@TAKE :DOBJ COUNTER :PREP NIL :IOBJ NIL :HERE FOREST :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x "You take " COUNTER COUNTER
LISPMOO2/MAIN> (setf (symbol-function 'counter) (let ((count 0)) (lambda () (incf count)))) #<FUNCTION (LAMBDA ()) {10058ED92B}>
Note that basically every other cell is in use
LISPMOO2/MAIN> { @verb counter :is (com-cnt (progn (print (funcall 'counter)))) (:VERB COM-@VERB :DOBJ COUNTER :PREP :IS :IOBJ (COM-CNT (PROGN (PRINT (FUNCALL 'COUNTER)))) :HERE FOREST :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x ((PROGN (PRINT (FUNCALL 'COUNTER))))
lisp2 for days
I just use the object's name as the :dobj to give it priority in inheritance.
LISPMOO2/MAIN> { cnt counter (:VERB COM-CNT :DOBJ COUNTER :PREP NIL :IOBJ NIL :HERE FOREST :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x 1 1 LISPMOO2/MAIN> { cnt counter (:VERB COM-CNT :DOBJ COUNTER :PREP NIL :IOBJ NIL :HERE FOREST :CALLER NIL :PLAYER SCREWTAPE :PASSES 0) LISPMOO2/MAIN> x 2 2 LISPMOO2/MAIN>
The deeper meaning of this has been preying on me. To some extent, instead of packages, I am spatially organising lisp code in this way, in a way with a sensible distance metric. I guess this is also like lambdamoo.
So far I suspect that the property is something like, if we just use teleportation to connect places and things, which is analogous to just un/loading ASDF systems a la carte in lisp, sure, you can do anything, given that in this way everything has an everything to everything connection.
On the other hand, by spatially organising my game, this series of actions has a relatable meaning:
{ north { west { @take gold-ring { east { @give gold-ring :to distressed-princess
and I'm arguing that this has something that
(push (pop (get 'clearing :contents)) (get 'distressed-princess :inventory))
doesn't. Anyway, I only know to write this exactly in hindsight.