Yeah, the Clojure namespacing does make translating symbol references
in my game-action macro a bit cumbersome... But I think Clojure's
straight-forward approach to namespacing is well worth this small
inconvenience :-)
On Mar 19, 8:54 am, alux wrote:
> JC Petkovich, thank you. I couldnt see your
JC Petkovich, thank you. I couldnt see your message before March 19,
6:00 group time, i.e. 13:00 UTC, but thats exactly the solution that
was needed.
Regards, alux
JC Petkovich schrieb:
> You just needed to edit your translation from CL a bit more, there
> were some extra brackets in your if sta
You just needed to edit your translation from CL a bit more, there
were some extra brackets in your if statements. The following should
work:
(defspel game-action [command subj obj place & rest]
`(defspel ~command [subject# object#]
`(if (and (= *location* '~'~place)
(= '~sub
By the way, you may find a working version at
http://paste.lisp.org/+22IH/1
Kind regards, alux
On 19 Mrz., 09:18, alux wrote:
> Hello Michael, hello Dave,
>
> its actually been the parenthesis.
>
> Thank you. (Now I still have to understand it ;-)
>
> On 18 Mrz., 22:43, Michael Wood wrote:
>
>
Hello Michael, hello Dave,
its actually been the parenthesis.
Thank you. (Now I still have to understand it ;-)
On 18 Mrz., 22:43, Michael Wood wrote:
> On 18 March 2010 23:40, Dave M wrote:
>
> > ...
>
> >> (game-action weld chain bucket attic
> >> (if ((and (have 'bucket) (alter-var
On 18 March 2010 23:40, Dave M wrote:
> ...
>
>> (game-action weld chain bucket attic
>> (if ((and (have 'bucket) (alter-var-root (var *chain-welded*) (fn
> ^
> Your if-condition is nested one form too deeply; try "(if (and (have
> 'bucket) ...) ...)"
>
> I haven't tried it
...
> (game-action weld chain bucket attic
> (if ((and (have 'bucket) (alter-var-root (var *chain-welded*) (fn
^
Your if-condition is nested one form too deeply; try "(if (and (have
'bucket) ...) ...)"
I haven't tried it, so there might be other problems.
-Dave
--
You
On 18 March 2010 22:38, alux wrote:
> Again, from my translation of the http://www.lisperati.com/casting.html
> tutorial.
>
> I completely lost track at the macro generating macro (defspel game-
> action ..
>
> In short, Barski writes a very simple (and neat) text adventure. To
> avoid wrong assum
Again, from my translation of the http://www.lisperati.com/casting.html
tutorial.
I completely lost track at the macro generating macro (defspel game-
action ..
In short, Barski writes a very simple (and neat) text adventure. To
avoid wrong assumtions he doesnt talk about macros but SPELs, using