Re: Translation from Common Lisp 2

2010-03-19 Thread alux
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 esiot...@gmail.com wrote: On 18 March 2010 23:40, Dave M damncan...@gmail.com wrote: ... (game-action weld chain bucket attic          (if

Re: Translation from Common Lisp 2

2010-03-19 Thread alux
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 alu...@googlemail.com 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

Re: Translation from Common Lisp 2

2010-03-19 Thread JC Petkovich
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) (=

Re: Translation from Common Lisp 2

2010-03-19 Thread alux
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

Re: Translation from Common Lisp 2

2010-03-19 Thread Conrad
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 alu...@googlemail.com wrote: JC Petkovich, thank

Translation from Common Lisp 2

2010-03-18 Thread alux
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

Re: Translation from Common Lisp 2

2010-03-18 Thread Michael Wood
On 18 March 2010 22:38, alux alu...@googlemail.com 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

Re: Translation from Common Lisp 2

2010-03-18 Thread Dave M
... (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

Re: Translation from Common Lisp 2

2010-03-18 Thread Michael Wood
On 18 March 2010 23:40, Dave M damncan...@gmail.com 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