Re: Land of lisp to Clojure

2014-07-12 Thread Cecil Westerhof
2014-07-09 5:11 GMT+02:00 Timothy Baldridge tbaldri...@gmail.com: Prefer vectors over quoted lists '(1 2) vs [1 2]. There's rarely a case (outside of macros) that you want the former. ​I did this mostly. The exception is: (def nodes { :living-room ['(You are in the living-room.)

Re: Land of lisp to Clojure

2014-07-09 Thread Cecil Westerhof
2014-07-09 2:24 GMT+02:00 Bruce Wang br...@brucewang.net: You might want to check out this https://github.com/quux00/land-of-lisp-in-clojure ​I will look into it. But I learn most if I do it myself. ;-)​ -- Cecil Westerhof -- You received this message because you are subscribed

Re: Land of lisp to Clojure

2014-07-09 Thread Cecil Westerhof
it. On Tue, Jul 8, 2014 at 6:24 PM, Bruce Wang br...@brucewang.net wrote: Hi Cecil, You might want to check out this https://github.com/quux00/land-of-lisp-in-clojure Cheers, Bruce On Wed, Jul 9, 2014 at 9:49 AM, Cecil Westerhof cldwester...@gmail.com wrote: I received the book land of lisp

Re: Land of lisp to Clojure

2014-07-09 Thread Cecil Westerhof
2014-07-09 5:30 GMT+02:00 John Mastro john.b.mas...@gmail.com: Cecil Westerhof cldwester...@gmail.com wrote: - The book displays all the lines of a look on separate lines. In my case it is just one long line. Am I doing something wrong? No, you're not doing anything wrong. There's nothing

Re: Land of lisp to Clojure

2014-07-09 Thread Cecil Westerhof
2014-07-09 9:39 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: Or you could use a definition of look more like this, which uses println to print each item on its own line (not sure if you wanted to retain the parens or not, but both are easily doable). (defn look [] (doseq [d

Re: Land of lisp to Clojure

2014-07-09 Thread Cecil Westerhof
2014-07-09 10:38 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: 2014-07-09 9:39 GMT+02:00 Cecil Westerhof cldwester...@gmail.com: Or you could use a definition of look more like this, which uses println to print each item on its own line (not sure if you wanted to retain the parens or

Re: Land of lisp to Clojure

2014-07-09 Thread John Mastro
Cecil Westerhof cldwester...@gmail.com wrote: I read a little about it. And no, I do not use dynamic binding. So I probably should use atoms. Is there a convention how to name atoms? Nope, none that I've come across anyway. Dynamic variables can have very surprising effects if you're not aware

Land of lisp to Clojure

2014-07-08 Thread Cecil Westerhof
I received the book land of lisp as a gift. I am trying to translate it to Clojure. In chapter 5 there is a text game engine. In the attachment my translation. What do you think of it? There are a few problems. - The book displays all the lines of a look on separate lines. In my case it is just

Re: Land of lisp to Clojure

2014-07-08 Thread Bruce Wang
Hi Cecil, You might want to check out this https://github.com/quux00/land-of-lisp-in-clojure Cheers, Bruce On Wed, Jul 9, 2014 at 9:49 AM, Cecil Westerhof cldwester...@gmail.com wrote: I received the book land of lisp as a gift. I am trying to translate it to Clojure. In chapter 5

Re: Land of lisp to Clojure

2014-07-08 Thread Timothy Baldridge
On Tue, Jul 8, 2014 at 6:24 PM, Bruce Wang br...@brucewang.net wrote: Hi Cecil, You might want to check out this https://github.com/quux00/land-of-lisp-in-clojure Cheers, Bruce On Wed, Jul 9, 2014 at 9:49 AM, Cecil Westerhof cldwester...@gmail.com wrote: I received the book land of lisp

Re: Land of lisp to Clojure

2014-07-08 Thread John Mastro
Hi Cecil, Cecil Westerhof cldwester...@gmail.com wrote: - The book displays all the lines of a look on separate lines. In my case it is just one long line. Am I doing something wrong? No, you're not doing anything wrong. There's nothing in that data structure which would inherently cause it to