Re: use lein compile a Java project

2013-10-12 Thread Shantanu Kumar
Hi Gaofeng,

The JAR files are dependency artifacts that must be placed in the Maven 
repository. You can specify them in the :dependencies vector as below:

: dependencies [[commons-codec 1.4]
[commons-logging 1.1.1]
[org.apache.httpcomponents/httpclient 4.1.2]
]

Find their maven coordinates of those artifacts on http://mvnrepository.com
 or http://search.maven.org/ and use them in project.clj. You need not have 
these JARs in resources/lib folder.

Shantanu

On Saturday, 12 October 2013 07:56:47 UTC+5:30, Gaofeng Zeng wrote:


 .
 ├── doc
 │   └── intro.md
 ├── java
 │   ├── LIBS
 │   └── NetSpider
 │   ├── bin
 │   ├── build.xml
 │   ├── invalid.src
 │   └── src
 ├── LICENSE
 ├── project.clj
 ├── project.clj.bak
 ├── README.md
 ├── resources
 │   └── lib
 │   ├── commons-codec-1.4.jar
 │   ├── commons-logging-1.1.1.jar
 │   ├── httpclient-4.1.2.jar
 │   ├── httpclient-cache-4.1.2.jar
 │   ├── httpcore-4.1.2.jar
 │   ├── httpmime-4.1.2.jar
 │   ├── jsoup-1.6.3.jar
 │   └── mongo-2.10.1.jar
 ├── src
 │   ├── clj
 │   │   └── crawler
 │   └── java
 │   ├── test
 │   └── util
 ├── target
 │   ├── classes
 │   ├── spider.jar
 │   └── stale
 │   └── extract-native.dependencies
 └── test
 └── crawler
 └── core_test.clj


 This is my dir tree of my project. Compile the  java project need the jars 
 that located in resources/lib, and I set this (:resource-paths 
 [resources/lib]), but not effect.

 On Friday, October 11, 2013 10:20:41 PM UTC+8, John Hume wrote:

 I believe :dependencies and :resource-paths will be used for the 
 classpath at both build and run time. Does that meet your needs?


 On Fri, Oct 11, 2013 at 8:00 AM, Gaofeng Zeng ndtm...@gmail.com wrote:

 How use lein compile a Java project?

 I know the java-source-paths can specify the src path. But I don't know 
 is there any option can specify the lib path that contains dependencies of 
 Java source.

 (defproject crawler 0.1.0-SNAPSHOT
  :description FIXME: write description
  :url http://example.com/FIXME;
  :license {:name Eclipse Public License
:url http://www.eclipse.org/legal/epl-v10.html}
  :dependencies [[org.clojure/clojure 1.5.1]]
  :source-paths [src/clj]
  :java-source-paths [java/NetSpider/src])

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




 -- 
 http://elhumidor.blogspot.com/ 



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


Clojure can't import some Java classes

2013-10-12 Thread Zach Oakes
I recently learned that merely importing a Java class in Clojure causes 
static initializers to be run. Sometimes, this causes compilation errors, 
because they are written with the assumption that they will only be run 
during runtime.

I ran into this just now while trying to make a simple Clojure game with 
LibGDX. After simply importing its Timer class, I began getting compilation 
errors. The stack trace shows it is due to a static 
initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
 to instantiate the class!

I also ran into this recently while trying to use RoboVM. My question is, 
do I have any options? I haven't found many discussions about this here or 
elsewhere. This surprises me, because it seems like something more people 
should be running into.

-- 
-- 
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 can't import some Java classes

2013-10-12 Thread Zach Oakes
I should add, I am aware I can bring in a class dynamically with 
Class/forName, and that is what I ended up doing for the Timer class. 
However, this is not always practical, and sometimes is simply not an 
option if aot-compilation is required.

On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure causes 
 static initializers to be run. Sometimes, this causes compilation errors, 
 because they are written with the assumption that they will only be run 
 during runtime.

 I ran into this just now while trying to make a simple Clojure game with 
 LibGDX. After simply importing its Timer class, I began getting compilation 
 errors. The stack trace shows it is due to a static 
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question is, 
 do I have any options? I haven't found many discussions about this here or 
 elsewhere. This surprises me, because it seems like something more people 
 should be running into.


-- 
-- 
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 can't import some Java classes

2013-10-12 Thread Wujek Srujek
So you are saying compilation is trying to instantiate class and run static
initializers? This seems very backward, are you sure?


On Sat, Oct 12, 2013 at 8:30 AM, Zach Oakes zsoa...@gmail.com wrote:

 I should add, I am aware I can bring in a class dynamically with
 Class/forName, and that is what I ended up doing for the Timer class.
 However, this is not always practical, and sometimes is simply not an
 option if aot-compilation is required.


 On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure causes
 static initializers to be run. Sometimes, this causes compilation errors,
 because they are written with the assumption that they will only be run
 during runtime.

 I ran into this just now while trying to make a simple Clojure game with
 LibGDX. After simply importing its Timer class, I began getting compilation
 errors. The stack trace shows it is due to a static 
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question is,
 do I have any options? I haven't found many discussions about this here or
 elsewhere. This surprises me, because it seems like something more people
 should be running into.

  --
 --
 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: Clojure can't import some Java classes

2013-10-12 Thread Colin Fleming
Yup, it's true. I suffer from this as well. When I'm compiling Cursive
normal compilation fails because a bunch of the IntelliJ classes assume the
IntelliJ platform is running and barf if it's not. I have an awful hack
which is to run the compilation within their test framework which sets up a
mock platform, but it's really ugly. I'd appreciate a clever workaround to
this too. The other thing I've considered is to create a set of API classes
to compile against which would be the standard classes with the static
initialisers stripped out with ASM or something. In fact you could strip
out everything but the signatures.


On 12 October 2013 21:17, Wujek Srujek wujek.sru...@gmail.com wrote:

 So you are saying compilation is trying to instantiate class and run
 static initializers? This seems very backward, are you sure?


 On Sat, Oct 12, 2013 at 8:30 AM, Zach Oakes zsoa...@gmail.com wrote:

 I should add, I am aware I can bring in a class dynamically with
 Class/forName, and that is what I ended up doing for the Timer class.
 However, this is not always practical, and sometimes is simply not an
 option if aot-compilation is required.


 On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure causes
 static initializers to be run. Sometimes, this causes compilation errors,
 because they are written with the assumption that they will only be run
 during runtime.

 I ran into this just now while trying to make a simple Clojure game with
 LibGDX. After simply importing its Timer class, I began getting compilation
 errors. The stack trace shows it is due to a static 
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question
 is, do I have any options? I haven't found many discussions about this here
 or elsewhere. This surprises me, because it seems like something more
 people should be running into.

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


-- 
-- 
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 - Where to start?

2013-10-12 Thread shlomivaknin
Hey Jeff, 

On Thursday, October 10, 2013 11:41:05 PM UTC+2, Jeff Heon wrote:

 I remember reading a post with a list of open source projects with 
 excellent clojure code.


did you mean this post 
http://stackoverflow.com/questions/2444893/clojure-open-source-projects ? 

-- 
-- 
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] Counterclockwise - Clojure plugin for Eclipse

2013-10-12 Thread Casper Clausen
Nice work, looking forward to using this. 

I'm wondering though, what is the best or official way to import a lein 
project? I've never been able to figure it out, so I always do lein pom and 
import as maven project and then convert to leiningen project. Is there a 
better way?



On Saturday, October 12, 2013 2:11:53 AM UTC+2, Steve Buikhuizen wrote:

 Laurent, you rock!

 Auto-formatting is already saving my fingers a lot of travelling.

 Thanks for the great work.


-- 
-- 
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] Counterclockwise - Clojure plugin for Eclipse

2013-10-12 Thread PublicFarley
Awesome work Laurent! Just awesome. 

@Casper Take a look at this for making leinigen projects easily importable into 
Eclipse: https://github.com/kumarshantanu/lein-idefiles

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


Re: ANN: lein-midje-doc 0.0.9 released

2013-10-12 Thread Timothy Washington
This library looks great, and I'm eager to try it out in one of my new
projects, which uses *[midje 1.5.1]* (and my *profile.clj* is below).
But, in a new project, I just ran `*lein midje-doc*`, and I'm getting a
RuntimeException in one of the 3rd party libraries. I've attached a log
file with the stacktrace. Any ideas on overcoming this?


*java.lang.RuntimeException: No such var: seq/map-nth,
compiling:(me/raynes/conch.clj:196: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.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:436)*
*at
leiningen.midje_doc.renderer$eval19$loading__4910__auto20.invoke(renderer.clj:1)
*
*at leiningen.midje_doc.renderer$eval19.invoke(renderer.clj:1)*
*at clojure.lang.Compiler.eval(Compiler.java:6619)*
*...*

*fig.1 *


*~/.lein/profile.clj*
*
*

{:user

 {:plugins [

[lein-marginalia 0.7.1]

[lein-midje 3.1.1]

[lein-midje-doc 0.0.13]]

  :dependencies []

  :repl-options {}}}

*fig.2 *


Tim Washington
Interruptsoftware.ca / Bkeeping.com



On Mon, Sep 23, 2013 at 3:05 AM, zcaudate z...@caudate.me wrote:

 Ooops! Really sorry guys. the resource directory was not included in the
 v0.0.9 jar file... it is now fixed in v0.0.10.

 lein-midje-doc

 lein-midje-doc fixes the problem of incorrectly documented examples by
 bridging the gap between writing tests and writing documentation.
  https://github.com/zcaudate/lein-midje-doc#featuresFeatures:

1. To generate .html documentation from a .clj test file.
2. To express documentation elements as clojure datastructures.
3. To render clojure code and midje facts as code examples.
4. To allow tagging of elements for numbering and linking.

 https://github.com/zcaudate/lein-midje-doc#benefitsBenefits:

1. All documentation errors can be eliminated.
2. Removes the need to cut and copy test examples into a readme file.
3. Entire test suites can potentially be turned into nice looking
documentation with relatively little work.



 On Monday, September 23, 2013 2:22:08 PM UTC+10, zcaudate wrote:

 Hi Everyone.

 I've just pushed a new documentation library for midje tests to clojars.
 Its very experimental and a bit of a hack but I'm finding it super useful.
 Hope to get some feedback on this library.

 Github Page - 
 https://github.com/zcaudate/**lein-midje-dochttps://github.com/zcaudate/lein-midje-doc

 Generated Documentation - 
 http://z.caudate.me/lein-**midje-doc/http://z.caudate.me/lein-midje-doc/


 Chris



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


midje-doc.out
Description: Binary data


Re: Clojure can't import some Java classes

2013-10-12 Thread Zach Oakes
Compiling against mock classes is the other solution I've tried as well. 
I'm not sure how the real classes would take over once the program is run, 
and also it's a quite laborious and brittle solution since updates to the 
real classes would break the mock classes. Definitely interested in ideas 
others may have.

On Saturday, October 12, 2013 4:36:31 AM UTC-4, Colin Fleming wrote:

 Yup, it's true. I suffer from this as well. When I'm compiling Cursive 
 normal compilation fails because a bunch of the IntelliJ classes assume the 
 IntelliJ platform is running and barf if it's not. I have an awful hack 
 which is to run the compilation within their test framework which sets up a 
 mock platform, but it's really ugly. I'd appreciate a clever workaround to 
 this too. The other thing I've considered is to create a set of API classes 
 to compile against which would be the standard classes with the static 
 initialisers stripped out with ASM or something. In fact you could strip 
 out everything but the signatures.


 On 12 October 2013 21:17, Wujek Srujek wujek@gmail.com 
 javascript:wrote:

 So you are saying compilation is trying to instantiate class and run 
 static initializers? This seems very backward, are you sure?


 On Sat, Oct 12, 2013 at 8:30 AM, Zach Oakes zso...@gmail.comjavascript:
  wrote:

 I should add, I am aware I can bring in a class dynamically with 
 Class/forName, and that is what I ended up doing for the Timer class. 
 However, this is not always practical, and sometimes is simply not an 
 option if aot-compilation is required.


 On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure causes 
 static initializers to be run. Sometimes, this causes compilation errors, 
 because they are written with the assumption that they will only be run 
 during runtime.

 I ran into this just now while trying to make a simple Clojure game 
 with LibGDX. After simply importing its Timer class, I began getting 
 compilation errors. The stack trace shows it is due to a static 
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question 
 is, do I have any options? I haven't found many discussions about this 
 here 
 or elsewhere. This surprises me, because it seems like something more 
 people should be running into.

  -- 
 -- 
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to clo...@googlegroups.comjavascript:
 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 javascript:
 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 javascript:.
 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.comjavascript:
 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 javascript:
 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 javascript:.
 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] Counterclockwise - Clojure plugin for Eclipse

2013-10-12 Thread Gary Zhao
Great. But I have one thing confusing.
Auto indent uses two spaces, but tab uses four spaces. How can I make them 
consistent? Either 2 or 4 spaces for both. I tried some settings but didn't 
seem to work.

Thanks.

On Thursday, October 10, 2013 6:36:01 AM UTC-7, Laurent PETIT wrote:

 Hi, a new version of Counterclockwise, the Clojure plugin for the 
 Eclipse IDE, has just been released. 

 Hot new features 
  
 - auto indentation as you type 
 - available as a Standalone Product: Download, Unzip, Code! 
 - many bug fixes including (hopefully) stability improvements 

 Install 
 = 
 - Software update site for installing into an existing Eclipse: 
 http://updatesite.ccw-ide.org/stable/ 

 Standalone product for: 
 - Windows 64 bits: 

 http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86_64.zip
  
 - Windows 32 bits: 

 http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-win32.win32.x86.zip
  
 - Linux 64 bits: 

 http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86_64.zip
  
 - Linux 32 bits: 

 http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-linux.gtk.x86.zip
  
 - OS X 64 bits: 

 http://updatesite.ccw-ide.org/branch/master/master-0.20.0.STABLE001/products/ccw-macosx.cocoa.x86_64.zip
  

 Create a folder, unzip the product inside this folder, and double 
 click on the Counterclockwise executable! (only pre-requisite: Java 
 7 in your path) 

 Release Note 
 == 
 https://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.20.0 


 Cheers, 


 -- 
 Laurent Petit 


-- 
-- 
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] Moderm-cljs - Tutorial 21 - Learn by contributing (part 2)

2013-10-12 Thread Mimmo Cosenza
Hi all,
I just published the second part of the tutorial - learn by contributing. 

https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-21.md

Here I started from where I leaft the previous tutorial-20 by revisiting again 
the Enfocus directories layout and its project.clj to make it possible to 
create a jar which contains only the resources needed by a third party which is 
not interested in the dev/testing stuff of the lib itself. 

HIH

Mimmo


-- 
-- 
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 can't import some Java classes

2013-10-12 Thread Colin Fleming
In my case I'm AOTing, so compiling against one set of classes then running
against another isn't difficult. If you're compiling from source it's
tougher, but aren't you basically compiling at runtime at that point?
Couldn't you work around it changing your startup order (i.e. loading
LibGDX with some Java and then requiring your Clojure)?


On 13 October 2013 04:54, Zach Oakes zsoa...@gmail.com wrote:

 Compiling against mock classes is the other solution I've tried as well.
 I'm not sure how the real classes would take over once the program is run,
 and also it's a quite laborious and brittle solution since updates to the
 real classes would break the mock classes. Definitely interested in ideas
 others may have.


 On Saturday, October 12, 2013 4:36:31 AM UTC-4, Colin Fleming wrote:

 Yup, it's true. I suffer from this as well. When I'm compiling Cursive
 normal compilation fails because a bunch of the IntelliJ classes assume the
 IntelliJ platform is running and barf if it's not. I have an awful hack
 which is to run the compilation within their test framework which sets up a
 mock platform, but it's really ugly. I'd appreciate a clever workaround to
 this too. The other thing I've considered is to create a set of API classes
 to compile against which would be the standard classes with the static
 initialisers stripped out with ASM or something. In fact you could strip
 out everything but the signatures.


 On 12 October 2013 21:17, Wujek Srujek wujek@gmail.com wrote:

 So you are saying compilation is trying to instantiate class and run
 static initializers? This seems very backward, are you sure?


 On Sat, Oct 12, 2013 at 8:30 AM, Zach Oakes zso...@gmail.com wrote:

 I should add, I am aware I can bring in a class dynamically with
 Class/forName, and that is what I ended up doing for the Timer class.
 However, this is not always practical, and sometimes is simply not an
 option if aot-compilation is required.


 On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure
 causes static initializers to be run. Sometimes, this causes compilation
 errors, because they are written with the assumption that they will only 
 be
 run during runtime.

 I ran into this just now while trying to make a simple Clojure game
 with LibGDX. After simply importing its Timer class, I began getting
 compilation errors. The stack trace shows it is due to a static
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question
 is, do I have any options? I haven't found many discussions about this 
 here
 or elsewhere. This surprises me, because it seems like something more
 people should be running into.

  --
 --
 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=enhttp://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_outhttps://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=enhttp://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_outhttps://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
 

Re: Clojure can't import some Java classes

2013-10-12 Thread Zach Oakes
I'm just pulling LibGDX from maven and trying to call its classes via 
Clojure. I don't doubt that mock classes could work, but I think the effort 
in writing and maintaining them would be more than it's worth.

On Saturday, October 12, 2013 4:25:15 PM UTC-4, Colin Fleming wrote:

 In my case I'm AOTing, so compiling against one set of classes then 
 running against another isn't difficult. If you're compiling from source 
 it's tougher, but aren't you basically compiling at runtime at that point? 
 Couldn't you work around it changing your startup order (i.e. loading 
 LibGDX with some Java and then requiring your Clojure)?


 On 13 October 2013 04:54, Zach Oakes zso...@gmail.com javascript:wrote:

 Compiling against mock classes is the other solution I've tried as well. 
 I'm not sure how the real classes would take over once the program is run, 
 and also it's a quite laborious and brittle solution since updates to the 
 real classes would break the mock classes. Definitely interested in ideas 
 others may have.


 On Saturday, October 12, 2013 4:36:31 AM UTC-4, Colin Fleming wrote:

 Yup, it's true. I suffer from this as well. When I'm compiling Cursive 
 normal compilation fails because a bunch of the IntelliJ classes assume the 
 IntelliJ platform is running and barf if it's not. I have an awful hack 
 which is to run the compilation within their test framework which sets up a 
 mock platform, but it's really ugly. I'd appreciate a clever workaround to 
 this too. The other thing I've considered is to create a set of API classes 
 to compile against which would be the standard classes with the static 
 initialisers stripped out with ASM or something. In fact you could strip 
 out everything but the signatures.


 On 12 October 2013 21:17, Wujek Srujek wujek@gmail.com wrote:

 So you are saying compilation is trying to instantiate class and run 
 static initializers? This seems very backward, are you sure?


 On Sat, Oct 12, 2013 at 8:30 AM, Zach Oakes zso...@gmail.com wrote:

 I should add, I am aware I can bring in a class dynamically with 
 Class/forName, and that is what I ended up doing for the Timer class. 
 However, this is not always practical, and sometimes is simply not an 
 option if aot-compilation is required.


 On Saturday, October 12, 2013 2:28:38 AM UTC-4, Zach Oakes wrote:

 I recently learned that merely importing a Java class in Clojure 
 causes static initializers to be run. Sometimes, this causes compilation 
 errors, because they are written with the assumption that they will only 
 be 
 run during runtime.

 I ran into this just now while trying to make a simple Clojure game 
 with LibGDX. After simply importing its Timer class, I began getting 
 compilation errors. The stack trace shows it is due to a static 
 initializerhttps://github.com/libgdx/libgdx/blob/511b557c1a2d23bf8110a05b0ef54cc20b7f958d/gdx/src/com/badlogic/gdx/utils/Timer.java#L32attempting
  to instantiate the class!

 I also ran into this recently while trying to use RoboVM. My question 
 is, do I have any options? I haven't found many discussions about this 
 here 
 or elsewhere. This surprises me, because it seems like something more 
 people should be running into.

  -- 
 -- 
 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=enhttp://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_outhttps://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=enhttp://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_outhttps://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 

Re: [ANN] Austin — the ClojureScript browser-REPL, rebuilt stronger, faster, easier

2013-10-12 Thread Timothy Washington
Ok, figured this out. I had to add the option to pass in a *:url* to the *
repl-env* function. Made a pull request
herehttps://github.com/cemerick/austin/pull/19.
Let me know if you'd like anything changed or cleaned up.


Thanks

Tim Washington
Interruptsoftware.ca / Bkeeping.com


On Fri, Oct 11, 2013 at 7:52 PM, Timothy Washington twash...@gmail.comwrote:

 This looks awesome. I'm digging into it right now.

 *A)* A problem cropped up where the example app, provided 
 herehttps://github.com/cemerick/austin/blob/master/browser-connected-repl-sample/README.md,
 isn't working for me. After *i)* turning off all other repls and 
 *ii)*following instructions exactly, the call to
 *(js/alert Salut!)* just hangs. However, my environment is behind a *VM
 Ware Guest* Ubuntu Linux (OSX Host). So I don't know if this is
 interfering with the setup, in any way.

 *B)* That being said, I can't wait to dig more into this. As far as
 feedback and requests goes, for the longest while, I've wanted *nrepl-ritz
 * / *nrepl.el* / *cljsbuild auto* / *cljsbuild repl-listen* ... in same
 session (see 
 herehttps://groups.google.com/forum/#!topic/clojure/kc3jQvKmLHg).
 This meaning, that I've wanted cljs auto-build that tees both to the file
 system, and the browser connected repl. Also, a debugger would be available
 if any Clojure errors pop up. I believe you'd need *cljsbuild auto* and 
 *cljsbuild
 repl-listen* setup as nrepl middleware. But I'm by no means an expert.


 Cheers. Great work.

 Tim Washington
 Interruptsoftware.ca / Bkeeping.com


 On Mon, Sep 9, 2013 at 8:24 PM, Nelson Morris nmor...@nelsonmorris.netwrote:

 I've been using austin on a project with emacs/nrepl.  It works for a C-c
 C-k, switch to nrepl, interact with app. However, some other features like
 auto-complete and jump-to-symbol-definition I'm used to in a clojure
 workflow don't work or cause a core to spin.  I'd suspect the eldoc call to
 show the function arguments could act similar.

 -
 Nelson


 On Mon, Sep 9, 2013 at 10:25 AM, Norman Richards 
 o...@nostacktrace.comwrote:

 On Mon, Aug 5, 2013 at 8:21 AM, Chas Emerick c...@cemerick.com wrote:

 As you might know, I've been tinkering with an easier-to-use variant of
 ClojureScript's browser-REPL for some time.  I've finally wrapped that up
 into its own project, Austin: [...]



 Is anyone successfully using this with nrepl in emacs?  I am able to
 make it work, but something is causing both emacs and the JVM it is
 connected to to use 100% CPU.  I seem to be getting a long stream of
 Unable to resolve symbol: if-let in this context,
 compiling:(NO_SOURCE_PATH:1:1)

 See: https://gist.github.com/orb/6496320

 *nrepl-connection* fills up with:

 d2:ex45:class
 clojure.lang.Compiler$CompilerException2:id6:1504207:root-ex45:class
 clojure.lang.Compiler$CompilerException7:session36:43e688aa-01c2-4824-b1f3-1bd05a1f02446:statusl10:eval-erroreed3:err128:CompilerException
 java.lang.RuntimeException: Unable to resolve symbol: if-let in this
 context, compiling:(NO_SOURCE_PATH:1:1)


 I'm not sure if this is a problem with austin or if it's nrepl.el or
 something on the emacs side.

 As a side note, I occasionally get a similar error message using
 straight nrepl when first starting up, but it usually only happens once.
  With austin/nrepl it appears to be stuck in some kind of loop erroring
 over and over...  Does anyone have a known good setup I could try to
 reproduce?



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

2013-10-12 Thread Manuel Paccagnella
Looks very interesting, thanks for sharing! BTW, documentation is 
impressive and quite comprehensive.

On a related note: I've spotted a couple of typos in your README.md so far. 
Do you accept pull requests for small fixes like these? 

Il giorno venerdì 11 ottobre 2013 18:23:41 UTC+2, Malcolm Sparks ha scritto:

 A few months ago, Stuart Sierra blogged about the workflow he follows for 
 building Clojure applications.

 One of the great pleasures of working with a dynamic language is being 
 able to build a system while simultaneously interacting with it. 
 -- http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded

 Since then I've been using this workflow for my own projects, and found it 
 to be amazingly effective. 

 I've added some extra features, and the result is Jig, which builds on 
 Stuart's work in the following ways :-

- Multiple components can each contribute to the 'system' map
- Components are started in dependency order
- Components are specified and configured in a config (edn) file
- Jig can host 'plain old' Leiningen projects - Jig will even 'reload' 
them too e.g. if their project.clj dependencies change.
- Jig can host multiple projects simultaneously

 There's a small but growing list of optional re-usable components that 
 provide extra functionality :-

- Pedestal services support. Jig provides the system map and 'url-for' 
function in the service context.
- Nginx cache purging on reload
- Git pull prior reload
- Reload via JMX
- nREPL
- Stencil cache purging
- Firefox remote control support for 'browser refresh on reload'

 I know others are working on similar designs. I'd be interested to hear 
 what people think and whether this is useful.

 Thanks,

 Malcolm

 PS: Jig can be found here: https://github.com/juxt/jig





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


evaluating compiled clojurescript functions at the REPL

2013-10-12 Thread Benjamin Vulpes
Hey all!

I've written a S.O. question about Emacs/ClojureScript REPL integration. My
basic question is:

how ams call compiled functions and execute in browser context?

I love working with Emacs and I also love all of the work that everyone has
put into building a robust Emacs/CLJ* toolchain, and really look forward to
any tips anyone has to share on getting all of the nrepl.el functionality
in a browser-executing cljs repl.

Thanks!
--vulpes

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