Game Project - HTML5 or Applet?

2013-05-24 Thread JvJ
I'm thinking of making a game in Clojure for this competition: 
http://lispinsummerprojects.org/.

However, I'm not sure if the best way to go is HTML5 with ClojureScript or 
a Java applet

More specifically, I'd like to do HTML5, but am unsure of the current 
capabilities of ClojureScript.

Any advice would be appreciated.

-- 
-- 
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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-24 Thread JvJ
Or... what about abstracting away the graphics/audio/input and doing both?

On Friday, 24 May 2013 05:22:20 UTC-4, JvJ wrote:
>
> I'm thinking of making a game in Clojure for this competition: 
> http://lispinsummerprojects.org/.
>
> However, I'm not sure if the best way to go is HTML5 with ClojureScript or 
> a Java applet
>
> More specifically, I'd like to do HTML5, but am unsure of the current 
> capabilities of ClojureScript.
>
> Any advice would be appreciated.
>

-- 
-- 
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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-24 Thread JvJ
Stephen, thanks the suggestion.  However, since this is a competition, I'm 
not sure I'd want to use someone else's code.

I'd love to take a look at your design, however.

On Friday, 24 May 2013 08:52:49 UTC-4, Stephen Kockentiedt wrote:
>
> Hi,
>
> in case you want to go with an applet, you could use Simplecs [1], a 
> library I wrote for creating games based on a Component-Entity-System 
> engine which is heavily influenced by Chris Granger's post. It embraces 
> functional programming and immutable data structures. The game state is 
> represented by a single map. The library is still at an early stage. 
> However, the existing functionality is enough to implement a full game. Any 
> feedback is of course welcome.
>
> Best regards
> Stephen
>
> [1] https://github.com/s-k/simplecs <https://github.com/s-k/simplecs>
>
>
> Am Freitag, 24. Mai 2013 11:43:34 UTC+2 schrieb JeremyS:
>>
>> Hi,
>>
>> I haven't investigated much game development in HTML5 with ClojureScript, 
>> but Chris granger did !
>> You can find here [1] some explanations about a game he developped for a 
>> node knockout,
>> in [2] you can find the code of the game and [3] is a library 
>> implementing the pattern he used to model his game.
>> I don't know if that may be what you're looking for but I think it can be 
>> interesting to take  look !
>>
>> Cheers,
>>
>> Jeremy.
>>
>>
>> [1] 
>> http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/<http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/>
>> [2] 
>> https://github.com/ibdknox/ChromaShift<https://github.com/ibdknox/ChromaShift>
>> [3] https://github.com/ibdknox/gambit <https://github.com/ibdknox/gambit>
>>
>> On Friday, May 24, 2013 11:22:20 AM UTC+2, JvJ wrote:
>>>
>>> I'm thinking of making a game in Clojure for this competition: 
>>> http://lispinsummerprojects.org/.
>>>
>>> However, I'm not sure if the best way to go is HTML5 with ClojureScript 
>>> or a Java applet
>>>
>>> More specifically, I'd like to do HTML5, but am unsure of the current 
>>> capabilities of ClojureScript.
>>>
>>> Any advice would be appreciated.
>>>
>>

-- 
-- 
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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-24 Thread JvJ
Also, I'm taking a look at your tutorial.  The code seems to involve a lot 
of assoc/update-type methods, combined with special let statements.  Have 
you considered using the state monad, or something similar, in order to 
better manage this?

On Friday, 24 May 2013 08:52:49 UTC-4, Stephen Kockentiedt wrote:
>
> Hi,
>
> in case you want to go with an applet, you could use Simplecs [1], a 
> library I wrote for creating games based on a Component-Entity-System 
> engine which is heavily influenced by Chris Granger's post. It embraces 
> functional programming and immutable data structures. The game state is 
> represented by a single map. The library is still at an early stage. 
> However, the existing functionality is enough to implement a full game. Any 
> feedback is of course welcome.
>
> Best regards
> Stephen
>
> [1] https://github.com/s-k/simplecs <https://github.com/s-k/simplecs>
>
>
> Am Freitag, 24. Mai 2013 11:43:34 UTC+2 schrieb JeremyS:
>>
>> Hi,
>>
>> I haven't investigated much game development in HTML5 with ClojureScript, 
>> but Chris granger did !
>> You can find here [1] some explanations about a game he developped for a 
>> node knockout,
>> in [2] you can find the code of the game and [3] is a library 
>> implementing the pattern he used to model his game.
>> I don't know if that may be what you're looking for but I think it can be 
>> interesting to take  look !
>>
>> Cheers,
>>
>> Jeremy.
>>
>>
>> [1] 
>> http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/<http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/>
>> [2] 
>> https://github.com/ibdknox/ChromaShift<https://github.com/ibdknox/ChromaShift>
>> [3] https://github.com/ibdknox/gambit <https://github.com/ibdknox/gambit>
>>
>> On Friday, May 24, 2013 11:22:20 AM UTC+2, JvJ wrote:
>>>
>>> I'm thinking of making a game in Clojure for this competition: 
>>> http://lispinsummerprojects.org/.
>>>
>>> However, I'm not sure if the best way to go is HTML5 with ClojureScript 
>>> or a Java applet
>>>
>>> More specifically, I'd like to do HTML5, but am unsure of the current 
>>> capabilities of ClojureScript.
>>>
>>> Any advice would be appreciated.
>>>
>>

-- 
-- 
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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-24 Thread JvJ
Thanks Mikera.  That looks great.  I like the fact that it's mostly a 
graphics/phisics/audio library rather than an actual game engine.

On Saturday, 25 May 2013 01:04:29 UTC-4, Mikera wrote:
>
> You might want to consider LibGDX:
>
> https://code.google.com/p/libgdx/
>
> Looks pretty flexible, can do HTML5 games with WebGL as well as Android, 
> iOS and desktop. It's also Java based so should be pretty easy to use from 
> Clojure.
>
> On Friday, 24 May 2013 17:22:20 UTC+8, JvJ wrote:
>>
>> I'm thinking of making a game in Clojure for this competition: 
>> http://lispinsummerprojects.org/.
>>
>> However, I'm not sure if the best way to go is HTML5 with ClojureScript 
>> or a Java applet
>>
>> More specifically, I'd like to do HTML5, but am unsure of the current 
>> capabilities of ClojureScript.
>>
>> Any advice would be appreciated.
>>
>

-- 
-- 
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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-25 Thread JvJ
The combination of CES and LibGDX seems intriguing.  I think I'd like to go 
with that.

Stephen, how would you feel about me extending/using your library for the 
contest?  Technically, it's not against the rules, but I still wouldn't 
feel right if I didn't ask for permission.

On Saturday, 25 May 2013 01:04:29 UTC-4, Mikera wrote:
>
> You might want to consider LibGDX:
>
> https://code.google.com/p/libgdx/
>
> Looks pretty flexible, can do HTML5 games with WebGL as well as Android, 
> iOS and desktop. It's also Java based so should be pretty easy to use from 
> Clojure.
>
> On Friday, 24 May 2013 17:22:20 UTC+8, JvJ wrote:
>>
>> I'm thinking of making a game in Clojure for this competition: 
>> http://lispinsummerprojects.org/.
>>
>> However, I'm not sure if the best way to go is HTML5 with ClojureScript 
>> or a Java applet
>>
>> More specifically, I'd like to do HTML5, but am unsure of the current 
>> capabilities of ClojureScript.
>>
>> Any advice would be appreciated.
>>
>

-- 
-- 
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/groups/opt_out.




Maven + LibGDX - HELP!

2013-05-25 Thread JvJ
I am more or less terrible at Maven, but I'm OK with Leiningen.  Given that 
I have some information about a Maven repository (
https://code.google.com/p/libgdx/wiki/MavenProjectSetup#Maven_Archetype), 
how do I use it with Leiningen?

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/groups/opt_out.




Re: A chain of function vars

2013-05-26 Thread JvJ
I could be wrong, but I believe that symbols and vars are separate 
entities.  

f1 is a symbol which is associated with a var that contains the function. 
 When you evaluate the symbol 'f1, it looks at the association to find the 
var.

It looks like, when you define f2 and f3 to take on those variables, the 
symbols 'f2 and 'f3 get associated with the same var as 'f1.  So I don't 
think there's any chaining together.  They're just associated with a single 
var.

Again, I could be wrong, but I believe this is how it works.


On Sunday, 26 May 2013 17:33:24 UTC-4, Simon Katz wrote:
>
> If I define a chain of vars like this...
>
> (defn f1 [] 42) 
>
> (def f2 #'f1) 
>
> (def f3 #'f2) 
>
>...when I call f3 the chain of vars is followed:
>
> (f3) ; => 42 
>
>  Out of curiosity, where is this following-the-chain defined?
>
> I looked at http://clojure.org/evaluation which simply says "The result 
> of the evaluation of the operator is [...] cast to IFn (the interface 
> representing Clojure functions), and invoke() is called on it".
>
> --Simon
>

-- 
-- 
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/groups/opt_out.




Re: A chain of function vars

2013-05-26 Thread JvJ
Actually, I spoke WAY too soon.

It looks like it has to do with the way that Var is cast to IFn.

https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java

Check out lines 391 and 410.  When invoked, the result of fn() is invoked. 
 fn() casts deref() (the data contained by the var) into a function.

If the var contains another var, casting that var to an IFn will result in 
a recursive call.

For example:

f3 casts f2 to an IFn.
f2 casts f1 to an IFn.
f1 casts the function to an IFn (resulting in the function).

So the "chaining together" is defined in the invoke method and the casting 
process.

On Sunday, 26 May 2013 17:33:24 UTC-4, Simon Katz wrote:
>
> If I define a chain of vars like this...
>
> (defn f1 [] 42) 
>
> (def f2 #'f1) 
>
> (def f3 #'f2) 
>
>...when I call f3 the chain of vars is followed:
>
> (f3) ; => 42 
>
>  Out of curiosity, where is this following-the-chain defined?
>
> I looked at http://clojure.org/evaluation which simply says "The result 
> of the evaluation of the operator is [...] cast to IFn (the interface 
> representing Clojure functions), and invoke() is called on it".
>
> --Simon
>

-- 
-- 
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/groups/opt_out.




Re: A chain of function vars

2013-05-26 Thread JvJ
Additionally, we can make the chain into a loop.

(defn f1 [] 42)
(def f2 #'f1)
(def f3 #'f2)
(def f1 #'f3)

(f3) ==> stack overflow

On Sunday, 26 May 2013 18:18:57 UTC-4, JvJ wrote:
>
> Actually, I spoke WAY too soon.
>
> It looks like it has to do with the way that Var is cast to IFn.
>
>
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java
>
> Check out lines 391 and 410.  When invoked, the result of fn() is invoked. 
>  fn() casts deref() (the data contained by the var) into a function.
>
> If the var contains another var, casting that var to an IFn will result in 
> a recursive call.
>
> For example:
>
> f3 casts f2 to an IFn.
> f2 casts f1 to an IFn.
> f1 casts the function to an IFn (resulting in the function).
>
> So the "chaining together" is defined in the invoke method and the casting 
> process.
>
> On Sunday, 26 May 2013 17:33:24 UTC-4, Simon Katz wrote:
>>
>> If I define a chain of vars like this...
>>
>> (defn f1 [] 42) 
>>
>> (def f2 #'f1) 
>>
>> (def f3 #'f2) 
>>
>>...when I call f3 the chain of vars is followed:
>>
>> (f3) ; => 42 
>>
>>  Out of curiosity, where is this following-the-chain defined?
>>
>> I looked at http://clojure.org/evaluation which simply says "The result 
>> of the evaluation of the operator is [...] cast to IFn (the interface 
>> representing Clojure functions), and invoke() is called on it".
>>
>> --Simon
>>
>

-- 
-- 
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/groups/opt_out.




Re: A chain of function vars

2013-05-26 Thread JvJ
I suppose that would depend on the specifications for how various objects 
are cast to functions.  For instance, vectors, maps, sets, keywords, etc. 
have their own specific ways of acting as functions.  Do you know where 
that is specified?

On Sunday, 26 May 2013 18:35:55 UTC-4, Simon Katz wrote:
>
> Cool; thanks. That's an implementation-level explanation, which is fine 
> as far as it goes.
>
> Can anyone point at a specification-level explanation?
>
>
> On Sunday, 26 May 2013 23:18:57 UTC+1, JvJ wrote:
>>
>> Actually, I spoke WAY too soon.
>>
>> It looks like it has to do with the way that Var is cast to IFn.
>>
>>
>> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java
>>
>> Check out lines 391 and 410.  When invoked, the result of fn() is 
>> invoked.  fn() casts deref() (the data contained by the var) into a 
>> function.
>>
>> If the var contains another var, casting that var to an IFn will result 
>> in a recursive call.
>>
>> For example:
>>
>> f3 casts f2 to an IFn.
>> f2 casts f1 to an IFn.
>> f1 casts the function to an IFn (resulting in the function).
>>
>> So the "chaining together" is defined in the invoke method and the 
>> casting process.
>>
>> On Sunday, 26 May 2013 17:33:24 UTC-4, Simon Katz wrote:
>>>
>>> If I define a chain of vars like this...
>>>
>>> (defn f1 [] 42) 
>>>
>>> (def f2 #'f1) 
>>>
>>> (def f3 #'f2) 
>>>
>>>...when I call f3 the chain of vars is followed:
>>>
>>> (f3) ; => 42 
>>>
>>>  Out of curiosity, where is this following-the-chain defined?
>>>
>>> I looked at http://clojure.org/evaluation which simply says "The result 
>>> of the evaluation of the operator is [...] cast to IFn (the interface 
>>> representing Clojure functions), and invoke() is called on it".
>>>
>>> --Simon
>>>
>>

-- 
-- 
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/groups/opt_out.




Re: Maven + LibGDX - HELP!

2013-05-27 Thread JvJ
Wowwee zowee that's a lot of code.  Thanks.

On Saturday, 25 May 2013 22:02:07 UTC-4, JvJ wrote:
>
> I am more or less terrible at Maven, but I'm OK with Leiningen.  Given 
> that I have some information about a Maven repository (
> https://code.google.com/p/libgdx/wiki/MavenProjectSetup#Maven_Archetype), 
> how do I use it with Leiningen?
>
> 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/groups/opt_out.




Re: Game Project - HTML5 or Applet?

2013-05-27 Thread JvJ
Thanks for permission.

Also... as far as the state monad goes, it's just a half-formed idea.  I'll 
try to throw something together in the next week or so.

On Monday, 27 May 2013 06:26:30 UTC-4, Stephen Kockentiedt wrote:
>
> Sorry for answering a little late. You are welcome to do whatever you want 
> with the code. Therefore, I licensed it under CC0. And you are welcome to 
> do pull requests.
>
> Regarding the state monad, I'm not fully sure what you mean. Do you have 
> any suggestions? You can of course use the -> macro:
>
> (-> ces
>   (update-entity entity [:pos] inc)
>   (assoc :key value))
>
> On Saturday, May 25, 2013 10:21:26 PM UTC+2, JvJ wrote:
>>
>> The combination of CES and LibGDX seems intriguing.  I think I'd like to 
>> go with that.
>>
>> Stephen, how would you feel about me extending/using your library for the 
>> contest?  Technically, it's not against the rules, but I still wouldn't 
>> feel right if I didn't ask for permission.
>>
>> On Saturday, 25 May 2013 01:04:29 UTC-4, Mikera wrote:
>>>
>>> You might want to consider LibGDX:
>>>
>>> https://code.google.com/p/libgdx/
>>>
>>> Looks pretty flexible, can do HTML5 games with WebGL as well as Android, 
>>> iOS and desktop. It's also Java based so should be pretty easy to use from 
>>> Clojure.
>>>
>>> On Friday, 24 May 2013 17:22:20 UTC+8, JvJ wrote:
>>>>
>>>> I'm thinking of making a game in Clojure for this competition: 
>>>> http://lispinsummerprojects.org/.
>>>>
>>>> However, I'm not sure if the best way to go is HTML5 with ClojureScript 
>>>> or a Java applet
>>>>
>>>> More specifically, I'd like to do HTML5, but am unsure of the current 
>>>> capabilities of ClojureScript.
>>>>
>>>> Any advice would be appreciated.
>>>>
>>>

-- 
-- 
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/groups/opt_out.




Re: Maven + LibGDX - HELP!

2013-05-29 Thread JvJ
Hey man.  Do you have any advice on how to deal with native dependencies in 
this case?

I have the following project.clj, but the dlls aren't getting copied.

(defproject libgdxtest "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME";
  :license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
  :repositories [
 ]
  :native-dependencies [[com.badlogic.gdx/gdx-backend-lwjgl-natives "0.9.9"]
[com.badlogic.gdx/gdx-backend-jglfw-natives "0.9.9"]
[com.badlogic.gdx/gdx-natives "0.9.9"]]
  :dependencies [[org.clojure/clojure "1.4.0"]
 [com.badlogic.gdx/gdx "0.9.9"]
 [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9"]
 [com.badlogic.gdx/gdx-backend-lwjgl-natives "0.9.9"]
 [com.badlogic.gdx/gdx-backend-jglfw-natives "0.9.9"]
 [com.badlogic.gdx/gdx-natives "0.9.9"]
 ])

On Monday, 27 May 2013 06:40:05 UTC-4, Stephen Kockentiedt wrote:
>
> You just have to include the following item under :dependencies in your 
> project.clj:
>
> [com.badlogic.gdx/gdx "0.9.9-SNAPSHOT"]
> [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9-SNAPSHOT"]
>
> If you want to use another backend, you have to change the second entry 
> accordingly. The following code is the main namespace for a game prototype 
> of mine. Maybe, it can help you a little.
>
> (ns unfinished-game.core
>   (:gen-class)
>   (:require [clojure.java.io :as io]
> [unfinished-game.input :as input]
> [unfinished-game.logic :as logic]
> [unfinished-game.util.geometry :refer (vec2d)])
>   (:import (com.badlogic.gdx ApplicationAdapter Gdx InputAdapter)
>  (com.badlogic.gdx.graphics GL10 Mesh OrthographicCamera Texture)
>(com.badlogic.gdx.graphics.g2d SpriteBatch)
>(com.badlogic.gdx.backends.lwjgl LwjglApplication)))
>
> (def images {})
>
> (defn draw! [^SpriteBatch batch {:keys [type image position anchor]}]
>   (let [image-object ^Texture (images image)
> x (float (- (:x position) (* (.getWidth image-object) (case (:x 
> anchor)
> :center 0.5
> :right 1
> 0
> y (float (- (:y position) (* (.getHeight image-object) (case (:y 
> anchor)
>  :bottom 0
>  :center 
> 0.5
>  1]
> (cond (= type :image) (.draw batch image-object x y
>
> (def image-names #{"player"
>"block1"
>"cross"
>"MetalBlock"})
>
> (def game-state (atom {}))
>
> (defn app-adapter []
>   (let [batch (atom nil)
> keys-down (atom #{})]
> (proxy [ApplicationAdapter] []
>   (create []
> (println "Init.")
> (doseq [image-name image-names]
>   (def images
> (conj images
>   [(keyword image-name)
>(Texture.
>  (.internal Gdx/files (str "images/" image-name 
> ".png")))])))
> (reset! game-state (logic/initial-game-state))
> (reset! batch (SpriteBatch.))
> (.setInputProcessor Gdx/input
> (proxy [InputAdapter] []
>   (keyDown [keycode]
> (when-let [key-keyword 
> (input/libgdx-key-map keycode)]
>   (swap! keys-down #(conj % key-keyword)))
> true)
>   (keyUp [keycode]
> (when-let [key-keyword 
> (input/libgdx-key-map keycode)]
>   (swap! keys-down #(disj % key-keyword)))
> true
>   (render []
> (let [canvas-dims (vec2d (.getWidth Gdx/graphics) (.getHeight 
> Gdx/graphics))
>   delta-in-s (.getDeltaTime Gdx/graphics)]
>   (swap! game-state logic/advance-game-state canvas-dims 
> @keys-down delta-in-s))
> (let [things-to-draw (logic/rendering-commands
>        @game-state)]
>   (.glClear (Gdx/gl) GL10/GL_COLOR_BUFFER_B

Re: Maven + LibGDX - HELP!

2013-05-29 Thread JvJ
Unfortunately, same problem:

Unable to read file for extraction: gdx.dll
  [Thrown class com.badlogic.gdx.utils.GdxRuntimeException]

I feel like there should be a target/native folder, but it's not there.

On Wednesday, 29 May 2013 03:48:33 UTC-4, Stephen Kockentiedt wrote:
>
> It should works like this:
>
> (defproject libgdxtest "0.1.0-SNAPSHOT"
>   :description "FIXME: write description"
>   :url "http://example.com/FIXME";
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :repositories [["libgdx" "
> http://libgdx.badlogicgames.com/nightlies/maven/";]]
>   :dependencies [[org.clojure/clojure "1.4.0"]
>  [com.badlogic.gdx/gdx "0.9.9"]
>  [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9"]])
>
> In my first answer, I forgot to mention that you have to add the 
> repository.
>
> On Wednesday, May 29, 2013 9:39:10 AM UTC+2, JvJ wrote:
>>
>> Hey man.  Do you have any advice on how to deal with native dependencies 
>> in this case?
>>
>> I have the following project.clj, but the dlls aren't getting copied.
>>
>> (defproject libgdxtest "0.1.0-SNAPSHOT"
>>   :description "FIXME: write description"
>>   :url "http://example.com/FIXME";
>>   :license {:name "Eclipse Public License"
>> :url "http://www.eclipse.org/legal/epl-v10.html"}
>>   :repositories [
>>  ]
>>   :native-dependencies [[com.badlogic.gdx/gdx-backend-lwjgl-natives 
>> "0.9.9"]
>> [com.badlogic.gdx/gdx-backend-jglfw-natives 
>> "0.9.9"]
>> [com.badlogic.gdx/gdx-natives "0.9.9"]]
>>   :dependencies [[org.clojure/clojure "1.4.0"]
>>  [com.badlogic.gdx/gdx "0.9.9"]
>>  [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9"]
>>  [com.badlogic.gdx/gdx-backend-lwjgl-natives "0.9.9"]
>>  [com.badlogic.gdx/gdx-backend-jglfw-natives "0.9.9"]
>>  [com.badlogic.gdx/gdx-natives "0.9.9"]
>>  ])
>>
>> On Monday, 27 May 2013 06:40:05 UTC-4, Stephen Kockentiedt wrote:
>>>
>>> You just have to include the following item under :dependencies in your 
>>> project.clj:
>>>
>>> [com.badlogic.gdx/gdx "0.9.9-SNAPSHOT"]
>>> [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9-SNAPSHOT"]
>>>
>>> If you want to use another backend, you have to change the second entry 
>>> accordingly. The following code is the main namespace for a game prototype 
>>> of mine. Maybe, it can help you a little.
>>>
>>> (ns unfinished-game.core
>>>   (:gen-class)
>>>   (:require [clojure.java.io :as io]
>>> [unfinished-game.input :as input]
>>> [unfinished-game.logic :as logic]
>>> [unfinished-game.util.geometry :refer (vec2d)])
>>>   (:import (com.badlogic.gdx ApplicationAdapter Gdx InputAdapter)
>>>  (com.badlogic.gdx.graphics GL10 Mesh OrthographicCamera Texture)
>>>(com.badlogic.gdx.graphics.g2d SpriteBatch)
>>>(com.badlogic.gdx.backends.lwjgl LwjglApplication)))
>>>
>>> (def images {})
>>>
>>> (defn draw! [^SpriteBatch batch {:keys [type image position anchor]}]
>>>   (let [image-object ^Texture (images image)
>>> x (float (- (:x position) (* (.getWidth image-object) (case (:x 
>>> anchor)
>>> :center 
>>> 0.5
>>> :right 1
>>> 0
>>> y (float (- (:y position) (* (.getHeight image-object) (case (:y 
>>> anchor)
>>>  :bottom 
>>> 0
>>>  :center 
>>> 0.5
>>>  1]
>>> (cond (= type :image) (.draw batch image-object x y
>>>
>>> (def image-names #{"player"
>>>"block1"
>>>"cross"
>>>"M

Re: Maven + LibGDX - HELP!

2013-05-29 Thread JvJ
Thank you!  I deleted my .m2 folder.  I had already installed a separate 
version of libgdx locally, and I guess that was interfering.

On Wednesday, 29 May 2013 04:32:33 UTC-4, Stephen Kockentiedt wrote:
>
> - Which version of Windows do you use?
> - Which lein version do you use?
> - What is the output if you delete the folder .m2 in your home folder and 
> then call lein deps?
>
> On Wednesday, May 29, 2013 10:16:14 AM UTC+2, JvJ wrote:
>>
>> Unfortunately, same problem:
>>
>> Unable to read file for extraction: gdx.dll
>>   [Thrown class com.badlogic.gdx.utils.GdxRuntimeException]
>>
>> I feel like there should be a target/native folder, but it's not there.
>>
>> On Wednesday, 29 May 2013 03:48:33 UTC-4, Stephen Kockentiedt wrote:
>>>
>>> It should works like this:
>>>
>>> (defproject libgdxtest "0.1.0-SNAPSHOT"
>>>   :description "FIXME: write description"
>>>   :url "http://example.com/FIXME";
>>>   :license {:name "Eclipse Public License"
>>> :url "http://www.eclipse.org/legal/epl-v10.html"}
>>>   :repositories [["libgdx" "
>>> http://libgdx.badlogicgames.com/nightlies/maven/";]]
>>>   :dependencies [[org.clojure/clojure "1.4.0"]
>>>      [com.badlogic.gdx/gdx "0.9.9"]
>>>  [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9"]])
>>>
>>> In my first answer, I forgot to mention that you have to add the 
>>> repository.
>>>
>>> On Wednesday, May 29, 2013 9:39:10 AM UTC+2, JvJ wrote:
>>>>
>>>> Hey man.  Do you have any advice on how to deal with native 
>>>> dependencies in this case?
>>>>
>>>> I have the following project.clj, but the dlls aren't getting copied.
>>>>
>>>> (defproject libgdxtest "0.1.0-SNAPSHOT"
>>>>   :description "FIXME: write description"
>>>>   :url "http://example.com/FIXME";
>>>>   :license {:name "Eclipse Public License"
>>>> :url "http://www.eclipse.org/legal/epl-v10.html"}
>>>>   :repositories [
>>>>  ]
>>>>   :native-dependencies [[com.badlogic.gdx/gdx-backend-lwjgl-natives 
>>>> "0.9.9"]
>>>> [com.badlogic.gdx/gdx-backend-jglfw-natives 
>>>> "0.9.9"]
>>>> [com.badlogic.gdx/gdx-natives "0.9.9"]]
>>>>   :dependencies [[org.clojure/clojure "1.4.0"]
>>>>  [com.badlogic.gdx/gdx "0.9.9"]
>>>>  [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9"]
>>>>  [com.badlogic.gdx/gdx-backend-lwjgl-natives "0.9.9"]
>>>>  [com.badlogic.gdx/gdx-backend-jglfw-natives "0.9.9"]
>>>>  [com.badlogic.gdx/gdx-natives "0.9.9"]
>>>>  ])
>>>>
>>>> On Monday, 27 May 2013 06:40:05 UTC-4, Stephen Kockentiedt wrote:
>>>>>
>>>>> You just have to include the following item under :dependencies in 
>>>>> your project.clj:
>>>>>
>>>>> [com.badlogic.gdx/gdx "0.9.9-SNAPSHOT"]
>>>>> [com.badlogic.gdx/gdx-backend-lwjgl "0.9.9-SNAPSHOT"]
>>>>>
>>>>> If you want to use another backend, you have to change the second 
>>>>> entry accordingly. The following code is the main namespace for a game 
>>>>> prototype of mine. Maybe, it can help you a little.
>>>>>
>>>>> (ns unfinished-game.core
>>>>>   (:gen-class)
>>>>>   (:require [clojure.java.io :as io]
>>>>> [unfinished-game.input :as input]
>>>>> [unfinished-game.logic :as logic]
>>>>> [unfinished-game.util.geometry :refer (vec2d)])
>>>>>   (:import (com.badlogic.gdx ApplicationAdapter Gdx InputAdapter)
>>>>>  (com.badlogic.gdx.graphics GL10 Mesh OrthographicCamera Texture)
>>>>>(com.badlogic.gdx.graphics.g2d SpriteBatch)
>>>>>(com.badlogic.gdx.backends.lwjgl LwjglApplication)))
>>>>>
>>>>> (def images {})
>>>>>
>>>>> (defn draw! [^SpriteBatch batch {:keys [type image position anchor]}]
>>>>>   (let [im

Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
Consider the following:

(let [ [&{:keys [] :as m}]  [:a 1 :b 2 :c 3]]
 m)

==> {:a 1 :b 2 :c 3}

Is there a shorter form of [&{:keys [] :as m}]?

-- 
-- 
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/groups/opt_out.




Re: Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
Well... I'm a dingus.

[&{:as m}]

On Thursday, 6 June 2013 15:23:22 UTC-4, JvJ wrote:
>
> Consider the following:
>
> (let [ [&{:keys [] :as m}]  [:a 1 :b 2 :c 3]]
>  m)
>
> ==> {:a 1 :b 2 :c 3}
>
> Is there a shorter form of [&{:keys [] :as m}]?
>

-- 
-- 
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/groups/opt_out.




Re: Shortcut for variadic map destructuring?

2013-06-06 Thread JvJ
I just realized it after I posted, but thanks for the help anyways.

On Thursday, 6 June 2013 15:27:28 UTC-4, Jim foo.bar wrote:
>
> On 06/06/13 20:23, JvJ wrote: 
> > Is there a shorter form of [&{:keys [] :as m}]? 
>
> if you don't care about the actual keys just do this: 
>
> [& {:as m}] 
>
> HTH, 
>
> Jim 
>
>
>
>

-- 
-- 
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/groups/opt_out.




Text editor plugins and REPL

2013-06-14 Thread JvJ

I'm currently writing an interactive application (game programming 
environment) that can be controlled by commands from the REPL.  However, 
I'm wondering what it would take to integrate commands into the text editor 
itself, or to allow the editor to be controlled to a certain extent by the 
application.

I usually use Emacs with SLIME, but have also used sublimetext with 
SublimeRepl.  My question is, for those of you with experience in this sort 
of thing, what would be the best approach to creating text editor plugins 
that can communicate with a running Clojure application, and which editor 
would be the easiest to use?

-- 
-- 
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/groups/opt_out.




State monad issue

2013-07-11 Thread JvJ
I'm trying to use a domonad block with the state monad, and I'm running 
into trouble chaining together multiple monadic instructions.

Take this for example:

;; This block of code fetches the value from :a in the state,
;; and then associates a new value for :b if :a is set.
(domonad state-m
 [a (fetch-val :a)
 _ (if a
   (update-state #(assoc % :b 2))
   (m-result nil))
 ]
 nil)

My question is, what if I wanted to run two update functions, like
(update-state #(assoc % :b 2)) and (update-state #(assoc % :c 3)),
but within the if statement?

(p.s.  I realize that assoc is variadic, and could easily deal with this, 
however I'm using
it as a simple example of a more general case)

-- 
-- 
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/groups/opt_out.




Re: State monad issue

2013-07-11 Thread JvJ
Yeah it is possible to do it with another domonad block.  I just don't want 
to clutter up the code by repeating myself.

I made a macro do-state that introduces a new domonad block using the 
current state.  It works:

(defmacro do-state [bindings & r]
`(fn [st] ( (domonad state-m ~bindings ~@r) st)))

(domonad state-m
 [a (fetch-val :a)
 _ (if a
   (do-state[ _ (update-state #(assoc % :b 2))
  _ (update-state 
#(assoc % :b 2))]
  nil)
   (m-result nil))
 ]
 nil)

On Thursday, July 11, 2013 2:18:44 PM UTC-7, Ben wrote:
>
> Is it not possible just to put another domonad block in the true branch of 
> the if? Alternately, it should be possible to do it with an explicit bind 
> operation.
>
>
> On Thu, Jul 11, 2013 at 2:11 PM, JvJ >wrote:
>
>> I'm trying to use a domonad block with the state monad, and I'm running 
>> into trouble chaining together multiple monadic instructions.
>>
>> Take this for example:
>>
>> ;; This block of code fetches the value from :a in the state,
>> ;; and then associates a new value for :b if :a is set.
>> (domonad state-m
>>  [a (fetch-val :a)
>>  _ (if a
>>(update-state #(assoc % :b 2))
>>(m-result nil))
>>  ]
>>  nil)
>>
>> My question is, what if I wanted to run two update functions, like
>> (update-state #(assoc % :b 2)) and (update-state #(assoc % :c 3)),
>> but within the if statement?
>>
>> (p.s.  I realize that assoc is variadic, and could easily deal with this, 
>> however I'm using
>> it as a simple example of a more general case)
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks, which 
> may be sweet, aromatic, fermented or spirit-based. ... Family and social 
> life also offer numerous other occasions to consume drinks for pleasure." 
> [Larousse, "Drink" entry]
>
>  

-- 
-- 
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/groups/opt_out.




easier way to write "not not"?

2013-07-16 Thread JvJ
Not that it's a big deal, but is there a standard library function for 
#(not (not %))?

-- 
-- 
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/groups/opt_out.




Re: merge nested maps

2013-07-17 Thread JvJ
By the way, this is already in contrib: 
http://clojuredocs.org/clojure_contrib/clojure.contrib.map-utils/deep-merge-with

On Wednesday, July 17, 2013 5:42:24 AM UTC-7, Chris Gill wrote:
>
> Thank you for finding and posting this! Been wracking my brain trying to 
> figure out a good way to do a full map merge
>
> On Thursday, April 25, 2013 5:26:53 PM UTC-4, Stuart Sierra wrote:
>>
>> Here's a way to do it from the Pedestal demo source 
>> code
>> :
>>
>> (defn deep-merge
>>   "Recursively merges maps. If keys are not maps, the last value wins."
>>   [& vals]
>>   (if (every? map? vals)
>> (apply merge-with deep-merge vals)
>> (last vals)))
>>
>> -S
>>
>>
>>
>> On Thursday, April 25, 2013 4:41:33 PM UTC-4, Joachim De Beule wrote:
>>>
>>> Hi list,
>>>
>>> I was searching for an "easy" way to combined nested maps, e.g. as in 
>>>
>>> (combine {:foo {:bar "baz"}} {:foo {:x "y"}})
>>> => {:foo {:bar "baz", :x "y"}}
>>>
>>> I would expect that there is some core map operation to do this, but 
>>> neither merge nor unify work as they simply return {:foo {:x "y"}}, and I 
>>> don't see anything else. Am I missing something?
>>>
>>> Joachim.
>>>
>>

-- 
-- 
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/groups/opt_out.




Penumbra vs. LibGDX

2013-07-17 Thread JvJ
Lately, I've been working on games with Clojure and LibGDX.  However, many 
of the advantages of interactive development are not present, because 
LibGDX apps are built around Java development, and don't work well if you 
try to run multiple apps within a single program (i.e. from the REPL).

Penumbra has this ability, but doesn't seem to be portable to other 
platforms (i.e. Android, HTML5), and doesn't have built-in Box2D support 
(although it can be added).  If anyone has worked with one or both of these 
systems, can they suggest the pros and cons of using each.  Furthermore, is 
it possible to use both?  (i.e. have apps implemented in either penumbra or 
libgdx, but using the same opengl/box2d code in both)


-- 
-- 
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/groups/opt_out.




Re: Penumbra vs. LibGDX

2013-07-17 Thread JvJ
1) Phonegap seems like it just makes HTML5.  So, does it work with android, 
IOS, and desktop?
2) I haven't done much clj-script development.  What's the REPL situation 
like with that?
3) Nice job using PITA in that sense.

On Wednesday, 17 July 2013 16:30:08 UTC-7, Chris Bui wrote:
>
> I haven't worked with Penumbra, but I've tried getting LibGDX to work with 
> Clojure and it's just a PITA. Totally agree that you lose the REPL with 
> LibGDX.
>
> I'm writing another game now, although much if it is server side. I did 
> however, discover that you can use Phonegap to write HTML5 applications and 
> deploy them to Android, iOS. And if you can do that, you can write games 
> with Clojurescript using the canvas. Also, there are Box2d libraries for 
> javascript that you can use. Just throwing another option out there.
>

-- 
-- 
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/groups/opt_out.




Calling Clojure from Emacs Lisp

2013-07-18 Thread JvJ
I'd like to be able to define some custom emacs commands that send clojure 
code strings to a running repl, and to which I could attach key bindings. 
 Does anyone know an easy way to do this?

-- 
-- 
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/groups/opt_out.




Domain-specific language design books

2013-07-18 Thread JvJ
Does anyone know of any good books on DSL design, in Clojure or any other 
Lisp?

-- 
-- 
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/groups/opt_out.




Re: Domain-specific language design books

2013-07-18 Thread JvJ
Thanks.  Mostly, I'm looking for something that's about design principles 
rather than a "how-to".  I figure I might as well get educated before I 
just dive blindly in.

On Thursday, 18 July 2013 13:30:06 UTC-7, JvJ wrote:
>
> Does anyone know of any good books on DSL design, in Clojure or any other 
> Lisp?

-- 
-- 
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/groups/opt_out.




Importing another data_readers

2013-07-19 Thread JvJ
I'm not 100% on how the data_readers.clj file works.  It's just a map with 
no namespace that appears to get loaded by some kind of black magic.

Is it possible to provide a library which includes its reader macros, so 
that the library user's project doesn't need to include their own 
data_readers.clj?

-- 
-- 
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/groups/opt_out.




Re: Exporting Multiple Namespaces

2013-07-19 Thread JvJ
"Facades and workarounds for things that are more difficult than they 
should be."  Very nice.

On Friday, 19 July 2013 13:06:50 UTC-7, JvJ wrote:
>
> I'm creating a library with a lot of available functions in a lot of 
> different namespaces, and I'd like many of them to be available to users of 
> the library without having to specify a number of different import 
> statements.
>
> Is there a way to have the core namespace 'export' the other namespaces 
> without having to place all the important functions in one monolithic 
> core.clj?
>

-- 
-- 
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/groups/opt_out.




Exporting Multiple Namespaces

2013-07-19 Thread JvJ
I'm creating a library with a lot of available functions in a lot of 
different namespaces, and I'd like many of them to be available to users of 
the library without having to specify a number of different import 
statements.

Is there a way to have the core namespace 'export' the other namespaces 
without having to place all the important functions in one monolithic 
core.clj?

-- 
-- 
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/groups/opt_out.




Re: Importing another data_readers

2013-07-19 Thread JvJ
Thanks.  I'll make sure users know about it.  It's a game engine, so I'll 
mostly be using it for things like Box2D vector literals  (i.e. v#(1,2)), 
and floating-point numbers ( f#(1.4), so they don't have to say  (float 
1.4)).

On Friday, 19 July 2013 13:48:50 UTC-7, Stuart Sierra wrote:
>
> When Clojure starts it will search for files named data_readers.clj at the 
> root the Java classpath. Every library JAR can have its own 
> data_readers.clj and they will all be loaded and merged.
>
> Be careful with this: if there's a conflict in data reader bindings, 
> Clojure won't start. If your library provides a data reader tag that other 
> users may want to override in their applications, don't put it in the 
> data_readers.clj file in your library. On the other hand, if your library 
> uses data readers in its own sources, then it needs to include them in its 
> data_readers.clj file.
>
> -S
>
>
> On Friday, July 19, 2013 4:08:54 PM UTC-4, JvJ wrote:
>>
>> I'm not 100% on how the data_readers.clj file works.  It's just a map 
>> with no namespace that appears to get loaded by some kind of black magic.
>>
>> Is it possible to provide a library which includes its reader macros, so 
>> that the library user's project doesn't need to include their own 
>> data_readers.clj?
>>
>

-- 
-- 
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/groups/opt_out.




Accessing Record Constructors

2013-07-31 Thread JvJ
I tried to define this record, but the Vec2. constructor doesn't exist yet.
How can I use the constructor inside the record's method?

(defrecord Vec2 [x y]

  Vector
  (mag [this]
   (Math/sqrt
(+ (* x x) (* y y
  
  (v+ [this] this)
   (v+ [this other]
   (Vec2. (+ (:x this) (:x other)
 (:y this) (:y other
  (v+ [this a b & c]
  (reduce v+
  this
  (conj c b a

-- 
-- 
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/groups/opt_out.




Re: Accessing Record Constructors

2013-07-31 Thread JvJ
I figured it out.  I assumed it was some quirk with defrecord, but it was 
an arity exception.  Didn't pass 2 params to the ctor.
DERP!

;; This is the right way:
(Vec2. (+ (:x this) (:x other))
   (+ (:y this) (:y other)))

On Wednesday, 31 July 2013 17:51:36 UTC-7, JvJ wrote:
>
> I tried to define this record, but the Vec2. constructor doesn't exist yet.
> How can I use the constructor inside the record's method?
>
> (defrecord Vec2 [x y]
>
>   Vector
>   (mag [this]
>(Math/sqrt
> (+ (* x x) (* y y
>   
>   (v+ [this] this)
>(v+ [this other]
>(Vec2. (+ (:x this) (:x other)
>  (:y this) (:y other
>   (v+ [this a b & c]
>   (reduce v+
>   this
>   (conj c b a
>

-- 
-- 
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/groups/opt_out.




Two Dimensional Associative Map

2013-08-01 Thread JvJ
I'm looking for an associative data structure that can be accessed by both 
rows and columns, and could potentially be sparse.

Suppose the following table is called t:

|   | :A   | :B   | :C   ||---+--+--+--|| 1 |  |  | 
'[x y z] || 2 | "2a" | "2b" |  || 3 |  |  |  || 3 | :3a 
 |  | "Foo"|


Then (t :A) would return {2 "2a", 3 :3a}, and (t 2) would return {:A "2a", 
:B "2b"}.
(t :A 2) or (t 2 :A) would return "2a".

I'm thinking of implementing it as a simple map of maps with some extra 
functions, but I'm not sure if
that would be the best option.


-- 
-- 
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/groups/opt_out.




Re: Two Dimensional Associative Map

2013-08-02 Thread JvJ
Actually, what I'm looking for is a way to use arbitrary types of keys 
rather than integers.

I have this so far:

 Table data structure.
 For now, the table data structure is a map of maps.

(defn row
  "Get a row of the table.
 If only the key is passed, a row
lookup function is returned."
  ([r]
 #(row r %))
  ([r m]
 (get m r)))

(defn col
  "Get a column of the table."
  ([c]
 #(col c %))
  ([c m]
 (for [[rk r] m
   :let [x (get r c)]
   :when x]
   [rk x])))

(defn t-get
  "Get values in a table."
  [m &{:keys [r c]}]
  (cond
   (and r c) (get-in m [r c])
   r (row r m)
   c (col c m)
   :else m))

(defn t-update
  "Update a value or values in the map."
  [m f &{:keys [r c]}]
  (cond
   (and r c) (update-in m [r c] f)
   r (update-in m [r] f)
   
   ;; This O(n) column update is making me angry!
   c (let [res (f (into {} (t-get m :c c)))]
   (println "f result: " res)
   (reduce
(fn [acc k]
  (if-let [v (get res k)]
(update-in acc [k] assoc c v)
(if (contains? (get m k) c)
  (update-in acc [k] dissoc c)
  acc)))
m
(clojure.set/union (set (keys m))
   (set (keys res)))

(defn t-set
  "Set a value or values in the map."
  [m v & r]
  (apply t-update m (constantly v) r))

It works pretty well for swapping out rows or individual cells, but setting 
a column seems like an inefficient operation.  I don't know how much I'll be
using that.

On Thursday, 1 August 2013 17:59:40 UTC-7, JvJ wrote:
>
> I'm looking for an associative data structure that can be accessed by both 
> rows and columns, and could potentially be sparse.
>
> Suppose the following table is called t:
>
> |   | :A   | :B   | :C   ||---+--+--+--|| 1 |  |  
> | '[x y z] || 2 | "2a" | "2b" |  || 3 |  |  |  || 3 | 
> :3a  |  | "Foo"|
>
>
> Then (t :A) would return {2 "2a", 3 :3a}, and (t 2) would return {:A "2a", 
> :B "2b"}.
> (t :A 2) or (t 2 :A) would return "2a".
>
> I'm thinking of implementing it as a simple map of maps with some extra 
> functions, but I'm not sure if
> that would be the best option.
>
>
>

-- 
-- 
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/groups/opt_out.




Searching for Regular Expressions in a file

2013-08-12 Thread JvJ
Is there a way to do a regex search over an entire file without loading the 
file into memory?

-- 
-- 
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/groups/opt_out.


Re: Searching for Regular Expressions in a file

2013-08-13 Thread JvJ
I had some difficulty with the line seq because I was looking for 
multi-line patterns.  I'll try the char-seq thing.

On Monday, 12 August 2013 18:42:18 UTC-7, Joel Holdbrooks wrote:
>
> You could use *line-seq* which, if I'm not mistaken, is lazy. Then do 
> your regex search line by line lazily.
>
> On Monday, August 12, 2013 4:25:15 PM UTC-7, JvJ wrote:
>>
>> Is there a way to do a regex search over an entire file without loading 
>> the file into memory?
>>
>

-- 
-- 
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/groups/opt_out.




Easiest way to map over leaf nodes of nested sequence

2013-08-27 Thread JvJ
I feel like this question has been asked about a trillion times, but I was 
having a hard time finding a straight answer.  Is there a really 
straightforward way in the standard library or in one of the contrib 
libraries to do something like this:
(nested-map inc '(1 (2 3) (4 (5 (6) ===> '(2 (3 4) (5 (6 (7

-- 
-- 
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/groups/opt_out.


Re: Easiest way to map over leaf nodes of nested sequence

2013-08-27 Thread JvJ
I suppose that works, but it seems a little inelegant to do this:
(prewalk #(if (sequential? %) % (f %)) xs)
instead of just
(prewalk f xs)

On Tuesday, 27 August 2013 20:06:38 UTC-7, gfredericks wrote:
>
> Clojure.walk
> On Aug 27, 2013 10:05 PM, "JvJ" > wrote:
>
>> I feel like this question has been asked about a trillion times, but I 
>> was having a hard time finding a straight answer.  Is there a really 
>> straightforward way in the standard library or in one of the contrib 
>> libraries to do something like this:
>> (nested-map inc '(1 (2 3) (4 (5 (6) ===> '(2 (3 4) (5 (6 (7
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>

-- 
-- 
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/groups/opt_out.


Emacs Clojure mode : No syntax highlighting for #_

2013-08-28 Thread JvJ
Although semicolons cause the text color to change in order to look 
"commented-out", the #_ reader macro doesn't cause any such change.  Is 
this intended, or is it a bug?

-- 
-- 
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/groups/opt_out.


Re: too circular?

2013-08-29 Thread JvJ
I wonder if the somewhat counterintuitive concept of a "named anonymous 
function" eludes some people, or isn't properly conveyed in tutorials.

On Tuesday, 27 August 2013 00:36:07 UTC-7, HamsterofDeath wrote:

> thx
>
>
> 2013/8/26 Marshall Bockrath-Vandegrift >
>
>> Dennis Haupt > writes:
>>
>> > (defn fib-n [n]
>> > (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)]
>> > (take n (fib 1 1
>> >
>> > can't i do a recursion here? how can i achieve this without doing an
>> > "outer defn"?
>>
>> You just need to give the anonymous function a name it can use to refer
>> to itself for (non-tail) recursion:
>>
>> (defn fib-n [n]
>>   (let [fib (fn fib [a b] (cons a (lazy-seq (fib b (+ b a)]
>> (take n (fib 1 1
>>
>> -Marshall
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
-- 
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/groups/opt_out.


Java Metadata Wrapper

2013-08-30 Thread JvJ
I've noticed that, when doing a lot of Java interop, it's impossible to 
attach metadata to most Java objects, since they don't implement the IMeta 
interface.  A workaround for this would be to do something like put every 
Java object in a single-element list and attach metadata to the list, but 
this is annoying.  Would it be possible (or even useful) to create some 
kind of generic IMeta structure that can wrap other Java objects and have 
them act like normal, except for the added metadata (or even other 
Clojure-esque features)?

-- 
-- 
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/groups/opt_out.


Catching Exceptions from Threads in REPL

2013-09-04 Thread JvJ

I'm working on a multithreaded program, and debugging in the repl is very 
hard.  Every time an exception occurs, the thread either shuts down or 
deals with it in some other way.  Is there a way I can get the REPL to 
intercept the exception and display 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/groups/opt_out.


Re: [ANN] lein typed - Check Clojure code with core.typed

2013-09-05 Thread JvJ
What's the compatibility with the REPL like?  Is there anything like a 
type-checked REPL initialization, or automatic type checking when loading a 
namespace?

On Tuesday, 3 September 2013 11:18:04 UTC-7, Ambrose Bonnaire-Sergeant 
wrote:

> Hi,
>
> Announcing lein typed, a tool to use core.typed at the command line.
>
> https://github.com/frenchy64/lein-typed
>
> Thanks,
> Ambrose
>

-- 
-- 
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/groups/opt_out.


Clojurescript Light Table Setup

2015-02-20 Thread JvJ
I'm having some issues working with CLJS and Light table.  I've found a few 
things online, but never a single end-to-end setup.  Does anyone have any 
advice on setting up, beginning with lein, ending with repl-browser 
connection in light table?

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: Clojurescript Light Table Setup

2015-02-22 Thread JvJ
Actually, the problem seems to be fixed.  I used the lein figwheel template 
and that seems to work well.

On Friday, 20 February 2015 14:52:15 UTC-8, Sam Ritchie wrote:
>
> What issues are you having?
>
>   JvJ 
>  February 20, 2015 at 2:17 PM
> I'm having some issues working with CLJS and Light table.  I've found a 
> few things online, but never a single end-to-end setup.  Does anyone have 
> any advice on setting up, beginning with lein, ending with repl-browser 
> connection in light table?
>
> Thanks.
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>  
>
> -- 
> Sam Ritchie (@sritchie)
> Paddleguru Co-Founder
> 703.863.8561
> www.paddleguru.com
> Twitter <http://twitter.com/paddleguru> // Facebook 
> <http://facebook.com/paddleguru>
>  

-- 
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.


Paper on Immutable Persistent Data Structures

2015-07-20 Thread JvJ
Does anyone know if there exists a paper/web page describing in detail how 
each of Clojure's data structures are implemented?

-- 
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.spec

2016-05-25 Thread JvJ
Any plans for cljs support?

On Monday, 23 May 2016 07:12:29 UTC-7, Rich Hickey wrote:
>
> Introducing clojure.spec 
>
> I'm happy to introduce today clojure.spec, a new core library and support 
> for data and function specifications in Clojure. 
>
> Better communication 
>
> Clojure is a dynamic language, and thus far we have relied on 
> documentation or external libraries to explain the use and behavior of 
> functions and libraries. But documentation is difficult to produce, is 
> frequently not maintained, cannot be automatically checked and varies 
> greatly in quality. Specs are expressive and precise. Including spec in 
> Clojure creates a lingua franca with which we can state how our programs 
> work and how to use them. 
>
> More leverage and power 
>
> A key advantage of specifications over documentation is the leverage they 
> provide. In particular, specs can be utilized by programs in ways that docs 
> cannot. Defining specs takes effort, and spec aims to maximize the return 
> you get from making that effort. spec gives you tools for leveraging specs 
> in documentation, validation, error reporting, destructuring, 
> instrumentation, test-data generation and generative testing. 
>
> Improved developer experience 
>
> Error messages from macros are a perennial challenge for new (and 
> experienced) users of Clojure. specs can be used to conform data in macros 
> instead of using a custom parser. And Clojure's macro expansion will 
> automatically use specs, when present, to explain errors to users. This 
> should result in a greatly improved experience for users when errors occur. 
>
> More robust software 
>
> Clojure has always been about simplifying the development of robust 
> software. In all languages, dynamic or not, tests are essential to quality 
> - too many critical properties are not captured by common type systems. 
> spec has been designed from the ground up to directly support generative 
> testing via test.check https://github.com/clojure/test.check. When you 
> use spec you get generative tests for free. 
>
> Taken together, I think the features of spec demonstrate the ongoing 
> advantages of a powerful dynamic language like Clojure for building robust 
> software - superior expressivity, instrumentation-enhanced REPL-driven 
> development, sophisticated testing and more flexible systems. I encourage 
> you to read the spec rationale and overview  http://clojure.org/about/spec. 
> Look for spec's inclusion in the next alpha release of Clojure, within a 
> day or so. 
>
> Note that spec is still alpha, and some details are likely to change. 
> Feedback welcome. 
>
> I hope you find spec useful and powerful! 
>
> Rich 
>
>

-- 
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.spec

2016-05-25 Thread JvJ
Approximate ETA for this, if known?

On Wednesday, 25 May 2016 09:08:29 UTC-7, Alex Miller wrote:
>
> Coming.
>
> On Wednesday, May 25, 2016 at 10:59:52 AM UTC-5, JvJ wrote:
>>
>> Any plans for cljs support?
>>
>

-- 
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.


Get Lein to run 32-bit JVM on Windows

2016-07-05 Thread JvJ
Is it possible to configure Leiningen to run a 32-bit JVM by default?  I've 
already tried changing the LEIN_CMD and JAVA_HOME to the x86 executable paths, 
but it still runs the amd64 JVM.

Any tips?  I'm doing this for overtone, since it doesn't support amd64 on 
Windows.

-- 
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: Get Lein to run 32-bit JVM on Windows

2016-07-05 Thread JvJ
I think when I wrote LEIN_CMD, I meant LEIN_JAVA_CMD.  I've already set it 
to the x86 JVM path, with no luck so far.

(System/getProperty "os.arch") still returns "amd64", and overtone still 
doesn't work right.

On Tuesday, 5 July 2016 02:02:53 UTC-7, David Powell wrote:
>
> I think you need to set LEIN_JAVA_CMD to affect the jvm actually used to 
> start leiningen itself.
>
> On Tue, Jul 5, 2016 at 9:35 AM, JvJ > 
> wrote:
>
>> Is it possible to configure Leiningen to run a 32-bit JVM by default?  
>> I've already tried changing the LEIN_CMD and JAVA_HOME to the x86 
>> executable paths, but it still runs the amd64 JVM.
>>
>> Any tips?  I'm doing this for overtone, since it doesn't support amd64 on 
>> Windows.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@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: Get Lein to run 32-bit JVM on Windows

2016-07-06 Thread JvJ
My solution was to dual-boot linux.  I think it's about time anyway.

On Tuesday, 5 July 2016 12:17:02 UTC-7, JvJ wrote:
>
> I think when I wrote LEIN_CMD, I meant LEIN_JAVA_CMD.  I've already set it 
> to the x86 JVM path, with no luck so far.
>
> (System/getProperty "os.arch") still returns "amd64", and overtone still 
> doesn't work right.
>
> On Tuesday, 5 July 2016 02:02:53 UTC-7, David Powell wrote:
>>
>> I think you need to set LEIN_JAVA_CMD to affect the jvm actually used to 
>> start leiningen itself.
>>
>> On Tue, Jul 5, 2016 at 9:35 AM, JvJ  wrote:
>>
>>> Is it possible to configure Leiningen to run a 32-bit JVM by default?  
>>> I've already tried changing the LEIN_CMD and JAVA_HOME to the x86 
>>> executable paths, but it still runs the amd64 JVM.
>>>
>>> Any tips?  I'm doing this for overtone, since it doesn't support amd64 
>>> on Windows.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@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+u...@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.


Quil and Core.async - Problems blocking thread with

2016-08-02 Thread JvJ
I'm experimenting with using core.async with game scripting.  For testing 
purposes, I put together a small sketch with quil.

The issue I'm having is that the quil sketch's draw function seems to break 
whenever the 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: Klipse for Kids

2016-08-02 Thread JvJ
Pretty good.  However: In chapter 1, you might want to clear up the fact 
that 7*8 is 7 x 8 early on.  Kids may not be familiar with the * as a 
multiplication symbol.  I realize it's explained later, but it's better to 
avoid confusion beforehand.

On Tuesday, 2 August 2016 10:52:30 UTC-7, Mars0i wrote:
>
> This looks very, very nice.  The instant feedback is especially helpful.  
> (You are probably already working on is capturing errors to make them less 
> daunting.)
>
> Klipse reminded me of Carin Meier's beautiful and poignant Hello World 
> for the Next Generation. 
> 
>
> I always wondered whether *The Little Schemer* 
>  would work with kids. I 
> suspect not, until mid teens, at least.
>

-- 
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.


ClojureScript vs. Elm for Multiplayer Web Game

2015-09-20 Thread JvJ
I'm trying to develop a small multiplayer in-browser card game (simple 2d 
garphics), but I don't have  a lot of experience in web app development. 
 I'll probably be handling client-server communication with Node.js.

I do have experience with functional programming, so I was looking into 
things like ClojureScript and the Elm language (http://elm-lang.org).

If anyone has experience with game development in either or both of these 
languages, which would you suggest?

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: ClojureScript vs. Elm for Multiplayer Web Game

2015-09-21 Thread JvJ
Wow!  An unexpected number of resources on exactly what I'm looking for! 
 Thanks!

... but I am somehow surprised that someone could mention both Clojure and 
the Undead without using term "Macronomicon".

On Monday, 21 September 2015 06:52:24 UTC-7, Gijs S. wrote:
>
> I have no experience with Elm, but I have made a card game with 
> ClojureScript:
>
> http://thegeez.net/2012/03/20/racket_gin_clojurescript.html
>
> As well as a version with a Datomic back-end:
> http://thegeez.net/2014/06/12/gin_datomic.html
>
>

-- 
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: ClojureScript vs. Elm for Multiplayer Web Game

2015-09-22 Thread JvJ
Also, I noticed that http-kit is being used in the zombie game tutorial.  
How does that stack up against node in terms of capability?

On Monday, 21 September 2015 21:22:51 UTC-7, JvJ wrote:

> Wow!  An unexpected number of resources on exactly what I'm looking for! 
>  Thanks!
>
> ... but I am somehow surprised that someone could mention both Clojure and 
> the Undead without using term "Macronomicon".
>
> On Monday, 21 September 2015 06:52:24 UTC-7, Gijs S. wrote:
>>
>> I have no experience with Elm, but I have made a card game with 
>> ClojureScript:
>>
>> http://thegeez.net/2012/03/20/racket_gin_clojurescript.html
>>
>> As well as a version with a Datomic back-end:
>> http://thegeez.net/2014/06/12/gin_datomic.html
>>
>>

-- 
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.


core.typed and cider

2015-09-24 Thread JvJ
Hi,

Maybe this topic has already been addressed, but if it has been, I couldn't 
find it.

When using cider, I tend to user C-c C-l a lot to reload my namespaces as 
I'm writing them.

Is there an easy way to incorporate type-checking into this process?  A 
load-file-and-typecheck command?

I've already tried just putting (t/check-ns) at the end of the file, but 
this seems to cause stack overflows in some cases.

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: core.typed and cider

2015-09-25 Thread JvJ
Lars, thanks for telling me about squiggly-clojure.  It seems great.

Do you know if there's a way to get it to work with cljc and/or cljs files? 
 Currently, it only seems to work with clj files.

On Thursday, 24 September 2015 13:36:07 UTC-7, JvJ wrote:
>
> Hi,
>
> Maybe this topic has already been addressed, but if it has been, I 
> couldn't find it.
>
> When using cider, I tend to user C-c C-l a lot to reload my namespaces as 
> I'm writing them.
>
> Is there an easy way to incorporate type-checking into this process?  A 
> load-file-and-typecheck command?
>
> I've already tried just putting (t/check-ns) at the end of the file, but 
> this seems to cause stack overflows in some cases.
>
> 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.


recombining results from clojure.data/diff

2015-10-15 Thread JvJ
I just discovered clojure.data/diff, and it's great.  However, I'm not sure 
how to recombine the results to get back the original.

For instance, if (diff a b) = c, then how can I combine b and c to get back 
to a?

-- 
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: recombining results from clojure.data/diff

2015-10-19 Thread JvJ
Merge isn't recursive on substructures.

-- 
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.


Libraries for dealing with DNS

2015-10-19 Thread JvJ
DNS clients happen to be my job.  If you can't find one, maybe I'll conttibute 
to something.

-- 
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.


compojure/http-kit redirection

2015-10-26 Thread JvJ
Hi, I'm starting a web app with compojure and http-kit.  I would like to 
have one request redirect to another page, but I'm not sure how:

(defroutes app
  (GET "/ws" ws-handler) ; Websocket connection
  (GET "/user/:id" [id] ;; I want to redirect to index.html?user=id
   )
  (resources "/"))


When I get the /user/:id path, I would like to return index.html?user=id. 
 How can that be done?


Also, how to I interpret URL params using defroutes?


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.


core.async multi-channel?

2015-10-27 Thread JvJ
Is it possible to create a core.async channel that has one input and 
simultaneously delivers the same message to multiple endpoints?

-- 
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.


core.typed - Can't resolve alias name

2015-10-29 Thread JvJ
Reposting from the core.typed google group.  Didn't get a response.

I'm just starting with core.typed, and I can't seem to get it to work 
properly in the REPL.

I start by defining an alias (Fhtagn), but when I later try to type-check 
it, the name "Fhtagn" is unresolved.

Am I using it wrong, or is this just a consequence of using the REPL?


guymover.game-server> (t/defalias Fhtagn (t/HMap :mandatory {:a t/Int :b t/
Str}))
nil
guymover.game-server> (t/cf {:a 1 :b ""} Fhtagn)
Type Error (C:\Users\Kaylen\AppData\Local\Temp\form-init7559705448676355576.
clj) Internal Error (:) Cannot resolve name guymover.game-server/
Fhtagn
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.


cljc require-macros

2015-10-30 Thread JvJ
I've been writing some cljc files lately, and importing the clj/cljs 
versions of particular libraries is becoming somewhat difficult.

I usually have to do some complicated reader-conditionals like this:


(ns my-ns
(:require #?(:clj [clojure.core.typed :as t :refer [ann defalias Int]]
:cljs [cljs.core.typed :as t :refer [Int]]))

#?@( :cljs ( (:require-macros [cljs.core.typed :as t :refer [ann 
defalias]]))
  :clj ()))


When including cross-platform libraries, I am able to refer all necessary 
symbols in a :require clause for clj files, but I need to separate macros 
from other symbols with cljs files.

Is there an easier or more straightforward way to do this with cljc files?

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.


Expectations mode not running tests

2015-11-02 Thread JvJ
I've been attempting to use expectations and emacs expectations-mode to run 
test on namespaces.  However, when I attempt to execute tests in 
expectations mode, I get the following error message:

expectations-eval: Symbol’s function definition is void: nrepl-send-string

I'm not sure if this has something to do with my project setup, but I 
expect my emacs configuration is to blame.

Any ideas on how it may be fixed?

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.


Prismatic Schema: Defining a schema for key-value pairs

2016-01-15 Thread JvJ

I've recently started using prismatic schema, and I'm attempting to define 
a schema for a map data structure.

I understand that it is possible to use a schema to define the types of 
both keys and values in the map, like so:

(def my-map {key-schema val-schema})


However, I would like to use the schema to enforce certain relationships 
between the keys and values.  In particular, this one:

(fn [[k v]]
   (isa? (type v) k))


Is it possible to define an associative map schema that applies a predicate 
to key-value pairs rather than just keys and values separately?

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: Prismatic Schema: Defining a schema for key-value pairs

2016-01-16 Thread JvJ
That is exactly what I am looking for!

-- 
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: Prismatic Schema: Defining a schema for key-value pairs

2016-01-16 Thread JvJ
Do you know if there's a way to identify the particular key that failed in 
the error message?

On Saturday, 16 January 2016 02:01:49 UTC-8, JvJ wrote:
>
> That is exactly what I am looking for!

-- 
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.


defmulti with prismatic schema

2016-01-16 Thread JvJ
Hello,

I understand that Prismatic Schema has a means of annotating defmethod, but 
what should I do about defmulti?

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.


Cross-platform check if value is a channel

2016-01-17 Thread JvJ
Is there a way of checking to see if something is a channel?  Does it work 
in both clj and cljs?

-- 
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: Cross-platform check if value is a channel

2016-01-18 Thread JvJ
So, you can just check if #(safisfies? 
clojure.core.async.impl.protocols/Channel %)

On Monday, 18 January 2016 10:48:10 UTC-8, Alex Miller wrote:
>
> There is a ticket for this http://dev.clojure.org/jira/browse/ASYNC-126 
> and you'll notice there is actually an implementation buried inside right 
> now:
>
> clojure.core.async.impl.protocols/closed?
>
> On Sunday, January 17, 2016 at 10:53:57 PM UTC-6, JvJ wrote:
>>
>> Is there a way of checking to see if something is a channel?  Does it 
>> work in both clj and cljs?
>>
>

-- 
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.


Parsing complex parameter lists

2016-01-18 Thread JvJ
I'm extending def macros, and I would like to know if there is an easy way 
to handle parsing the complex parameter lists that can be passed into these 
macros.

For example, defn has a parameter list something like the following:

[name doc-string? attr-map? arg-vec pre-post-map? & body]


There are so many possible conditions here.  I feel like there should be an 
easy way to do it, but my solutions so far seem too complex.

-- 
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: defmulti with prismatic schema

2016-01-19 Thread JvJ
I've already figured out that the dispatch function can be schematized, but 
good call on the wrapper.  I'll try that.

On Monday, 18 January 2016 00:58:19 UTC-8, Jason Wolfe wrote:
>
> You can find some context here and in the linked PRs:
>
> https://github.com/plumatic/schema/pull/119
>
> Basically, the reason we don't have defmulti is that it's difficult to 
> implement properly, and didn't seem worth the effort and maintenance cost.  
>
> The simplest workaround is to create a schematized wrapper function that 
> calls through to your `defmulti`, and make that the public API (name the 
> wrapper `foo` and your defmulti `foo*` or something).
>
> There are also two partial solutions:
>  - Schematize each defmethod individually (as you mention)
>  - Schematize the dispatch function (this can do the inputs, but not the 
> outputs)
>
> Hope this helps,
> Jason
>
>
>
>
> On Sunday, January 17, 2016 at 12:29:43 AM UTC, JvJ wrote:
>>
>> Hello,
>>
>> I understand that Prismatic Schema has a means of annotating defmethod, 
>> but what should I do about defmulti?
>>
>> 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.


Emulating the Syntax quote

2016-01-20 Thread JvJ
With the syntax quote, all symbols become namespace-qualified.  (I.e `a => 
user/a, `def=> clojure.core/def)

Is there a way to determine how a given symbol would be qualified in the 
current environment, and to find out what it's implicit namespace would be?

-- 
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: Emulating the Syntax quote

2016-01-20 Thread JvJ
Here's the solution I came up with:

(s/defn qualify :- s/Symbol
  "Convert a symbol to a qualified symbol.  If the
symbol does not already refer to an existing var,
default to the current namespace."
  [sym :- s/Symbol]
  (let [res (resolve sym)
ns (or (and res (-> res (meta) (:ns) (.name) (name)))
   (-> *ns* (.name) (name)))
nme (name sym)]
(symbol ns nme)))

On Wednesday, 20 January 2016 08:36:49 UTC-8, kovasb wrote:
>
> Are you looking for https://clojuredocs.org/clojure.core/resolve ?
>
>
> On Wed, Jan 20, 2016 at 3:11 AM, JvJ > 
> wrote:
>
>> With the syntax quote, all symbols become namespace-qualified.  (I.e `a 
>> => user/a, `def=> clojure.core/def)
>>
>> Is there a way to determine how a given symbol would be qualified in the 
>> current environment, and to find out what it's implicit namespace would be?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@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+u...@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.


Check if value is a ring handler

2016-01-26 Thread JvJ
Is there a way to dynamically check whether or not a given function 
qualifies as a ring handler?

-- 
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.


Kicking off a process in Compojure Defroutes / http-kit runserver

2016-02-01 Thread JvJ
I'm working on a web app, and I'm using defroutes to define my application 
and runserver to initialize it.  However, when run-server is called, I 
can't find a way to run code before the app starts listening for requests.  
I'd like to start a background async process that can interact with 
incoming web requests.  Is there an easy way to do this using defroutes, or 
will I have to come up with something on my own?

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.


Chaining compojure routes

2016-02-12 Thread JvJ
I'm just starting to use ring/compojure to create web apps.

One thing I would like to do is have an updatable collection of apps that 
can be accessed based on the URL input.

For example, if I have an app named "foo", then website.com/foo would 
redirect to that app.

So far, I have the following implementation:

(def route-m
  {"foo" (routes (GET "/foo" [] "Hello Foo!"))
   "bar" (routes
  (GET "/bar/baz" [] "Hello Foo!")
  (GET "/bar/quux" [] "Hello Quux!"))})

(def test-r
  (routes
   (GET "/hey"
[]
"HEY!")
   (GET "/:app*" [app]
(route-m app


The issue with this method is the fact that the "sub-routes" need to have 
the full path instead of just the sub-path.  For example, "foo" needs to 
define its routes in terms of "foo/..." instead of just "/...".

Is there any way around this?

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.


Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ

I've been using Schema, and there's a kind of type definition that I'm 
having trouble with.  I'm not sure exactly how to describe it, so I'll 
provide an example.

I'm working on a digital card game in which there are numerous zones that a 
card may be in.  Each card needs to know which zone it is in, and there may 
be additional information depending on the zone.

For instance, if a card is in a player's hand, no additional information is 
required.  However, if the card is on the board, it needs to understand its 
position on the board.

I have the following definition for zone types:

(def Zone
  "A schema for referring to the various game zones."
  (s/enum :Hand
  :Deck
  :Board
  :Field
  :Discard
  :Void))

I want to define a different schema type for each of these, and then define 
a zone spec:

(def ZoneSpec {(required-key :zone-type) Zone
}

-- 
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.


Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ
I've been using Schema, and there's a kind of type definition that I'm 
having trouble with.  I'm not sure exactly how to describe it, so I'll 
provide an example.

I'm working on a digital card game in which there are numerous zones that a 
card may be in.  Each card needs to know which zone it is in, and there may 
be additional information depending on the zone.

For instance, if a card is in a player's hand, no additional information is 
required.  However, if the card is on the board, it needs to understand its 
position on the board.

I have the following definition for zone types:

(def Zone
  "A schema for referring to the various game zones."
  (s/enum :Hand
  :Deck
  :Board
  :Field
  :Discard
  :Void))

I want to define a different schema type for each of these, and then define 
a zone spec:

(def ZoneSpec {(required-key :zone-type) Zone
   :data 
})

I want to ensure that whichever data is provided specified the schema 
associated with the zone type.

Is there a way to do this?

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.


Prismatic Schema - Why is "both" deprecated?

2016-03-05 Thread JvJ

I've noticed that there is the function "both" in Schema.

Both says that it can be replaced by conditional, but I'm not sure exactly 
how to go about doing this.

Can someone provide an example?

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: Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ
Algebraic data types are exactly what I'm looking for, actually.  I think 
I'll try something like that.

On Saturday, 5 March 2016 16:28:22 UTC-8, Bobby Eickhoff wrote:
>
> Note also that I'm giving each Zone "object" it's own :type property.  
> That's how I'm able to dispatch on the type.  It also plays well with 
> multimethods.
>
> On Saturday, March 5, 2016 at 7:26:27 PM UTC-5, Bobby Eickhoff wrote:
>>
>> It sounds like what you're describing is (structurally) an algebraic data 
>> type, i.e. a generic type with specific variants.  I've been able to do 
>> something like this in my own projects.  Here I'm considering Zone the 
>> general type and each variant is Zone:Hand, Zone:Deck, &c.
>>
>> (def Zone:Hand
>>   ...)
>>
>> (def Zone:Deck
>>   ...)
>>
>> (def Zone
>>   (s/conditional
>> #(= (:type %) :Hand) Zone:Hand
>> #(= (:type %) :Deck) Zone:Deck
>> ...))
>>
>> Does that help?
>>
>> On Saturday, March 5, 2016 at 6:58:31 PM UTC-5, JvJ wrote:
>>>
>>> I've been using Schema, and there's a kind of type definition that I'm 
>>> having trouble with.  I'm not sure exactly how to describe it, so I'll 
>>> provide an example.
>>>
>>> I'm working on a digital card game in which there are numerous zones 
>>> that a card may be in.  Each card needs to know which zone it is in, and 
>>> there may be additional information depending on the zone.
>>>
>>> For instance, if a card is in a player's hand, no additional information 
>>> is required.  However, if the card is on the board, it needs to understand 
>>> its position on the board.
>>>
>>> I have the following definition for zone types:
>>>
>>> (def Zone
>>>   "A schema for referring to the various game zones."
>>>   (s/enum :Hand
>>>   :Deck
>>>   :Board
>>>   :Field
>>>   :Discard
>>>   :Void))
>>>
>>> I want to define a different schema type for each of these, and then 
>>> define a zone spec:
>>>
>>> (def ZoneSpec {(required-key :zone-type) Zone
>>>:data >> specified earlier>
>>> })
>>>
>>> I want to ensure that whichever data is provided specified the schema 
>>> associated with the zone type.
>>>
>>> Is there a way to do this?
>>>
>>> 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: Prismatic Schema - Why is "both" deprecated?

2016-03-06 Thread JvJ
In this example, one of the schemas is a predicate schema.  What if neither 
of them are?

On Sunday, 6 March 2016 18:48:21 UTC-8, Jason Wolfe wrote:
>
> In place of (s/both long (s/pred odd?)) you can do (s/conditional odd? 
> long), but (s/constrained long odd?) probably provides better error 
> messages (since it validates long before odd?). I think there are some 
> examples in the readme. 
>
> If this isn't what you're looking for, can you please provide some more 
> details of your use case? 
>
> Thanks,
> Jason
>
>
>
> On Sunday, March 6, 2016 at 5:38:35 AM UTC+5:30, JvJ wrote:
>>
>>
>> I've noticed that there is the function "both" in Schema.
>>
>> Both says that it can be replaced by conditional, but I'm not sure 
>> exactly how to go about doing this.
>>
>> Can someone provide an example?
>>
>> 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: Prismatic Schema - Self-reference in schema definitions

2016-03-12 Thread JvJ
Thanks for the tip here.  abstract-map-schema works really well.

One thing that I would add to it if I could would be a dispatch function 
rather than just keywords, but I don't need that at the moment.

On Sunday, 6 March 2016 18:41:53 UTC-8, Jason Wolfe wrote:
>
> If I'm understanding correctly, this sounds like a 
> `schema.experimental.abstract-map-schema` to me (it's basically shorthand 
> for what Bobby suggests) .  There's an example in the readme. 
>
> Best, Jason
>
> On Sunday, March 6, 2016 at 5:28:31 AM UTC+5:30, JvJ wrote:
>>
>> I've been using Schema, and there's a kind of type definition that I'm 
>> having trouble with.  I'm not sure exactly how to describe it, so I'll 
>> provide an example.
>>
>> I'm working on a digital card game in which there are numerous zones that 
>> a card may be in.  Each card needs to know which zone it is in, and there 
>> may be additional information depending on the zone.
>>
>> For instance, if a card is in a player's hand, no additional information 
>> is required.  However, if the card is on the board, it needs to understand 
>> its position on the board.
>>
>> I have the following definition for zone types:
>>
>> (def Zone
>>   "A schema for referring to the various game zones."
>>   (s/enum :Hand
>>   :Deck
>>   :Board
>>   :Field
>>   :Discard
>>   :Void))
>>
>> I want to define a different schema type for each of these, and then 
>> define a zone spec:
>>
>> (def ZoneSpec {(required-key :zone-type) Zone
>>:data > specified earlier>
>> })
>>
>> I want to ensure that whichever data is provided specified the schema 
>> associated with the zone type.
>>
>> Is there a way to do this?
>>
>> 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: [ANN] Elements of Clojure

2016-03-19 Thread JvJ
So far, this appears to be primarily focused on style and programming 
practice.  Is that going to be the primary focus of the book?

On Thursday, 17 March 2016 10:47:55 UTC-7, Zach Tellman wrote:
>
> I'm writing a book about Clojure, aimed at people who already know the 
> core concepts, and want to use them more effectively.  The first chapter, 
> "Names", is complete and can be read for free.  Details can be found at 
> http://elementsofclojure.com/.  
>
> I'm happy to answer any questions here, or on the book's mailing list at 
> https://groups.google.com/forum/#!forum/elements-of-clojure.
>

-- 
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.


Error with company-mode autocomplete

2016-03-19 Thread JvJ
I downloaded a new emacs config 
(https://github.com/clojure-emacs/example-config), and it appears to be 
using company for auto-completion.  However, the autocomplete never works. 
 I get the following error each time:


Error while checking syntax automatically: (void-function seq-find) [2 
times]
eldoc error: (void-function seq-position)


Does anyone know the cause of this or how it could be fixed?

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: Error with company-mode autocomplete

2016-03-19 Thread JvJ
Solved by adding the seq-library to my load 
path: https://github.com/NicolasPetton/seq.el

On Saturday, 19 March 2016 15:13:40 UTC-7, JvJ wrote:
>
> I downloaded a new emacs config (
> https://github.com/clojure-emacs/example-config), and it appears to be 
> using company for auto-completion.  However, the autocomplete never works. 
>  I get the following error each time:
>
>
> Error while checking syntax automatically: (void-function seq-find) [2 
> times]
> eldoc error: (void-function seq-position)
>
>
> Does anyone know the cause of this or how it could be fixed?
>
> 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.


Emacs cider mode has problems with macros

2016-03-19 Thread JvJ


Something unusual happens when I'm writing macros while in modes cider and 
ClojureC with autocomplete enabled.

I have a macro derive-component (definition is too long to put in here). 
When I attempt to use this macro, as follows:

;; s refers to schema.core in this context

(derive-component
 Position
 "It has x and y coordinates."
   [s/Int s/Int])


If I try to type anywhere within the above form, I get a massive exception 
printout in the repl.  Furthermore, my cursor automatically switches to the 
repl from the file buffer.

I realize that something may be wrong with my macro definition, but that's 
not the point.  The repl should be able to handle these errors gracefully. 
 Furthermore, There is nothing to my knowledge that should be actively 
evaluating code.

Does anyone know what may be doing this?

Thanks

Here's the error stack trace:

RuntimeException [Int Int] is not a valid sequence schema; a valid sequence 
schema consists of zero or more `one` elements, followed by zero or more 
`optional` elements, followed by an optional schema that will match the 
remaining elements.  schema.core/parse-sequence-schema (core.clj:901)
java.lang.IllegalArgumentException: Don't know how to create ISeq from: 
clojure.lang.Symbol
 at clojure.lang.RT.seqFrom (RT.java:528)
clojure.lang.RT.seq (RT.java:509)
clojure.core/seq (core.clj:137)
clojure.core.protocols$seq_reduce.invoke (protocols.clj:30)
clojure.core.protocols/fn (protocols.clj:84)
clojure.core.protocols$fn__6452$G__6447__6465.invoke (protocols.clj:13)
clojure.core$reduce.invoke (core.clj:6519)
clojure.core$mapv.invoke (core.clj:6616)
cider.nrepl.middleware.info$format_eldoc$fn__26048.invoke (info.clj:290)
clojure.core$map$fn__4553.invoke (core.clj:2622)
clojure.lang.LazySeq.sval (LazySeq.java:40)
clojure.lang.LazySeq.seq (LazySeq.java:49)
clojure.lang.RT.seq (RT.java:507)
clojure.core/seq (core.clj:137)
clojure.core$map$fn__4553.invoke (core.clj:2616)
clojure.lang.LazySeq.sval (LazySeq.java:40)
clojure.lang.LazySeq.seq (LazySeq.java:49)
clojure.lang.RT.seq (RT.java:507)
clojure.core/seq (core.clj:137)
clojure.core$dorun.invoke (core.clj:3009)
clojure.core$doall.invoke (core.clj:3025)
clojure.walk$walk.invoke (walk.clj:46)
clojure.walk$postwalk.invoke (walk.clj:58)
clojure.core$partial$fn__4527.invoke (core.clj:2493)
clojure.core$map$fn__4553.invoke (core.clj:2622)
clojure.lang.LazySeq.sval (LazySeq.java:40)
clojure.lang.LazySeq.seq (LazySeq.java:49)
clojure.lang.RT.seq (RT.java:507)
clojure.lang.LazilyPersistentVector.create 
(LazilyPersistentVector.java:30)
clojure.core$vec.invoke (core.clj:361)
clojure.walk$walk.invoke (walk.clj:45)
clojure.walk$postwalk.invoke (walk.clj:58)
clojure.core$partial$fn__4527.invoke (core.clj:2493)
clojure.core$map$fn__4553.invoke (core.clj:2624)
clojure.lang.LazySeq.sval (LazySeq.java:40)
clojure.lang.LazySeq.seq (LazySeq.java:49)
clojure.lang.Cons.next (Cons.java:39)
clojure.lang.RT.next (RT.java:674)
clojure.core/next (core.clj:64)
clojure.core.protocols/fn (protocols.clj:170)
clojure.core.protocols$fn__6478$G__6473__6487.invoke (protocols.clj:19)
clojure.core.protocols$seq_reduce.invoke (protocols.clj:31)
clojure.core.protocols/fn (protocols.clj:101)
clojure.core.protocols$fn__6452$G__6447__6465.invoke (protocols.clj:13)
clojure.core$reduce.invoke (core.clj:6519)
clojure.core$into.invoke (core.clj:6600)
clojure.walk$walk.invoke (walk.clj:49)
clojure.walk$postwalk.invoke (walk.clj:58)
clojure.walk$stringify_keys.invoke (walk.clj:107)
clojure.tools.nrepl.transport.FnTransport.send (transport.clj:28)
clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__13898.send 
(pr_values.clj:27)
cider.nrepl.middleware.info$eldoc_reply.invoke (info.clj:302)
cider.nrepl.middleware.info$wrap_info$fn__26058.invoke (info.clj:315)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
cemerick.piggieback$wrap_cljs_repl$fn__20579.invoke (piggieback.clj:299)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
cider.nrepl.middleware.track_state$wrap_tracker$fn__27148.invoke 
(track_state.clj:200)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
cider.nrepl.middleware.pprint$wrap_pprint$fn__22366.invoke 
(pprint.clj:106)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
cider.nrepl.middleware.inspect$wrap_inspect$fn__20853.invoke 
(inspect.clj:137)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
clojure.tools.nrepl.middleware.pr_values$pr_values$fn__13895.invoke 
(pr_values.clj:22)
clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__13724.invoke 
(middleware.clj:22)
cider.nrepl.middle

Prismatic Schema -- Type signature of reducing functions

2016-03-31 Thread JvJ

When using functions with schema type signatures for reduce, I run into 
output schema errors whenever I try to short-circuit the reducing operation 
by wrapping the return value in reduced.  How can I modify the type 
signature so that it accepts output values of types A and (reduced A)?

-- 
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.


Core.async performance with many channels

2016-04-02 Thread JvJ

Lately, I've been working on a game in Clojure, and I've been trying out 
various ways of modelling the game state and objects.

One of these ideas is to give each object its own channel and make a fully 
asynchronous architecture.

I would like to know if having potentially hundreds of channels operating 
at once would be a significant performance issue.

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.


Cross platform date/time libarary

2016-04-03 Thread JvJ
Is there a date/time library that is written for both clojure and 
clojurescript?

-- 
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: Cross platform date/time libarary

2016-04-03 Thread JvJ
OK.  As long as a single import in a cljc will suffice.

On Sunday, 3 April 2016 21:20:54 UTC-7, Sean Corfield wrote:
>
> On 4/3/16, 7:36 PM, "JvJ"  on 
> behalf of kfjwh...@gmail.com > wrote: 
> > Is there a date/time library that is written for both clojure and 
> clojurescript? 
>
> Probably the closest thing is this pair of libraries: 
>
> https://github.com/clj-time/clj-time 
>
> https://github.com/andrewmcveigh/cljs-time 
>
> Same API, different implementations. 
>
> Sean Corfield -- (904) 302-SEAN 
> An Architect's View -- http://corfield.org/ 
>
> "If you're not annoying somebody, you're not really alive." 
> -- Margaret Atwood 
>
>
>
>
>
>
>

-- 
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.async performance with many channels

2016-04-03 Thread JvJ
This thing just an idea at this point.  Basically, your typical game loop 
will consist of iterating over a collection of objects and calling some 
kind of update operation on each.  I would like to replace this with 
asynchronous signaling.  Signaling could include messages like "update this 
object".  These messages would trigger certain async processes to start in 
the object.  This may allow for more flexible and asynchronous programming, 
since not everything has to fit into an update cycle.

On Sunday, 3 April 2016 21:10:16 UTC-7, Rangel Spasov wrote:
>
> Without knowing too much about the internals, but having used 
> core.async/channels a lot, I don't think "hundreds" of channels will be a 
> problem ever. However, as always the devil is in the details. People might 
> be able to give better feedback if you give more details about your use 
> case. 
>
> On Saturday, April 2, 2016 at 7:59:50 PM UTC-7, JvJ wrote:
>>
>>
>> Lately, I've been working on a game in Clojure, and I've been trying out 
>> various ways of modelling the game state and objects.
>>
>> One of these ideas is to give each object its own channel and make a 
>> fully asynchronous architecture.
>>
>> I would like to know if having potentially hundreds of channels operating 
>> at once would be a significant performance issue.
>>
>> 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.


Webassembly as a Clojure target platform

2016-04-03 Thread JvJ
Is there any plan in the future to have clojure (or some dialect of 
clojure) compile to webassembly?  I can't say for sure if it is the "next 
big thing" for the web, but it is a very interesting concept.

I suppose that, if Java bytecode could cross-compile to Webassembly, we 
would essentially get this for free, but I'm not sure if that will happen.

-- 
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.async performance with many channels

2016-04-06 Thread JvJ
It seems to do rather well.

On Wednesday, 6 April 2016 08:29:07 UTC-7, Francis Avila wrote:
>
> On Monday, April 4, 2016 at 6:30:07 PM UTC-5, Howard M. Lewis Ship wrote:
>>
>> David Nolen had an early ClojureScript core.async demo with thousands of 
>> channels, controlling individual pixels.
>>
>
> This is the demo you are referring to: 
> http://swannodette.github.io/2013/08/02/10-processes/
>  
>

-- 
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.


CLJS Analyzer - How To fully qualify a symbol?

2016-04-14 Thread JvJ
I'm writing a cross-platform app.  One of the macros I use takes a symbol 
as a parameter, and I want to make sure that I can obtain a fully qualified 
version of that symbol.

For example, if I have the following environment:

(ns foo

-- 
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.


  1   2   3   >