Re: Compulsive over-optimization

2013-10-19 Thread Laurent PETIT
Can you give a concrete example?

Le samedi 19 octobre 2013, Kendall Shaw a écrit :

> With clojure in particular, I am having trouble not rearranging my code to
> be what I think is more optimal in ways that seem probably not practical.
> I've noticed myself doing that when I'm newish to languages and apis. But,
> I go bonkers with clojure.
>
> Do you have any thoughts about how to avoid that, other than Bob Newhart's
> advice:
>
> Bob Newhart-Stop It 
>
> Kendall
>
> --
> --
> 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: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-19 Thread dm3
As I was the one who caused this by fixing `lein uberjar` :), I've 
submitted a pull request to ring which should fix improper 
`resource-response` behaviour:
https://github.com/ring-clojure/ring/pull/97


2013 m. spalis 19 d., šeštadienis 04:02:06 UTC+3, xavi rašė:
>
> It seems it's this problem that somone else already reported a few days 
> ago...
>
> https://github.com/ring-clojure/ring/issues/96
>
>
> On Saturday, October 19, 2013 2:50:16 AM UTC+2, xavi wrote:
>>
>> If I comment out 
>>   (wrap-resource "public")
>> then it works (i.e. the uberjar produced by lein 2.3.3 serves the home 
>> page).
>>
>> Does this mean that the problem was not completely solved in Ring 1.2? 
>> Argh! I'll try to take a look to Ring's code and see if I can find the 
>> problem and fix it.
>> On the other hand, why there's this difference in the uberjars generated 
>> by 2.3.2 and 2.3.3?
>>
>> Also, in case it may help, when requesting some other pages of the app, I 
>> get this error...
>>
>> 2013-10-19 02:17:33.219:WARN:oejs.AbstractHttpConnection:/password-resets
>> java.lang.NullPointerException
>>   at java.io.FilterInputStream.close(FilterInputStream.java:155)
>>   at 
>> sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream.close(JarURLConnection.java:90)
>>   at ring.util.servlet$set_body.invoke(servlet.clj:94)
>>   at ring.util.servlet$update_servlet_response.invoke(servlet.clj:112)
>>   at ring.adapter.jetty$proxy_handler$fn__7145.invoke(jetty.clj:20)
>>   at 
>> ring.adapter.jetty.proxy$org.eclipse.jetty.server.handler.AbstractHandler$0.handle(Unknown
>>  
>> Source)
>>   at 
>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>>   at org.eclipse.jetty.server.Server.handle(Server.java:363)
>>   at 
>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
>>   at 
>> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
>>   at 
>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
>>   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>>   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>>   at 
>> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>>   at 
>> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
>>   at 
>> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
>>   at 
>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>>   at 
>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>>   at java.lang.Thread.run(Thread.java:680)
>>
>>
>> Xavi
>>
>> On Saturday, October 19, 2013 2:15:10 AM UTC+2, Phil Hagelberg wrote:
>>>
>>>
>>> xavi writes: 
>>> > @Phil I'm already using ring 1.2 
>>>
>>> Hm; it's probably the same problem manifested a different way 
>>> then. Something is assuming that any entry in a jar file is fair game 
>>> whether it's a directory or file. 
>>>
>>> -Phil 
>>>
>>

-- 
-- 
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, floats, ints and OpenGL

2013-10-19 Thread Chris Gill
I am in this boat as well, clojure + opengl, currently using lwjgl for 
bindings and management. I am curious why you need float support actually, 
what specific methods are you hoping to utilize this with? Currently I 
create float-arrays from the loaded mesh and build the VBOs and push that 
all the to card the one time, this would be done for every mesh or 
combination of meshes. After that all work, for me at least, I use uniforms 
to manipulate the scene and so far have planned to do this through 
core.matrix to work with the uniforms-- I don't plan on using very many 
lwjgl functions since much of it seems geared towards pre-opengl 3 stuff. 
Performing matrix ops on 1000 objects doesn't seem out of the realm of what 
core.matrix can handle-- it's using ndarrays and seems quick so far. So my 
question is maybe you can skirt the issue? I don't really know your 
scenario, but what version of openGL do you plan on supporting? Keep in 
mind core.matrix even has some euclidean math built in such as length and 
distance.

I based this off of a c++ example so it may be wrong as of yet-- haven't 
implemented as of now; here is normalize and lookat to fill in some more 
functions (using core.matrix): https://gist.github.com/viperscape/7055130


On Monday, September 9, 2013 9:43:12 AM UTC-4, Alex Fowler wrote:
>
> Hello!
>
> With this letter I would like to receive an answer from somebody from the 
> development team (if anyone else has something to say, you're surely 
> welcome :) ).
>
> I am working for a big multimedia company and recently I have been 
> considering moving to Clojure as the main language of development. We have 
> been doing Java and Scala before, but now when I tried Clojure and see the 
> possibilities it provides, I would definitely stand for it to be our 
> ground. However, while I am so satisfied with everything - the language, 
> the community, the Java interop, there is still something that hinders and 
> makes me linger. Namely, the lack of good support of floats and ints in the 
> language. While many people would not consider it to be a huge disadvantage 
> or even notice it, things are not so bright when it comes to OpenGL.
>
> The case is that OpenGL and 3D graphics hardware in general has no support 
> for doubles or longs. Therefore, all libraries, all data and all 
> computations are meant to be performed with floats and ints (shaders too). 
> Due to the lack of good support of these data types in Clojure (for 
> example, there are no ^float and ^int typehints, float and int values can 
> only be typecasted to, all calculations always retain doubles and longs), 
> results in too many extra typecasts, which are absolutely unnecessary and 
> take too much time. So, calculations become very cumbersome, even if we do 
> not take mandatory boxing into account.
>
> Considering that such kinds of calculations are usually abuntant in the 
> aforementioned types of applications, the penalty grows really huge. I have 
> endeavoured several discussions on the IRC to find out possible 
> workarounds. Although many good proposals by many good people were made, 
> aimed at improving the situation, none of them could solve the fundamental 
> lack of the ability to manipulate 32bit primitive (or even boxed) data 
> types. That lack renders Clojure not really suitable for heavy-load OpenGL 
> applications that require somewhat extensive calculations: some kinds of 
> games, simulations, generative graphics and so on. Considering how superior 
> Clojure is to any other language available for JVM, that black spot looks 
> especially embarrasing. And I could imagine falling back to Java for fast 
> computations, just like we fall back to ASM in, say C, that is very 
> undesirable and discouraging, since we want to pick Clojure for Clojure and 
> it will be too cumbersome to make 50/50% Java/Clojure apps just to work 
> around that design decision.
>
> Therefore, while deciding if to pick Clojure as the base for our 
> development, I would like to know answers to the following questions:
>
> 1) What is the current reason for the support for these types to be 
> missing?
> 2) Are there any plans for improvement of support for floats, ints and 
> maybe, localized unboxed calculations? Or is there some advice on how to 
> enable their support?
> 3) What is you vision for Clojure + OpenGL applications?
> 4) Is it possible to request support for floats, ints and maybe shorts for 
> the language?
> 5) Is it possible to request support for localized unboxed calculations, 
> like (with-unboxed ... ) and localized float-only and int-only 
> calculations, like, say in special macros (with-floats-&-ints ... here go 
> (+) (-) and stuff ONLY with floats/ints ... ) ?
>
> Preferably, I would like to hear the answers from somebody from the 
> development team, because I have already received enough support from the 
> community, on the IRC, I appreciate it, but now I have to make a serious 
> choice for our comp

Re: Clojure, floats, ints and OpenGL

2013-10-19 Thread Chris Gill
... as well core.matrix supports normalise, which I just reali*z*ed since I 
am American English. haha

On Saturday, October 19, 2013 8:05:47 AM UTC-4, Chris Gill wrote:
>
> I am in this boat as well, clojure + opengl, currently using lwjgl for 
> bindings and management. I am curious why you need float support actually, 
> what specific methods are you hoping to utilize this with? Currently I 
> create float-arrays from the loaded mesh and build the VBOs and push that 
> all the to card the one time, this would be done for every mesh or 
> combination of meshes. After that all work, for me at least, I use uniforms 
> to manipulate the scene and so far have planned to do this through 
> core.matrix to work with the uniforms-- I don't plan on using very many 
> lwjgl functions since much of it seems geared towards pre-opengl 3 stuff. 
> Performing matrix ops on 1000 objects doesn't seem out of the realm of what 
> core.matrix can handle-- it's using ndarrays and seems quick so far. So my 
> question is maybe you can skirt the issue? I don't really know your 
> scenario, but what version of openGL do you plan on supporting? Keep in 
> mind core.matrix even has some euclidean math built in such as length and 
> distance.
>
> I based this off of a c++ example so it may be wrong as of yet-- haven't 
> implemented as of now; here is normalize and lookat to fill in some more 
> functions (using core.matrix): https://gist.github.com/viperscape/7055130
>
>
> On Monday, September 9, 2013 9:43:12 AM UTC-4, Alex Fowler wrote:
>>
>> Hello!
>>
>> With this letter I would like to receive an answer from somebody from the 
>> development team (if anyone else has something to say, you're surely 
>> welcome :) ).
>>
>> I am working for a big multimedia company and recently I have been 
>> considering moving to Clojure as the main language of development. We have 
>> been doing Java and Scala before, but now when I tried Clojure and see the 
>> possibilities it provides, I would definitely stand for it to be our 
>> ground. However, while I am so satisfied with everything - the language, 
>> the community, the Java interop, there is still something that hinders and 
>> makes me linger. Namely, the lack of good support of floats and ints in the 
>> language. While many people would not consider it to be a huge disadvantage 
>> or even notice it, things are not so bright when it comes to OpenGL.
>>
>> The case is that OpenGL and 3D graphics hardware in general has no 
>> support for doubles or longs. Therefore, all libraries, all data and all 
>> computations are meant to be performed with floats and ints (shaders too). 
>> Due to the lack of good support of these data types in Clojure (for 
>> example, there are no ^float and ^int typehints, float and int values can 
>> only be typecasted to, all calculations always retain doubles and longs), 
>> results in too many extra typecasts, which are absolutely unnecessary and 
>> take too much time. So, calculations become very cumbersome, even if we do 
>> not take mandatory boxing into account.
>>
>> Considering that such kinds of calculations are usually abuntant in the 
>> aforementioned types of applications, the penalty grows really huge. I have 
>> endeavoured several discussions on the IRC to find out possible 
>> workarounds. Although many good proposals by many good people were made, 
>> aimed at improving the situation, none of them could solve the fundamental 
>> lack of the ability to manipulate 32bit primitive (or even boxed) data 
>> types. That lack renders Clojure not really suitable for heavy-load OpenGL 
>> applications that require somewhat extensive calculations: some kinds of 
>> games, simulations, generative graphics and so on. Considering how superior 
>> Clojure is to any other language available for JVM, that black spot looks 
>> especially embarrasing. And I could imagine falling back to Java for fast 
>> computations, just like we fall back to ASM in, say C, that is very 
>> undesirable and discouraging, since we want to pick Clojure for Clojure and 
>> it will be too cumbersome to make 50/50% Java/Clojure apps just to work 
>> around that design decision.
>>
>> Therefore, while deciding if to pick Clojure as the base for our 
>> development, I would like to know answers to the following questions:
>>
>> 1) What is the current reason for the support for these types to be 
>> missing?
>> 2) Are there any plans for improvement of support for floats, ints and 
>> maybe, localized unboxed calculations? Or is there some advice on how to 
>> enable their support?
>> 3) What is you vision for Clojure + OpenGL applications?
>> 4) Is it possible to request support for floats, ints and maybe shorts 
>> for the language?
>> 5) Is it possible to request support for localized unboxed calculations, 
>> like (with-unboxed ... ) and localized float-only and int-only 
>> calculations, like, say in special macros (with-floats-&-ints ... here go 
>> (+) (-) and stuff ONLY w

Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-19 Thread Christopher Bird
John, thanks. Not a stupid question at all. When learning a new language, a 
new environment, and using an unfamiliar OS, there are so many moving parts 
that it is sometimes hard to know where to begin when tracking stuff down. 
My old and favorite line here is that "signposts are generally made by 
people who know the lay of the land"..
So please keep the advice coming.

Chris

On Friday, October 18, 2013 10:16:38 AM UTC-5, John Mastro wrote:
>
> > So, clearly I need to get  the libs onto the classpath. The questions 
> are what libs, where and how? 
>
> Forgive me if this is a stupid question, but have you already listed the 
> dependency coordinates under the :dependencies key of your project.clj? 
>
> Leiningen has a sample project.clj here: 
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj 
>
> You're unlikely to need most of the options - just take a look at 
> :dependencies. Each project will list the appropriate coordinate vector 
> (e.g. [some/project "1.0.0"]) on their project page and/or GitHub repo. 
>
> - John

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


How to reflect on super class fields?

2013-10-19 Thread binita
Hi everyone,

I have this class hierarchy: class Foo extends Bar

On using clojure.reflect/reflect on instance of Bar (bar-instance), I get 
the fields of Bar only. But, I need all the fields of the super classes too.

I tried casting bar-instance to Foo, and then doing a reflect on the 
result. It seems like the cast didn't really return a Foo instance.

  (reflect (cast Foo bar-instance) )

How can i get the fields of Foo?

Thanks
Binita

-- 
-- 
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: Strange exception intializing clojure.core using Spring-Hadoop

2013-10-19 Thread sudheer babu
It was nice article it was very useful for me as well as useful for http://123trainings.com/it-hadoop-bigdata-online-training.html";>online 
Hadoop training learners.thanks for providing this valuable 
information.123trainings provides best https://www.youtube.com/watch?v=PqbYn5LXzRw";>Hadoop online 
training

-- 
-- 
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] JUST CREATED GOOGLE + CLOJURE COMMUNITY FOR TUNISIA

2013-10-19 Thread Rafik NACCACHE
Dear All,

It is my pleasure to announce that we just created a Tunisial Local HUB for 
Clojure advocacy, teaching and technical exchange :

https://plus.google.com/u/1/communities/106805143209555111634

Awareness about clojure in Tunisia is quite low, though this is a country 
that accounts for a significant number of talented software engineers.
S, I think it would be a nice idea to advocate for the language here, I 
mean talent is present and just waits to be converted :)

I would be grateful if you can join this little effort of mine to assist us 
and make our community look good, and who knows, we could be a good 
starting point for a wider and more global clojure user base :)

Thank you all,

Regards

-- 
-- 
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] JUST CREATED GOOGLE + CLOJURE COMMUNITY FOR TUNISIA

2013-10-19 Thread Plínio Balduino
Congratulations

IMHO, local communities are the best way to make the language more popular
and even to create a job market for Clojure.

Wish you all the success

Plínio
On Oct 19, 2013 12:11 PM, "Rafik NACCACHE"  wrote:

> Dear All,
>
> It is my pleasure to announce that we just created a Tunisial Local HUB
> for Clojure advocacy, teaching and technical exchange :
>
> https://plus.google.com/u/1/**communities/**106805143209555111634
>
> Awareness about clojure in Tunisia is quite low, though this is a country
> that accounts for a significant number of talented software engineers.
> S, I think it would be a nice idea to advocate for the language here, I
> mean talent is present and just waits to be converted :)
>
> I would be grateful if you can join this little effort of mine to assist
> us and make our community look good, and who knows, we could be a good
> starting point for a wider and more global clojure user base :)
>
> Thank you all,
>
> Regards
>
> --
> --
> 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: How to reflect on super class fields?

2013-10-19 Thread dennis zhuang
There is an option :ancestors for reflect:

(reflect 3  :ancestors true)

Options:

 :ancestors in addition to the keys described above, also
include an :ancestors key with the entire set of
ancestors, and add all ancestor members to
:members.


2013/10/19 binita 

> Hi everyone,
>
> I have this class hierarchy: class Foo extends Bar
>
> On using clojure.reflect/reflect on instance of Bar (bar-instance), I get
> the fields of Bar only. But, I need all the fields of the super classes too.
>
> I tried casting bar-instance to Foo, and then doing a reflect on the
> result. It seems like the cast didn't really return a Foo instance.
>
>   (reflect (cast Foo bar-instance) )
>
> How can i get the fields of Foo?
>
> Thanks
> Binita
>
> --
> --
> 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.
>



-- 
庄晓丹
Email:killme2...@gmail.com xzhu...@avos.com
Site:   http://fnil.net
Twitter:  @killme2008

-- 
-- 
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] lein-fruit, native iOS apps in Clojure.

2013-10-19 Thread Zach Oakes
https://github.com/oakes/lein-fruit

This is the first release of lein-fruit, the iOS equivalent of lein-droid, 
allowing you to build native iOS apps in Clojure and/or Java. It is also 
included in the latest release of Nightcode . It 
is really just a thin wrapper around RoboVM , the 
bytecode-to-native translator and bridge for iOS APIs. The plugin also 
includes a few useful templates to get you started.

One caveat is that, due to the weird way Clojure imports Java classes, 
which I discussed here 
before, 
you can't import most of RoboVM's iOS classes without getting a nasty 
compile error. As a workaround, you must invoke these classes dynamically. 
The Clojure template in lein-fruit provides some convenience functions for 
this, but ultimately it is a big limitation.

So why build this? Games! Nightcode already had a Clojure LibGDX template, 
allowing you to compile a desktop and Android game from the same Clojure 
codebase -- and now it supports iOS, too! And since games don't really use 
platform-specific APIs, the aforementioned problem isn't a big deal.

Additional caveats: There is no REPL or runtime evaling due to iOS 
executable memory restrictions. Also, I don't own a Mac or an iOS device, 
so I had to do all my development in a VM with the iOS simulator (a VM 
inside of a VM?). Naturally, I would like to hear about any bugs. Thanks!

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: uberjar problem with Leiningen 2.3.3 (works with 2.3.2)

2013-10-19 Thread Phil Hagelberg

xavi writes:

> Does this mean that the problem was not completely solved in Ring 1.2? 
> Argh! I'll try to take a look to Ring's code and see if I can find the 
> problem and fix it.

I took another look, and it looks like it was fixed by the commit I
linked to previously, but then broken again a week later by another commit:

https://github.com/ring-clojure/ring/commit/df71e6a522ffbc3b3edd518c61bda1c37708af7c#diff-84b6775eb77642c1afe9b5745af47a2f

But the pull request linked to will fix it again; hopefully for good this time.

-Phil


pgpTgdvcwrpXo.pgp
Description: PGP signature


No such namespace warning with Clojurescript repl

2013-10-19 Thread Greg Chapman
I've been working through the Clojurescript tutorial here: 
https://github.com/magomimmo/modern-cljs

When compiling step 2, which adds a file requiring clojure.browser.repl, I 
get a "WARNING: No such namespace: e at line 71" (in repl.cljs). The code 
in repl.cljs is:

  (event/listen connection
> :success
> (fn [e]
>   (net/transmit
>repl-connection
>:evaluate-javascript
>(.getResponseText e/currentTarget
>  ()
>
>
which does appear to be treating the event object e as a namespace. Should 
that be changed to (.- currentTarget e) ? 


-- 
-- 
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: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-19 Thread John Mastro
> John, thanks. Not a stupid question at all. When learning a new language, a 
> new environment, and using an unfamiliar OS, there are so many moving parts 
> that it is sometimes hard to know where to begin when tracking stuff down. My 
> old and favorite line here is that "signposts are generally made by people 
> who know the lay of the land"..
> So please keep the advice coming.


Were you able to get it working after setting :dependencies?

To expand a bit on what's going on: Part of what Leiningen does for you is 
manage your dependencies (including Clojure itself, which is very cool). It 
will both install them and arrange for the correct classpath to be in effect 
when you run e.g. 'lein repl' or 'lein run' from your project directory. You 
only need to tell Leiningen about your direct dependencies - it will 
automatically handle their dependencies as well. 

I'd recommend taking a look at Leiningen's official tutorial if you haven't 
already:
https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md

I've never used Eclipse so I can't be any help there. 

- John

-- 
-- 
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: No such namespace warning with Clojurescript repl

2013-10-19 Thread Mimmo Cosenza
which tutorial are you referencing?

Anyway, what CLJS release are you using? Have you tried with 
[org.clojure/clojurescript "0.0-1947"  dependencies?

mimmo


On Oct 19, 2013, at 6:47 PM, Greg Chapman  wrote:

> I've been working through the Clojurescript tutorial here: 
> https://github.com/magomimmo/modern-cljs
> 
> When compiling step 2, which adds a file requiring clojure.browser.repl, I 
> get a "WARNING: No such namespace: e at line 71" (in repl.cljs). The code in 
> repl.cljs is:
> 
>   (event/listen connection
> :success
> (fn [e]
>   (net/transmit
>repl-connection
>:evaluate-javascript
>(.getResponseText e/currentTarget
>  ()
> 
> 
> which does appear to be treating the event object e as a namespace. Should 
> that be changed to (.- currentTarget e) ? 
> 
> 
> 
> -- 
> -- 
> 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: No such namespace warning with Clojurescript repl

2013-10-19 Thread David Nolen
You can no longer use foo/bar to access properties, a slash now always
indicates a namespace with CLJS 1933 and up.


On Sat, Oct 19, 2013 at 12:47 PM, Greg Chapman wrote:

> I've been working through the Clojurescript tutorial here:
> https://github.com/magomimmo/modern-cljs
>
> When compiling step 2, which adds a file requiring clojure.browser.repl, I
> get a "WARNING: No such namespace: e at line 71" (in repl.cljs). The code
> in repl.cljs is:
>
>   (event/listen connection
>> :success
>> (fn [e]
>>   (net/transmit
>>repl-connection
>>:evaluate-javascript
>>(.getResponseText e/currentTarget
>>  ()
>>
>>
> which does appear to be treating the event object e as a namespace. Should
> that be changed to (.- currentTarget e) ?
>
>
>  --
> --
> 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: ANN: core.match 0.2.0

2013-10-19 Thread David Nolen
If there's something specific you would like to see based on what is
already present I'm listening.

David


On Fri, Oct 18, 2013 at 11:49 AM, François De Serres <
francois.de.ser...@gmail.com> wrote:

> Hi David,
>
> any chance to see core.match expose its compiler in the near future?
> The ability to create "matchers" at runtime (like matchure/fn-match) would
> be much welcome ;)
>
> Thankies,
> --
> François
>
> --
> --
> 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: Compulsive over-optimization

2013-10-19 Thread Kendall Shaw
The question in the second paragraph depends on the belief that someone 
could engage in pointless refactoring.


There is an implied assertion that clojure's design provides more 
opportunities for someone to engage in pointless refactoring.


Disproving that someone could engage in pointless activity would miss 
the point of the question. So, providing an example for that would 
possibly lead to more confusion.


If the implied asssertion about clojure's design were taken to further 
imply that the design is flawed in those cases, this would also be 
missing the point of the question.


If  cases in which clojure's design were flawed were not invented for 
the purpose of pursuing this questioning. Without criticism of clojure's 
design, specifics about how clojure could be used in a multitude of ways 
to solve a problem, could be described by way of example. But, that 
would also miss the point of the question.


So, if the image of someone engaging in pointless refactoring reminds 
you of an experience that you have had, and if you can use that as the 
model for a general case, how would you suggest preventing the general 
case from being made actual, in the future?


Kendall

On 10/19/2013 12:35 AM, Laurent PETIT wrote:

Can you give a concrete example?

Le samedi 19 octobre 2013, Kendall Shaw a écrit :

With clojure in particular, I am having trouble not rearranging my
code to be what I think is more optimal in ways that seem probably
not practical. I've noticed myself doing that when I'm newish to
languages and apis. But, I go bonkers with clojure.

Do you have any thoughts about how to avoid that, other than Bob
Newhart's advice:

Bob Newhart-Stop It 

Kendall

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



--
ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
This.is.easy. This-is-easy-too. Almost as easy to read as this.

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Compulsive over-optimization

2013-10-19 Thread Softaddicts
I read your post three times and now I need to get a couple of fuses
replaced :)

Holy smoke, it's Saturday man ! Most of us are probably trying to recover
from the work week, give us a chance :)))

Luc P.


> The question in the second paragraph depends on the belief that someone 
> could engage in pointless refactoring.
> 
> There is an implied assertion that clojure's design provides more 
> opportunities for someone to engage in pointless refactoring.
> 
> Disproving that someone could engage in pointless activity would miss 

> the point of the question. So, providing an example for that would 
> possibly lead to more confusion.
> 
> If the implied asssertion about clojure's design were taken to further 
> imply that the design is flawed in those cases, this would also be 
> missing the point of the question.
> 
> If  cases in which clojure's design were flawed were not invented for 

> the purpose of pursuing this questioning. Without criticism of clojure's 
> design, specifics about how clojure could be used in a multitude of ways 
> to solve a problem, could be described by way of example. But, that 
> would also miss the point of the question.
> 
> So, if the image of someone engaging in pointless refactoring reminds 

> you of an experience that you have had, and if you can use that as the 
> model for a general case, how would you suggest preventing the general 
> case from being made actual, in the future?
> 
> Kendall
> 
> On 10/19/2013 12:35 AM, Laurent PETIT wrote:
> > Can you give a concrete example?
> >
> > Le samedi 19 octobre 2013, Kendall Shaw a écrit :
> >
> > With clojure in particular, I am having trouble not rearranging my
> > code to be what I think is more optimal in ways that seem probably
> > not practical. I've noticed myself doing that when I'm newish to

> > languages and apis. But, I go bonkers with clojure.
> >
> > Do you have any thoughts about how to avoid that, other than Bob

> > Newhart's advice:
> >
> > Bob Newhart-Stop It 
> >
> > Kendall
> >
> > -- 
> > -- 
> > 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.
> 
> 
> -- 
> ThisIsHardToRead, asIsThis. This_is_easier, unless_it_is_underlined. 
> This.is.easy. This-is-easy-too. Almost as easy to read as this.
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
--
Softaddicts sent by ibisMail from my ipad!

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

load-file & namespace

2013-10-19 Thread Ramesh
Hi All,

I'm calling load-file to load a user-specified file inside -main. And, the
loaded file has its own namespace, and I'm able to see that using
(ns-publics) as well. However, when I try to call a function inside the
loaded file, from -main, I'm getting a "no such namespace" exception.

;; Lein project test1;File : src/test1/core.clj(ns test1.core
(:gen-class))(defn -main [ & args]   (load-file (first args))
(println (ns-publics 'test1.core))  (println (ns-publics 'hello))
(println (hello/someconst))) ;File : hello.clj(ns hello)(println
*ns*)(defn someconst [] 25); run as : ; lein run hello.clj(comment
error  Exception in thread "main" java.lang.RuntimeException: No such
namespace: hello, compiling:(test1/core.clj:9:12)   at
clojure.lang.Compiler.analyze(Compiler.java:6380)   at
clojure.lang.Compiler.analyze(Compiler.java:6322)   at
clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3573)  at
clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)at
clojure.lang.Compiler.analyze(Compiler.java:6361)   at
clojure.lang.Compiler.analyze(Compiler.java:6322)   at
clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3624)  at
clojure.lang.Compiler.analyzeSeq(Compiler.java:6562)at
clojure.lang.Compiler.analyze(Compiler.java:6361)   at
clojure.lang.Compiler.analyze(Compiler.java:6322)   at
clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5708) at
clojure.lang.Compiler$FnMethod.parse(Compiler.java:5139)at
clojure.lang.Compiler$FnExpr.parse(Compiler.java:3751)  at
clojure.lang.Compiler.analyzeSeq(Compiler.java:6558)at
clojure.lang.Compiler.analyze(Compiler.java:6361)   at
clojure.lang.Compiler.analyzeSeq(Compiler.java:6548)at
clojure.lang.Compiler.analyze(Compiler.java:6361)   at
clojure.lang.Compiler.access$100(Compiler.java:37)  at
clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:529)   at
clojure.lang.Compiler.analyzeSeq(Compiler.java:6560)at
clojure.lang.Compiler.analyze(Compiler.java:6361)   at
clojure.lang.Compiler.analyze(Compiler.java:6322)   at
clojure.lang.Compiler.eval(Compiler.java:6623)  at
clojure.lang.Compiler.load(Compiler.java:7064)  at
clojure.lang.RT.loadResourceScript(RT.java:370) at
clojure.lang.RT.loadResourceScript(RT.java:361) at
clojure.lang.RT.load(RT.java:440)   at
clojure.lang.RT.load(RT.java:411)   at
clojure.core$load$fn__5018.invoke(core.clj:5530)at
clojure.core$load.doInvoke(core.clj:5529)   at
clojure.lang.RestFn.invoke(RestFn.java:408) at
clojure.core$load_one.invoke(core.clj:5336) at
clojure.core$load_lib$fn__4967.invoke(core.clj:5375)at
clojure.core$load_lib.doInvoke(core.clj:5374)   at
clojure.lang.RestFn.applyTo(RestFn.java:142)at
clojure.core$apply.invoke(core.clj:619) at
clojure.core$load_libs.doInvoke(core.clj:5413)  at
clojure.lang.RestFn.applyTo(RestFn.java:137)at
clojure.core$apply.invoke(core.clj:619) at
clojure.core$require.doInvoke(core.clj:5496)at
clojure.lang.RestFn.invoke(RestFn.java:408) at
user$eval3.invoke(NO_SOURCE_FILE:1) at
clojure.lang.Compiler.eval(Compiler.java:6619)  at
clojure.lang.Compiler.eval(Compiler.java:6608)  at
clojure.lang.Compiler.eval(Compiler.java:6582)  at
clojure.core$eval.invoke(core.clj:2852) at
clojure.main$eval_opt.invoke(main.clj:308)  at
clojure.main$initialize.invoke(main.clj:327)at
clojure.main$null_opt.invoke(main.clj:362)  at
clojure.main$main.doInvoke(main.clj:440)at
clojure.lang.RestFn.invoke(RestFn.java:421) at
clojure.lang.Var.invoke(Var.java:419)   at
clojure.lang.AFn.applyToHelper(AFn.java:163)at
clojure.lang.Var.applyTo(Var.java:532)  at
clojure.main.main(main.java:37)Caused by: java.lang.RuntimeException:
No such namespace: helloat
clojure.lang.Util.runtimeException(Util.java:219)   at
clojure.lang.Compiler.resolveIn(Compiler.java:6844) at
clojure.lang.Compiler.resolve(Compiler.java:6818)   at
clojure.lang.Compiler.analyzeSymbol(Compiler.java:6779) at
clojure.lang.Compiler.analyze(Compiler.java:6343)   ... 54 more)




-ramesh

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