Gin card game with Datomic
Hi all, I wrote a web app where you can play a card game with Clojure, ClojureScript and Datomic. Background on the design is here: http://thegeez.net/2014/06/12/gin_datomic.html The game is playable here: http://gin.thegeez.net/ The code is on github: https://github.com/thegeez/gin -Gijs -- 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: Clojure:Lisp :: LSD:Meditation
I'm not sure what the problem is here. I've posted personal blog links before that were Clojure related; I sincerely thought that it was potentially useful to the group, and I more or less got responses that supported that. That being the case, I'm having a hard time understanding what is so different about my blog post and Divyansh's; as far as I can tell, this post is relevant to Clojure, even if it's a bit more...exploratory. It has Clojure code examples, it talks about Common Lisp and Python and metaprogramming. It's clearly not random spam. So it seems to me that some folks simply don't like the content; that's fine, but I think it's a stretch to say that it's not appropriate for this list. Or if it is not appropriate, then even relevant blog posts should never be appropriate, and arguably stuff like, say, epic ruminations on the nature of literate programming would arguably be even less appropriate for the list. DD (2014/06/13 11:25), Gary Trakhman wrote: To be fair, I actually read the thing, but I hoped to see more interesting information on LSD, meditation and Clojure than the headline would suggest :-). On Thu, Jun 12, 2014 at 10:01 PM, Atamert Ölçgen mu...@muhuk.com mailto:mu...@muhuk.com wrote: There's also Planet Clojure http://clojure.in/. @Divyansh Josh, Hussein and Gary are not the only ones who think this sort of traffic building is uncool. By traffic building I mean; sending a message with a link that has no valuable information for the group members. They are probably just nodding their head and thinking that sending another response is not necessary. At least that's what I did before I saw your response. 90% of the messages in this group doesn't interest me. That's fine. Valuable information for someone else. But I certainly wouldn't want everybody to post their blogs here regularly. Because each message is a tiny little distraction. I'm willing to pay the price because when a really cool library is announced for example, I get a big reward. Let's keep the benefit/cost ratio, time-wise attention-wise, high. On Thu, Jun 12, 2014 at 10:05 PM, Gary Trakhman gary.trakh...@gmail.com mailto:gary.trakh...@gmail.com wrote: Twitter's a more organic way to do this. Your followers can read it, decide to retweet or not. On Thu, Jun 12, 2014 at 5:37 PM, Divyansh Prakash divyanshprakas...@gmail.com mailto:divyanshprakas...@gmail.com wrote: Sorry if you feel that way. Thought i could share my thoughts and start an interesting discussion. That is what the group is for. You are obviously free to skip anything that doesn't interest you. That was the prime reason for the concise title. I have no intentions of misleading anyone. -- 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 mailto: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 mailto:clojure%2bunsubscr...@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 mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 mailto: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 mailto:clojure%2bunsubscr...@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 mailto:clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Clojure:Lisp :: LSD:Meditation
If i were to be asked, i would restrict the group to: 1. Any type of question that is related to clojure 2. Any type of announcement on clojure core library 3. Any new library/version 4. Any link to a narration on real life usages (e.g how we did xyz with clojure) or benchmarks (generally hard facts ) 5. Any link to new book, tutorial, training materials. This is just my opinion, I dont know the group policy and may be its all up to me to choose what i want to read and what i dont want to and probably keep my feelings to myself ;) Josh On Fri, Jun 13, 2014 at 12:34 PM, Dave Della Costa ddellaco...@gmail.com wrote: I'm not sure what the problem is here. I've posted personal blog links before that were Clojure related; I sincerely thought that it was potentially useful to the group, and I more or less got responses that supported that. That being the case, I'm having a hard time understanding what is so different about my blog post and Divyansh's; as far as I can tell, this post is relevant to Clojure, even if it's a bit more...exploratory. It has Clojure code examples, it talks about Common Lisp and Python and metaprogramming. It's clearly not random spam. So it seems to me that some folks simply don't like the content; that's fine, but I think it's a stretch to say that it's not appropriate for this list. Or if it is not appropriate, then even relevant blog posts should never be appropriate, and arguably stuff like, say, epic ruminations on the nature of literate programming would arguably be even less appropriate for the list. DD (2014/06/13 11:25), Gary Trakhman wrote: To be fair, I actually read the thing, but I hoped to see more interesting information on LSD, meditation and Clojure than the headline would suggest :-). On Thu, Jun 12, 2014 at 10:01 PM, Atamert Ölçgen mu...@muhuk.com mailto:mu...@muhuk.com wrote: There's also Planet Clojure http://clojure.in/. @Divyansh Josh, Hussein and Gary are not the only ones who think this sort of traffic building is uncool. By traffic building I mean; sending a message with a link that has no valuable information for the group members. They are probably just nodding their head and thinking that sending another response is not necessary. At least that's what I did before I saw your response. 90% of the messages in this group doesn't interest me. That's fine. Valuable information for someone else. But I certainly wouldn't want everybody to post their blogs here regularly. Because each message is a tiny little distraction. I'm willing to pay the price because when a really cool library is announced for example, I get a big reward. Let's keep the benefit/cost ratio, time-wise attention-wise, high. On Thu, Jun 12, 2014 at 10:05 PM, Gary Trakhman gary.trakh...@gmail.com mailto:gary.trakh...@gmail.com wrote: Twitter's a more organic way to do this. Your followers can read it, decide to retweet or not. On Thu, Jun 12, 2014 at 5:37 PM, Divyansh Prakash divyanshprakas...@gmail.com mailto:divyanshprakas...@gmail.com wrote: Sorry if you feel that way. Thought i could share my thoughts and start an interesting discussion. That is what the group is for. You are obviously free to skip anything that doesn't interest you. That was the prime reason for the concise title. I have no intentions of misleading anyone. -- 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 mailto: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 mailto:clojure%2bunsubscr...@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 mailto:clojure%2bunsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 mailto:clojure@googlegroups.com Note that posts from new members are
Re: Clojure:Lisp :: LSD:Meditation
On Fri, Jun 13, 2014 at 9:34 AM, Dave Della Costa ddellaco...@gmail.com wrote: So it seems to me that some folks simply don't like the content; It's not because we don't like the content. I didn't even read the content. You haven't made a post and linked to your blog since February, right? (I just searched my local archives) Divyansh has posted 3 links in the last 3 months. I have seen another post by Gijs. He links to his blog. But he's also announcing an open source project. I see no problems with that. I even posted it to hacker news. I'm not a moderator or anything, just simply explaining my point of view - as a member of the group. -- Kind Regards, Atamert Ölçgen -+- --+ +++ www.muhuk.com -- 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: Clojure:Lisp :: LSD:Meditation
Divyansh has posted 3 links in the last 3 months. So? It's not because we don't like the content. I didn't even read the content. I have seen another post by Gijs. He links to his blog. But he's also announcing an open source project. I see no problems with that. I even posted it to hacker news. So, *is* it about the content or not? I'm still not understanding what line Divyansh's post is crossing. (2014/06/13 18:51), Atamert Ölçgen wrote: On Fri, Jun 13, 2014 at 9:34 AM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: So it seems to me that some folks simply don't like the content; It's not because we don't like the content. I didn't even read the content. You haven't made a post and linked to your blog since February, right? (I just searched my local archives) Divyansh has posted 3 links in the last 3 months. I have seen another post by Gijs. He links to his blog. But he's also announcing an open source project. I see no problems with that. I even posted it to hacker news. I'm not a moderator or anything, just simply explaining my point of view - as a member of the group. -- Kind Regards, Atamert Ölçgen -+- --+ +++ www.muhuk.com http://www.muhuk.com -- 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 mailto:clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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: Clojure:Lisp :: LSD:Meditation
You raise a good point, which is that I don't know what the group policy is or where it's posted. I just see this in the header on the google groups page: Welcome to the Clojure mailing list. Please note that posts by new members are moderated to prevent spam. Anyone know better than this? (2014/06/13 18:50), Josh Kamau wrote: If i were to be asked, i would restrict the group to: 1. Any type of question that is related to clojure 2. Any type of announcement on clojure core library 3. Any new library/version 4. Any link to a narration on real life usages (e.g how we did xyz with clojure) or benchmarks (generally hard facts ) 5. Any link to new book, tutorial, training materials. This is just my opinion, I dont know the group policy and may be its all up to me to choose what i want to read and what i dont want to and probably keep my feelings to myself ;) Josh On Fri, Jun 13, 2014 at 12:34 PM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: I'm not sure what the problem is here. I've posted personal blog links before that were Clojure related; I sincerely thought that it was potentially useful to the group, and I more or less got responses that supported that. That being the case, I'm having a hard time understanding what is so different about my blog post and Divyansh's; as far as I can tell, this post is relevant to Clojure, even if it's a bit more...exploratory. It has Clojure code examples, it talks about Common Lisp and Python and metaprogramming. It's clearly not random spam. So it seems to me that some folks simply don't like the content; that's fine, but I think it's a stretch to say that it's not appropriate for this list. Or if it is not appropriate, then even relevant blog posts should never be appropriate, and arguably stuff like, say, epic ruminations on the nature of literate programming would arguably be even less appropriate for the list. DD (2014/06/13 11:25), Gary Trakhman wrote: To be fair, I actually read the thing, but I hoped to see more interesting information on LSD, meditation and Clojure than the headline would suggest :-). On Thu, Jun 12, 2014 at 10:01 PM, Atamert Ölçgen mu...@muhuk.com mailto:mu...@muhuk.com mailto:mu...@muhuk.com mailto:mu...@muhuk.com wrote: There's also Planet Clojure http://clojure.in/. @Divyansh Josh, Hussein and Gary are not the only ones who think this sort of traffic building is uncool. By traffic building I mean; sending a message with a link that has no valuable information for the group members. They are probably just nodding their head and thinking that sending another response is not necessary. At least that's what I did before I saw your response. 90% of the messages in this group doesn't interest me. That's fine. Valuable information for someone else. But I certainly wouldn't want everybody to post their blogs here regularly. Because each message is a tiny little distraction. I'm willing to pay the price because when a really cool library is announced for example, I get a big reward. Let's keep the benefit/cost ratio, time-wise attention-wise, high. On Thu, Jun 12, 2014 at 10:05 PM, Gary Trakhman gary.trakh...@gmail.com mailto:gary.trakh...@gmail.com mailto:gary.trakh...@gmail.com mailto:gary.trakh...@gmail.com wrote: Twitter's a more organic way to do this. Your followers can read it, decide to retweet or not. On Thu, Jun 12, 2014 at 5:37 PM, Divyansh Prakash divyanshprakas...@gmail.com mailto:divyanshprakas...@gmail.com mailto:divyanshprakas...@gmail.com mailto:divyanshprakas...@gmail.com wrote: Sorry if you feel that way. Thought i could share my thoughts and start an interesting discussion. That is what the group is for. You are obviously free to skip anything that doesn't interest you. That was the prime reason for the concise title. I have no intentions of misleading anyone. -- 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 mailto:clojure@googlegroups.com mailto:clojure@googlegroups.com mailto:clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post.
Re: Clojure:Lisp :: LSD:Meditation
On Fri, Jun 13, 2014 at 10:03 AM, Dave Della Costa ddellaco...@gmail.com wrote: Divyansh has posted 3 links in the last 3 months. So? It's not because we don't like the content. I didn't even read the content. I have seen another post by Gijs. He links to his blog. But he's also announcing an open source project. I see no problems with that. I even posted it to hacker news. So, *is* it about the content or not? I'm still not understanding what line Divyansh's post is crossing. It's not the content in his website, it's the content posted to the mailing list. To further expand on this; I didn't participate in the literate programming thread, but I think it belongs here. The kind of post we're discussing here is a purely promotional kind. Please scroll and read the OP again. (2014/06/13 18:51), Atamert Ölçgen wrote: On Fri, Jun 13, 2014 at 9:34 AM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: So it seems to me that some folks simply don't like the content; It's not because we don't like the content. I didn't even read the content. You haven't made a post and linked to your blog since February, right? (I just searched my local archives) Divyansh has posted 3 links in the last 3 months. I have seen another post by Gijs. He links to his blog. But he's also announcing an open source project. I see no problems with that. I even posted it to hacker news. I'm not a moderator or anything, just simply explaining my point of view - as a member of the group. -- Kind Regards, Atamert Ölçgen -+- --+ +++ www.muhuk.com http://www.muhuk.com -- 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 mailto:clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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. -- Kind Regards, Atamert Ölçgen -+- --+ +++ www.muhuk.com -- 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: Clojure:Lisp :: LSD:Meditation
I found this post from 2011 which probably is still relevant: https://groups.google.com/d/msg/clojure/t0pGIuoyB7I/RQtuuAOhes8J On Friday, June 13, 2014 1:05:47 PM UTC+3, David Della Costa wrote: You raise a good point, which is that I don't know what the group policy is or where it's posted. I just see this in the header on the google groups page: Welcome to the Clojure mailing list. Please note that posts by new members are moderated to prevent spam. Anyone know better than this? (2014/06/13 18:50), Josh Kamau wrote: If i were to be asked, i would restrict the group to: 1. Any type of question that is related to clojure 2. Any type of announcement on clojure core library 3. Any new library/version 4. Any link to a narration on real life usages (e.g how we did xyz with clojure) or benchmarks (generally hard facts ) 5. Any link to new book, tutorial, training materials. This is just my opinion, I dont know the group policy and may be its all up to me to choose what i want to read and what i dont want to and probably keep my feelings to myself ;) Josh On Fri, Jun 13, 2014 at 12:34 PM, Dave Della Costa ddell...@gmail.com javascript: mailto:ddell...@gmail.com javascript: wrote: I'm not sure what the problem is here. I've posted personal blog links before that were Clojure related; I sincerely thought that it was potentially useful to the group, and I more or less got responses that supported that. That being the case, I'm having a hard time understanding what is so different about my blog post and Divyansh's; as far as I can tell, this post is relevant to Clojure, even if it's a bit more...exploratory. It has Clojure code examples, it talks about Common Lisp and Python and metaprogramming. It's clearly not random spam. So it seems to me that some folks simply don't like the content; that's fine, but I think it's a stretch to say that it's not appropriate for this list. Or if it is not appropriate, then even relevant blog posts should never be appropriate, and arguably stuff like, say, epic ruminations on the nature of literate programming would arguably be even less appropriate for the list. DD (2014/06/13 11:25), Gary Trakhman wrote: To be fair, I actually read the thing, but I hoped to see more interesting information on LSD, meditation and Clojure than the headline would suggest :-). On Thu, Jun 12, 2014 at 10:01 PM, Atamert Ölçgen mu...@muhuk.com javascript: mailto:mu...@muhuk.com javascript: mailto:mu...@muhuk.com javascript: mailto:mu...@muhuk.com javascript: wrote: There's also Planet Clojure http://clojure.in/. @Divyansh Josh, Hussein and Gary are not the only ones who think this sort of traffic building is uncool. By traffic building I mean; sending a message with a link that has no valuable information for the group members. They are probably just nodding their head and thinking that sending another response is not necessary. At least that's what I did before I saw your response. 90% of the messages in this group doesn't interest me. That's fine. Valuable information for someone else. But I certainly wouldn't want everybody to post their blogs here regularly. Because each message is a tiny little distraction. I'm willing to pay the price because when a really cool library is announced for example, I get a big reward. Let's keep the benefit/cost ratio, time-wise attention-wise, high. On Thu, Jun 12, 2014 at 10:05 PM, Gary Trakhman gary.t...@gmail.com javascript: mailto:gary.t...@gmail.com javascript: mailto:gary.t...@gmail.com javascript: mailto: gary.t...@gmail.com javascript: wrote: Twitter's a more organic way to do this. Your followers can read it, decide to retweet or not. On Thu, Jun 12, 2014 at 5:37 PM, Divyansh Prakash divyansh...@gmail.com javascript: mailto:divyansh...@gmail.com javascript: mailto:divyansh...@gmail.com javascript: mailto:divyansh...@gmail.com javascript: wrote: Sorry if you feel that way. Thought i could share my thoughts and start an interesting discussion. That is what the group is for. You are obviously free to skip anything that doesn't interest you. That was the prime reason for the concise title. I
Re: Clojure:Lisp :: LSD:Meditation
On Jun 13, 2014, at 6:58 AM, Jonas jonas.enl...@gmail.com wrote: I found this post from 2011 which probably is still relevant: https://groups.google.com/d/msg/clojure/t0pGIuoyB7I/RQtuuAOhes8J And just for fun, from that thread... Rich Hickey wrote: There will be times, yes, when the most considerate thing will be to write opinions in a blog post, perhaps putting only a pointer here and following up on the blog. On Friday, June 13, 2014 1:05:47 PM UTC+3, David Della Costa wrote: You raise a good point, which is that I don't know what the group policy is or where it's posted. I just see this in the header on the google groups page: Welcome to the Clojure mailing list. Please note that posts by new members are moderated to prevent spam. Anyone know better than this? (2014/06/13 18:50), Josh Kamau wrote: If i were to be asked, i would restrict the group to: 1. Any type of question that is related to clojure 2. Any type of announcement on clojure core library 3. Any new library/version 4. Any link to a narration on real life usages (e.g how we did xyz with clojure) or benchmarks (generally hard facts ) 5. Any link to new book, tutorial, training materials. This is just my opinion, I dont know the group policy and may be its all up to me to choose what i want to read and what i dont want to and probably keep my feelings to myself ;) Josh On Fri, Jun 13, 2014 at 12:34 PM, Dave Della Costa ddell...@gmail.com mailto:ddell...@gmail.com wrote: I'm not sure what the problem is here. I've posted personal blog links before that were Clojure related; I sincerely thought that it was potentially useful to the group, and I more or less got responses that supported that. That being the case, I'm having a hard time understanding what is so different about my blog post and Divyansh's; as far as I can tell, this post is relevant to Clojure, even if it's a bit more...exploratory. It has Clojure code examples, it talks about Common Lisp and Python and metaprogramming. It's clearly not random spam. So it seems to me that some folks simply don't like the content; that's fine, but I think it's a stretch to say that it's not appropriate for this list. Or if it is not appropriate, then even relevant blog posts should never be appropriate, and arguably stuff like, say, epic ruminations on the nature of literate programming would arguably be even less appropriate for the list. DD (2014/06/13 11:25), Gary Trakhman wrote: To be fair, I actually read the thing, but I hoped to see more interesting information on LSD, meditation and Clojure than the headline would suggest :-). On Thu, Jun 12, 2014 at 10:01 PM, Atamert Ölçgen mu...@muhuk.com mailto:mu...@muhuk.com mailto:mu...@muhuk.com mailto:mu...@muhuk.com wrote: There's also Planet Clojure http://clojure.in/. @Divyansh Josh, Hussein and Gary are not the only ones who think this sort of traffic building is uncool. By traffic building I mean; sending a message with a link that has no valuable information for the group members. They are probably just nodding their head and thinking that sending another response is not necessary. At least that's what I did before I saw your response. 90% of the messages in this group doesn't interest me. That's fine. Valuable information for someone else. But I certainly wouldn't want everybody to post their blogs here regularly. Because each message is a tiny little distraction. I'm willing to pay the price because when a really cool library is announced for example, I get a big reward. Let's keep the benefit/cost ratio, time-wise attention-wise, high. On Thu, Jun 12, 2014 at 10:05 PM, Gary Trakhman gary.t...@gmail.com mailto:gary.t...@gmail.com mailto:gary.t...@gmail.com mailto:gary.t...@gmail.com wrote: Twitter's a more organic way to do this. Your followers can read it, decide to retweet or not. On Thu, Jun 12, 2014 at 5:37 PM, Divyansh Prakash divyansh...@gmail.com mailto:divyansh...@gmail.com mailto:divyansh...@gmail.com mailto:divyansh...@gmail.com wrote: Sorry if you feel that way. Thought i could share my thoughts and start an interesting discussion. That is what the group is for. You are obviously free to skip anything that doesn't
[ANN] Version 4.3.1 of Rete for Frames Rule Engine (CLIPS-like Expert System Shell)
Hello all, What's new: - Java interface moved to separate namespace; - reworked fact memory implementation. Simplified and more Clojure-like code. As a result is a little loss of performance (hope, gain in reliability); - fixed bug in Waltz example. Reference: https://github.com/rururu/rete4frames Sincerely, Ru -- 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: Instaparse - thank you!
I'd like to join the thank-you chorus -- Instaparse rocks, period. I'm using it to integrate my concordancing utility, Smyrna [1] with a POS-tagging engine for Polish originally written in C++; specifically, to parse the rules generated by the latter. I've given a talk on it this year at LambdaDays [2]. [1]: https://github.com/nathell/smyrna/ [2]: http://danieljanus.pl/lambdadays-2014 http://danieljanus.pl/lambdadays-2014/#// -- 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: core.logic API confusion
On Mon, Jun 9, 2014 at 2:11 AM, JD jesus.diama...@gmail.com wrote: When I try to use core.logic's fact function I am getting a symbol not found error. What is the idiomatic way to do something like: (logic/fact Orbits :mercury :sun) Orbits here was previously bound in a defrel, which I ended up replacing with pldb/db-rel. (ns logic.orbit (:refer-clojure :exclude [==]) (:use [clojure.core.logic]) (:require [clojure.core.logic.pldb :as pldb])) (pldb/db-rel orbits satellite body) (def orbit-facts (pldb/db-facts pldb/empty-db [orbits :mercury :sun] [orbits :venus :sun] [orbits :earth :sun] [orbits :mars :sun] [orbits :moon :earth] [orbits :phobos :mars] [orbits :deimos :mars])) (pldb/with-db orbit-facts (run* [moon] (fresh [planet] (orbits moon planet) (orbits planet :sun -- 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: raspberry pi and clojure
Hi Atamert, Thanks for your response. I get the looping message and then it just sits there. This is what I see in my console: pi@raspberrypi /opt/pi4j/examples $ runclojure clojure/examples.clj Start running blinkio hello looping Then it just sits there. After a certain amount of time, it ends and returns back to the prompt. I am running clojure 1.6.0 On Friday, June 13, 2014 12:33:24 AM UTC-4, Andre Perez wrote: Hi everyone, I just started trying to play with a raspberry pi for a variety of reasons, and given that java runs on it, I decided to use this as an opportunity to learn clojure. I'm playing with a blinkIo example which looks like this: public class BlinkGpioExample { public static void main(String[] args) throws InterruptedException { System.out.println(--Pi4J-- GPIO Blink Example ... started.); // create gpio controller final GpioController gpio = GpioFactory.getInstance(); // provision gpio pin #01 #03 as an output pins and blink final GpioPinDigitalOutput resevoirPumpLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_01); final GpioPinDigitalOutput troughFillLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_03); // provision gpio pin #02 as an input pin with its internal pull down // resistor enabled final GpioPinDigitalInput resevoirSwitch = gpio.provisionDigitalInputPin( RaspiPin.GPIO_14, Resevoir Switch, PinPullResistance.PULL_DOWN); final GpioPinDigitalInput trougSwitch = gpio.provisionDigitalInputPin( RaspiPin.GPIO_13, Trough Switch, PinPullResistance.PULL_DOWN); resevoirSwitch.setShutdownOptions(true); // create and register gpio pin listener resevoirSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { // when button is pressed, speed up the blink rate on LED #2 if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { resevoirPumpLine.blink(1000); } } }); trougSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { //stick value into a flat file or in mem database; troughFillLine.blink(1000); } } }); System.out .println( ... the LED will continue blinking until the program is terminated.); System.out.println( ... PRESS CTRL-C TO STOP THE PROGRAM.); // keep program running until user aborts (CTRL-C) for (;;) { Thread.sleep(500); } } } Since I am quite new to clojure, i attempted to do a straight port to clojure (as opposed to writing the blinkio in a more functional manner) and came up with : (def factory (GpioFactory/getInstance) ) (def pumpOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_01)) (def troughOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_03)) (def pumpInput (.provisionDigitalInputPin factory RaspiPin/GPIO_13 troughSwitch PinPullResistance/PULL_DOWN)) (def resevoirInput (.provisionDigitalInputPin factory RaspiPin/GPIO_14 resevoirSwitch PinPullResistance/PULL_DOWN)) (def resevoirListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital ( handleGpioPinDigitalStateChangeEvent [this event] (printf resevoir here) ))) (.addListener resevoirInput [ ^com.pi4j.io.gpio.event.GpioPinListenerDigital resevoirListener] ) (def troughListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital ( handleGpioPinDigitalStateChangeEvent [this event] (printf trough here))) ) (.addListener resevoirInput [ ^com.pi4j.io.gpio.event.GpioPinListenerDigital troughListener] ) (defn infinite[f seconds](future (loop [] (f) ( Thread/sleep (* seconds 1000)) (recur (infinite (printf \nlooping) 10) ** My question: This compiles, and runs, but doesn't actually do anything when I manipulate the PI io. I am thinking I have to do something regarding defining my inputIOs as atoms, but I'm still trying to get my head wrapped around that concept. Could someone please point me in the right direction to get my (printf trough /resevoir here) messages to display? Mind you that there isn't a problem with any of the wiring on the PI, it is verified in the java version of this program. I am just having trouble porting this code. Thanks for any help! Andre -- 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
Clojure and Maven
Hey guys, New to Maven and need to convert my leiningen project to Maven to integrate with TeamCity. I can run: mvn clean install and it builds the .jar file. However, when I try to run the jar file: java -jar target/my-app-jar-with-dependencies.jar I get the error: Error: Could not find or load main class my-namespace.core My namespace definition looks like: (ns my-namespace.core (:gen-class)) My pom.xml looks like: build plugins plugin groupIdcom.theoryinpractise/groupId artifactIdclojure-maven-plugin/artifactId version1.3.20/version configuration scriptsrc/my-namespace/run.clj/script testscripttest/my-namespace/run_test.clj/testscript /configuration /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.4/version configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalsingle/goal /goals /execution /executions configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive descriptorRefs descriptorRefjar-with-dependencies/descriptorRef /descriptorRefs /configuration /plugin /plugins /build What am I doing wrong? Thanks! -- 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: raspberry pi and clojure
Can you fix the two issues I've pointed out and post the code somewhere with highlighting (a gist maybe)? Maybe I can't see the real issue and someone else more experienced than me can provide the answer. They may not bother reading it if it's not properly formatted and highlighted. On Fri, Jun 13, 2014 at 3:30 PM, Andre Perez andreope...@gmail.com wrote: Hi Atamert, Thanks for your response. I get the looping message and then it just sits there. This is what I see in my console: pi@raspberrypi /opt/pi4j/examples $ runclojure clojure/examples.clj Start running blinkio hello looping Then it just sits there. After a certain amount of time, it ends and returns back to the prompt. I am running clojure 1.6.0 On Friday, June 13, 2014 12:33:24 AM UTC-4, Andre Perez wrote: Hi everyone, I just started trying to play with a raspberry pi for a variety of reasons, and given that java runs on it, I decided to use this as an opportunity to learn clojure. I'm playing with a blinkIo example which looks like this: public class BlinkGpioExample { public static void main(String[] args) throws InterruptedException { System.out.println(--Pi4J-- GPIO Blink Example ... started.); // create gpio controller final GpioController gpio = GpioFactory.getInstance(); // provision gpio pin #01 #03 as an output pins and blink final GpioPinDigitalOutput resevoirPumpLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_01); final GpioPinDigitalOutput troughFillLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_03); // provision gpio pin #02 as an input pin with its internal pull down // resistor enabled final GpioPinDigitalInput resevoirSwitch = gpio .provisionDigitalInputPin( RaspiPin.GPIO_14, Resevoir Switch, PinPullResistance.PULL_DOWN); final GpioPinDigitalInput trougSwitch = gpio.provisionDigitalInputPin( RaspiPin.GPIO_13, Trough Switch, PinPullResistance.PULL_DOWN); resevoirSwitch.setShutdownOptions(true); // create and register gpio pin listener resevoirSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { // when button is pressed, speed up the blink rate on LED #2 if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { resevoirPumpLine.blink(1000); } } }); trougSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { //stick value into a flat file or in mem database; troughFillLine.blink(1000); } } }); System.out .println( ... the LED will continue blinking until the program is terminated.); System.out.println( ... PRESS CTRL-C TO STOP THE PROGRAM.); // keep program running until user aborts (CTRL-C) for (;;) { Thread.sleep(500); } } } Since I am quite new to clojure, i attempted to do a straight port to clojure (as opposed to writing the blinkio in a more functional manner) and came up with : (def factory (GpioFactory/getInstance) ) (def pumpOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_01)) (def troughOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_03)) (def pumpInput (.provisionDigitalInputPin factory RaspiPin/GPIO_13 troughSwitch PinPullResistance/PULL_DOWN)) (def resevoirInput (.provisionDigitalInputPin factory RaspiPin/GPIO_14 resevoirSwitch PinPullResistance/PULL_DOWN)) (def resevoirListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital (handleGpioPinDigitalStateChangeEvent [this event] (printf resevoir here (.addListener resevoirInput [^com.pi4j.io.gpio.event. GpioPinListenerDigital resevoirListener] ) (def troughListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital (handleGpioPinDigitalStateChangeEvent [this event] (printf trough here) ))) (.addListener resevoirInput [^com.pi4j.io.gpio.event. GpioPinListenerDigital troughListener] ) (defn infinite[f seconds](future (loop [] (f) ( Thread/sleep (* seconds 1000)) (recur (infinite (printf \nlooping) 10) ** My question: This compiles, and runs, but doesn't actually do anything when I manipulate the PI io. I am thinking I have to do something regarding defining my inputIOs as atoms, but I'm still trying to get my head wrapped around that concept. Could someone please point me in the right direction to get my (printf trough /resevoir here) messages to display? Mind you that there isn't a problem with any of the wiring on the PI, it is verified in the java version of this program. I am just having trouble porting this code. Thanks for any help! Andre -- You received this message because you
Re: Clojure and Maven
Not sure if this would help; but there's a `lein pom` command. I've just run it on a project and it seems to produce a somewhat different pom. On Fri, Jun 13, 2014 at 3:34 PM, Mark Watson mkw5...@gmail.com wrote: Hey guys, New to Maven and need to convert my leiningen project to Maven to integrate with TeamCity. I can run: mvn clean install and it builds the .jar file. However, when I try to run the jar file: java -jar target/my-app-jar-with-dependencies.jar I get the error: Error: Could not find or load main class my-namespace.core My namespace definition looks like: (ns my-namespace.core (:gen-class)) My pom.xml looks like: build plugins plugin groupIdcom.theoryinpractise/groupId artifactIdclojure-maven-plugin/artifactId version1.3.20/version configuration scriptsrc/my-namespace/run.clj/script testscripttest/my-namespace/run_test.clj/testscript /configuration /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.4/version configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalsingle/goal /goals /execution /executions configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive descriptorRefs descriptorRefjar-with-dependencies/descriptorRef /descriptorRefs /configuration /plugin /plugins /build What am I doing wrong? Thanks! -- 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. -- Kind Regards, Atamert Ölçgen -+- --+ +++ www.muhuk.com -- 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: Clojure and Maven
Oh, and I have a function: (defn -main []...) In my-namespace.core -- 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: raspberry pi and clojure
I've also done this in place of the infinite call : (while true (Thread/sleep (* 10 1000))) In this case, it sits there, as it should, but I'm not seeing the events kick off still. This is more along the lines of the for (;;) { Thread.sleep(500)} java code. Should this have still technically worked regarding registering the gpio listeners? I dont know if the non mutability of my gpio inputs plays a role in what is going down behind the scenes or if I need to have state managed for it. At the end of the day, it is just supposed to receive an event and then acts on it. There isn't really state to be managed that I am seeing. I'm just printing a message. Thanks! On Friday, June 13, 2014 12:33:24 AM UTC-4, Andre Perez wrote: Hi everyone, I just started trying to play with a raspberry pi for a variety of reasons, and given that java runs on it, I decided to use this as an opportunity to learn clojure. I'm playing with a blinkIo example which looks like this: public class BlinkGpioExample { public static void main(String[] args) throws InterruptedException { System.out.println(--Pi4J-- GPIO Blink Example ... started.); // create gpio controller final GpioController gpio = GpioFactory.getInstance(); // provision gpio pin #01 #03 as an output pins and blink final GpioPinDigitalOutput resevoirPumpLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_01); final GpioPinDigitalOutput troughFillLine = gpio .provisionDigitalOutputPin(RaspiPin.GPIO_03); // provision gpio pin #02 as an input pin with its internal pull down // resistor enabled final GpioPinDigitalInput resevoirSwitch = gpio.provisionDigitalInputPin( RaspiPin.GPIO_14, Resevoir Switch, PinPullResistance.PULL_DOWN); final GpioPinDigitalInput trougSwitch = gpio.provisionDigitalInputPin( RaspiPin.GPIO_13, Trough Switch, PinPullResistance.PULL_DOWN); resevoirSwitch.setShutdownOptions(true); // create and register gpio pin listener resevoirSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { // when button is pressed, speed up the blink rate on LED #2 if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { resevoirPumpLine.blink(1000); } } }); trougSwitch.addListener(new GpioPinListenerDigital() { @Override public void handleGpioPinDigitalStateChangeEvent( GpioPinDigitalStateChangeEvent event) { if (event.getState().isHigh()) { System.out.println(event.getPin().getName() + do nothing); } else { //stick value into a flat file or in mem database; troughFillLine.blink(1000); } } }); System.out .println( ... the LED will continue blinking until the program is terminated.); System.out.println( ... PRESS CTRL-C TO STOP THE PROGRAM.); // keep program running until user aborts (CTRL-C) for (;;) { Thread.sleep(500); } } } Since I am quite new to clojure, i attempted to do a straight port to clojure (as opposed to writing the blinkio in a more functional manner) and came up with : (def factory (GpioFactory/getInstance) ) (def pumpOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_01)) (def troughOutput (.provisionDigitalOutputPin factory RaspiPin/GPIO_03)) (def pumpInput (.provisionDigitalInputPin factory RaspiPin/GPIO_13 troughSwitch PinPullResistance/PULL_DOWN)) (def resevoirInput (.provisionDigitalInputPin factory RaspiPin/GPIO_14 resevoirSwitch PinPullResistance/PULL_DOWN)) (def resevoirListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital ( handleGpioPinDigitalStateChangeEvent [this event] (printf resevoir here) ))) (.addListener resevoirInput [ ^com.pi4j.io.gpio.event.GpioPinListenerDigital resevoirListener] ) (def troughListener (reify com.pi4j.io.gpio.event.GpioPinListenerDigital ( handleGpioPinDigitalStateChangeEvent [this event] (printf trough here))) ) (.addListener resevoirInput [ ^com.pi4j.io.gpio.event.GpioPinListenerDigital troughListener] ) (defn infinite[f seconds](future (loop [] (f) ( Thread/sleep (* seconds 1000)) (recur (infinite (printf \nlooping) 10) ** My question: This compiles, and runs, but doesn't actually do anything when I manipulate the PI io. I am thinking I have to do something regarding defining my inputIOs as atoms, but I'm still trying to get my head wrapped around that concept. Could someone please point me in the right direction to get my (printf trough /resevoir here) messages to display? Mind you that there isn't a problem with any of the wiring on the PI, it is verified in the java version of this program. I am just having trouble porting this code. Thanks for any help! Andre -- You received this message because you are subscribed to the
Re: Clojure and Maven
Not sure if this is the only thing to change, but : mainClassmy-namespace.core/mainClass should be: mainClassmy_namespace.core/mainClass While Clojure uses -'s in namespace names, they are always _'s in the output package/class names. On Friday, June 13, 2014 10:34:54 AM UTC-5, Mark Watson wrote: Hey guys, New to Maven and need to convert my leiningen project to Maven to integrate with TeamCity. I can run: mvn clean install and it builds the .jar file. However, when I try to run the jar file: java -jar target/my-app-jar-with-dependencies.jar I get the error: Error: Could not find or load main class my-namespace.core My namespace definition looks like: (ns my-namespace.core (:gen-class)) My pom.xml looks like: build plugins plugin groupIdcom.theoryinpractise/groupId artifactIdclojure-maven-plugin/artifactId version1.3.20/version configuration scriptsrc/my-namespace/run.clj/script testscripttest/my-namespace/run_test.clj/testscript /configuration /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.4/version configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalsingle/goal /goals /execution /executions configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive descriptorRefs descriptorRefjar-with-dependencies/descriptorRef /descriptorRefs /configuration /plugin /plugins /build What am I doing wrong? Thanks! -- 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: Gin card game with Datomic
Cool! On Fri, Jun 13, 2014 at 12:49 AM, Gijs S. gijsstuur...@gmail.com wrote: Hi all, I wrote a web app where you can play a card game with Clojure, ClojureScript and Datomic. Background on the design is here: http://thegeez.net/2014/06/12/gin_datomic.html The game is playable here: http://gin.thegeez.net/ The code is on github: https://github.com/thegeez/gin -Gijs -- 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. -- 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: Clojure and Maven
Ah, forgot about that. Still having the same issue with that resolved unfortunately. On Friday, June 13, 2014 12:08:00 PM UTC-4, Alex Miller wrote: Not sure if this is the only thing to change, but : mainClassmy-namespace.core/mainClass should be: mainClassmy_namespace.core/mainClass While Clojure uses -'s in namespace names, they are always _'s in the output package/class names. On Friday, June 13, 2014 10:34:54 AM UTC-5, Mark Watson wrote: Hey guys, New to Maven and need to convert my leiningen project to Maven to integrate with TeamCity. I can run: mvn clean install and it builds the .jar file. However, when I try to run the jar file: java -jar target/my-app-jar-with-dependencies.jar I get the error: Error: Could not find or load main class my-namespace.core My namespace definition looks like: (ns my-namespace.core (:gen-class)) My pom.xml looks like: build plugins plugin groupIdcom.theoryinpractise/groupId artifactIdclojure-maven-plugin/artifactId version1.3.20/version configuration scriptsrc/my-namespace/run.clj/script testscripttest/my-namespace/run_test.clj/testscript /configuration /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.4/version configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalsingle/goal /goals /execution /executions configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive descriptorRefs descriptorRefjar-with-dependencies/descriptorRef /descriptorRefs /configuration /plugin /plugins /build What am I doing wrong? Thanks! -- 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: Clojure and Maven
Ah, forgot about that. Still having the same issue with that resolved unfortunately. -- 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.
[ANN] Loom 0.5.0 released
Hi everyone, I've released version 0.5.0 of Loom https://github.com/aysylu/loom, graph algorithms and visualization library: https://clojars.org/aysylu/loom/versions/0.5.0 What's new: - Multigraphs support (Mark Engelberg) - DAG ancestry (Aaron Brooks) - Prim's MST (Guru Devanla) - A* (Guru Devanla) - multi path bidirectional BFS (Josh Davey) - perf improvements (Guru Devanla) + cleanup (Kevin Downey, Sung Pae, Jony Epsilon) Thanks for all the contributions! Cheers, Aysylu @aysylu22 -- 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.
Clojure Full Time or Contract to Hire Job - REMOTE
I am reaching out to this group with a new full time or contract to hire job opening I have with my direct client in MA. They are looking for a strong Clojure Developer. I have included the project description below. If you are interested please feel free to shoot me an email at luke.hart...@randstadusa.com. This position is critical to developing the ecommerce platform for engagement with suppliers and vendors. This individual will lead a team of technical resources in the design, development, deployment and support of the new platform. This resource will work with a cross organizational, cross geographic team and external partner to develop the strategy, vision and design of the platform of the future. The individual will be a self-starter proficient in web technologies and able to set the architecture with a team of resources. 1. Develop understanding of vendor products supporting the area. 2. Facilitate working sessions with team, steering, and stakeholders group to ensure solution mapping 3. Assess technical fit of packaged solutions 4. Work with the solutions architect to detail the solution requirements. 5. Develop overview of interface requirements 6. Collaborate with Infrastructure team to define hardware solution and upgrade requirements 7. Work with team to design technical solutions which can scale and minimize support needs. 8. Translate requirements into specifications 9. Design the technical architecture for visual merchandising business functions, performance criteria, business service level of agreements, information security and disaster recovery plans. 10. Review detailed designs produced by vendor and others. Lead architectural reviews for interfaces. 11. Ensure overall quality and adherence to standards for vendor and team deliverables. Requirements: 1. Bachelors Degree in a technical discipline. Masters preferred. 2. Strong communication and leadership skills demonstrated with both technical and non-technical personnel. 3. A proven track record of success in developing and managing large-scale, complex software applications 4. A strong background with software development lifecycles 5. Strong team leadership abilities with excellent technical and inter-personal skills. 6. Multi-task and have a collaborative work style with strong desire to work in dynamic, fast paced environment that requires flexibility and ability to manage multiple priorities. 7. Experience designing applications using a SOA approach. 8. Expertise in design and integration of multi-tier application 9. Ecommerce experience is preferred including vendor and product management 10. Experience with master data is preferred 11. 2+ years of prior experience and knowledge with web technologies such as HTML5, Java script, CSS, AJA 12. Web UI Development experience 13. Java and/or C++ Engineer with exceptional software system design patterns experience 14. Strong drive in ensuring code quality a big plus 15. Experience in agile development methodologies preferred 1. Expertise in web techniques 2. Thorough understanding and experience of Java/J2EE 3. Preferred experience / exposure with Clojure 4. Demonstrated ability in working with cross-platform team to ensure legacy feeds (Java, MS,and AS400) 5. Strong customer interaction, organizational and time-management skills. 6. Experience with Retail industry is strongly preferred. -- 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: Clojure and Maven
There are no .class files in my jar I assume some file-path is messed up, I just can't figure out where. -- 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.
[ANN] Quil 2.1.0 released
Friday the 13th and a full moon is ideal time for a release! Happy to announce release of Quil 2.1.0. It is available on clojars: https://clojars.org/quil Here is the list of changes: - Middleware https://github.com/quil/quil/wiki/Middleware support. - Functional mode https://github.com/quil/quil/wiki/Functional-mode-%28fun-mode%29 support. - Updated to Processing 2.2.1. - New methods: resize http://quil.info/image.html#resize and state-atom http://quil.info/state.html#state-atom. - :no-safe-draw feature renamed to :no-safe-fns. - Fixed NPE when exiting :p2d sketch using esc key. #110 https://github.com/quil/quil/issues/110. - Wrap all user-provided function to safe wrappers. #106 https://github.com/quil/quil/issues/106. Most interesting changes are middleware https://github.com/quil/quil/wiki/Middleware and functional mode https://github.com/quil/quil/wiki/Functional-mode-%28fun-mode%29. Take a look at them. Thanks Maksim Karandashov for contributing and help with release testing. Future plans: - Quil on ClojureScript - GSoC project which Maksim is working on. - More cool middleware. There some ideas on middleware wiki page, feel free to grab and implement them. Would be happy to get more ideas/implementations. - Work on http://quil.info to make it more than simple API site. Your feedback is welcome. Happy hacking! Nikita Beloglazov -- 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: Clojure and Maven
Hi mark, I am curious about why you need to convert. I am thinking of using TC again myself soon. Currently in hudson I just do lein commands and use lein test-out plugin so the test reports can be shown as they would do from junit tests. you could do the same with TC or failing that have a first build step that does lein pom and then the main build step uses the output of that? or are there other particular advantages of maven on TC? or some feature lein pom does not handle that you need? Thanks, Henry On Friday, June 13, 2014 4:34:54 PM UTC+1, Mark Watson wrote: Hey guys, New to Maven and need to convert my leiningen project to Maven to integrate with TeamCity. I can run: mvn clean install and it builds the .jar file. However, when I try to run the jar file: java -jar target/my-app-jar-with-dependencies.jar I get the error: Error: Could not find or load main class my-namespace.core My namespace definition looks like: (ns my-namespace.core (:gen-class)) My pom.xml looks like: build plugins plugin groupIdcom.theoryinpractise/groupId artifactIdclojure-maven-plugin/artifactId version1.3.20/version configuration scriptsrc/my-namespace/run.clj/script testscripttest/my-namespace/run_test.clj/testscript /configuration /plugin plugin artifactIdmaven-jar-plugin/artifactId version2.4/version configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive /configuration /plugin plugin artifactIdmaven-assembly-plugin/artifactId executions execution phasepackage/phase goals goalsingle/goal /goals /execution /executions configuration archive manifest mainClassmy-namespace.core/mainClass /manifest /archive descriptorRefs descriptorRefjar-with-dependencies/descriptorRef /descriptorRefs /configuration /plugin /plugins /build What am I doing wrong? Thanks! -- 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.
ANN: ClojureScript 0.0-2234
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2234 Leiningen dependency information: [org.clojure/clojurescript 0.0-2234] This release fixes a critical bug around the `case` statement. This will be the last ClojureScript release before we move to support only Clojure 1.6.0. ## 0.0-2234 ### Fixes * CLJS-812: Recur from case statement generated invalid JavaScript * CLJS-811: use the correct class loader in cljs.js-deps/goog-resource * fix fns with metadata under advanced compilation * CLJS-809: dissoc :file metadata introduced by tools.reader 0.8.4 * mark cljs.reader vars as ^:dynamic to avoid compiler warnings -- 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.
Mathematica like eval
Hi all, I'm a novice to Clojure (but not to programming). I'm looking for an implementation of an eval function to eval expression like Mathematica does. For instance, in Mathematica the expression: 8 + a + 9 (2 + b) + 2 if a and b are not bound, translates to Plus[10, a, Times[9, Plus[2, b]]] if a and b become bounded later (let say to 1 and 2) and the expression is evaluated again, it returns 47. I would like to be able to run: (eval-partial '(+ (+ 8 2) a (* 9 (+ 2 b and get, if a and b are unbound: (fn [x y] (+ 10 x (* 9 (+ 2 y or (better still) ['(a b) (fn [x y] (+ 10 x (* 9 (+ 2 y] Notice that, whenever possible, the eval takes place and parts of the expression are evaluated (in the example above, the expression (+ 8 2) is evaluated to 10). If you know of any implementation or have any ideas on the subject, please let me know. Cheers, Dilvan. -- 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: time expression of clojure produces different results on cascalog queries
Thanks a ton for ur reply's Andy and Thomas . I used Criterium and got results like below : Evaluation count : 240 in 60 samples of 4 calls. Execution time mean : 265.359848 ms Execution time std-deviation : 25.544031 ms Execution time lower quantile : 229.851248 ms ( 2.5%) Execution time upper quantile : 310.110448 ms (97.5%) Overhead used : 2.708614 ns But i don't understand the output . What does Evaluation count : 240 in 60 samples of 4 calls. mean ? Also little unclear about other details too. Could you please make me understand a little about above output !! Would really appreciate ur help . Cheers, Sindhu -- 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.
[ANN] data.json 0.2.5
data.json: parsing and generating JSON in pure Clojure https://github.com/clojure/data.json Leiningen dependency information: [org.clojure/data.json 0.2.5] This is a bugfix release. Changes: - DJSON-17: do not print Infinity or NaN floating-point values This is a clojure-contrib project: http://dev.clojure.org/display/doc/Clojure+Contrib -- 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: [ANN] Quil 2.1.0 released
Awesome update, thanks! Loads to digest :) On Friday, June 13, 2014 3:48:41 PM UTC-4, Nikita Beloglazov wrote: Friday the 13th and a full moon is ideal time for a release! Happy to announce release of Quil 2.1.0. It is available on clojars: https://clojars.org/quil Here is the list of changes: - Middleware https://github.com/quil/quil/wiki/Middleware support. - Functional mode https://github.com/quil/quil/wiki/Functional-mode-%28fun-mode%29 support. - Updated to Processing 2.2.1. - New methods: resize http://quil.info/image.html#resize and state-atom http://quil.info/state.html#state-atom. - :no-safe-draw feature renamed to :no-safe-fns. - Fixed NPE when exiting :p2d sketch using esc key. #110 https://github.com/quil/quil/issues/110. - Wrap all user-provided function to safe wrappers. #106 https://github.com/quil/quil/issues/106. Most interesting changes are middleware https://github.com/quil/quil/wiki/Middleware and functional mode https://github.com/quil/quil/wiki/Functional-mode-%28fun-mode%29. Take a look at them. Thanks Maksim Karandashov for contributing and help with release testing. Future plans: - Quil on ClojureScript - GSoC project which Maksim is working on. - More cool middleware. There some ideas on middleware wiki page, feel free to grab and implement them. Would be happy to get more ideas/implementations. - Work on http://quil.info to make it more than simple API site. Your feedback is welcome. Happy hacking! Nikita Beloglazov -- 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: Gin card game with Datomic
Very cool! From: clojure@googlegroups.com [mailto:clojure@googlegroups.com] On Behalf Of Gijs S. Sent: Friday, June 13, 2014 12:49 AM To: clojure@googlegroups.com Subject: Gin card game with Datomic Hi all, I wrote a web app where you can play a card game with Clojure, ClojureScript and Datomic. Background on the design is here: http://thegeez.net/2014/06/12/gin_datomic.html The game is playable here: http://gin.thegeez.net/ The code is on github: https://github.com/thegeez/gin -Gijs -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.commailto: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.commailto: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.commailto:clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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: Mathematica like eval
There is a nice example of something similar to this in Joy of Clojure (2nd edition anyway; not sure about first). It only shows you how to do contextual-evaluation, and doesn't return a function if some set of the symbols are not mapped in the context, but I'll bet you could modify the example to infer when one of the variables is missing in the context specification, and return a function in that case. It is right at the beginning of the section on macros. Good book, BTW. Can maybe share more later if you aren't interested in getting the book or need more guidance on this. Chris On Friday, June 13, 2014 2:46:56 PM UTC-7, Dilvan wrote: Hi all, I'm a novice to Clojure (but not to programming). I'm looking for an implementation of an eval function to eval expression like Mathematica does. For instance, in Mathematica the expression: 8 + a + 9 (2 + b) + 2 if a and b are not bound, translates to Plus[10, a, Times[9, Plus[2, b]]] if a and b become bounded later (let say to 1 and 2) and the expression is evaluated again, it returns 47. I would like to be able to run: (eval-partial '(+ (+ 8 2) a (* 9 (+ 2 b and get, if a and b are unbound: (fn [x y] (+ 10 x (* 9 (+ 2 y or (better still) ['(a b) (fn [x y] (+ 10 x (* 9 (+ 2 y] Notice that, whenever possible, the eval takes place and parts of the expression are evaluated (in the example above, the expression (+ 8 2) is evaluated to 10). If you know of any implementation or have any ideas on the subject, please let me know. Cheers, Dilvan. -- 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.
using hidden parameters?
This might be kind of perverse, but I was wondering if it was possible to write a function or macro that takes hidden parameters, i.e., uses symbols defined in the scope of use, without passing them in explicitly. For example, function next-number takes hidden parameter x, so = (let [x 12] (next-number)) Would return 13. With the whole code is data paradigm it seems like this should be possible, but I haven't figured out how to do this yet without getting an error. -- 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: using hidden parameters?
It is possible with macros: (defmacro next-number [] '(+ x 1)) Note that I'm using ' and not ` here, so the x isn't resolved. If I wanted to use backticks, I'd need to write: (defmacro next-number [] `(+ ~'x 1)) Macros also get an implicit env binding that gives them access to the local environment. (defmacro locals [] (into {} (for [x (keys env)] [`'~x x]))) - James On 14 June 2014 01:16, Christopher Howard cmhowa...@alaska.edu wrote: This might be kind of perverse, but I was wondering if it was possible to write a function or macro that takes hidden parameters, i.e., uses symbols defined in the scope of use, without passing them in explicitly. For example, function next-number takes hidden parameter x, so = (let [x 12] (next-number)) Would return 13. With the whole code is data paradigm it seems like this should be possible, but I haven't figured out how to do this yet without getting an error. -- 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. -- 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: using hidden parameters?
Here's a way to do it. Not sure if this is what you want. (let [x (atom 12)] (defn next-number [] (swap! x inc))) Functions are clojures, which means that next-number can retain a pointer to a variable that it can see when it's defined. If some of the ideas here are unfamiliar: The atom function gives you something that you can modify in place, in effect, and swap! is one way to modify it. Passing inc to swap! applies inc to the value in the atom x, and stores the result back into the atom. (I'm not sure if my wording here is precisely correct, but the idea should be clear enough.) You can also use a top-level variable instead of a local one defined by let: (def x (atom 12)) (defn next-number [] (swap! x inc)) @x ;= 12 ; [the @ operator gets the value out of the atom.] (next-number) ;= 13 @x ;= 13 (next-number) ;= 14 With the let form, (next-number) is your *only* way of accessing x, which could be a good thing or a bad thing--unless you define other functions in the scope of the let at the same time that you define next-number: (let [x (atom 12)] (defn next-number [] (swap! x inc)) (defn undo-next [] (swap! x dec)) (defn check-number [] @x)) (check-number) ;= 12 (check-number) ;= 12 (next-number);= 13 (check-number) ;= 13 (undo-next);= 12 (check-number) ;= 12 (Perhaps many Clojure programmers *would* consider all of this perverse, but similar things are considered ... cool in the some corners of the Scheme and Common Lisp worlds. (cool doesn't necessarily mean useful often--just *cool*--and maybe useful now and then.)) On Friday, June 13, 2014 7:16:09 PM UTC-5, Christopher Howard wrote: This might be kind of perverse, but I was wondering if it was possible to write a function or macro that takes hidden parameters, i.e., uses symbols defined in the scope of use, without passing them in explicitly. For example, function next-number takes hidden parameter x, so = (let [x 12] (next-number)) Would return 13. With the whole code is data paradigm it seems like this should be possible, but I haven't figured out how to do this yet without getting an error. -- 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: Gin card game with Datomic
Great, but I couldn't play this game. Do I need something else to play this? I am using IE8. 2014년 6월 13일 금요일 오후 4시 49분 19초 UTC+9, Gijs S. 님의 말: Hi all, I wrote a web app where you can play a card game with Clojure, ClojureScript and Datomic. Background on the design is here: http://thegeez.net/2014/06/12/gin_datomic.html The game is playable here: http://gin.thegeez.net/ The code is on github: https://github.com/thegeez/gin -Gijs -- 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.