Re: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq

2013-04-30 Thread Ambrose Bonnaire-Sergeant
Hi Navgeet,

I'm not sure if rewriting jvm.tools.analyzer is a good idea, given that
there is CinC project for this year's GSoC.

Perhaps you could contribute to the CinC analyzer, and then follow with
integration with Codeq?

Thanks,
Ambrose

On Wed, May 1, 2013 at 1:45 AM, Navgeet Agrawal
wrote:

> Hi all,
> I've started with the application, though it has gotten quite late. I've
> explained what I intend to do in this gist -
> https://gist.github.com/Navgeet/5490202
>
> I'm kinda stuck in the last part - analysis techniques. I would appreciate
> suggestions that are not too heavy to deal with, given my  tight schedule
> in the later half of coding period.
>
> Cheers
> Navgeet
>
>  --
> --
> 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.
>
>
>

-- 
-- 
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: Something like cond, but with test-fns

2013-04-30 Thread Ken Scambler
That's the one I want.  Thanks!


On 29 April 2013 04:37, Stuart Sierra  wrote:

> You could do it with `condp`:
>
> (condp #(%1 %2) value
>   foo-pred? (foo-result)
>   bar-pred? (bar-result)
>   else? (default-result))
>
> -S
>
>
>
> On Saturday, April 20, 2013 5:15:14 AM UTC-4, Ken Scambler wrote:
>>
>> Hi there,
>> I'm getting started with Clojure, and found myself really missing
>> Scala-style pattern matching.   Now I know about Matchure and core.match,
>> but all I really needed was a cond using test predicates rather than
>> boolean expressions, like this:
>>
>> (condval value
>>   foo-pred? (foo-result)
>>   bar-pred? (bar-result)
>>   else? (default-result))
>>
>> (Where 'else? is a predicate that ignores the argument and returns true)
>>
>> Lisp being Lisp, I rolled my own and it works fine.   But I was wondering
>> if there was an idiomatic way to do this in the standard library, without
>> the repetition that cond necessitates when you are testing against a single
>> value.
>>
>> Cheers,
>> Ken
>>
>  --
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/ZLu3E-tr_Y4/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> clojure+unsubscr...@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.




Re: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Finally it works! Had some more issues with Eclipse running on Java 7, but 
wiping out all Java and installing the latest JDK of version 7 and showing 
some little attention to Eclipse did the trick! Thank you very much for the 
directions, atkaaz and other buddies - I would've never been able to figure 
it out alone by myself without the help from the community :)

So looks like having latest CCW beta (todays latest ver. 0.13 beta I think) 
and Java 7 turned out to be necessary for my wish to come true! :D

And looking forward for a fully and correctly maintained JME repo! Just 
want to show encouragement to those who are able :)



вторник, 30 апреля 2013 г., 23:04:01 UTC+4 пользователь atkaaz написал:
>
> I had the issue here: 
> https://code.google.com/p/counterclockwise/issues/detail?id=567
> I think the fix is to use java 7 for eclipse not java 6
>
>
>
> On Tue, Apr 30, 2013 at 10:01 PM, Alex Fowler 
> 
> > wrote:
>
>> Same thing... I have no firewall or other restrictions... Have just 
>> deleted the ccw folder, and now it creates the folder, but does not fetch a 
>> jar into it. And the error is the same... reaally strange that :) Tried 
>> removing all the Run Configs just to be sure.. still same :)  Idk, maybe if 
>> I reboot, it's gonna be ok... I try to reboot now.
>>
>> вторник, 30 апреля 2013 г., 22:48:58 UTC+4 пользователь atkaaz написал:
>>>
>>> actually looks like I spoke too soon, what I said doesn't seem to apply 
>>> to you because the console message says  ccw.server instead of ccw-server  
>>> (dot vs dash), so it should be able to fetch that unless you're not 
>>> allowing it in firewall? I emptied my .m2 folder and it works for me, ccw 
>>> fetches all the artifacts even though I just Ctrl+Alt+L after starting 
>>> eclipse without any Update Dependencies on the project.
>>>
>>>
>>> On Tue, Apr 30, 2013 at 9:42 PM, AtKaaZ  wrote:
>>>
  sorry I meant, Run As->Run Configurations... :)


 On Tue, Apr 30, 2013 at 9:41 PM, AtKaaZ  wrote:

> oh yes that thing, just do Run->Run As...  on your project
> and delete all the children inside Clojure
> things like:
> fightingsail Leiningen
> where fightingsail is the name of the project
>
> and when you try to start the REPL again, it will create a new one 
> with the correct Arguments
>
>
> On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:
>
>> Right, I had the stable version, not beta, and Ctrl+Alt+L had no 
>> effect at all. So now I have updated to the latest beta. Now repl 
>> does 
>> not start at all :)
>>
>> The error in the console is:
>>
>> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
>> http://repo1.maven.org/**maven2/ ): 
>> repo1.maven.org
>>
>> This could be due to a typo in :dependencies or network issues.
>>
>>
>> My Eclipse version is
>>
>> Eclipse IDE for Java Developers
>>
>> Version: Juno Service Release 2
>>
>> Build id: 20130225-0426
>>
>>
>> CCW now is
>>
>>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239 
>> ccw.feature.feature.group Counterclockwise team 
>>
>>
>> I looked up and I saw Laurent saying that there is problems of 
>> backwards compatibility problems in new Eclipse versions... Uhhh so 
>> sad.. do you have any ideas?
>>
>>
>> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ 
>> написал:
>>>
>>> oh nevermind I misread that. So it doesn't work for you with ccw? 
>>> are you using latest ccw beta?
>>> When I start the core.clj file with Ctrl+Alt+L to load it in a repl 
>>> it works for me
>>>
>>> Eclipse SDK
>>>
>>> Version: 4.3.0
>>> Build id: I20130430-0031
>>>   Counterclockwise (Clojure plugin for Eclipse)
>>> 0.13.0.201304242239ccw.feature.feature.groupCounterclockwise 
>>> team
>>>  
>>>
>>> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:
>>>
 Just tried that! Very nice! Got it running with "lein repl" from 
 Windows command prompt!!! However, when I fire up the repl from 
 Eclipse 
 CCW, I get:

 ClassNotFoundException com.jme3.app.SimpleApplication 
  java.net.URLClassLoader$1.run (URLClassLoader.java:366)

 I assume, this is due to the fact that when I evaluate te "core" 
 file directly, it skips the "project.clj" which specifies the 
 necessary 
 :resource-paths... Don't you know, how can I have the repl from CCW? 
 Should 
 I make some explicit resources loading?



 понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James 
 Reeves написал:
>
> I've been messing around with jME3 as well, and at some point I 
> might release a libr

Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
To clarify, I was suspecting that I did something wrong in the (POST)
route. I tried using (:syms) as well as (:strs). I'm really stuck on
what is happening here.

-- 
-- 
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: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey


On Tuesday, April 30, 2013 6:25:11 AM UTC-7, Tassilo Horn wrote:
>
> David Toomey > writes: 
>
> Hi David, 
>
> > The error, as mentioned in the title: java.lang.ClassCastException: 
> > clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom 
>
> In which line? 
>
> The error is where the bolded is. It may have been confusing on the OP 
because I accidentally posted the test-case on not the real code: 

(defn do-login [handle passwd]
  (let [tuser (select db/allusers
  (fields :username :password :usertype)
  (where {:username handle}))]
(if (crypt/compare passwd
   (let [[{pwd :password}] tuser]
 pwd))
  ;ERROR:
  (do *(sesh/put! :uname handle)*
  (response/redirect "/"))
  (response/redirect "/"
 

> Hm, the message tells that you are using an atom function like swap! on 
> something that's not an Atom but Unbound.  But your code doesn't contain 
> such a coll.  So I guess it's in the SQL Korma code here 
> where db/allusers is Unbound. 
>
>
No, that part and the bcrypt comparision passes. Regardless, Korma does not 
use atoms. The problem is with the noir.session namespace and the error 
revolves around (sesh/put!). As I understand it, the noir.session namespace 
uses an atom. 


-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
I had the issue here:
https://code.google.com/p/counterclockwise/issues/detail?id=567
I think the fix is to use java 7 for eclipse not java 6



On Tue, Apr 30, 2013 at 10:01 PM, Alex Fowler wrote:

> Same thing... I have no firewall or other restrictions... Have just
> deleted the ccw folder, and now it creates the folder, but does not fetch a
> jar into it. And the error is the same... reaally strange that :) Tried
> removing all the Run Configs just to be sure.. still same :)  Idk, maybe if
> I reboot, it's gonna be ok... I try to reboot now.
>
> вторник, 30 апреля 2013 г., 22:48:58 UTC+4 пользователь atkaaz написал:
>>
>> actually looks like I spoke too soon, what I said doesn't seem to apply
>> to you because the console message says  ccw.server instead of ccw-server
>> (dot vs dash), so it should be able to fetch that unless you're not
>> allowing it in firewall? I emptied my .m2 folder and it works for me, ccw
>> fetches all the artifacts even though I just Ctrl+Alt+L after starting
>> eclipse without any Update Dependencies on the project.
>>
>>
>> On Tue, Apr 30, 2013 at 9:42 PM, AtKaaZ  wrote:
>>
>>> sorry I meant, Run As->Run Configurations... :)
>>>
>>>
>>> On Tue, Apr 30, 2013 at 9:41 PM, AtKaaZ  wrote:
>>>
 oh yes that thing, just do Run->Run As...  on your project
 and delete all the children inside Clojure
 things like:
 fightingsail Leiningen
 where fightingsail is the name of the project

 and when you try to start the REPL again, it will create a new one with
 the correct Arguments


 On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:

> Right, I had the stable version, not beta, and Ctrl+Alt+L had no
> effect at all. So now I have updated to the latest beta. Now repl does
> not start at all :)
>
> The error in the console is:
>
> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
> http://repo1.maven.org/**maven2/ ):
> repo1.maven.org
>
> This could be due to a typo in :dependencies or network issues.
>
>
> My Eclipse version is
>
> Eclipse IDE for Java Developers
>
> Version: Juno Service Release 2
>
> Build id: 20130225-0426
>
>
> CCW now is
>
>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239
> ccw.feature.feature.group Counterclockwise team
>
>
> I looked up and I saw Laurent saying that there is problems of
> backwards compatibility problems in new Eclipse versions... Uhhh so
> sad.. do you have any ideas?
>
>
> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>>
>> oh nevermind I misread that. So it doesn't work for you with ccw? are
>> you using latest ccw beta?
>> When I start the core.clj file with Ctrl+Alt+L to load it in a repl
>> it works for me
>>
>> Eclipse SDK
>>
>> Version: 4.3.0
>> Build id: I20130430-0031
>>   Counterclockwise (Clojure plugin for Eclipse)
>> 0.13.0.201304242239ccw.feature.feature.groupCounterclockwise team
>>
>>
>> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:
>>
>>> Just tried that! Very nice! Got it running with "lein repl" from
>>> Windows command prompt!!! However, when I fire up the repl from Eclipse
>>> CCW, I get:
>>>
>>> ClassNotFoundException com.jme3.app.SimpleApplication
>>>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>>>
>>> I assume, this is due to the fact that when I evaluate te "core"
>>> file directly, it skips the "project.clj" which specifies the necessary
>>> :resource-paths... Don't you know, how can I have the repl from CCW? 
>>> Should
>>> I make some explicit resources loading?
>>>
>>>
>>>
>>> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James
>>> Reeves написал:

 I've been messing around with jME3 as well, and at some point I
 might release a library for it.

 One of the problems with jME3 is that its deployment mechanism
 hasn't quite caught up with the current century. I'm planning on 
 packaging
 it up eventually, but in the meantime here's the ugly, dirty, terrible 
 hack
 I've been using:

 1. Download the binaries: http://www.**jmonkeyen
 gine.com/nightly/**jME3_2013-04-29.zip
 2. Create a new directory and extract the zip file into it
 3. Create a new Leiningen project
 4. Add the following to your project.clj file: :resource-paths
 ["lib/*"]
 5. Copy the lib directory from the jME3 binaries into your project
 directory

 Here's an example application to get you going:

 https://gist.github.com/**weavejester/5484183

Re: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Same thing... I have no firewall or other restrictions... Have just deleted 
the ccw folder, and now it creates the folder, but does not fetch a jar 
into it. And the error is the same... reaally strange that :) Tried 
removing all the Run Configs just to be sure.. still same :)  Idk, maybe if 
I reboot, it's gonna be ok... I try to reboot now.

вторник, 30 апреля 2013 г., 22:48:58 UTC+4 пользователь atkaaz написал:
>
> actually looks like I spoke too soon, what I said doesn't seem to apply to 
> you because the console message says  ccw.server instead of ccw-server  
> (dot vs dash), so it should be able to fetch that unless you're not 
> allowing it in firewall? I emptied my .m2 folder and it works for me, ccw 
> fetches all the artifacts even though I just Ctrl+Alt+L after starting 
> eclipse without any Update Dependencies on the project.
>
>
> On Tue, Apr 30, 2013 at 9:42 PM, AtKaaZ >wrote:
>
>> sorry I meant, Run As->Run Configurations... :)
>>
>>
>> On Tue, Apr 30, 2013 at 9:41 PM, AtKaaZ > >wrote:
>>
>>> oh yes that thing, just do Run->Run As...  on your project
>>> and delete all the children inside Clojure
>>> things like:
>>> fightingsail Leiningen
>>> where fightingsail is the name of the project
>>>
>>> and when you try to start the REPL again, it will create a new one with 
>>> the correct Arguments
>>>
>>>
>>> On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler 
>>> 
>>> > wrote:
>>>
 Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect 
 at all. So now I have updated to the latest beta. Now repl does not 
 start at all :)

 The error in the console is:

 Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
 http://repo1.maven.org/maven2/): repo1.maven.org

 This could be due to a typo in :dependencies or network issues.


 My Eclipse version is

 Eclipse IDE for Java Developers

 Version: Juno Service Release 2

 Build id: 20130225-0426


 CCW now is

   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239 
 ccw.feature.feature.group Counterclockwise team 


 I looked up and I saw Laurent saying that there is problems of 
 backwards compatibility problems in new Eclipse versions... Uhhh so 
 sad.. do you have any ideas?


 вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>
> oh nevermind I misread that. So it doesn't work for you with ccw? are 
> you using latest ccw beta?
> When I start the core.clj file with Ctrl+Alt+L to load it in a repl it 
> works for me
>
> Eclipse SDK
>
> Version: 4.3.0
> Build id: I20130430-0031
>   Counterclockwise (Clojure plugin for Eclipse)
> 0.13.0.201304242239ccw.feature.feature.groupCounterclockwise team
>  
>
> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:
>
>> Just tried that! Very nice! Got it running with "lein repl" from 
>> Windows command prompt!!! However, when I fire up the repl from Eclipse 
>> CCW, I get:
>>
>> ClassNotFoundException com.jme3.app.SimpleApplication 
>>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>>
>> I assume, this is due to the fact that when I evaluate te "core" file 
>> directly, it skips the "project.clj" which specifies the necessary 
>> :resource-paths... Don't you know, how can I have the repl from CCW? 
>> Should 
>> I make some explicit resources loading?
>>
>>
>>
>> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James 
>> Reeves написал:
>>>
>>> I've been messing around with jME3 as well, and at some point I 
>>> might release a library for it.
>>>
>>> One of the problems with jME3 is that its deployment mechanism 
>>> hasn't quite caught up with the current century. I'm planning on 
>>> packaging 
>>> it up eventually, but in the meantime here's the ugly, dirty, terrible 
>>> hack 
>>> I've been using:
>>>
>>> 1. Download the binaries: http://www.**jmonkeyen**gine.com/nightly/*
>>> *jME3_2013-04-**29.zip
>>> 2. Create a new directory and extract the zip file into it
>>> 3. Create a new Leiningen project
>>> 4. Add the following to your project.clj file: :resource-paths 
>>> ["lib/*"]
>>> 5. Copy the lib directory from the jME3 binaries into your project 
>>> directory
>>>
>>> Here's an example application to get you going:
>>>
>>> https://gist.github.com/**weavej**ester/5484183
>>>
>>> - James
>>>
>>>
>>> On 29 April 2013 20:02, Alex Fowler  wrote:
>>>
 Hello! I have a problem, I will try to explain.. I want to write a 
 game with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). 
 So I take their late

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
actually looks like I spoke too soon, what I said doesn't seem to apply to
you because the console message says  ccw.server instead of ccw-server
(dot vs dash), so it should be able to fetch that unless you're not
allowing it in firewall? I emptied my .m2 folder and it works for me, ccw
fetches all the artifacts even though I just Ctrl+Alt+L after starting
eclipse without any Update Dependencies on the project.


On Tue, Apr 30, 2013 at 9:42 PM, AtKaaZ  wrote:

> sorry I meant, Run As->Run Configurations... :)
>
>
> On Tue, Apr 30, 2013 at 9:41 PM, AtKaaZ  wrote:
>
>> oh yes that thing, just do Run->Run As...  on your project
>> and delete all the children inside Clojure
>> things like:
>> fightingsail Leiningen
>> where fightingsail is the name of the project
>>
>> and when you try to start the REPL again, it will create a new one with
>> the correct Arguments
>>
>>
>> On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:
>>
>>> Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect
>>> at all. So now I have updated to the latest beta. Now repl does not
>>> start at all :)
>>>
>>> The error in the console is:
>>>
>>> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
>>> http://repo1.maven.org/maven2/): repo1.maven.org
>>>
>>> This could be due to a typo in :dependencies or network issues.
>>>
>>>
>>> My Eclipse version is
>>>
>>> Eclipse IDE for Java Developers
>>>
>>> Version: Juno Service Release 2
>>>
>>> Build id: 20130225-0426
>>>
>>>
>>> CCW now is
>>>
>>>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239
>>> ccw.feature.feature.group Counterclockwise team
>>>
>>>
>>> I looked up and I saw Laurent saying that there is problems of backwards
>>> compatibility problems in new Eclipse versions... Uhhh so sad.. do you
>>> have any ideas?
>>>
>>>
>>> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:

 oh nevermind I misread that. So it doesn't work for you with ccw? are
 you using latest ccw beta?
 When I start the core.clj file with Ctrl+Alt+L to load it in a repl it
 works for me

 Eclipse SDK

 Version: 4.3.0
 Build id: I20130430-0031
   Counterclockwise (Clojure plugin for Eclipse)
 0.13.0.201304242239ccw.feature.feature.groupCounterclockwise team


 On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:

> Just tried that! Very nice! Got it running with "lein repl" from
> Windows command prompt!!! However, when I fire up the repl from Eclipse
> CCW, I get:
>
> ClassNotFoundException com.jme3.app.SimpleApplication
>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>
> I assume, this is due to the fact that when I evaluate te "core" file
> directly, it skips the "project.clj" which specifies the necessary
> :resource-paths... Don't you know, how can I have the repl from CCW? 
> Should
> I make some explicit resources loading?
>
>
>
> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James
> Reeves написал:
>>
>> I've been messing around with jME3 as well, and at some point I might
>> release a library for it.
>>
>> One of the problems with jME3 is that its deployment mechanism hasn't
>> quite caught up with the current century. I'm planning on packaging it up
>> eventually, but in the meantime here's the ugly, dirty, terrible hack 
>> I've
>> been using:
>>
>> 1. Download the binaries: http://www.**jmonkeyen**gine.com/nightly/**
>> jME3_2013-04-**29.zip
>> 2. Create a new directory and extract the zip file into it
>> 3. Create a new Leiningen project
>> 4. Add the following to your project.clj file: :resource-paths
>> ["lib/*"]
>> 5. Copy the lib directory from the jME3 binaries into your project
>> directory
>>
>> Here's an example application to get you going:
>>
>> https://gist.github.com/**weavej**ester/5484183
>>
>> - James
>>
>>
>> On 29 April 2013 20:02, Alex Fowler  wrote:
>>
>>> Hello! I have a problem, I will try to explain.. I want to write a
>>> game with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So
>>> I take their latest nightie set of jars (http://jmonkeyengine.com/**
>>> nigh**tly/ ) and what? I
>>> can't make use of them in my CCW/Leiningen project no matter how hard I
>>> try. So ok, I have found some examples where people get them in the 
>>> "lib"
>>> folder and it works, or where they recommend pushing them to the local
>>> maven repo... but they do not tell how they do it, or they show it for 
>>> some
>>> very simple cases. Sure, there is a lot of instructions like "use mvn
>>> install:install-file " or "lein localrepo 
>>> install

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
also I think Ctrl+Alt+S is my Ctrl+Alt+L , either that or they both do the
same thing. I forgot whether I added Ctrl+Alt+L myself but it's meant to
mean Load File In REPL


On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:

> Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect at
> all. So now I have updated to the latest beta. Now repl does not start
> at all :)
>
> The error in the console is:
>
> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
> http://repo1.maven.org/maven2/): repo1.maven.org
>
> This could be due to a typo in :dependencies or network issues.
>
>
> My Eclipse version is
>
> Eclipse IDE for Java Developers
>
> Version: Juno Service Release 2
>
> Build id: 20130225-0426
>
>
> CCW now is
>
>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239
> ccw.feature.feature.group Counterclockwise team
>
>
> I looked up and I saw Laurent saying that there is problems of backwards
> compatibility problems in new Eclipse versions... Uhhh so sad.. do you
> have any ideas?
>
>
> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>>
>> oh nevermind I misread that. So it doesn't work for you with ccw? are you
>> using latest ccw beta?
>> When I start the core.clj file with Ctrl+Alt+L to load it in a repl it
>> works for me
>>
>> Eclipse SDK
>>
>> Version: 4.3.0
>> Build id: I20130430-0031
>>   Counterclockwise (Clojure plugin for Eclipse)0.13.0.201304242239
>> ccw.feature.feature.groupCounterclockwise team
>>
>>
>> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler  wrote:
>>
>>> Just tried that! Very nice! Got it running with "lein repl" from Windows
>>> command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:
>>>
>>> ClassNotFoundException com.jme3.app.SimpleApplication
>>>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>>>
>>> I assume, this is due to the fact that when I evaluate te "core" file
>>> directly, it skips the "project.clj" which specifies the necessary
>>> :resource-paths... Don't you know, how can I have the repl from CCW? Should
>>> I make some explicit resources loading?
>>>
>>>
>>>
>>> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves
>>> написал:

 I've been messing around with jME3 as well, and at some point I might
 release a library for it.

 One of the problems with jME3 is that its deployment mechanism hasn't
 quite caught up with the current century. I'm planning on packaging it up
 eventually, but in the meantime here's the ugly, dirty, terrible hack I've
 been using:

 1. Download the binaries: http://www.**jmonkeyen**gine.com/nightly/**
 jME3_2013-04-**29.zip
 2. Create a new directory and extract the zip file into it
 3. Create a new Leiningen project
 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
 5. Copy the lib directory from the jME3 binaries into your project
 directory

 Here's an example application to get you going:

 https://gist.github.com/**weavej**ester/5484183

 - James


 On 29 April 2013 20:02, Alex Fowler  wrote:

> Hello! I have a problem, I will try to explain.. I want to write a
> game with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I
> take their latest nightie set of jars (http://jmonkeyengine.com/**nigh
> **tly/ ) and what? I can't
> make use of them in my CCW/Leiningen project no matter how hard I try. So
> ok, I have found some examples where people get them in the "lib" folder
> and it works, or where they recommend pushing them to the local maven
> repo... but they do not tell how they do it, or they show it for some very
> simple cases. Sure, there is a lot of instructions like "use mvn
> install:install-file " or "lein localrepo 
> install
> "... so do I have to do it for all the 30 (thirty) jar
> files? Considering too, that I have to invent an "artifactId" for every 
> one
> of them, invent a "version number", type all that in manually. And that is
> not my library, I do not want to invent that. And even, if I do that, 
> then,
> how do I specify that all them are interdependant (are parts of one thing)
> and have to be always drawn in together? I will have to specify the 30
> dependencies in my project.clj each time? Well, and even if I do, then I
> will still have that pain with manually copying all that stuff on each new
> machine where I work, picking it from the local maven repo and putting it
> to another maven repo. And if I want to push it to Clojars, I have do
> that for each one manually too, typing in commands in the Windows cmd and
> taking care for inventing version numbers?... oh, and maybe I could go

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
sorry I meant, Run As->Run Configurations... :)


On Tue, Apr 30, 2013 at 9:41 PM, AtKaaZ  wrote:

> oh yes that thing, just do Run->Run As...  on your project
> and delete all the children inside Clojure
> things like:
> fightingsail Leiningen
> where fightingsail is the name of the project
>
> and when you try to start the REPL again, it will create a new one with
> the correct Arguments
>
>
> On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:
>
>> Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect
>> at all. So now I have updated to the latest beta. Now repl does not
>> start at all :)
>>
>> The error in the console is:
>>
>> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
>> http://repo1.maven.org/maven2/): repo1.maven.org
>>
>> This could be due to a typo in :dependencies or network issues.
>>
>>
>> My Eclipse version is
>>
>> Eclipse IDE for Java Developers
>>
>> Version: Juno Service Release 2
>>
>> Build id: 20130225-0426
>>
>>
>> CCW now is
>>
>>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239
>> ccw.feature.feature.group Counterclockwise team
>>
>>
>> I looked up and I saw Laurent saying that there is problems of backwards
>> compatibility problems in new Eclipse versions... Uhhh so sad.. do you
>> have any ideas?
>>
>>
>> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>>>
>>> oh nevermind I misread that. So it doesn't work for you with ccw? are
>>> you using latest ccw beta?
>>> When I start the core.clj file with Ctrl+Alt+L to load it in a repl it
>>> works for me
>>>
>>> Eclipse SDK
>>>
>>> Version: 4.3.0
>>> Build id: I20130430-0031
>>>   Counterclockwise (Clojure plugin for Eclipse)
>>> 0.13.0.201304242239ccw.feature.feature.groupCounterclockwise team
>>>
>>>
>>> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:
>>>
 Just tried that! Very nice! Got it running with "lein repl" from
 Windows command prompt!!! However, when I fire up the repl from Eclipse
 CCW, I get:

 ClassNotFoundException com.jme3.app.SimpleApplication
  java.net.URLClassLoader$1.run (URLClassLoader.java:366)

 I assume, this is due to the fact that when I evaluate te "core" file
 directly, it skips the "project.clj" which specifies the necessary
 :resource-paths... Don't you know, how can I have the repl from CCW? Should
 I make some explicit resources loading?



 понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James
 Reeves написал:
>
> I've been messing around with jME3 as well, and at some point I might
> release a library for it.
>
> One of the problems with jME3 is that its deployment mechanism hasn't
> quite caught up with the current century. I'm planning on packaging it up
> eventually, but in the meantime here's the ugly, dirty, terrible hack I've
> been using:
>
> 1. Download the binaries: http://www.**jmonkeyen**gine.com/nightly/**
> jME3_2013-04-**29.zip
> 2. Create a new directory and extract the zip file into it
> 3. Create a new Leiningen project
> 4. Add the following to your project.clj file: :resource-paths
> ["lib/*"]
> 5. Copy the lib directory from the jME3 binaries into your project
> directory
>
> Here's an example application to get you going:
>
> https://gist.github.com/**weavej**ester/5484183
>
> - James
>
>
> On 29 April 2013 20:02, Alex Fowler  wrote:
>
>> Hello! I have a problem, I will try to explain.. I want to write a
>> game with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So
>> I take their latest nightie set of jars (http://jmonkeyengine.com/**
>> nigh**tly/ ) and what? I
>> can't make use of them in my CCW/Leiningen project no matter how hard I
>> try. So ok, I have found some examples where people get them in the "lib"
>> folder and it works, or where they recommend pushing them to the local
>> maven repo... but they do not tell how they do it, or they show it for 
>> some
>> very simple cases. Sure, there is a lot of instructions like "use mvn
>> install:install-file " or "lein localrepo 
>> install
>> "... so do I have to do it for all the 30 (thirty) 
>> jar
>> files? Considering too, that I have to invent an "artifactId" for every 
>> one
>> of them, invent a "version number", type all that in manually. And that 
>> is
>> not my library, I do not want to invent that. And even, if I do that, 
>> then,
>> how do I specify that all them are interdependant (are parts of one 
>> thing)
>> and have to be always drawn in together? I will have to specify the 30
>> dependencies in my project.clj each time? Well, and even if I do, then I
>> will still have 

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
oh yes that thing, just do Run->Run As...  on your project
and delete all the children inside Clojure
things like:
fightingsail Leiningen
where fightingsail is the name of the project

and when you try to start the REPL again, it will create a new one with the
correct Arguments


On Tue, Apr 30, 2013 at 9:35 PM, Alex Fowler wrote:

> Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect at
> all. So now I have updated to the latest beta. Now repl does not start
> at all :)
>
> The error in the console is:
>
> Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central (
> http://repo1.maven.org/maven2/): repo1.maven.org
>
> This could be due to a typo in :dependencies or network issues.
>
>
> My Eclipse version is
>
> Eclipse IDE for Java Developers
>
> Version: Juno Service Release 2
>
> Build id: 20130225-0426
>
>
> CCW now is
>
>   Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239
> ccw.feature.feature.group Counterclockwise team
>
>
> I looked up and I saw Laurent saying that there is problems of backwards
> compatibility problems in new Eclipse versions... Uhhh so sad.. do you
> have any ideas?
>
>
> вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>>
>> oh nevermind I misread that. So it doesn't work for you with ccw? are you
>> using latest ccw beta?
>> When I start the core.clj file with Ctrl+Alt+L to load it in a repl it
>> works for me
>>
>> Eclipse SDK
>>
>> Version: 4.3.0
>> Build id: I20130430-0031
>>   Counterclockwise (Clojure plugin for Eclipse)0.13.0.201304242239
>> ccw.feature.feature.groupCounterclockwise team
>>
>>
>> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler  wrote:
>>
>>> Just tried that! Very nice! Got it running with "lein repl" from Windows
>>> command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:
>>>
>>> ClassNotFoundException com.jme3.app.SimpleApplication
>>>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>>>
>>> I assume, this is due to the fact that when I evaluate te "core" file
>>> directly, it skips the "project.clj" which specifies the necessary
>>> :resource-paths... Don't you know, how can I have the repl from CCW? Should
>>> I make some explicit resources loading?
>>>
>>>
>>>
>>> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves
>>> написал:

 I've been messing around with jME3 as well, and at some point I might
 release a library for it.

 One of the problems with jME3 is that its deployment mechanism hasn't
 quite caught up with the current century. I'm planning on packaging it up
 eventually, but in the meantime here's the ugly, dirty, terrible hack I've
 been using:

 1. Download the binaries: http://www.**jmonkeyen**gine.com/nightly/**
 jME3_2013-04-**29.zip
 2. Create a new directory and extract the zip file into it
 3. Create a new Leiningen project
 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
 5. Copy the lib directory from the jME3 binaries into your project
 directory

 Here's an example application to get you going:

 https://gist.github.com/**weavej**ester/5484183

 - James


 On 29 April 2013 20:02, Alex Fowler  wrote:

> Hello! I have a problem, I will try to explain.. I want to write a
> game with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I
> take their latest nightie set of jars (http://jmonkeyengine.com/**nigh
> **tly/ ) and what? I can't
> make use of them in my CCW/Leiningen project no matter how hard I try. So
> ok, I have found some examples where people get them in the "lib" folder
> and it works, or where they recommend pushing them to the local maven
> repo... but they do not tell how they do it, or they show it for some very
> simple cases. Sure, there is a lot of instructions like "use mvn
> install:install-file " or "lein localrepo 
> install
> "... so do I have to do it for all the 30 (thirty) jar
> files? Considering too, that I have to invent an "artifactId" for every 
> one
> of them, invent a "version number", type all that in manually. And that is
> not my library, I do not want to invent that. And even, if I do that, 
> then,
> how do I specify that all them are interdependant (are parts of one thing)
> and have to be always drawn in together? I will have to specify the 30
> dependencies in my project.clj each time? Well, and even if I do, then I
> will still have that pain with manually copying all that stuff on each new
> machine where I work, picking it from the local maven repo and putting it
> to another maven repo. And if I want to push it to Clojars, I have do
> that for each one manually too, typing in comma

Re: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Right, I had the stable version, not beta, and Ctrl+Alt+L had no effect at 
all. So now I have updated to the latest beta. Now repl does not start 
at all :)

The error in the console is:

Could not transfer artifact ccw:ccw.server:pom:0.1.0 from/to central 
(http://repo1.maven.org/maven2/): repo1.maven.org

This could be due to a typo in :dependencies or network issues.


My Eclipse version is

Eclipse IDE for Java Developers

Version: Juno Service Release 2

Build id: 20130225-0426


CCW now is

  Counterclockwise (Clojure plugin for Eclipse) 0.13.0.201304242239 
ccw.feature.feature.group Counterclockwise team 


I looked up and I saw Laurent saying that there is problems of backwards 
compatibility problems in new Eclipse versions... Uhhh so sad.. do you 
have any ideas?


вторник, 30 апреля 2013 г., 21:58:04 UTC+4 пользователь AtKaaZ написал:
>
> oh nevermind I misread that. So it doesn't work for you with ccw? are you 
> using latest ccw beta?
> When I start the core.clj file with Ctrl+Alt+L to load it in a repl it 
> works for me
>
> Eclipse SDK
>
> Version: 4.3.0
> Build id: I20130430-0031
>   Counterclockwise (Clojure plugin for Eclipse)0.13.0.201304242239
> ccw.feature.feature.groupCounterclockwise team
>
>
> On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler 
> > wrote:
>
>> Just tried that! Very nice! Got it running with "lein repl" from Windows 
>> command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:
>>
>> ClassNotFoundException com.jme3.app.SimpleApplication 
>>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>>
>> I assume, this is due to the fact that when I evaluate te "core" file 
>> directly, it skips the "project.clj" which specifies the necessary 
>> :resource-paths... Don't you know, how can I have the repl from CCW? Should 
>> I make some explicit resources loading?
>>
>>
>>
>> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves 
>> написал:
>>>
>>> I've been messing around with jME3 as well, and at some point I might 
>>> release a library for it.
>>>
>>> One of the problems with jME3 is that its deployment mechanism hasn't 
>>> quite caught up with the current century. I'm planning on packaging it up 
>>> eventually, but in the meantime here's the ugly, dirty, terrible hack I've 
>>> been using:
>>>
>>> 1. Download the binaries: http://www.**jmonkeyengine.com/nightly/**
>>> jME3_2013-04-29.zip
>>> 2. Create a new directory and extract the zip file into it
>>> 3. Create a new Leiningen project
>>> 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
>>> 5. Copy the lib directory from the jME3 binaries into your project 
>>> directory
>>>
>>> Here's an example application to get you going:
>>>
>>> https://gist.github.com/**weavejester/5484183
>>>
>>> - James
>>>
>>>
>>> On 29 April 2013 20:02, Alex Fowler  wrote:
>>>
 Hello! I have a problem, I will try to explain.. I want to write a game 
 with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take 
 their latest nightie set of jars 
 (http://jmonkeyengine.com/**nightly/) 
 and what? I can't make use of them in my CCW/Leiningen project no 
 matter how hard I try. So ok, I have found some examples where people get 
 them in the "lib" folder and it works, or where they recommend pushing 
 them 
 to the local maven repo... but they do not tell how they do it, or they 
 show it for some very simple cases. Sure, there is a lot of instructions 
 like "use mvn install:install-file " or "lein 
 localrepo install "... so do I have to do it for all 
 the 30 (thirty) jar files? Considering too, that I have to invent an 
 "artifactId" for every one of them, invent a "version number", type all 
 that in manually. And that is not my library, I do not want to invent 
 that. 
 And even, if I do that, then, how do I specify that all them are 
 interdependant (are parts of one thing) and have to be always drawn in 
 together? I will have to specify the 30 dependencies in my project.clj 
 each 
 time? Well, and even if I do, then I will still have that pain with 
 manually copying all that stuff on each new machine where I work, picking 
 it from the local maven repo and putting it to another maven repo. And 
 if I want to push it to Clojars, I have do that for each one manually too, 
 typing in commands in the Windows cmd and taking care for inventing 
 version 
 numbers?... oh, and maybe I could go about specifying  clauses 
 in a pom? pinch me am I dreaming a nightmare? :)

 I have tried to do something along these lines... spent about 15 hours 
 in general and got almost nothing but headache and eyesore... and a 
 feeling 
 of being extremily stupid for not being able to plug a fe

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
oh nevermind I misread that. So it doesn't work for you with ccw? are you
using latest ccw beta?
When I start the core.clj file with Ctrl+Alt+L to load it in a repl it
works for me

Eclipse SDK

Version: 4.3.0
Build id: I20130430-0031
  Counterclockwise (Clojure plugin for Eclipse)0.13.0.201304242239
ccw.feature.feature.groupCounterclockwise team


On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:

> Just tried that! Very nice! Got it running with "lein repl" from Windows
> command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:
>
> ClassNotFoundException com.jme3.app.SimpleApplication
>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>
> I assume, this is due to the fact that when I evaluate te "core" file
> directly, it skips the "project.clj" which specifies the necessary
> :resource-paths... Don't you know, how can I have the repl from CCW? Should
> I make some explicit resources loading?
>
>
>
> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves
> написал:
>>
>> I've been messing around with jME3 as well, and at some point I might
>> release a library for it.
>>
>> One of the problems with jME3 is that its deployment mechanism hasn't
>> quite caught up with the current century. I'm planning on packaging it up
>> eventually, but in the meantime here's the ugly, dirty, terrible hack I've
>> been using:
>>
>> 1. Download the binaries: http://www.**jmonkeyengine.com/nightly/**
>> jME3_2013-04-29.zip
>> 2. Create a new directory and extract the zip file into it
>> 3. Create a new Leiningen project
>> 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
>> 5. Copy the lib directory from the jME3 binaries into your project
>> directory
>>
>> Here's an example application to get you going:
>>
>> https://gist.github.com/**weavejester/5484183
>>
>> - James
>>
>>
>> On 29 April 2013 20:02, Alex Fowler  wrote:
>>
>>> Hello! I have a problem, I will try to explain.. I want to write a game
>>> with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take
>>> their latest nightie set of jars 
>>> (http://jmonkeyengine.com/**nightly/)
>>> and what? I can't make use of them in my CCW/Leiningen project no
>>> matter how hard I try. So ok, I have found some examples where people get
>>> them in the "lib" folder and it works, or where they recommend pushing them
>>> to the local maven repo... but they do not tell how they do it, or they
>>> show it for some very simple cases. Sure, there is a lot of instructions
>>> like "use mvn install:install-file " or "lein
>>> localrepo install "... so do I have to do it for all
>>> the 30 (thirty) jar files? Considering too, that I have to invent an
>>> "artifactId" for every one of them, invent a "version number", type all
>>> that in manually. And that is not my library, I do not want to invent that.
>>> And even, if I do that, then, how do I specify that all them are
>>> interdependant (are parts of one thing) and have to be always drawn in
>>> together? I will have to specify the 30 dependencies in my project.clj each
>>> time? Well, and even if I do, then I will still have that pain with
>>> manually copying all that stuff on each new machine where I work, picking
>>> it from the local maven repo and putting it to another maven repo. And
>>> if I want to push it to Clojars, I have do that for each one manually too,
>>> typing in commands in the Windows cmd and taking care for inventing version
>>> numbers?... oh, and maybe I could go about specifying  clauses
>>> in a pom? pinch me am I dreaming a nightmare? :)
>>>
>>> I have tried to do something along these lines... spent about 15 hours
>>> in general and got almost nothing but headache and eyesore... and a feeling
>>> of being extremily stupid for not being able to plug a few jars into a jvm
>>> program (isn't java all just about putting jars together? :) ). I am a
>>> Clojure newb and maybe I am missing somewhat essential.. but in Scala, with
>>> or without SBT, using Scala IDE for Eclipse, I got everything up and
>>> running in about 15 minutes.
>>>
>>> Please, could anyone give me a clear explanation or better, a full
>>> example of plugging in the JME3 into a Clojure project? Shouldn't it be
>>> simple? Thank you in advance, the situation is really disappointing for me
>>> :(
>>>
>>> --
>>> --
>>> 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
>>> ---
>>>

Re: Using a Java game engine in my project

2013-04-30 Thread AtKaaZ
seems to be working fine for me, are you not starting the repl from the
project's folder ? tested with lein 2.2.0 from master


On Tue, Apr 30, 2013 at 8:49 PM, Alex Fowler wrote:

> Just tried that! Very nice! Got it running with "lein repl" from Windows
> command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:
>
> ClassNotFoundException com.jme3.app.SimpleApplication
>  java.net.URLClassLoader$1.run (URLClassLoader.java:366)
>
> I assume, this is due to the fact that when I evaluate te "core" file
> directly, it skips the "project.clj" which specifies the necessary
> :resource-paths... Don't you know, how can I have the repl from CCW? Should
> I make some explicit resources loading?
>
>
>
> понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves
> написал:
>>
>> I've been messing around with jME3 as well, and at some point I might
>> release a library for it.
>>
>> One of the problems with jME3 is that its deployment mechanism hasn't
>> quite caught up with the current century. I'm planning on packaging it up
>> eventually, but in the meantime here's the ugly, dirty, terrible hack I've
>> been using:
>>
>> 1. Download the binaries: http://www.**jmonkeyengine.com/nightly/**
>> jME3_2013-04-29.zip
>> 2. Create a new directory and extract the zip file into it
>> 3. Create a new Leiningen project
>> 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
>> 5. Copy the lib directory from the jME3 binaries into your project
>> directory
>>
>> Here's an example application to get you going:
>>
>> https://gist.github.com/**weavejester/5484183
>>
>> - James
>>
>>
>> On 29 April 2013 20:02, Alex Fowler  wrote:
>>
>>> Hello! I have a problem, I will try to explain.. I want to write a game
>>> with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take
>>> their latest nightie set of jars 
>>> (http://jmonkeyengine.com/**nightly/)
>>> and what? I can't make use of them in my CCW/Leiningen project no
>>> matter how hard I try. So ok, I have found some examples where people get
>>> them in the "lib" folder and it works, or where they recommend pushing them
>>> to the local maven repo... but they do not tell how they do it, or they
>>> show it for some very simple cases. Sure, there is a lot of instructions
>>> like "use mvn install:install-file " or "lein
>>> localrepo install "... so do I have to do it for all
>>> the 30 (thirty) jar files? Considering too, that I have to invent an
>>> "artifactId" for every one of them, invent a "version number", type all
>>> that in manually. And that is not my library, I do not want to invent that.
>>> And even, if I do that, then, how do I specify that all them are
>>> interdependant (are parts of one thing) and have to be always drawn in
>>> together? I will have to specify the 30 dependencies in my project.clj each
>>> time? Well, and even if I do, then I will still have that pain with
>>> manually copying all that stuff on each new machine where I work, picking
>>> it from the local maven repo and putting it to another maven repo. And
>>> if I want to push it to Clojars, I have do that for each one manually too,
>>> typing in commands in the Windows cmd and taking care for inventing version
>>> numbers?... oh, and maybe I could go about specifying  clauses
>>> in a pom? pinch me am I dreaming a nightmare? :)
>>>
>>> I have tried to do something along these lines... spent about 15 hours
>>> in general and got almost nothing but headache and eyesore... and a feeling
>>> of being extremily stupid for not being able to plug a few jars into a jvm
>>> program (isn't java all just about putting jars together? :) ). I am a
>>> Clojure newb and maybe I am missing somewhat essential.. but in Scala, with
>>> or without SBT, using Scala IDE for Eclipse, I got everything up and
>>> running in about 15 minutes.
>>>
>>> Please, could anyone give me a clear explanation or better, a full
>>> example of plugging in the JME3 into a Clojure project? Shouldn't it be
>>> simple? Thank you in advance, the situation is really disappointing for me
>>> :(
>>>
>>> --
>>> --
>>> 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

Re: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Just tried that! Very nice! Got it running with "lein repl" from Windows 
command prompt!!! However, when I fire up the repl from Eclipse CCW, I get:

ClassNotFoundException com.jme3.app.SimpleApplication 
 java.net.URLClassLoader$1.run (URLClassLoader.java:366)

I assume, this is due to the fact that when I evaluate te "core" file 
directly, it skips the "project.clj" which specifies the necessary 
:resource-paths... Don't you know, how can I have the repl from CCW? Should 
I make some explicit resources loading?



понедельник, 29 апреля 2013 г., 23:46:25 UTC+4 пользователь James Reeves 
написал:
>
> I've been messing around with jME3 as well, and at some point I might 
> release a library for it.
>
> One of the problems with jME3 is that its deployment mechanism hasn't 
> quite caught up with the current century. I'm planning on packaging it up 
> eventually, but in the meantime here's the ugly, dirty, terrible hack I've 
> been using:
>
> 1. Download the binaries: 
> http://www.jmonkeyengine.com/nightly/jME3_2013-04-29.zip
> 2. Create a new directory and extract the zip file into it
> 3. Create a new Leiningen project
> 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
> 5. Copy the lib directory from the jME3 binaries into your project 
> directory
>
> Here's an example application to get you going:
>
> https://gist.github.com/weavejester/5484183
>
> - James
>
>
> On 29 April 2013 20:02, Alex Fowler >wrote:
>
>> Hello! I have a problem, I will try to explain.. I want to write a game 
>> with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take 
>> their latest nightie set of jars (http://jmonkeyengine.com/nightly/) 
>> and what? I can't make use of them in my CCW/Leiningen project no 
>> matter how hard I try. So ok, I have found some examples where people get 
>> them in the "lib" folder and it works, or where they recommend pushing them 
>> to the local maven repo... but they do not tell how they do it, or they 
>> show it for some very simple cases. Sure, there is a lot of instructions 
>> like "use mvn install:install-file " or "lein 
>> localrepo install "... so do I have to do it for all 
>> the 30 (thirty) jar files? Considering too, that I have to invent an 
>> "artifactId" for every one of them, invent a "version number", type all 
>> that in manually. And that is not my library, I do not want to invent that. 
>> And even, if I do that, then, how do I specify that all them are 
>> interdependant (are parts of one thing) and have to be always drawn in 
>> together? I will have to specify the 30 dependencies in my project.clj each 
>> time? Well, and even if I do, then I will still have that pain with 
>> manually copying all that stuff on each new machine where I work, picking 
>> it from the local maven repo and putting it to another maven repo. And 
>> if I want to push it to Clojars, I have do that for each one manually too, 
>> typing in commands in the Windows cmd and taking care for inventing version 
>> numbers?... oh, and maybe I could go about specifying  clauses 
>> in a pom? pinch me am I dreaming a nightmare? :)
>>
>> I have tried to do something along these lines... spent about 15 hours in 
>> general and got almost nothing but headache and eyesore... and a feeling of 
>> being extremily stupid for not being able to plug a few jars into a jvm 
>> program (isn't java all just about putting jars together? :) ). I am a 
>> Clojure newb and maybe I am missing somewhat essential.. but in Scala, with 
>> or without SBT, using Scala IDE for Eclipse, I got everything up and 
>> running in about 15 minutes.
>>
>> Please, could anyone give me a clear explanation or better, a full 
>> example of plugging in the JME3 into a Clojure project? Shouldn't it be 
>> simple? Thank you in advance, the situation is really disappointing for me 
>> :(
>>
>> -- 
>> -- 
>> 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 a

Re: [GSOC 2013] Program analysis suite, based on Rich Hickey's Codeq

2013-04-30 Thread Navgeet Agrawal
Hi all,
I've started with the application, though it has gotten quite late. I've
explained what I intend to do in this gist -
https://gist.github.com/Navgeet/5490202

I'm kinda stuck in the last part - analysis techniques. I would appreciate
suggestions that are not too heavy to deal with, given my  tight schedule
in the later half of coding period.

Cheers
Navgeet

-- 
-- 
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: login with friend, but username blank, despite keyword-params middleware in place

2013-04-30 Thread Nelson Morris
On Tue, Apr 30, 2013 at 10:57 AM, larry google groups <
lawrencecloj...@gmail.com> wrote:

>
> This at least gets me a different error, which is good. But how did you
> know this? Where is this documented? Why does the order matter?
>
>
>
I knew this because the :params map had strings instead of keywords.

There is some documentation in the doc string for wrap-keyword-params:
https://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/keyword_params.clj#L21
.

Order matters because:

(->  routes
  (wrap-keyword-params)
  (wrap-nested-params)
  (wrap-params))

becomes:

(wrap-params (wrap-nested-params (wrap-keyword-params routes))).

This creates a function that takes a ring request and returns a ring
response (a ring handler).  The functions get opportunities to changed the
ring request from outside-in. So wrap-params puts together the :params map
first, then wrap-nested-params gets to do its thing, then
wrap-keyword-params get to turn the :params keys from strings into
keywords, and finally the routes get to take the modified request map and
turn it into a ring response.  Changing the response map happens in
opposite order.

-
Nelson Morris

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




[ANN] Portugal Clojure

2013-04-30 Thread Plínio Balduino
Hi there (I'll translate the announcement)

We opened a Clojure group for discussion in Portuguese (Brazilian,
European and African Portuguese). It's a small effort to increase the
usage of Clojure in Brazil and Portugal and help the newcomers to
enjoy this awesome language.

Regards

Plínio

2013/4/30 https://github.com/jmaandrade/orchestration
:
> Viva,
>
> foi criado o grupo https://groups.google.com/forum/#!forum/clojure-portugal
> para discusão e divulgação do Clojure
>
>
> Segunda-feira, 25 de Março de 2013 10:48:57 UTC,
> https://github.com/jmaandrade/orchestration escreveu:
>>
>> Viva,
>>
>> Gostaria de abrir um tema de discussão sobre a utilização do Clojure em
>> Portugal, a sua receptividade, as vantagens e desvantagens, os riscos,
>> etc...
>>
>> Qual o futuro do Clojure em Portugal? Alguém está a trabalhar em Clojure?
>>
>> Follow me on https://github.com/jmaandrade /orchestration
>>
>>
>>
>>
>>
>>
>>
>>
> --
> --
> 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.
>
>

-- 
-- 
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: Portugal Clojure

2013-04-30 Thread https://github.com/jmaandrade/orchestration
Viva,

foi criado o grupo https://groups.google.com/forum/#!forum/clojure-portugal 
para discusão e divulgação do Clojure


Segunda-feira, 25 de Março de 2013 10:48:57 UTC, 
https://github.com/jmaandrade/orchestration escreveu:
>
> Viva,
>
> Gostaria de abrir um tema de discussão sobre a utilização do Clojure em 
> Portugal, a sua receptividade, as vantagens e desvantagens, os riscos, 
> etc...
>
> Qual o futuro do Clojure em Portugal? Alguém está a trabalhar em Clojure?
>
> Follow me on https://github.com/jmaandrade /orchestration
>
>
>
>
>
>
>
>
>

-- 
-- 
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] repetition-hunter

2013-04-30 Thread mynomoto
Now you can find repetitions in your code across multiple namespaces, Alex. 
And filter the results.

https://github.com/mynomoto/repetition-hunter 

On Sunday, April 28, 2013 5:45:06 PM UTC-3, mynomoto wrote:
>
> Not yet, but doesn't look hard to do. Will put in the todo list. 
>
> On 4/28/13, Alex Baranosky wrote: 
> > Can it search for repetition across multiple namespaces? 
> > 
> > 
> > On Sun, Apr 28, 2013 at 11:45 AM, mynomoto  wrote: 
> > 
> >> Repetition hunter is a library to find repetitions in your code 
> >> 
> >> https://github.com/mynomoto/repetition-hunter 
> >> 
> >> Happy hunting! 
> >> 
> >> mynomoto 
> >> https://github.com/mynomoto 
> >> 
> >> -- 
> >> -- 
> >> 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. 
> >> 
> >> 
> >> 
> > 
> > -- 
> > -- 
> > 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 a topic in the 
> > Google Groups "Clojure" group. 
> > To unsubscribe from this topic, visit 
> > https://groups.google.com/d/topic/clojure/uuHhsMZtbQs/unsubscribe?hl=en. 
>
> > To unsubscribe from this group and all its topics, send an email to 
> > clojure+unsubscr...@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.




Re: memorize-clj

2013-04-30 Thread Alex Fowler
Agreed! Totally worthwhile. I even do this consciously sometimes.

понедельник, 29 апреля 2013 г., 11:01:17 UTC+4 пользователь Chris Ford 
написал:
>
> Jorge, reinventing the wheel is a very worthwhile pursuit. Maybe you'll 
> come up with something new, and certainly you'll learn something.
>
> Thanks for sharing.
>
> Chris
>
>
> On 29 April 2013 08:23, Baishampayan Ghose 
> > wrote:
>
>> One more reason to read Clojure's source code. Trust me, it's 
>> surprisingly easy to understand.
>>
>> Sent from phone. Please excuse brevity.
>> On 29 Apr 2013 09:29, "Jorge Urdaneta" > 
>> wrote:
>>
>>>  Thank you. Shame on me
>>>
>>> On 28/04/13 23:28, Gary Trakhman wrote:
>>>  
>>> Clojure has the http://clojuredocs.org/clojure_core/clojure.core/memoize 
>>> function 
>>> built-in, as well as https://github.com/clojure/core.memoize for more 
>>> complicated stuff. 
>>>
>>>
>>> On Sun, Apr 28, 2013 at 11:51 PM, Jorge Urdaneta 
>>> 
>>> > wrote:
>>>
 Hi,

 I started a library called memorize-clj 
 https://github.com/jorgeu/memorize-clj
 It provides a function "memorize" that take a function and cache its 
 results using
 guava cache. Of course the function must be pure and the parameters 
 should be
 easy to compare and get a hashcode.

 Maybe I'm reinventing the wheel here but it was fun to build anyway.
 I saw this feature in Groovy and couldn't found anything equivalent for 
 Clojure.

 -- 
 Jorge Urdaneta

 -- 
 -- 
 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 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.
>>>  
>>>  
>>>
>>>
>>>
>>> -- 
>>> Jorge Urdaneta
>>>
>>>  -- 
>>> -- 
>>> 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 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:

Re: login with friend, but username blank, despite keyword-params middleware in place

2013-04-30 Thread larry google groups

> is in the wrong order.  It needs to be
> 
> (-> 
> 
>  (wrap-keyword-params)
> (wrap-nested-params)
>  (wrap-params))


This at least gets me a different error, which is good. But how did you 
know this? Where is this documented? Why does the order matter? 







On Monday, April 29, 2013 9:58:38 PM UTC-4, Nelson Morris wrote:
>
> The part of the middleware stack that looks like:
>
> (-> 
>   (wrap-params)
>   (wrap-nested-params)
>   (wrap-keyword-params))
>
> is in the wrong order.  It needs to be
>
> (-> 
>
>   (wrap-keyword-params)
>   (wrap-nested-params)
>   (wrap-params))
>
> The response having
>
>  :params {"" nil, "login_failed" "Y", "username" ""},
>
> indicates that they are not being changed to keywords.  Since friend's 
> interactive-form workflow uses keywords to pull out the params, 
> it doesn't match and is constantly failing.
>
> -
> Nelson Morris
>
>
>
> On Mon, Apr 29, 2013 at 4:20 PM, Chas Emerick 
> > wrote:
>
>> There's too much here for me to comb through.  A couple of things:
>>
>> https://friend-demo.herokuapp.com/interactive-form is a complete demo 
>> application that uses Friend's interactive-form workflow.  You might have 
>> seen this already; if not, it's a good starting point.
>>
>> Second, try adding a verbose logging middleware to your -> form, e.g.
>>
>> (defn wrap-verbose
>>   [h]
>>   (fn [req]
>> (println "" req)
>> (h req))
>>
>> (-> ...
>> wrap-verbose)
>>
>> You can move that wrap-verbose application around in your "stack" to see 
>> the state of the request map at different points.
>>
>> Hope that helps,
>>
>> - Chas
>>
>> --
>> --
>> 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.




Re: Clojure special forms

2013-04-30 Thread David Simmons
Thanks Christophe.

Love the book BTW.

cheers

Dave

-- 
-- 
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: Clojure special forms

2013-04-30 Thread David Simmons
Hi All

thank you for your answers. I think I now understand (@Gregory - completely 
agree about Clojure  being pragmatic).

Onwards and Upwards

Kind Regards

Dave

-- 
-- 
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: Observing namespace changes

2013-04-30 Thread Dave Sann
Out of interest, did any library come out of this?

On Thursday, 15 January 2009 06:46:52 UTC+11, Laurent PETIT wrote:
>
> OK thank you both Chris & Mike for your answer. 
>
> What I've done for the moment is similar to what Mike did: at any 
> place where there is a chance for something to change namespaces, I 
> reload a new snapshot (and I throw the old). 
>
> Registering watchers for Vars seems very interesting, I'll 
> investigate. 
>
> Registering watchers for ns would be great too. 
>
> But there still may be  a case or two uncovered, even when we will be 
> able to register watchers on ns : when new ns are created. Then we 
> need so kind of watcher on the vector holding all the ns ... ? 
>
> If this vector is implemented as a Var, it is maybe already possible 
> to do this, even if it is undocumented ? 
>
> Cheers, 
>
> -- 
> Laurent 
>
> On Jan 14, 5:55 pm, MikeM  wrote: 
> > There's no event mechanism to monitor namespace changes. I accomplish 
> > this by taking a snapshot before and after any possible namespace- 
> > changing execution, using ns-map. Not as efficient as an event 
> > callback, but I haven't had any performance issues (map lookups are 
> > plenty fast for me). 
> > 
> > You can register a watcher for a Var to get notification of a root 
> > binding change using add-watcher - note that the clojure.org doc for 
> > add-watcher has not been updated to match the Var watcher revision.

-- 
-- 
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: Clojure special forms

2013-04-30 Thread Christophe Grand
Hi David,

Special forms exist because they have special semantics and evaluation
rules.
Is there some overlap between them? Absolutely: when you have fn you don't
need let. Still we have let.

About reduce: originally reduce was pure clojure with no interop, the
.reduce you see is just for the chunked-seq optimization -- when the seq is
not chunked you don't use any interop.
Plus this reduce is an interim one: it's later (in core.clj) redefined on
top of a couple of protocols to enable more optimizations.

Christophe



On Mon, Apr 29, 2013 at 5:26 PM, David Simmons wrote:

> Hi Both.
>
> Thank you for your prompt replies. Maybe I'm being purist but if one of
> the special forms is the dot you have all of Java to play with so
> presumably you could produce any of the other clojure functions. I thought
> that the special forms enabled you to produce all other elements of the
> language with just the special forms. Isn't having the dot cheating a bit
> :-).
>
> cheers
>
> Dave
>
> --
> --
> 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.
>
>
>



-- 
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/

-- 
-- 
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: Clojure special forms

2013-04-30 Thread Gregory Graham
This shows the pragmatic nature of Clojure. A founding idea of Lisp is that 
the whole language can be built up from a handful of simple elements, and 
this is a good thing for a lot of reasons. However, practical concerns such 
as efficiency and interoperability may lead implementers to access the 
native platform (Java in the case of Clojure). A beautiful thing about 
Clojure is that interoperability with Java is so easily done within the 
Clojure language.


On Monday, April 29, 2013 10:26:20 AM UTC-5, David Simmons wrote:
>
> Hi Both.
>
> Thank you for your prompt replies. Maybe I'm being purist but if one of 
> the special forms is the dot you have all of Java to play with so 
> presumably you could produce any of the other clojure functions. I thought 
> that the special forms enabled you to produce all other elements of the 
> language with just the special forms. Isn't having the dot cheating a bit 
> :-).
>
> cheers
>
> Dave
>

-- 
-- 
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: http-kit on heroku?

2013-04-30 Thread Feng Shen
Hi,  here is how to do hot code reload: 

http://http-kit.org/migration.html#reload


On Monday, April 15, 2013 12:48:50 PM UTC+8, Wei Hsu wrote:
>
> Thanks guys, got it sorted out.
>
> If I may ask a followup question, how do you run it in development? 
> Pre-http-kit, I've been using lein ring server, which has a nice feature 
> that reloads code automatically as it is saved so you don't have to restart 
> the server.
>
> On Sunday, April 14, 2013 8:39:50 PM UTC-7, Ryan McGowan wrote:
>>
>> Maik is right. However, if you still want an example application you can 
>> check out a side project  of mine. 
>> It works just fine on Heroku.
>>
>> Originally it was a noir/jetty application which I have since moved to 
>> http-kitand
>>  Compojure. Enjoy :)
>>
>> On Sunday, April 14, 2013 2:36:44 PM UTC-4, Maik Schünemann wrote:
>>>
>>> I don't have an example of deploying http-kit on Heroku, but I think it 
>>> should be straightforward - basically your local setup should work on 
>>> heroku.
>>> Just like you can deploy your application, which starts up jetty to 
>>> heroku I think you can deploy your http-kit application on heroku.
>>> The only think to remember is that the port of the server is stored in 
>>> the port environment variable.
>>>
>>> So,
>>> just try :)
>>>
>>>
>>> On Sat, Apr 13, 2013 at 11:22 PM, Wei Hsu  wrote:
>>>
 Does anyone have an example of deploying http-kit on Heroku? The official 
 example  uses Jetty. 

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




Re: Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread Tassilo Horn
David Toomey  writes:

Hi David,

> The error, as mentioned in the title: java.lang.ClassCastException:
> clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

In which line?

Hm, the message tells that you are using an atom function like swap! on
something that's not an Atom but Unbound.  But your code doesn't contain
such a coll.  So I guess it's in the SQL Korma code here

>   (let [tuser (select db/allusers
>   (fields :username :password :usertype)
>   (where {:username "newguy"}))]

where db/allusers is Unbound.

Bye,
Tassilo

-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Good that you've mentioned it! While I use JME for a long time already, I 
started researching LibGDX not so long ago. For now, I program right on my 
Android Tablet PC, using AIDE with libgdx jars in the project. But the 
language is Java... sadly, I find that Clojure did not yet make it into 
Dalvik world (except for the barebones Clojure REPL, which uses 1.4.0 and 
is a year old). I am researching the use of JScheme and SISC insead of 
Clojure there for now... btw, do you have any interestinginfo onhow is 
Clojure going onto the Android platform?

вторник, 30 апреля 2013 г., 14:43:18 UTC+4 пользователь Mikera написал:
>
> Depending on exactly what you want, it may also be worth taking a look at 
> LibGDX:
>
> http://libgdx.badlogicgames.com/
>
> Seems like a pretty promising library, with plenty of cross platform 
> support. Not as much of a complete game engine as jMonkeyEngine, but 
> perhaps more in keeping with the Clojure "compose small standalone 
> libraries" philosophy.
>
> On Tuesday, 30 April 2013 03:02:16 UTC+8, Alex Fowler wrote:
>>
>> Hello! I have a problem, I will try to explain.. I want to write a game 
>> with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take 
>> their latest nightie set of jars (http://jmonkeyengine.com/nightly/) 
>> and what? I can't make use of them in my CCW/Leiningen project no 
>> matter how hard I try. So ok, I have found some examples where people get 
>> them in the "lib" folder and it works, or where they recommend pushing them 
>> to the local maven repo... but they do not tell how they do it, or they 
>> show it for some very simple cases. Sure, there is a lot of instructions 
>> like "use mvn install:install-file " or "lein 
>> localrepo install "... so do I have to do it for all 
>> the 30 (thirty) jar files? Considering too, that I have to invent an 
>> "artifactId" for every one of them, invent a "version number", type all 
>> that in manually. And that is not my library, I do not want to invent that. 
>> And even, if I do that, then, how do I specify that all them are 
>> interdependant (are parts of one thing) and have to be always drawn in 
>> together? I will have to specify the 30 dependencies in my project.clj each 
>> time? Well, and even if I do, then I will still have that pain with 
>> manually copying all that stuff on each new machine where I work, picking 
>> it from the local maven repo and putting it to another maven repo. And 
>> if I want to push it to Clojars, I have do that for each one manually too, 
>> typing in commands in the Windows cmd and taking care for inventing version 
>> numbers?... oh, and maybe I could go about specifying  clauses 
>> in a pom? pinch me am I dreaming a nightmare? :)
>>
>> I have tried to do something along these lines... spent about 15 hours in 
>> general and got almost nothing but headache and eyesore... and a feeling of 
>> being extremily stupid for not being able to plug a few jars into a jvm 
>> program (isn't java all just about putting jars together? :) ). I am a 
>> Clojure newb and maybe I am missing somewhat essential.. but in Scala, with 
>> or without SBT, using Scala IDE for Eclipse, I got everything up and 
>> running in about 15 minutes.
>>
>> Please, could anyone give me a clear explanation or better, a full 
>> example of plugging in the JME3 into a Clojure project? Shouldn't it be 
>> simple? Thank you in advance, the situation is really disappointing for me 
>> :(
>>
>

-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Yeah, to have an option is a good idea! I just wanted to say, that I 
wouldn't want it to be removed completely :) As far as I understand, you're 
making up some library-type project.. Do you have a page or a blog where I 
could track the progress and be up-to-date with the current version? I 
think that if you update the JME jars at least once-twice a month, then 
referencing that repository is very good when working on multiple machines!

вторник, 30 апреля 2013 г., 14:18:06 UTC+4 пользователь Jonathan Fischer 
Friberg написал:
>
> I think that for today I will stick with the "lib" folder solution, 
>> proposed by James, but I encourage the knowledgefull people Jonathan and 
>> James to work together to deliver a Clojars or Amazonaws online repository 
>> with more-or-less daily update, since the engine is really well-maintained. 
>> And a Clojure wrapper? I also think that there is no need to strip away the 
>> testdata since it contains many materials and shaders good for prototyping 
>> or prodution.
>>
>
> I think the best solution would be to separate it, that's
> my plan. That is, to have "jme" with only the core, and
> "jme-extra" or similar, with the extra goodies.
>
> Jonathan 
>

-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread Mikera
Depending on exactly what you want, it may also be worth taking a look at 
LibGDX:

http://libgdx.badlogicgames.com/

Seems like a pretty promising library, with plenty of cross platform 
support. Not as much of a complete game engine as jMonkeyEngine, but 
perhaps more in keeping with the Clojure "compose small standalone 
libraries" philosophy.

On Tuesday, 30 April 2013 03:02:16 UTC+8, Alex Fowler wrote:
>
> Hello! I have a problem, I will try to explain.. I want to write a game 
> with Clojure and JMonkeyEngine (http://jmonkeyengine.com/). So I take 
> their latest nightie set of jars (http://jmonkeyengine.com/nightly/) 
> and what? I can't make use of them in my CCW/Leiningen project no 
> matter how hard I try. So ok, I have found some examples where people get 
> them in the "lib" folder and it works, or where they recommend pushing them 
> to the local maven repo... but they do not tell how they do it, or they 
> show it for some very simple cases. Sure, there is a lot of instructions 
> like "use mvn install:install-file " or "lein 
> localrepo install "... so do I have to do it for all 
> the 30 (thirty) jar files? Considering too, that I have to invent an 
> "artifactId" for every one of them, invent a "version number", type all 
> that in manually. And that is not my library, I do not want to invent that. 
> And even, if I do that, then, how do I specify that all them are 
> interdependant (are parts of one thing) and have to be always drawn in 
> together? I will have to specify the 30 dependencies in my project.clj each 
> time? Well, and even if I do, then I will still have that pain with 
> manually copying all that stuff on each new machine where I work, picking 
> it from the local maven repo and putting it to another maven repo. And 
> if I want to push it to Clojars, I have do that for each one manually too, 
> typing in commands in the Windows cmd and taking care for inventing version 
> numbers?... oh, and maybe I could go about specifying  clauses 
> in a pom? pinch me am I dreaming a nightmare? :)
>
> I have tried to do something along these lines... spent about 15 hours in 
> general and got almost nothing but headache and eyesore... and a feeling of 
> being extremily stupid for not being able to plug a few jars into a jvm 
> program (isn't java all just about putting jars together? :) ). I am a 
> Clojure newb and maybe I am missing somewhat essential.. but in Scala, with 
> or without SBT, using Scala IDE for Eclipse, I got everything up and 
> running in about 15 minutes.
>
> Please, could anyone give me a clear explanation or better, a full example 
> of plugging in the JME3 into a Clojure project? Shouldn't it be simple? 
> Thank you in advance, the situation is really disappointing for me :(
>

-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread Jonathan Fischer Friberg
>
> I think that for today I will stick with the "lib" folder solution,
> proposed by James, but I encourage the knowledgefull people Jonathan and
> James to work together to deliver a Clojars or Amazonaws online repository
> with more-or-less daily update, since the engine is really well-maintained.
> And a Clojure wrapper? I also think that there is no need to strip away the
> testdata since it contains many materials and shaders good for prototyping
> or prodution.
>

I think the best solution would be to separate it, that's
my plan. That is, to have "jme" with only the core, and
"jme-extra" or similar, with the extra goodies.

Jonathan

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




The order of lazy-seq

2013-04-30 Thread Liao Pengyu
Code:

(def fib
  (lazy-seq
(concat [0 1] (map + fib (rest fib)
(take 10 fib) ;; Bomb

Got the error message: _StackOverflowError   clojure.lang.RT.more 
(RT.java:589)_

And the following solutions works well:

(def fib
  (concat [0 1] (lazy-seq (map + fib (rest fib) ;; Works well

(def fib
  (lazy-cat [0 1] (map + fib (rest fib ;; Works well

All of the above program using lazy-seq, why the first one rase 
stackoverflow exception?

-- 
-- 
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: testing for nil may not be enough

2013-04-30 Thread AtKaaZ
On Tue, Apr 30, 2013 at 10:51 AM, Tassilo Horn  wrote:

> "Jim - FooBar();"  writes:
>
> > funny you should mention that!!! that is exactly what I meant by 'my
> > fault'...I've come to realise that dynamic scope is almost evil, thus
> > I go to great lengths to avoid it completely...in the rare cases where
> > I do use it I always make sure it is bound to a init/default value :)
>
> I do exactly the opposite when I use dynamic vars, that is, I define no
> default value.  For example, there's a function foo that uses a dynamic
> var, and that must be bound and well-defined.  Therefore, I provide a
> macro to initially set it up, so that you write
>
>   (with-bar (foo bla))
>
> and with-bar takes care of the proper initialization of that dynamic var
> (which is not even visible to the user).  When foo explodes because of
> the var being Unbound, then it's obvious that the function was called
> outside a with-bar macro and thus is a user error.  A default value
>
the thing is, that it may not always explode if not used with with-bar,
depending on the implementation of the function, as if when used in an
(cond (nil? thevar) ... )  or (str thevar)
If you ask me, I'd allow the var to be unbound and code everywhere for
cases where the var could be unbound - which there should be many ie. any
function; so I can understand why people would want to take the
easy/workaround way and set a default value instead.

=> (defn decorate [input]
 (str "prefix:" input ":suffix")
 )
#'jme3test1.x1/decorate
=> (def ^:dynamic *y*)
#'jme3test1.x1/*y*

assume I forget to use with-bar here:
=> (decorate *y*)
"prefix:Unbound: #'jme3test1.x1/*y*:suffix"
didn't explode
or here:
=> (defn do-smth-with [input]
 (when (not (nil? input))
   (str "doing something with " input))
 )
#'jme3test1.x1/do-smth-with
=> (do-smth-with *y*)
"doing something with Unbound: #'jme3test1.x1/*y*"

=> (do-smth-with *x*)
"doing something with 2"
=> (decorate *x*)
"prefix:2:suffix"
=> (do-smth-with nil)
nil

I guess what I was trying to say all along is that it's too easy to fall
into this by mistake because maybe most don't check for unbound and it may
not explode

would shadow such an error.
>
> A real-world example of this design are many database query libs, where
> you frequently have code like
>
>   (with-db-connection (make-me-a-db-connection url)
> (select :from "foo" :where ...))
>
> Bye,
> Tassilo
>
> --
> --
> 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.
>
>
>

-- 
-- 
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: testing for nil may not be enough

2013-04-30 Thread AtKaaZ
On Tue, Apr 30, 2013 at 11:00 AM, Tassilo Horn  wrote:

> Gary Trakhman  writes:
>
> > If you're passing the var itself, I don't see why you'd need a macro.
> > If you want to check the namespace for a var matching an unquoted
> > symbol, you could do that in a macro.
>
> In case you really don't have the var itself but just its value, then
> "unbound" is a value, too, and you could check for it using
>
>   (instance? clojure.lang.Var$Unbound *x*)
>   ;=> true
>
> nice one, thanks!

I was thinking just in case any of these "clojure.lang.Var$Unbound" change
in the future, maybe I'd do something like this:

=>* (def uniqsym (gensym))*
#'jme3test1.x1/uniqsym

=> *uniqsym*
G__1603

=>* (defmacro defus [] `(def ~uniqsym))*
#'jme3test1.x1/defus

=> *(defus)*
#'jme3test1.x1/G__1603

=> *(class (eval uniqsym))*
clojure.lang.Var$Unbound

=> *(def unbound-class (class (eval uniqsym)))*
#'jme3test1.x1/unbound-class

=>* unbound-class*
clojure.lang.Var$Unbound

=> *(def ^:dynamic *x*)*
#'jme3test1.x1/*x*

=>* (instance? unbound-class *x*)*
true

=>* (binding [*x* 1]
 (instance? unbound-class *x*)
 )*
false

=>* (def ^:dynamic *x* 2)*
#'jme3test1.x1/*x*
=>* (binding [*x* 1]
 (instance? unbound-class *x*)
 )*
false


instead of
>
>   (not (bound? #'*x*))
>
> Bye,
> Tassilo
>
> --
> --
> 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.
>
>
>

-- 
-- 
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: Using a Java game engine in my project

2013-04-30 Thread Alex Fowler
Thankew to all who have answered. A relief is to find me not alone. I will 
write a composite answer to all proposals at once.

I have done an extensive googling during my initial search and found the 
Aurellem blog to be a very insighting and profound. I planned to start 
coupling Clojure and JME3 along the very lines that are described there. I 
am a lisp newb and what is written in the blog looks so charmingly lispy 
that I can't stop admiring it. But there is no explanation on how they do 
the initial setup. All other blogs and places, either fail in this too or 
reference outdated versions of the engine. For example, there is JME3 on 
Clojars, but the version is heavily outdated.

I agree that one of the main problems with the library is that its creators 
are known to be hardcore java people without any interest in promoting JME3 
to other jvm languages. There were some clashes on their forums for that. 
Whatever their position is, although I do not consider it is worth fighting 
for that fiercely, I can see some sense in what they're saying.. but 
anyways.. that leaves the engine somewhat behind present time trends and 
leaves us without official support for other JVM languages, without any 
hope for them to change their minds.

I think that for today I will stick with the "lib" folder solution, 
proposed by James, but I encourage the knowledgefull people Jonathan and 
James to work together to deliver a Clojars or Amazonaws online repository 
with more-or-less daily update, since the engine is really well-maintained. 
And a Clojure wrapper? I also think that there is no need to strip away the 
testdata since it contains many materials and shaders good for prototyping 
or prodution.

If the JME-Clojure adaptation initiative will fire up, I can try to 
contribute something - like 2D GUI framework based entirely on JME 3D 
objects with TUIO touch integration with gestures. I already have built a 
framework around JME in Scala and I believe that some concepts and features 
of it I will also need for Clojure projects so I can share them with the 
kind community. That, for example, could well serve for data visualisation 
and manipulation on big touchscreens.

So I will try what you have proposed some time later in today and I hope 
all will be fine.. :) thank you!



вторник, 30 апреля 2013 г., 0:59:26 UTC+4 пользователь AtKaaZ написал:
>
> that seems unsafe.
>
> I'd rather use a nightly zip or what I am currently using, jme3 engine as 
> project in eclipse and when needed ant build it and have my project always 
> refer to the lib folder in the dist ie. I've these 2 lines in my project:
>
>   :bootclasspath false;false is needed here for JME3 specified in 
> :resource-paths below; else it will fail with ClassNotFoundException 
> com.jme3.app.SimpleApplication  java.net.URLClassLoader$1.run 
> (URLClassLoader.java:366)
>
>   :resource-paths ["resources", "../jme3_engine/dist/lib/*"] ;needs 
> eclipse project present: jme3_engine from trunk/engine ie. 
> https://code.google.com/p/jmonkeyengine/source/browse/#svn%2Ftrunk%2Fengine  
> and make sure you ant build it once to create and populate dist/lib/ folder
>
> works fine for me in eclipse/ccw
>
> btw, maybe you(Jonathan) and James could focus your efforts and release 
> one clojure jme3 library instead of two (eventually), or not...  just a 
> thought. It would seem like a waste if there will be two. (like hermes and 
> titanium people are focusing only on titanium now)
>
> It'd be really cool to have a clojure 3D lib based on jme3
>
>
>
> On Mon, Apr 29, 2013 at 11:21 PM, Jonathan Fischer Friberg <
> odys...@gmail.com > wrote:
>
>> I'm currently making a library for jmonkeyengine. It's not 
>> ready yet, however, a while back I decided to put jme in a repository.
>>
>> Url: "http://jmonkeyengine.s3-website-eu-west-1.amazonaws.com/";
>> Add to deps: [jme "2013-04-01"]
>>
>> The biggest problem with it right now is that it contains all test models
>> and textures, which I didn't realise at the time (this accounts for more
>> than half of the size). But it's quick & easy if you want to give it a go.
>>
>> Jonathan
>>
>>
>>
>> On Mon, Apr 29, 2013 at 9:56 PM, AtKaaZ > >wrote:
>>
>>> That's awesome!  Thanks James!
>>>
>>>
>>> On Mon, Apr 29, 2013 at 10:46 PM, James Reeves 
>>> 
>>> > wrote:
>>>
 I've been messing around with jME3 as well, and at some point I might 
 release a library for it.

 One of the problems with jME3 is that its deployment mechanism hasn't 
 quite caught up with the current century. I'm planning on packaging it up 
 eventually, but in the meantime here's the ugly, dirty, terrible hack I've 
 been using:

 1. Download the binaries: 
 http://www.jmonkeyengine.com/nightly/jME3_2013-04-29.zip
 2. Create a new directory and extract the zip file into it
 3. Create a new Leiningen project
 4. Add the following to your project.clj file: :resource-paths ["lib/*"]
 5. Copy the lib director

Re: Iota, reducers, word counting

2013-04-30 Thread Meikel Brandmeyer (kotarak)
Hello,

your function does not follow the contract of fold. What you provided is 
basically the reduce function, but it doesn't work together with fold. For 
fold you need to merge the different maps you created in the subtasks. So 
the combine function must look different.

(defn my-frequencies
  [coll]
  (r/fold
(fn
  ([] {})
  ([a b] (merge-with + a b)))
#(update-in %1 [%2] (fnil inc 0))
{}
coll))

Compare this example. The contract for the combine function requires that 
the combine function may be called with zero arguments to return the 
seeding value for the subtask. In our case an empty map. (This is were your 
example blows up.) To combine two maps we use merge-with. The update-in is 
basically the reduce function. The reducers library provides the monoid 
helper to ease the pain a little. (Although it doesn't buy us much in your 
example.)

(defn my-frequencies
  [coll]
  (r/fold
(r/monoid
  #(merge-with + %1 %2)
  (constantly {}))
#(update-in %1 [%2] (fnil inc 0))
{}
coll))

Additionally you cannot use transients at the moment with fold.

Kind regards
Meikel

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




Lib-Noir session error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
Hello, I am trying to get a login form to work in Compojure. I had 
originally written this app in Noir, but now I'm trying to move it off of 
Noir. I am now using Lib-Noir and the (noir.session) namespace doesn't seem 
to be working the same way as Noir. I'm now confused. 

The error, as mentioned in the title: 
java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to 
clojure.lang.Atom


Here is the code that appears to be getting mucked up: 

(defn do-login [handle passwd]
  (let [tuser (select db/allusers
  (fields :username :password :usertype)
  (where {:username "newguy"}))]
(if (crypt/compare "password" 
   (let [[{pwd :password}] tuser]
 pwd))
  ;; error on this line: 
  (do (sesh/put! :uname handle)
  (response/redirect "/"))
  (response/redirect "/"

and the route:

  (GET "/account-login" [] (homes/login-page))
  (POST "/account-login" {{:strs [handle passwd]} :params}
(log/do-login handle passwd))


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




Clojure Login form error: java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

2013-04-30 Thread David Toomey
Hello, I am trying to get a login form to work in Compojure. I had 
originally written this app in Noir, but now I'm trying to move it off of 
Noir. I am now using Lib-Noir and the (noir.session) namespace doesn't seem 
to be working the same way as Noir. I'm now confused. 

The error, as mentioned in the title: 
java.lang.ClassCastException: clojure.lang.Var$Unbound cannot be cast to 
clojure.lang.Atom


Here is the code that appears to be getting mucked up: 

(defn do-login [handle passwd]
  (let [tuser (select db/allusers
  (fields :username :password :usertype)
  (where {:username "newguy"}))]
(if (crypt/compare "password" 
   (let [[{pwd :password}] tuser]
 pwd))
  ;; error on this line: 
  (do (sesh/put! :uname handle)
  (response/redirect "/"))
  (response/redirect "/"

and the route:

  (GET "/account-login" [] (homes/login-page))
  (POST "/account-login" {{:strs [handle passwd]} :params}
(log/do-login handle passwd))

Basically, except for the silly let-binding above, I'm following the 
pattern found in 4clojure. 



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




Iota, reducers, word counting

2013-04-30 Thread Catonano
Hello people,

I would like you to take a look at the question I posted here

http://meta.stackoverflow.com/questions/178326/why-is-this-question-not-good-enough

I´m trying to implement a word count of a large file using the machinery by
Iota ( https://github.com/thebusby/iota#readme ) just as an exercise

I´m stuck and I tried to post a question on stackoverflow, but my question
was not "up to the quality standards" of the site.

So I posted on meta and the guys there acknoledged tat my question was
decent.

Now I´d love to post it here but it would take too long and since it is
decent, I can safely ask you to look at it there.

Tanks for any hint

P.S. Of course I´d love you to comment on the Clojure related issues, not
about the meta issues about stacktrace of which I frankly care not so much

-- 
-- 
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: testing for nil may not be enough

2013-04-30 Thread Tassilo Horn
Gary Trakhman  writes:

> If you're passing the var itself, I don't see why you'd need a macro.
> If you want to check the namespace for a var matching an unquoted
> symbol, you could do that in a macro.

In case you really don't have the var itself but just its value, then
"unbound" is a value, too, and you could check for it using

  (instance? clojure.lang.Var$Unbound *x*)
  ;=> true

instead of

  (not (bound? #'*x*))

Bye,
Tassilo

-- 
-- 
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: testing for nil may not be enough

2013-04-30 Thread Tassilo Horn
AtKaaZ  writes:

> Seems like a good idea to have the root binding be nil. How would you
> make it check for bound inside the function? do we need some kind of
> macro?

If the var has a root binding of nil, then you can't distinguish the
cases "explicitly bound to nil" and "root binding", so I think in most
cases having no root binding is preferrable.

A counter example is *out*, where it makes sense that the root binding
is a PrintWriter to standard out.

Bye,
Tassilo

-- 
-- 
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: testing for nil may not be enough

2013-04-30 Thread Tassilo Horn
"Jim - FooBar();"  writes:

> funny you should mention that!!! that is exactly what I meant by 'my
> fault'...I've come to realise that dynamic scope is almost evil, thus
> I go to great lengths to avoid it completely...in the rare cases where
> I do use it I always make sure it is bound to a init/default value :)

I do exactly the opposite when I use dynamic vars, that is, I define no
default value.  For example, there's a function foo that uses a dynamic
var, and that must be bound and well-defined.  Therefore, I provide a
macro to initially set it up, so that you write

  (with-bar (foo bla))

and with-bar takes care of the proper initialization of that dynamic var
(which is not even visible to the user).  When foo explodes because of
the var being Unbound, then it's obvious that the function was called
outside a with-bar macro and thus is a user error.  A default value
would shadow such an error.

A real-world example of this design are many database query libs, where
you frequently have code like

  (with-db-connection (make-me-a-db-connection url)
(select :from "foo" :where ...))

Bye,
Tassilo

-- 
-- 
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: Clojure special forms

2013-04-30 Thread Tassilo Horn
Michael Klishin  writes:

Hi Michael,

> or http://clojure-doc.org/articles/language/macros.html#special_forms :)

Technically, fn, letfn, and loop are no special forms but macros built
on top of the real special forms fn*, letfn*, and loop*.  That
distinction is made for let/let* in the itemize list, so it should
probably be made for there three, too.

case, import, deftype, and reify are all just plain macros and no
special form at all, so they should be removed from the list.

Bye,
Tassilo

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