Re: IllegalArgumentException when running core.async example

2014-07-09 Thread Tobias Kortkamp
In judge try changing

  (let [out async/chan] ...)

to

  (let [out (async/chan)] ...)



On Wednesday, July 9, 2014 5:57:53 AM UTC+2, endbegin wrote:

 Just tried it with Clojure 1.6.0. Still no luck!



-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: IllegalArgumentException when running core.async example

2014-07-09 Thread endbegin
Thanks!! That did it.

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


IllegalArgumentException when running core.async example

2014-07-08 Thread endbegin
Hi

I was trying to teach myself core.async and tried the rock, paper, scissors 
example found here:
http://tech.puredanger.com/2013/07/10/rps-core-async/

See a gist here:
https://gist.github.com/endbegin/b10be6d7a3ba5f6c29db

Really, the main difference is in the :require statement at the top, and 
whenever I use a function from the core.async library, I prepend it with 
async. For instance, async/go or async/! and so on. 

I am using CIDER + Emacs, and Clojure 1.5.1, core.async 
0.1.303.0-886421-alpha. I created a new app with Lein, and when I do a 
CTRL+C+k, the file compiles just fine. 

However, when I try to play the game, I do a
 (def game (init))
 (play game)

and get the error:

IllegalArgumentException No implementation of method: :take! of protocol: 
#'clojure.core.async.impl.protocols/ReadPort found for class: 
clojure.core.async$chan  clojure.core/-cache-protocol-fn 
(core_deftype.clj:541)

*What does this mean?!?*

*P.S.* If I replace the :require at the top with 
(:require [clojure.core.async :refer :all]))

I can't even get it to compile. I get an error about there being a conflict 
between the partition-by in clojure.core and in core.async. 

Thanks for the help!

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: IllegalArgumentException when running core.async example

2014-07-08 Thread endbegin


 Just tried it with Clojure 1.6.0. Still no luck!


-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.