Thanks Norman! Not sure how I didn't realize that was happening, but it's
working exactly as you describe. Thanks much for your help!
Cheers,
Craig
On Sunday, June 30, 2013 2:40:48 PM UTC-5, Norman Richards wrote:
>
> Just like the prolog, you are generating an infinite number of solutions.
>
Hello fellow logicians!
I'm trying to translate the following prolog problem to core.logic:
>From http://tjeyamy.blogspot.com/2011/02/path-finding-in-prolog.html
edge(1,2).
edge(1,4).
edge(2,4).
edge(3,6).
edge(3,7).
edge(4,3).
edge(4,5).
edge(5,6).
edge(5,7).
edge(6,5).
edge(7,5).
edge(8,6).
e
Thanks David!
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, s
I was looking for David Nolen's old blog at posterous where he had posted a
reading list for logic programming, but that blog is no longer available. Does
anyone have that list? Or, David, if you could repost it on your new blog, I'm
sure others would appreciate it too!
Cheers,
Craig
--
--
On Monday, March 11, 2013 6:35:09 AM UTC-5, Marko Topolnik wrote:
>
>
> This kind if formatting hurts readability for people used to the style
> that most Clojure code adopts, which would look something like this:
>
> (defn- make-student [teacher-name student-name age]
> {:id (str teacher-name
Hi Gary,
On Monday, March 11, 2013 6:02:12 AM UTC-5, Gary Verhaegen wrote:
>
> For the sake of nitpicking, you are still using camelCase instead of
> hyphenation in make-student.
>
>
This part?
{:id (str teacher-name "!" student-name)
:TeacherName teacher-name
:StudentName
Alright, thanks Gary and Marko, I really appreciate the advice!
On Sunday, March 10, 2013 8:26:47 AM UTC-5, Marko Topolnik wrote:
>
> Several comments:
>
> 1. camelCase is not idiomatic for Clojure. Prefer lowercase-dashed-style.
>
> 2. use :keywords for map keys and, more generally, for any
> e
Hi all,
I wrote some code to generate some example data for a web ui that I'm
working on and I was wondering if I could get some advice about it to
ensure I'm on the right track in my clojure learning. Basically its a very
simple program that generates a number of JSON files that contain
info
On Friday, April 20, 2012 1:15:11 PM UTC-5, kurtharriger wrote:
>
>
> Game state does not have to be a map, it could be any datastructure
> you want, perhaps a protocol that is implemented by a concrete class
> in another JVM language. However, I avoid encapsulation unless there
> is a compel
Thanks for your input, I appreciate it.
On Friday, April 20, 2012 10:16:51 AM UTC-5, kurtharriger wrote:
>
> And you just need to keep the resulting state, no need to reapply the
> moves.
> Your main method might use a reduce or loop recur.
>
> (loop [game (new-game)]
> (if-not (complete? gam
On Friday, April 20, 2012 9:07:49 AM UTC-5, Walter van der Laan wrote:
>
> You could start with pure functions to handle the game logic, e.g.:
>
> (defn new-game []
> [[\- \- \-]
>[\- \- \-]
>[\- \- \-]])
>
> (defn print-game [game]
> (doseq [row game]
> (println (apply str row)))
forced to fit your logic into a loop of some re-binding that
> > simulates mutation.
> >
> >
> > On Thursday, April 19, 2012 3:21:56 PM UTC-7, Craig Ching wrote:
> >>
> >> Ok, I've read that what I want to do is a no no. But this is the sort
>
Ok, I've read that what I want to do is a no no. But this is the sort of
thing I did in Scheme about 20 years ago (and because of that I'm probably
misremembering ;-)).
Basically I'm learning clojure and thought I'd write a tic tac toe game.
But not any tic tac toe, I want to write one where
13 matches
Mail list logo