does a future call redirect printlns?

2013-03-05 Thread George Oliver
hi, 

I could use some help figuring out why this is working the way it is. It 
seems like a future function call is rebinding *out* so I don't see some 
printlns at the repl. 

I have a couple of functions for a server like this, 

(defn run [handler]
  (let
  [server (create-server)
   selector (:selector server)
   start (fn [] (future (handler server)))
   shutdown (fn []
  (println "Shutting down...")
  (doseq [k (.keys selector)]
(.close (.channel k)))
  (.close selector)
  (println "...done.")
  )]
{:server server :start start :shutdown shutdown}))

(defn app [server]
  (let
[acceptor (:acceptor server)
 selector (:selector server)]
(println "Starting Ex v Arcis on" (.getLocalAddress acceptor))
(while (.isOpen selector)   
  (select! selector)
  (echo-all (filter #(and (.isValid %) (.attachment %)) (.keys 
selector)))
  (Thread/sleep 3000))
(println "after")))


And a repl session looks like this, 

exvarcis.core> (def my-server (run #'app))
#'exvarcis.core/my-server

exvarcis.core> ((:start my-server))
#
Starting Ex v Arcis on #

exvarcis.core> ((:shutdown my-server))
Shutting down...
...done.
nil

exvarcis.core> 


So I never see the "after" called after the while loop.

If I comment out the while loop, I do see it. 

Anyone have a clue why this is working like it is?


thanks, George

-- 
-- 
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 get SHA1 of a string?

2013-03-05 Thread Frank Siebenlist
I just became aware of this crypto-password clojure-library by 
compojure/hiccup/codox's James Reeve:
https://github.com/weavejester/crypto-password

Supports bcrypt, script and pbkdf2.

Very well designed and easy to use!

This should be your goto-library for secure hashing of passwords!!!

-Frank.


On Mar 4, 2013, at 10:52 PM, Frank Siebenlist  
wrote:

> Hi Mark,
> 
> Thanks for sharing!
> 
> I like the approach of hiding all the interaction with the 
> java.security.MessageDigest library, 
> and returning the pair of matching digest&verify functions - it will avoid 
> many mistakes.
> 
> As far as the presented algorithm is concerned, it may be more prudent to 
> stick with bcrypt and friends though…
> 
> Regards, Frank.
> 
> 
> On Mar 4, 2013, at 7:32 PM, Mark C  wrote:
> 
>> For another cut at a hashing interface, you may want to look at one I made 
>> specifically for passwords.  You make a password hasher by passing in 
>> algorithm, salt length, and iterations, and you get back a map containing a 
>> pair of complementary functions: one that digests, the other that verifies.  
>> https://gist.github.com/mchampine/868342
>> 
>> Example: Digester/verifier pair using SHA-256 with 16 bytes salt and 10k 
>> iterations
>> 
>> (def strongPWHasher (pwfuncs "SHA-256" 16 1))  ; make the 
>> digester/verifier pair
>> (def hashed-pw ((strongPWHasher :digest) "mysecret"))  ; hash the password
>> ((strongPWHasher :verify) "mysecret" hashed-pw); verify it
>> 
>> M.
>> 
>> On Monday, March 4, 2013 6:46:07 PM UTC-5, FrankS wrote:
>> Larry, 
>> 
>> What I can advise though, is to look at my library code and it may give you 
>> different perspectives.  
>> 
>> Furthermore, copy, borrow, and steal what you like and make it your own. 
>> 
>> -FS. 
>> 
>> 
>> On Mar 4, 2013, at 3:17 PM, Frank Siebenlist  wrote: 
>> 
>>> If your code is for production… do not use my code! 
>>> 
>>> It's pretty much written over the weekend and it's "security code", meaning 
>>> that it deserves much more scrutiny than "ordinary" code. 
>>> 
>>> As mentioned in the readme, it's more an "educational exercise", although 
>>> it was good to see you struggling as it validated my concerns about the 
>>> java library's approach ;-) 
>>> 
>>> Don't even know if I'm willing to maintain it either… 
>>> 
>>> Sorry for the bad news - I was just trying to sollicit feedback about 
>>> alternative interfaces for the secure hashing. 
>>> 
>>> Regards, FrankS. 
>>> 
>>> 
>>> On Mar 4, 2013, at 3:09 PM, larry google groups  
>>> wrote: 
>>> 
 Frank, 
 
 Any idea when you might release your code in a stable form? I am using 
 this code at work so I am nervous about using code that is still 
 marked SNAPSHOT. Lein reminds me not to use a SNAPSHOT: 
 
 Could not find metadata org.clojars.franks42:clj.security.message- 
 digest:0.1.0-SNAPSHOT/maven-metadata.xml in central (http:// 
 repo1.maven.org/maven2) 
 Could not find metadata org.clojars.franks42:clj.security.message- 
 digest:0.1.0-SNAPSHOT/maven-metadata.xml in central-proxy (https:// 
 repository.sonatype.org/content/repositories/centralm1/) 
 Retrieving org/clojars/franks42/clj.security.message-digest/0.1.0- 
 SNAPSHOT/maven-metadata.xml (1k) 
  from https://clojars.org/repo/ 
 Could not find artifact org.clojars.franks42:clj.security.message- 
 digest:pom:0.1.0-20130304.220822-1 in central (http://repo1.maven.org/ 
 maven2) 
 Retrieving org/clojars/franks42/clj.security.message-digest/0.1.0- 
 SNAPSHOT/clj.security.message-digest-0.1.0-20130304.220822-1.pom (3k) 
  from https://clojars.org/repo/ 
 Retrieving org/clojure/clojure/1.5.0/clojure-1.5.0.pom (6k) 
  from http://repo1.maven.org/maven2/ 
 Retrieving org/clojars/franks42/clj.security.message-digest/0.1.0- 
 SNAPSHOT/clj.security.message-digest-0.1.0-20130304.220822-1.jar (6k) 
  from https://clojars.org/repo/ 
 Compiling 1 source files to /Users/lkrubner/projects/multi-platform- 
 data-visualization/mpdv-clojure/target/classes 
 Release versions may not depend upon snapshots. 
 Freeze snapshots to dated versions or set the 
 LEIN_SNAPSHOTS_IN_RELEASE environment variable to override. 
 
 
 
 
 
 
 On Mar 4, 4:55 pm, Frank Siebenlist  
 wrote: 
> Glad Larry has working code now... 
> 
> As I mentioned before in this thread, I'm working on this functional 
> interface for the message-digesting/secure-hashing, and this whole 
> discussion reads like a use case for the "why?" ;-) 
> 
> It "proofs" to me that there may be real value in a more user-friendly 
> approach than the one offered by java.security.MessageDigest. 
> 
> So instead of writing: 
> 
> (let [... 
>   nonce-as-bytes (.getBytes nonce) 
>   created-as-bytes (.getBytes created) 
>   secret-as-bytes (.getBytes secret) 
>   digest (.d

Re: A forum for Clojure...?

2013-03-05 Thread Max Gonzih
There is no forum engine there that can provide such flexibility that 
mailing list can provide. I want to be able to have updates send to my 
email on daily basis, I want to be able to reply directly in email, I want 
to be able to use it from different clients (console based, gui based, not 
only web ui).

On Tuesday, March 5, 2013 9:38:02 PM UTC+3, BJG145 wrote:
>
> I'm not used to Google Groups so I'm not even sure whether this is more of 
> a forum or a mailing list or something else. It's not really what I'd call 
> a full-on forum though. The communities where I hang around tend to look 
> more like this...
>
> http://www.edugeek.net/
> http://www.edugeek.net/forums/
>
> http://www.soundonsound.com/
> http://www.soundonsound.com/forum/
>
> News homepage with links, forum with sections, you get the picture. 
>
> This group is clearly where the action is and I imagine it will stay that 
> way, but I'm thinking it would be nice to have something more structured, 
> more community-minded and appealing to browse. 
>
> At the moment, apart from this, there are some barely-used  "Clojure" 
> sections in programming forums like Code Ranch which offer no advantage...
>
> http://www.coderanch.com/forums/f-110/clojure
>
> ...and the deserted "Getting Clojure" forum, which is the closest to the 
> kind of structure I had in mind, but badly needs a design makeover.
>
> http://www.gettingclojure.com/
> http://www.gettingclojure.com/forum:start
>
> Imagine a swish site with sensible sections for all levels; topics like 
> News, Programming, Leiningen, Light Table, Getting Started, General Chat 
> etc etc (OK so I don't know enough about the subject to know what they 
> should be)...does the idea have any appeal, or is it not going to 
> happen...? It's easy to set up stuff like that nowadays, though design and 
> moderation probably takes a bit more practice. Just a thought.
>

-- 
-- 
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] New Clojure meetup in Auckland, NZ

2013-03-05 Thread Colin Fleming
Hi everyone,

I'm pleased to announce a new Clojure meetup in Auckland, New Zealand.
We'll have our first meetup on March 27 - it would be great to see anyone
interested there. We'll have some talks on La Clojure, Storm and
ClojureScript, it should be a good time.

Full details here: http://www.meetup.com/Auckland-Clojure

Hope to see you there!

Cheers,
Colin

-- 
-- 
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: features expression

2013-03-05 Thread vemv
I believe protocols can entirely alleviate the need for feature expressions.

On Saturday, February 16, 2013 5:28:59 PM UTC+1, Mimmo Cosenza wrote:
>
> Hi all,
> the more I learn cli/cljs the more I find myself in looking for libraries 
> running on both sides of a clojurean web app. hiccup/valip, c2, 
> enliven/encofus, just to name few of them. 
>
> Is there a kind of agreement on which approach to follow to solve the 
> features  expression problem. I already used the leon-cljsbuild workaround 
> (i.e. :crossovers option) and cljx feature approach. 
>
> I just read about feature expression problem here: 
> http://dev.clojure.org/display/design/Feature+Expressions
> The last discussion is dated july 2012. Cljs, by attracting people coming 
> from the front-end side too and by freeing the back-end guys from js 
> programming, is growing fast and my personal opinion is that there should 
> be a move toward a decision regarding the sharing of code between cli and 
> cljs. 
>
> Is there any advance in this direction? 
>
> My best
>
> 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: [ClojureScript] features expression

2013-03-05 Thread Dave Sann
Honestly, writing clear understandable code is hard enough already.

I have voiced this opinion before in other discussions on this topic - but my 
view is that inline feature expressions should be used very sparingly. And 
preferably, there should also be other options for portability - e.g. separated 
specific source.

I like what kevin lynagh did with cljx. But this doesn't mean that it is the 
answer for all platform variation problems.

The idea of multiple lines of conditional preprocessing in my (or, worse for 
me, in your) source and then having to mentally resolve from that what gets 
compiled for a particular platform sounds like a recipe for guaranteed 
confusion and a bug finding horror.

The only way you could make that work would be with very good tooling. And I 
won't be holding my breath for that just yet.

I really want some portability enhancements - but it has to be manageable. 
otherwise it's going to take more effort than it saves.

Dave



On Wednesday, 6 March 2013 05:44:14 UTC+11, Brandon Bloom  wrote:
> > I personally think the CL feature expression approach is satisfactory.
> 
> 
> 
> The more I think about it, the less I think that the CL Feature Expression 
> approach is satisfactory as is.
> 
> 
> 
> I'm now reasonably convinced that, horror of horrors, we should look to the C 
> preprocessor for inspiration.
> 
> 
> 
> CL's approach only provides flags, not key/value pairs. Also, the CL approach 
> does not provide a structured form for if/else or cond expressions and has 
> only limited and/or/not predicate combinators. Experience in writing portable 
> C code has proven that == and >= are important for checking version numbers 
> and feature levels.

-- 
-- 
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 does one embed nrepl in his own application?

2013-03-05 Thread Sean Corfield
nrepl uses a specific protocol so you can't use telnet. You'll need an
nrepl client of some sort. Leiningen is the easiest one but I believe
there are nrepl clients in other languages than Clojure?

On Tue, Mar 5, 2013 at 8:37 AM, Jim - FooBar();  wrote:
> On 05/03/13 15:22, Weber, Martin S wrote:
>>
>> $ lein run -m replbuiltin.core &
>> $ lein repl :connect 42042
>> user=> (in-ns 'replbuiltin.core)
>> replbuiltin.core=> (foo 42)
>> 42
>
>
> trying to use 'telnet localhost' instead of 'lein repl :connect' cos I may
> not have lein access, and it doesn't work! I don't  get the repl upon
> connection...
> Do i need to do anything extra after starting the server?
>
> Jim
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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




Re: A forum for Clojure...?

2013-03-05 Thread Sean Corfield
On Tue, Mar 5, 2013 at 11:57 AM, Phil Hagelberg  wrote:
> Most people prefer a mailing list or news group since it allows them to
> read the content using a client of their choice rather than getting
> stuck with whatever HTML user interface the forum operators set up.

Agreed. Forums are a "destination" and that's not what I want from
technical information streams. I always find it frustrating when an
interesting community does spring up on a web forum and yet it doesn't
support full interaction via email...
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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: if I start other threads, does the main thread stop?

2013-03-05 Thread larry google groups
Oh, I found my mistake. I was calling the function instead of giving it to 
.start Thread. This was wrong:


(defn process-startup-hooks-that-run-in-their-own-threads []
  "2013-02-21- remember, each row in hooks is a map: {:order-of-events 2 
:event-name 'delete-old-sessions'} "
  (let [hooks (sort-by :order-of-events 
(:events-called-when-the-app-starts-that-run-in-their-own-threads-hooks 
@um/interactions))]
(doseq [x hooks]
  (let [event-as-string (:event-name x)
event-as-symbol (symbol event-as-string)
event (ns-resolve @event-namespace event-as-symbol)]
(if-not (nil? event)
  (.start (Thread. (event

and I guess this is right:


(defn process-startup-hooks-that-run-in-their-own-threads []
  "2013-02-21- remember, each row in hooks is a map: {:order-of-events 2 
:event-name 'delete-old-sessions'} "
  (let [hooks (sort-by :order-of-events 
(:events-called-when-the-app-starts-that-run-in-their-own-threads-hooks 
@um/interactions))]
(doseq [x hooks]
  (let [event-as-string (:event-name x)
event-as-symbol (symbol event-as-string)
event (ns-resolve @event-namespace event-as-symbol)]
(if-not (nil? event)
  (.start (Thread. event)))



On Tuesday, March 5, 2013 4:11:53 PM UTC-5, larry google groups wrote:
>
> Huh, interesting. So, I had this set of maps that had the names of the 
> functions that I wanted to be started in their own threads once the app 
> started up, but apparently only the first one gets called:
>
>
>:events-called-when-the-app-starts-that-run-in-their-own-threads-hooks 
> #{
>   
>   {:order-of-events 1 :event-name "omniture-fetch-new-data"}
>   
>   {:order-of-events 2 :event-name "persist-new-log-data-to-database"}
>   
>   {:order-of-events 3 :event-name 
> "omniture-call-api-for-report-if-status-is-ready"} 
>   
>   
>   }
>
>
> omniture-fetch-new-data fires up, but the other 2 functions do not. Does 
> the one sort of hijack everything else? 
>
>
> On Tuesday, March 5, 2013 3:24:14 PM UTC-5, larry google groups wrote:
>>
>>
>> This surprises me. I thought I could start my app, then start some 
>> functions in separate threads, and then call Jetty to connect my app 
>> to a socket and have it serve requests. But the way I did this did not 
>> work. I had first had this: 
>>
>> (defn -main [& args] 
>>   (let [port (Integer/parseInt (first args)) 
>> level-of-debugging (str (second args))] 
>> (try 
>>   (set-the-current-debugging-level level-of-debugging) 
>>   (um/update-interactions) 
>>   (pe/set-event-namespace core-namespace) 
>>   (pe/process-startup-hooks) 
>>   (pe/process-startup-hooks-that-run-in-their-own-threads) 
>>   (run-jetty #'app {:port (or port 8080) :join? false}) 
>>   (catch Exception e (debug/print-error-info e) 
>>
>> In this case, run-jetty never got called. The function that starts up 
>> the other functions in their own threads is: 
>>
>>
>> (defn process-startup-hooks-that-run-in-their-own-threads [] 
>>   "2013-02-21- remember, each row in hooks is a map: {:order-of-events 
>> 2 :event-name 'delete-old-sessions'} " 
>>   (let [hooks (sort-by :order-of-events (:events-called-when-the-app- 
>> starts-that-run-in-their-own-threads-hooks @um/interactions))] 
>> (doseq [x hooks] 
>>   (let [event-as-string (:event-name x) 
>> event-as-symbol (symbol event-as-string) 
>> event (ns-resolve @event-namespace event-as-symbol)] 
>> (if-not (nil? event) 
>>   (.start (Thread. (event 
>>
>> This seems to somehow hijack the main thread, so that run-jetty never 
>> gets called. 
>>
>> If I do this instead, then everything is fine: 
>>
>>
>> (defn -main [& args] 
>>   (let [port (Integer/parseInt (first args)) 
>> level-of-debugging (str (second args))] 
>> (try 
>>   (set-the-current-debugging-level level-of-debugging) 
>>   (um/update-interactions) 
>>   (pe/set-event-namespace core-namespace) 
>>   (pe/process-startup-hooks) 
>>   (run-jetty #'app {:port (or port 8080) :join? false}) 
>>   (pe/process-startup-hooks-that-run-in-their-own-threads) 
>>   (catch Exception e (debug/print-error-info e) 
>>
>>
>> run-jetty is called, and then the other functions startup . 
>>
>> But why did my first version of -main not work the way I expected? 
>>
>>

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

Re: if I start other threads, does the main thread stop?

2013-03-05 Thread larry google groups
Huh, interesting. So, I had this set of maps that had the names of the 
functions that I wanted to be started in their own threads once the app 
started up, but apparently only the first one gets called:


   :events-called-when-the-app-starts-that-run-in-their-own-threads-hooks #{

{:order-of-events 1 :event-name "omniture-fetch-new-data"}

{:order-of-events 2 :event-name "persist-new-log-data-to-database"}

{:order-of-events 3 :event-name 
"omniture-call-api-for-report-if-status-is-ready"} 
  

}


omniture-fetch-new-data fires up, but the other 2 functions do not. Does 
the one sort of hijack everything else? 


On Tuesday, March 5, 2013 3:24:14 PM UTC-5, larry google groups wrote:
>
>
> This surprises me. I thought I could start my app, then start some 
> functions in separate threads, and then call Jetty to connect my app 
> to a socket and have it serve requests. But the way I did this did not 
> work. I had first had this: 
>
> (defn -main [& args] 
>   (let [port (Integer/parseInt (first args)) 
> level-of-debugging (str (second args))] 
> (try 
>   (set-the-current-debugging-level level-of-debugging) 
>   (um/update-interactions) 
>   (pe/set-event-namespace core-namespace) 
>   (pe/process-startup-hooks) 
>   (pe/process-startup-hooks-that-run-in-their-own-threads) 
>   (run-jetty #'app {:port (or port 8080) :join? false}) 
>   (catch Exception e (debug/print-error-info e) 
>
> In this case, run-jetty never got called. The function that starts up 
> the other functions in their own threads is: 
>
>
> (defn process-startup-hooks-that-run-in-their-own-threads [] 
>   "2013-02-21- remember, each row in hooks is a map: {:order-of-events 
> 2 :event-name 'delete-old-sessions'} " 
>   (let [hooks (sort-by :order-of-events (:events-called-when-the-app- 
> starts-that-run-in-their-own-threads-hooks @um/interactions))] 
> (doseq [x hooks] 
>   (let [event-as-string (:event-name x) 
> event-as-symbol (symbol event-as-string) 
> event (ns-resolve @event-namespace event-as-symbol)] 
> (if-not (nil? event) 
>   (.start (Thread. (event 
>
> This seems to somehow hijack the main thread, so that run-jetty never 
> gets called. 
>
> If I do this instead, then everything is fine: 
>
>
> (defn -main [& args] 
>   (let [port (Integer/parseInt (first args)) 
> level-of-debugging (str (second args))] 
> (try 
>   (set-the-current-debugging-level level-of-debugging) 
>   (um/update-interactions) 
>   (pe/set-event-namespace core-namespace) 
>   (pe/process-startup-hooks) 
>   (run-jetty #'app {:port (or port 8080) :join? false}) 
>   (pe/process-startup-hooks-that-run-in-their-own-threads) 
>   (catch Exception e (debug/print-error-info e) 
>
>
> run-jetty is called, and then the other functions startup . 
>
> But why did my first version of -main not work the way I expected? 
>
>

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




if I start other threads, does the main thread stop?

2013-03-05 Thread larry google groups

This surprises me. I thought I could start my app, then start some
functions in separate threads, and then call Jetty to connect my app
to a socket and have it serve requests. But the way I did this did not
work. I had first had this:

(defn -main [& args]
  (let [port (Integer/parseInt (first args))
level-of-debugging (str (second args))]
(try
  (set-the-current-debugging-level level-of-debugging)
  (um/update-interactions)
  (pe/set-event-namespace core-namespace)
  (pe/process-startup-hooks)
  (pe/process-startup-hooks-that-run-in-their-own-threads)
  (run-jetty #'app {:port (or port 8080) :join? false})
  (catch Exception e (debug/print-error-info e)

In this case, run-jetty never got called. The function that starts up
the other functions in their own threads is:


(defn process-startup-hooks-that-run-in-their-own-threads []
  "2013-02-21- remember, each row in hooks is a map: {:order-of-events
2 :event-name 'delete-old-sessions'} "
  (let [hooks (sort-by :order-of-events (:events-called-when-the-app-
starts-that-run-in-their-own-threads-hooks @um/interactions))]
(doseq [x hooks]
  (let [event-as-string (:event-name x)
event-as-symbol (symbol event-as-string)
event (ns-resolve @event-namespace event-as-symbol)]
(if-not (nil? event)
  (.start (Thread. (event

This seems to somehow hijack the main thread, so that run-jetty never
gets called.

If I do this instead, then everything is fine:


(defn -main [& args]
  (let [port (Integer/parseInt (first args))
level-of-debugging (str (second args))]
(try
  (set-the-current-debugging-level level-of-debugging)
  (um/update-interactions)
  (pe/set-event-namespace core-namespace)
  (pe/process-startup-hooks)
  (run-jetty #'app {:port (or port 8080) :join? false})
  (pe/process-startup-hooks-that-run-in-their-own-threads)
  (catch Exception e (debug/print-error-info e)


run-jetty is called, and then the other functions startup .

But why did my first version of -main not work the way I expected?

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
I look here:

https://github.com/dakrone/clj-http/issues/45

and I see the original reasoning for :trace-redirects

"add a key like :trace-redirects in the response containing the
ordered list of traversed uris. This would allow clients to know what
was the final uri fetched more easily than now (I think the only way
is to set :save-request? and check the url inside the req). It could
also be very useful for caching purpose (knowing all the uris which
are equivalent to the terminal one). "

The README says: ":trace-redirects will contain the chain of the
redirections followed."

But in my case, I don't think I'm getting redirected. My :trace-
redirects only has 1 URL, and it is the URL that I POSTed to.

[:trace-redirects ["https://api2.omniture.com/admin/1.3/rest/?
method=Report.QueueOvertime"]] [:request-time 1601][:status 200]
[:headers {"date" "Tue, 05 Mar 2013 19:57:24 GMT", "server" "Omniture
AWS/2.0.0", "vary" "Accept-Encoding", "content-encoding" "gzip",
"xserver" "www503", "content-length" "83", "content-type" "application/
json", "connection" "close"}][:body "{\"status\":\"queued\",\"statusMsg
\":\"Your report has been queued\",\"reportID\":83928267}"]


Maybe the POST gets redirected to something with the same URL? The
status I see is 200, not 301 or 302.







On Mar 5, 2:33 pm, larry google groups 
wrote:
> Out of frustration, I have decided to surpress the re-tries. This
> worries me -- I hate to bury a problem without understanding it. But
> the retries are burying the actual queries. This page:
>
> https://github.com/dakrone/clj-http
>
> says:
>
> ;; Apache's http client automatically retries on IOExceptions, if you
> ;; would like to handle these retries yourself, you can specify a
> ;; :retry-handler. Return true to retry, false to stop trying:
> (client/post "http://example.org"; {:multipart [["title" "Foo"]
>                                                ["Content/type" "text/
> plain"]
>
> ["file" (clojure.java.io/file "/tmp/missing-file")]]
>                                    :retry-handler (fn [ex try-count
> http-context]
>                                                     (println "Got:"
> ex)
>                                                     (if (> try-count
> 4) false true))})
>
> So I have re-written my function so that the re-tries are always
> suppressed:
>
> (defn omniture-call-api [url-with-queue-method api-payload headers]
>   (timbre/spy :debug " return value of omniture-call-api "
>               (try+
>                 (http-client/post url-with-queue-method
>                                   {:body api-payload
>                                    :debug true
>                                    :debug-body true
>                                    :insecure true
>                                    :headers {"X-Api-Version" "2"
>                                              "X-WSSE" headers}
>                                    :content-type :json
>                                    :socket-timeout 4000
>                                    :conn-timeout 4000
>                                    :accept :json
>                                    :client-params
> {"http.protocol.allow-circular-redirects" false
>                                                    "http.useragent"
> "clj-http"}
>                                    :retry-handler (fn [ex try-count
> http-context]
>                                                     false)
>                                    })
>                 (catch Object o (catch-clj-http-exceptions o)
>
> I will have to come back to this later, when I have more time, and try
> to figure out what is going wrong.
>
> On Mar 5, 2:19 pm, larry google groups 
> wrote:
>
>
>
>
>
>
>
> > This is strange. An IOException is thrown, but it seems to do with
> > with the retry, which should never exist in the first place, unless an
> > IOException has been thrown:
>
> >  clj-http has thrown this exception:
> > {:trace-redirects
> >  ["https://api2.omniture.com/admin/1.3/rest/?
> > method=Report.QueueOvertime"],
> >  :request-time 885,
> >  :status 401,
> >  :headers
> >  {"date" "Tue, 05 Mar 2013 19:14:46 GMT",
> >   "server" "Omniture AWS/2.0.0",
> >   "www-authenticate"
> >   "WSSE realm=\"Omniture REST Api\", profile=\"UsernameToken\"",
> >   "xserver" "www811",
> >   "content-length" "90",
> >   "content-type" "application/json",
> >   "connection" "close"},
> >  :body
> >  "{\"error\":\"The nonce
> > (NGQ1ODc4NmU3M2QyY2I5MmIyOTIzOWFiN2Q4ODc1NjQ=) has already been used
> > \"}"}
>
> > On Mar 5, 12:45 pm, larry google groups 
> > wrote:
>
> > > > silly question are you using the call in a sequence pipeline with pmap 
> > > > or
> > > > mapcat or the like? Or does clj-http that under the covers?
>
> > > Those are good questions. Until I get this working I have been doing
> > > the simplest thing possible, which is simply starting the app, and
> > > then having the app make the call to Omniture as one of the first
> > > things it 

Re: A forum for Clojure...?

2013-03-05 Thread Phil Hagelberg

BJG145 writes:

> Imagine a swish site with sensible sections for all levels; topics like 
> News, Programming, Leiningen, Light Table, Getting Started, General Chat 
> etc etc (OK so I don't know enough about the subject to know what they 
> should be)...does the idea have any appeal, or is it not going to 
> happen...? It's easy to set up stuff like that nowadays, though design and 
> moderation probably takes a bit more practice. Just a thought.

Most people prefer a mailing list or news group since it allows them to
read the content using a client of their choice rather than getting
stuck with whatever HTML user interface the forum operators set up.

-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: how do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
Strangely enough, the re-tries continue even when the retry handler
always returns false. I must be misunderstanding things at a
fundamental level.


On Mar 5, 2:33 pm, larry google groups 
wrote:
> Out of frustration, I have decided to surpress the re-tries. This
> worries me -- I hate to bury a problem without understanding it. But
> the retries are burying the actual queries. This page:
>
> https://github.com/dakrone/clj-http
>
> says:
>
> ;; Apache's http client automatically retries on IOExceptions, if you
> ;; would like to handle these retries yourself, you can specify a
> ;; :retry-handler. Return true to retry, false to stop trying:
> (client/post "http://example.org"; {:multipart [["title" "Foo"]
>                                                ["Content/type" "text/
> plain"]
>
> ["file" (clojure.java.io/file "/tmp/missing-file")]]
>                                    :retry-handler (fn [ex try-count
> http-context]
>                                                     (println "Got:"
> ex)
>                                                     (if (> try-count
> 4) false true))})
>
> So I have re-written my function so that the re-tries are always
> suppressed:
>
> (defn omniture-call-api [url-with-queue-method api-payload headers]
>   (timbre/spy :debug " return value of omniture-call-api "
>               (try+
>                 (http-client/post url-with-queue-method
>                                   {:body api-payload
>                                    :debug true
>                                    :debug-body true
>                                    :insecure true
>                                    :headers {"X-Api-Version" "2"
>                                              "X-WSSE" headers}
>                                    :content-type :json
>                                    :socket-timeout 4000
>                                    :conn-timeout 4000
>                                    :accept :json
>                                    :client-params
> {"http.protocol.allow-circular-redirects" false
>                                                    "http.useragent"
> "clj-http"}
>                                    :retry-handler (fn [ex try-count
> http-context]
>                                                     false)
>                                    })
>                 (catch Object o (catch-clj-http-exceptions o)
>
> I will have to come back to this later, when I have more time, and try
> to figure out what is going wrong.
>
> On Mar 5, 2:19 pm, larry google groups 
> wrote:
>
>
>
>
>
>
>
> > This is strange. An IOException is thrown, but it seems to do with
> > with the retry, which should never exist in the first place, unless an
> > IOException has been thrown:
>
> >  clj-http has thrown this exception:
> > {:trace-redirects
> >  ["https://api2.omniture.com/admin/1.3/rest/?
> > method=Report.QueueOvertime"],
> >  :request-time 885,
> >  :status 401,
> >  :headers
> >  {"date" "Tue, 05 Mar 2013 19:14:46 GMT",
> >   "server" "Omniture AWS/2.0.0",
> >   "www-authenticate"
> >   "WSSE realm=\"Omniture REST Api\", profile=\"UsernameToken\"",
> >   "xserver" "www811",
> >   "content-length" "90",
> >   "content-type" "application/json",
> >   "connection" "close"},
> >  :body
> >  "{\"error\":\"The nonce
> > (NGQ1ODc4NmU3M2QyY2I5MmIyOTIzOWFiN2Q4ODc1NjQ=) has already been used
> > \"}"}
>
> > On Mar 5, 12:45 pm, larry google groups 
> > wrote:
>
> > > > silly question are you using the call in a sequence pipeline with pmap 
> > > > or
> > > > mapcat or the like? Or does clj-http that under the covers?
>
> > > Those are good questions. Until I get this working I have been doing
> > > the simplest thing possible, which is simply starting the app, and
> > > then having the app make the call to Omniture as one of the first
> > > things it does on startup.
>
> > > I will dig into clj-http to see what it is doing under the covers.
>
> > > I am curious, do you have a suspicion about something? A theory?
>
> > > On Mar 5, 11:17 am, "Meikel Brandmeyer (kotarak)" 
> > > wrote:
>
> > > > Hi,
>
> > > > silly question are you using the call in a sequence pipeline with pmap 
> > > > or
> > > > mapcat or the like? Or does clj-http that under the covers?
>
> > > > Kind regards
> > > > Meikel

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

Re: A forum for Clojure...?

2013-03-05 Thread Erlis Vidal
don't focus on the parenthesis :)


On Tue, Mar 5, 2013 at 2:30 PM, BJG145  wrote:

> It might be active, but it looks ghastly.
>
> http://www.reddit.com/r/haskell/
>
> I'm not talking about activity, I'm talking about aesthetics. ;-)
>
> On Tuesday, March 5, 2013 7:22:25 PM UTC, Ben wrote:
>
>> On Tue, Mar 5, 2013 at 11:21 AM, BJG145  wrote:
>> > Hmm, I'm Googling to find a good example.
>> >
>> > Haskell forums...nope, rubbish.
>>
>> The haskell reddit is very active.
>>
>> --
>> Ben Wolfson
>> "Human kind has used its intelligence to vary the flavour of drinks,
>> which may be sweet, aromatic, fermented or spirit-based. ... Family
>> and social life also offer numerous other occasions to consume drinks
>> for pleasure." [Larousse, "Drink" entry]
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
Out of frustration, I have decided to surpress the re-tries. This
worries me -- I hate to bury a problem without understanding it. But
the retries are burying the actual queries. This page:

https://github.com/dakrone/clj-http

says:

;; Apache's http client automatically retries on IOExceptions, if you
;; would like to handle these retries yourself, you can specify a
;; :retry-handler. Return true to retry, false to stop trying:
(client/post "http://example.org"; {:multipart [["title" "Foo"]
   ["Content/type" "text/
plain"]
 
["file" (clojure.java.io/file "/tmp/missing-file")]]
   :retry-handler (fn [ex try-count
http-context]
(println "Got:"
ex)
(if (> try-count
4) false true))})

So I have re-written my function so that the re-tries are always
suppressed:


(defn omniture-call-api [url-with-queue-method api-payload headers]
  (timbre/spy :debug " return value of omniture-call-api "
  (try+
(http-client/post url-with-queue-method
  {:body api-payload
   :debug true
   :debug-body true
   :insecure true
   :headers {"X-Api-Version" "2"
 "X-WSSE" headers}
   :content-type :json
   :socket-timeout 4000
   :conn-timeout 4000
   :accept :json
   :client-params
{"http.protocol.allow-circular-redirects" false
   "http.useragent"
"clj-http"}
   :retry-handler (fn [ex try-count
http-context]
false)
   })
(catch Object o (catch-clj-http-exceptions o)


I will have to come back to this later, when I have more time, and try
to figure out what is going wrong.



On Mar 5, 2:19 pm, larry google groups 
wrote:
> This is strange. An IOException is thrown, but it seems to do with
> with the retry, which should never exist in the first place, unless an
> IOException has been thrown:
>
>  clj-http has thrown this exception:
> {:trace-redirects
>  ["https://api2.omniture.com/admin/1.3/rest/?
> method=Report.QueueOvertime"],
>  :request-time 885,
>  :status 401,
>  :headers
>  {"date" "Tue, 05 Mar 2013 19:14:46 GMT",
>   "server" "Omniture AWS/2.0.0",
>   "www-authenticate"
>   "WSSE realm=\"Omniture REST Api\", profile=\"UsernameToken\"",
>   "xserver" "www811",
>   "content-length" "90",
>   "content-type" "application/json",
>   "connection" "close"},
>  :body
>  "{\"error\":\"The nonce
> (NGQ1ODc4NmU3M2QyY2I5MmIyOTIzOWFiN2Q4ODc1NjQ=) has already been used
> \"}"}
>
> On Mar 5, 12:45 pm, larry google groups 
> wrote:
>
>
>
>
>
>
>
> > > silly question are you using the call in a sequence pipeline with pmap or
> > > mapcat or the like? Or does clj-http that under the covers?
>
> > Those are good questions. Until I get this working I have been doing
> > the simplest thing possible, which is simply starting the app, and
> > then having the app make the call to Omniture as one of the first
> > things it does on startup.
>
> > I will dig into clj-http to see what it is doing under the covers.
>
> > I am curious, do you have a suspicion about something? A theory?
>
> > On Mar 5, 11:17 am, "Meikel Brandmeyer (kotarak)" 
> > wrote:
>
> > > Hi,
>
> > > silly question are you using the call in a sequence pipeline with pmap or
> > > mapcat or the like? Or does clj-http that under the covers?
>
> > > Kind regards
> > > Meikel

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




Re: A forum for Clojure...?

2013-03-05 Thread BJG145
It might be active, but it looks ghastly.

http://www.reddit.com/r/haskell/

I'm not talking about activity, I'm talking about aesthetics. ;-)

On Tuesday, March 5, 2013 7:22:25 PM UTC, Ben wrote:
>
> On Tue, Mar 5, 2013 at 11:21 AM, BJG145 > 
> wrote: 
> > Hmm, I'm Googling to find a good example. 
> > 
> > Haskell forums...nope, rubbish. 
>
> The haskell reddit is very active. 
>
> -- 
> Ben Wolfson 
> "Human kind has used its intelligence to vary the flavour of drinks, 
> which may be sweet, aromatic, fermented or spirit-based. ... Family 
> and social life also offer numerous other occasions to consume drinks 
> for pleasure." [Larousse, "Drink" entry] 
>

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




Re: A forum for Clojure...?

2013-03-05 Thread Erlis Vidal
yes, reddit is another good example


On Tue, Mar 5, 2013 at 2:22 PM, Ben Wolfson  wrote:

> On Tue, Mar 5, 2013 at 11:21 AM, BJG145  wrote:
> > Hmm, I'm Googling to find a good example.
> >
> > Haskell forums...nope, rubbish.
>
> The haskell reddit is very active.
>
> --
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks,
> which may be sweet, aromatic, fermented or spirit-based. ... Family
> and social life also offer numerous other occasions to consume drinks
> for pleasure." [Larousse, "Drink" entry]
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: A forum for Clojure...?

2013-03-05 Thread Tamreen Khan
True, but the gaming community itself is heavily forum-based, so it makes
sense that gaming frameworks and libraries will also have active forums.


On Tue, Mar 5, 2013 at 2:21 PM, BJG145  wrote:

> Hmm, I'm Googling to find a good example.
>
> Haskell forums...nope, rubbish.
> Python forums...nope.
>
> Maybe it's not a programmer thing. The gaming frameworks have nice forums
> - Unity for example. They're not all newbies.
>
> http://forum.unity3d.com/forum.php
>
>  --
> --
> 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: A forum for Clojure...?

2013-03-05 Thread Ben Wolfson
On Tue, Mar 5, 2013 at 11:21 AM, BJG145  wrote:
> Hmm, I'm Googling to find a good example.
>
> Haskell forums...nope, rubbish.

The haskell reddit is very active.

-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks,
which may be sweet, aromatic, fermented or spirit-based. ... Family
and social life also offer numerous other occasions to consume drinks
for pleasure." [Larousse, "Drink" entry]

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




Re: A forum for Clojure...?

2013-03-05 Thread BJG145
Hmm, I'm Googling to find a good example.

Haskell forums...nope, rubbish.
Python forums...nope.

Maybe it's not a programmer thing. The gaming frameworks have nice forums - 
Unity for example. They're not all newbies.

http://forum.unity3d.com/forum.php

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
This is strange. An IOException is thrown, but it seems to do with
with the retry, which should never exist in the first place, unless an
IOException has been thrown:


 clj-http has thrown this exception:
{:trace-redirects
 ["https://api2.omniture.com/admin/1.3/rest/?
method=Report.QueueOvertime"],
 :request-time 885,
 :status 401,
 :headers
 {"date" "Tue, 05 Mar 2013 19:14:46 GMT",
  "server" "Omniture AWS/2.0.0",
  "www-authenticate"
  "WSSE realm=\"Omniture REST Api\", profile=\"UsernameToken\"",
  "xserver" "www811",
  "content-length" "90",
  "content-type" "application/json",
  "connection" "close"},
 :body
 "{\"error\":\"The nonce
(NGQ1ODc4NmU3M2QyY2I5MmIyOTIzOWFiN2Q4ODc1NjQ=) has already been used
\"}"}




On Mar 5, 12:45 pm, larry google groups 
wrote:
> > silly question are you using the call in a sequence pipeline with pmap or
> > mapcat or the like? Or does clj-http that under the covers?
>
> Those are good questions. Until I get this working I have been doing
> the simplest thing possible, which is simply starting the app, and
> then having the app make the call to Omniture as one of the first
> things it does on startup.
>
> I will dig into clj-http to see what it is doing under the covers.
>
> I am curious, do you have a suspicion about something? A theory?
>
> On Mar 5, 11:17 am, "Meikel Brandmeyer (kotarak)" 
> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > silly question are you using the call in a sequence pipeline with pmap or
> > mapcat or the like? Or does clj-http that under the covers?
>
> > Kind regards
> > Meikel

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




Re: A forum for Clojure...?

2013-03-05 Thread Erlis Vidal
this is not a forum but it has some of the components you mentioned in your
initial post http://clojure-doc.org/


On Tue, Mar 5, 2013 at 2:17 PM, Tamreen Khan  wrote:

> It's a little different for language communities. More experienced
> developers will tend to use mailing lists or IRC. Also, I think
> stackoverflow is quickly become the go-to place for beginners to a language.
>
>
> On Tue, Mar 5, 2013 at 2:14 PM, BJG145  wrote:
>
>> I don't see it as an experience thing. There are a lot of highly skilled
>> professionals on the Edugeek and Sound On Sound forums...
>>
>> --
>> --
>> 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: A forum for Clojure...?

2013-03-05 Thread Tamreen Khan
It's a little different for language communities. More experienced
developers will tend to use mailing lists or IRC. Also, I think
stackoverflow is quickly become the go-to place for beginners to a language.

On Tue, Mar 5, 2013 at 2:14 PM, BJG145  wrote:

> I don't see it as an experience thing. There are a lot of highly skilled
> professionals on the Edugeek and Sound On Sound forums...
>
> --
> --
> 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: A forum for Clojure...?

2013-03-05 Thread BJG145
I don't see it as an experience thing. There are a lot of highly skilled 
professionals on the Edugeek and Sound On Sound forums...

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




Re: A forum for Clojure...?

2013-03-05 Thread larry google groups

There will be a correct moment for a structured forum, at some point.
I think the appeal is strongest for the less experienced, and so far
Clojure has appealed to the more experienced programmer. But that will
change over time.


On Mar 5, 1:38 pm, BJG145  wrote:
> I'm not used to Google Groups so I'm not even sure whether this is more of
> a forum or a mailing list or something else. It's not really what I'd call
> a full-on forum though. The communities where I hang around tend to look
> more like this...
>
> http://www.edugeek.net/http://www.edugeek.net/forums/
>
> http://www.soundonsound.com/http://www.soundonsound.com/forum/
>
> News homepage with links, forum with sections, you get the picture.
>
> This group is clearly where the action is and I imagine it will stay that
> way, but I'm thinking it would be nice to have something more structured,
> more community-minded and appealing to browse.
>
> At the moment, apart from this, there are some barely-used  "Clojure"
> sections in programming forums like Code Ranch which offer no advantage...
>
> http://www.coderanch.com/forums/f-110/clojure
>
> ...and the deserted "Getting Clojure" forum, which is the closest to the
> kind of structure I had in mind, but badly needs a design makeover.
>
> http://www.gettingclojure.com/http://www.gettingclojure.com/forum:start
>
> Imagine a swish site with sensible sections for all levels; topics like
> News, Programming, Leiningen, Light Table, Getting Started, General Chat
> etc etc (OK so I don't know enough about the subject to know what they
> should be)...does the idea have any appeal, or is it not going to
> happen...? It's easy to set up stuff like that nowadays, though design and
> moderation probably takes a bit more practice. Just a thought.

-- 
-- 
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: Hello World not found

2013-03-05 Thread Andrew Pennebaker
That's a great idea! Actually, I've been having a lot of difficulty getting
Leiningen installed in Windows. None of the installation methods work on my
Windows machines:

* Chocolatey Leiningen fails
* lein.bat fails
* lein Cygwin-compatible script fails


On Tue, Mar 5, 2013 at 11:08 AM, BJG145  wrote:

> If you're looking at Clojure on Windows for the first time, I'm trying to
> get a kind of "Clojure for Dummies" going at:
>
> www.silvercrow.co.uk/blog
>
> (Experienced developers need not apply...you'll roll your eyes.)
>
>
> On Tuesday, March 5, 2013 3:35:16 PM UTC, MC Andre wrote:
>>
>> Clojure can't find hello.clj in the current directory when run as "clj -m 
>> hello".
>>
>>
>> Trace:
>>
>>  C:\Documents and Settings\apenneba\Desktop>type hello.clj
>>
>>  (ns hello
>>  (:gen-class))
>>
>>  (defn -main [& args]
>>(println "Hello World!"))
>>
>>  C:\Documents and Settings\apenneba\Desktop>clj -m hello
>>  Exception in thread "main" java.io.FileNotFoundException: -m (The 
>> system cannot find the file specified)
>>at java.io.FileInputStream.open(**Native Method)
>>at java.io.FileInputStream.**(Unknown Source)
>>at java.io.FileInputStream.**(Unknown Source)
>>at clojure.lang.Compiler.**loadFile(Compiler.java:5817)
>>at clojure.main$load_script.**invoke(main.clj:221)
>>at clojure.main$script_opt.**invoke(main.clj:273)
>>at clojure.main$main.doInvoke(**main.clj:354)
>>at clojure.lang.RestFn.invoke(**RestFn.java:458)
>>at clojure.lang.Var.invoke(Var.**java:377)
>>at clojure.lang.AFn.**applyToHelper(AFn.java:174)
>>at clojure.lang.Var.applyTo(Var.**java:482)
>>at clojure.main.main(main.java:**37)
>>
>>
>> System:
>>
>>
>> * Clojure 1.2.0
>>
>> * Chocolatey 0.9.8.20
>>
>> * Windows XP SP3
>>
>>  --
> --
> 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.
>
>
>



-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us

-- 
-- 
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: [ClojureScript] features expression

2013-03-05 Thread Brandon Bloom
> I personally think the CL feature expression approach is satisfactory.

The more I think about it, the less I think that the CL Feature Expression 
approach is satisfactory as is.

I'm now reasonably convinced that, horror of horrors, we should look to the C 
preprocessor for inspiration.

CL's approach only provides flags, not key/value pairs. Also, the CL approach 
does not provide a structured form for if/else or cond expressions and has only 
limited and/or/not predicate combinators. Experience in writing portable C code 
has proven that == and >= are important for checking version numbers and 
feature levels.

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




A forum for Clojure...?

2013-03-05 Thread BJG145
I'm not used to Google Groups so I'm not even sure whether this is more of 
a forum or a mailing list or something else. It's not really what I'd call 
a full-on forum though. The communities where I hang around tend to look 
more like this...

http://www.edugeek.net/
http://www.edugeek.net/forums/

http://www.soundonsound.com/
http://www.soundonsound.com/forum/

News homepage with links, forum with sections, you get the picture. 

This group is clearly where the action is and I imagine it will stay that 
way, but I'm thinking it would be nice to have something more structured, 
more community-minded and appealing to browse. 

At the moment, apart from this, there are some barely-used  "Clojure" 
sections in programming forums like Code Ranch which offer no advantage...

http://www.coderanch.com/forums/f-110/clojure

...and the deserted "Getting Clojure" forum, which is the closest to the 
kind of structure I had in mind, but badly needs a design makeover.

http://www.gettingclojure.com/
http://www.gettingclojure.com/forum:start

Imagine a swish site with sensible sections for all levels; topics like 
News, Programming, Leiningen, Light Table, Getting Started, General Chat 
etc etc (OK so I don't know enough about the subject to know what they 
should be)...does the idea have any appeal, or is it not going to 
happen...? It's easy to set up stuff like that nowadays, though design and 
moderation probably takes a bit more practice. Just a thought.

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups

> silly question are you using the call in a sequence pipeline with pmap or
> mapcat or the like? Or does clj-http that under the covers?

Those are good questions. Until I get this working I have been doing
the simplest thing possible, which is simply starting the app, and
then having the app make the call to Omniture as one of the first
things it does on startup.

I will dig into clj-http to see what it is doing under the covers.

I am curious, do you have a suspicion about something? A theory?




On Mar 5, 11:17 am, "Meikel Brandmeyer (kotarak)" 
wrote:
> Hi,
>
> silly question are you using the call in a sequence pipeline with pmap or
> mapcat or the like? Or does clj-http that under the covers?
>
> Kind regards
> Meikel

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




Re: how does one embed nrepl in his own application?

2013-03-05 Thread Jim - FooBar();

On 05/03/13 15:22, Weber, Martin S wrote:

$ lein run -m replbuiltin.core &
$ lein repl :connect 42042
user=> (in-ns 'replbuiltin.core)
replbuiltin.core=> (foo 42)
42


trying to use 'telnet localhost' instead of 'lein repl :connect' cos I 
may not have lein access, and it doesn't work! I don't  get the repl 
upon connection...

Do i need to do anything extra after starting the server?

Jim

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

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




Re: Clojure Performance For Expensive Algorithms

2013-03-05 Thread Isaac Gouy


On Wednesday, February 27, 2013 2:46:25 PM UTC-8, Ben Mabey wrote:
>
>  On 2/27/13 9:59 AM, Isaac Gouy wrote:
>
> (defn blank? [s] (every? #(Character/isWhitespace %) s))
>>  
>>  Have you ever wondered about its performance? 
>>  
>
> No. Why would I wonder about the performance of a one line code snippet 
> that was written without concern for performance?
>  
>
> Because that one line of code is representative of the majority of clojure 
> functions (i.e. idiomatic clojure using core functions against seqs).
>


Is that one line of code representative of the majority of Closure 
programs? 

Perhaps function composition has implications for program performance.

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread Meikel Brandmeyer (kotarak)
Hi,

silly question are you using the call in a sequence pipeline with pmap or 
mapcat or the like? Or does clj-http that under the covers?

Kind regards
Meikel

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




Re: Hello World not found

2013-03-05 Thread BJG145
If you're looking at Clojure on Windows for the first time, I'm trying to 
get a kind of "Clojure for Dummies" going at:

www.silvercrow.co.uk/blog

(Experienced developers need not apply...you'll roll your eyes.)


On Tuesday, March 5, 2013 3:35:16 PM UTC, MC Andre wrote:
>
> Clojure can't find hello.clj in the current directory when run as "clj -m 
> hello".
>
>
> Trace:
>
>   C:\Documents and Settings\apenneba\Desktop>type hello.clj
>
>   (ns hello
>   (:gen-class))
>
>   (defn -main [& args]
> (println "Hello World!"))
>
>   C:\Documents and Settings\apenneba\Desktop>clj -m hello
>   Exception in thread "main" java.io.FileNotFoundException: -m (The 
> system cannot find the file specified)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.(Unknown Source)
> at java.io.FileInputStream.(Unknown Source)
> at clojure.lang.Compiler.loadFile(Compiler.java:5817)
> at clojure.main$load_script.invoke(main.clj:221)
> at clojure.main$script_opt.invoke(main.clj:273)
> at clojure.main$main.doInvoke(main.clj:354)
> at clojure.lang.RestFn.invoke(RestFn.java:458)
> at clojure.lang.Var.invoke(Var.java:377)
> at clojure.lang.AFn.applyToHelper(AFn.java:174)
> at clojure.lang.Var.applyTo(Var.java:482)
> at clojure.main.main(main.java:37)
>
>
> System:
>
>
> * Clojure 1.2.0
>
> * Chocolatey 0.9.8.20
>
> * Windows XP SP3
>
>

-- 
-- 
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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
As near as I can see, the 1st request is successful, and then the next
3 return with 401 errors, plus the message "The nonce has already been
used." Clearly, the 2nd, 3rd and 4th attempts should fail, because
they are re-using the nonce that was already used in the first
request, and a nonce can only be used once. So it makes sense that
they would get a 401 error, but it makes no sense that they would ever
get called at all, because why would the code re-try if there was no
IOException.

One of the requests returns with a 200 status:

 {:trace-redirects ["https://api2.omniture.com/admin/1.3/rest/?
method=Report.QueueOvertime"], :request-time 1658, :status
200, :headers {"date" "Mon, 04 Mar 2013 21:23:44 GMT", "server"
"Omniture AWS/2.0.0", "vary" "Accept-Encoding", "content-encoding"
"gzip", "xserver" "www322", "content-length" "83", "content-type"
"application/json", "connection" "close"}, :body "{\"status\":\"queued
\",\"statusMsg\":\"Your report has been queued\",\"reportID\":xxx}"}

I assume this is the first request, because if it wasn't then it would
get the error "This nonce has already been used." And why would the
later requests get the 401 error "This nonce has already been used"
unless the first request had succeeded?

My understanding is the code will retry up to 4 times if it encounters
an IOException. But in my case it seems to be retrying even though
here was no IOException.

Maybe this is some kind of timing issue?






On Mar 5, 10:50 am, larry google groups 
wrote:
> > Might be a silly suggestion but are the first 3 connections leading to 
> > redirects (30x's) ???
>
> Interesting idea. I will check. You are thinking that I should:
>
> {"http.protocol.allow-circular-redirects" false
>
> yes?
>
> On Mar 5, 2:39 am, Marc Boschma  wrote:
>
>
>
>
>
>
>
> > Might be a silly suggestion but are the first 3 connections leading to 
> > redirects (30x's) ???
>
> > On 05/03/2013, at 10:18 AM, larry google groups  
> > wrote:
>
> > > So, thanks to Michael Klishin, Aaron Cohen, Frank Siebenlist and Craig
> > > Brozefsky I am now able to correctly ping the Omniture API. But I am
> > > getting a strange behavior from the clj-http library. It makes 4 calls
> > > to the API server, even though the first call is successful.
>
> > > When I look here:
>
> > >https://github.com/dakrone/clj-http
>
> > > I see it says:
>
> > > ;; Apache's http client automatically retries on IOExceptions, if you
> > > ;; would like to handle these retries yourself, you can specify a
> > > ;; :retry-handler.
>
> > > So, since it re-tries, I should assume that it is encountering an
> > > IOException. But I get a successful response on the first try, so what
> > > would the IOException be?
>
> > > Because clj-http uses Slingshot, I have wrapped it in a "try+ / catch
> > > Object o" block. And I print the "o" to the terminal, and yet I am not
> > > seeing anything in the terminal. So where is the IOException? How do I
> > > find it?
>
> > > This is the actual function I use to ping the Omniture API:
>
> > > (defn omniture-call-api [url-with-queue-method api-payload headers]
> > >  (timbre/spy :debug " return value of omniture-call-api "
> > >              (try+
> > >                (http-client/post url-with-queue-method
> > >                                  {:body api-payload
> > >                                   :debug true
> > >                                   :debug-body true
> > >                                   :insecure true
> > >                                   :headers {"X-Api-Version" "2"
> > >                                             "X-WSSE" headers}
> > >                                   :content-type :json
> > >                                   :socket-timeout 4000
> > >                                   :conn-timeout 4000
> > >                                   :accept :json
> > >                                   :client-params
> > > {"http.protocol.allow-circular-redirects" true
> > >                                                   "http.useragent"
> > > "clj-http"}})
> > >                (catch Object o (println (pp/pprint o))
>
> > > If there is an IOException, why doesn't this line catch it?
>
> > >                (catch Object o (println (pp/pprint o))
>
> > > I read here that "catch Object o" is the correct way to catch
> > > everything, using Slingshot:
>
> > >https://github.com/scgilardi/slingshot/issues/24
>
> > > So why would I not see this error?
>
> > > --
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Clojure" group.
> > > To post to this group, send email to clojure@googlegroups.com
> > > Note that posts from new members are moderated - please be patient with 
> > > your first post.
> > > To unsubscribe from this group, send email to
> > > clojure+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/clojure?hl=en
> > > ---
> > > You received this message because you are subscrib

Re: Hello World not found

2013-03-05 Thread David Powell
It looks like the (unofficial) Clojure chocolatey package, installs its own
clj.bat file.

The "-m package.name" syntax only works for clojure packages that are on
your classpath, and that script doesn't put the current directory on the
classpath.  You might have better luck with something like:

  clj -i "hello.clj" -e "(hello/-main)"

However,

Clojure 1.2 is pretty ancient; and I don't think many people are using
chocolatey to install clojure.
(Many of the linux package managers are similarly out of date).

You would probably be better off looking at using Leiningen instead for
your Clojure installation.

-- 
Dave



On Tue, Mar 5, 2013 at 3:35 PM, MC Andre wrote:

> Clojure can't find hello.clj in the current directory when run as "clj -m 
> hello".
>
>
> Trace:
>
>   C:\Documents and Settings\apenneba\Desktop>type hello.clj
>
>   (ns hello
>   (:gen-class))
>
>   (defn -main [& args]
> (println "Hello World!"))
>
>   C:\Documents and Settings\apenneba\Desktop>clj -m hello
>   Exception in thread "main" java.io.FileNotFoundException: -m (The 
> system cannot find the file specified)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.(Unknown Source)
> at java.io.FileInputStream.(Unknown Source)
> at clojure.lang.Compiler.loadFile(Compiler.java:5817)
> at clojure.main$load_script.invoke(main.clj:221)
> at clojure.main$script_opt.invoke(main.clj:273)
> at clojure.main$main.doInvoke(main.clj:354)
> at clojure.lang.RestFn.invoke(RestFn.java:458)
> at clojure.lang.Var.invoke(Var.java:377)
> at clojure.lang.AFn.applyToHelper(AFn.java:174)
> at clojure.lang.Var.applyTo(Var.java:482)
> at clojure.main.main(main.java:37)
>
>
> System:
>
>
> * Clojure 1.2.0
>
> * Chocolatey 0.9.8.20
>
> * Windows XP SP3
>
>  --
> --
> 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 do I find an IO exception triggering retries in clj-http?

2013-03-05 Thread larry google groups
> Might be a silly suggestion but are the first 3 connections leading to 
> redirects (30x's) ???

Interesting idea. I will check. You are thinking that I should:

{"http.protocol.allow-circular-redirects" false

yes?


On Mar 5, 2:39 am, Marc Boschma  wrote:
> Might be a silly suggestion but are the first 3 connections leading to 
> redirects (30x's) ???
>
> On 05/03/2013, at 10:18 AM, larry google groups  
> wrote:
>
>
>
>
>
>
>
>
>
> > So, thanks to Michael Klishin, Aaron Cohen, Frank Siebenlist and Craig
> > Brozefsky I am now able to correctly ping the Omniture API. But I am
> > getting a strange behavior from the clj-http library. It makes 4 calls
> > to the API server, even though the first call is successful.
>
> > When I look here:
>
> >https://github.com/dakrone/clj-http
>
> > I see it says:
>
> > ;; Apache's http client automatically retries on IOExceptions, if you
> > ;; would like to handle these retries yourself, you can specify a
> > ;; :retry-handler.
>
> > So, since it re-tries, I should assume that it is encountering an
> > IOException. But I get a successful response on the first try, so what
> > would the IOException be?
>
> > Because clj-http uses Slingshot, I have wrapped it in a "try+ / catch
> > Object o" block. And I print the "o" to the terminal, and yet I am not
> > seeing anything in the terminal. So where is the IOException? How do I
> > find it?
>
> > This is the actual function I use to ping the Omniture API:
>
> > (defn omniture-call-api [url-with-queue-method api-payload headers]
> >  (timbre/spy :debug " return value of omniture-call-api "
> >              (try+
> >                (http-client/post url-with-queue-method
> >                                  {:body api-payload
> >                                   :debug true
> >                                   :debug-body true
> >                                   :insecure true
> >                                   :headers {"X-Api-Version" "2"
> >                                             "X-WSSE" headers}
> >                                   :content-type :json
> >                                   :socket-timeout 4000
> >                                   :conn-timeout 4000
> >                                   :accept :json
> >                                   :client-params
> > {"http.protocol.allow-circular-redirects" true
> >                                                   "http.useragent"
> > "clj-http"}})
> >                (catch Object o (println (pp/pprint o))
>
> > If there is an IOException, why doesn't this line catch it?
>
> >                (catch Object o (println (pp/pprint o))
>
> > I read here that "catch Object o" is the correct way to catch
> > everything, using Slingshot:
>
> >https://github.com/scgilardi/slingshot/issues/24
>
> > So why would I not see this error?
>
> > --
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups 
> > "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to clojure+unsubscr...@googlegroups.com.
> > For more options, visithttps://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 does one embed nrepl in his own application?

2013-03-05 Thread Jim - FooBar();

this is brilliant, thanks a lot!

Jim


On 05/03/13 15:45, Chas Emerick wrote:

See https://github.com/clojure/tools.nrepl#embedding-nrepl-starting-a-server

Cheers,

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

On Mar 5, 2013, at 10:03 AM, Jim - FooBar(); wrote:


Hi all,

I am intrigued about the idea of communicating with my application 
remotely...The book 'Clojure Programming' says that nrepl comes with a consumer 
lib and is easily embeddable to your apps. Can anyone point me to a direction 
where I can find more? perhaps someone ha already done that or something...I 
know leiningen uses it (DUH!) but I'd like to start with something small if 
possible...


alternatively, how does one use rlwrap with the socket-based repl from contrib? 
It seems like a reasonable repl-server but the fact that you can't use 
backspace, arrows etc makes the bare repl a rather horrific experience...

thanks in advance, :)

Jim

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




--
--
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 does one embed nrepl in his own application?

2013-03-05 Thread Chas Emerick
See https://github.com/clojure/tools.nrepl#embedding-nrepl-starting-a-server

Cheers,

- Chas

--
http://cemerick.com
[Clojure Programming from O'Reilly](http://www.clojurebook.com)

On Mar 5, 2013, at 10:03 AM, Jim - FooBar(); wrote:

> Hi all,
> 
> I am intrigued about the idea of communicating with my application 
> remotely...The book 'Clojure Programming' says that nrepl comes with a 
> consumer lib and is easily embeddable to your apps. Can anyone point me to a 
> direction where I can find more? perhaps someone ha already done that or 
> something...I know leiningen uses it (DUH!) but I'd like to start with 
> something small if possible...
> 
> 
> alternatively, how does one use rlwrap with the socket-based repl from 
> contrib? It seems like a reasonable repl-server but the fact that you can't 
> use backspace, arrows etc makes the bare repl a rather horrific experience...
> 
> thanks in advance, :)
> 
> Jim
> 
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
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: Clojurescript bug

2013-03-05 Thread David Powell
You could try the lein-outdated plugin.

  https://github.com/ato/lein-outdated

It looks at your project.clj, and tells you if there are newer versions of
any of your dependencies, and if so, what they are.

Eg:

  lein outdated

  [org.clojure/clojurescript "0.0-1586"] is available but we use "0.0-971"

-- 
Dave



On Tue, Mar 5, 2013 at 1:26 PM, Tom Hall  wrote:

> > Sure, just add it as an explicit dependency to your project. In fact,
> > your example uses r1450 only because you've got an explicit dependency
> > on it, as lein-cljsbuild 0.3.0 uses r1552 by default, so you could
> > also drop the explicit dependency. It's best to use the latest release
> > though.
>
> Cheers, I must be dumb as I cant see the latest version number on the
> github page.
> Googleing takes me to
> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-971
> but im guessing
> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-1586
> is the latest
>
> How is one to find this information out?
>
> Tom
>
> --
> --
> 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 does one embed nrepl in his own application?

2013-03-05 Thread Jim - FooBar();
wow! that is 10 times easier than I expected...I guess I'll have to 
ditch the socket-based approach...

thanks Martin  :)

Jim

On 05/03/13 15:22, Weber, Martin S wrote:

$ lein new replbuiltin && cd replbuiltin
$ sed -Ee 's,.0",.0"][org.clojure/tools.nrepl "0.2.2",' < project.clj > p
&& mv -f p project.clj
$ lein deps
$ cat < src/replbuiltin/core.clj
(ns replbuiltin.core
   (:use [clojure.tools.nrepl.server :only [start-server stop-server]]))

(defn foo [x] x)

(defn -main
   "I'm showing FooBar how to embed an nrepl!"
   [& _]
   (let [repl-server (start-server :port 42042)]
(Thread/sleep 6)))
EOF

$ lein run -m replbuiltin.core &
$ lein repl :connect 42042
user=> (in-ns 'replbuiltin.core)
replbuiltin.core=> (foo 42)
42



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




Hello World not found

2013-03-05 Thread MC Andre


Clojure can't find hello.clj in the current directory when run as "clj -m 
hello".


Trace:

C:\Documents and Settings\apenneba\Desktop>type hello.clj

(ns hello
(:gen-class))

(defn -main [& args]
  (println "Hello World!"))

C:\Documents and Settings\apenneba\Desktop>clj -m hello
Exception in thread "main" java.io.FileNotFoundException: -m (The 
system cannot find the file specified)
  at java.io.FileInputStream.open(Native Method)
  at java.io.FileInputStream.(Unknown Source)
  at java.io.FileInputStream.(Unknown Source)
  at clojure.lang.Compiler.loadFile(Compiler.java:5817)
  at clojure.main$load_script.invoke(main.clj:221)
  at clojure.main$script_opt.invoke(main.clj:273)
  at clojure.main$main.doInvoke(main.clj:354)
  at clojure.lang.RestFn.invoke(RestFn.java:458)
  at clojure.lang.Var.invoke(Var.java:377)
  at clojure.lang.AFn.applyToHelper(AFn.java:174)
  at clojure.lang.Var.applyTo(Var.java:482)
  at clojure.main.main(main.java:37)


System:


* Clojure 1.2.0

* Chocolatey 0.9.8.20

* Windows XP SP3

-- 
-- 
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: Possible to suppress some stderr output?

2013-03-05 Thread bruce li
I think the reason why we could redirect the *out* or *err* is that, all
Clojure functions staffs USE these 2 writers. But in places where it
doesn't (such as places where it uses System/out, System/err directly), it
would cause problem.

Here is a proof:
(with-out-str
  (with-open [out-writer (clojure.java.io/writer System/out)]
(.write out-writer "hello")))
This statement returns empty string: ""
Which means the output is never captured because it does not use the *out*
writer.


2013/3/5 Jim - FooBar(); 

>  I can see why you would think that but it would be the same story for
> *out* wouldn't it. Noone redirects System.out when you bind *out* to some
> writer, however still it works...
> I don't exactly have time to look into this now but I may do this
> afternoon :)
>
> Jim
>
>
> On 05/03/13 15:07, bruce li wrote:
>
> Thanks. Then I think I've caught some idea.
>
> When binding *err* with other writer (say a StringWriter s), anything that
> use the *err* writer will actually write to s. But the original stderr
> stream is not redirected. It is still preserved as System/err. Thus
> anything that does not use the *err* writer, but instead use the System/err
> stream will not get affected.
>
> Hope this makes sense.
>
> 2013/3/5 Jim - FooBar(); 
>
>>  On 05/03/13 14:50, bruce li wrote:
>>
>> What is the difference between *err* and System/err?!
>>
>>  its the same but wrapped in a PrintWriter
>>
>>
>> http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*err*
>>
>> Jim
>>
>>   --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
> --
> --
> 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: how does one embed nrepl in his own application?

2013-03-05 Thread Weber, Martin S
$ lein new replbuiltin && cd replbuiltin
$ sed -Ee 's,.0",.0"][org.clojure/tools.nrepl "0.2.2",' < project.clj > p
&& mv -f p project.clj
$ lein deps
$ cat < src/replbuiltin/core.clj
(ns replbuiltin.core
  (:use [clojure.tools.nrepl.server :only [start-server stop-server]]))

(defn foo [x] x)

(defn -main
  "I'm showing FooBar how to embed an nrepl!"
  [& _]
  (let [repl-server (start-server :port 42042)]
   (Thread/sleep 6)))
EOF

$ lein run -m replbuiltin.core &
$ lein repl :connect 42042
user=> (in-ns 'replbuiltin.core)
replbuiltin.core=> (foo 42)
42

-- 
-- 
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: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();
I can see why you would think that but it would be the same story for 
*out* wouldn't it. Noone redirects System.out when you bind *out* to 
some writer, however still it works...
I don't exactly have time to look into this now but I may do this 
afternoon :)


Jim

On 05/03/13 15:07, bruce li wrote:

Thanks. Then I think I've caught some idea.

When binding *err* with other writer (say a StringWriter s), anything 
that use the *err* writer will actually write to s. But the original 
stderr stream is not redirected. It is still preserved as System/err. 
Thus anything that does not use the *err* writer, but instead use the 
System/err stream will not get affected.


Hope this makes sense.

2013/3/5 Jim - FooBar(); >


On 05/03/13 14:50, bruce li wrote:

What is the difference between *err* and System/err?!

its the same but wrapped in a PrintWriter


http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*err*

Jim

-- 
-- 
You received this message because you are subscribed to the Google

Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com

Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.



--
--
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: Possible to suppress some stderr output?

2013-03-05 Thread bruce li
Thanks. Then I think I've caught some idea.

When binding *err* with other writer (say a StringWriter s), anything that
use the *err* writer will actually write to s. But the original stderr
stream is not redirected. It is still preserved as System/err. Thus
anything that does not use the *err* writer, but instead use the System/err
stream will not get affected.

Hope this makes sense.

2013/3/5 Jim - FooBar(); 

>  On 05/03/13 14:50, bruce li wrote:
>
> What is the difference between *err* and System/err?!
>
> its the same but wrapped in a PrintWriter
>
>
> http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*err*
>
> Jim
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 does one embed nrepl in his own application?

2013-03-05 Thread Jim - FooBar();

Hi all,

I am intrigued about the idea of communicating with my application 
remotely...The book 'Clojure Programming' says that nrepl comes with a 
consumer lib and is easily embeddable to your apps. Can anyone point me 
to a direction where I can find more? perhaps someone ha already done 
that or something...I know leiningen uses it (DUH!) but I'd like to 
start with something small if possible...



alternatively, how does one use rlwrap with the socket-based repl from 
contrib? It seems like a reasonable repl-server but the fact that you 
can't use backspace, arrows etc makes the bare repl a rather horrific 
experience...


thanks in advance, :)

Jim

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

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




Re: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();

On 05/03/13 14:50, bruce li wrote:

What is the difference between *err* and System/err?!

its the same but wrapped in a PrintWriter

http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*err*

Jim

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

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




Re: Clojure 1.5 print-table, org-mode babel, and org-mode HTML gen

2013-03-05 Thread Dave Kincaid
Comments in your .emacs file? That's blasphemy!

On Tuesday, March 5, 2013 6:37:29 AM UTC-6, greg r wrote:
>
> I think I was wrong about the extra elisp code required for nrepl to 
> evaluate babel Clojure code blocks.  This was from last year:
>
>
> https://groups.google.com/forum/?fromgroups=#!searchin/nrepl-el/babel/nrepl-el/txLYH9tH6AU/hj0NkyF8YZ8J
>
> I checked my .emacs file and the extra code for clojure babel is commented 
> out, so the later versions of nrepl must have this feature included.
> Too many months ago, I really need to put better notes and comments in my 
> .emacs file!
>
> Greg
>
> On Monday, March 4, 2013 4:25:23 PM UTC-5, Mark C wrote:
>>
>> Very cool. Great looking doc! I just installed LaTeX and TeXworks so it's 
>> off to play. (Other than incanter I already have the rest working, 
>> including nrepl -  though I have to start up nrepl with nrepl-jack-in. Is 
>> that what you were planning on doing? It would be cool to have it launched 
>> by the first compile!).
>>
>>
>>

-- 
-- 
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: Clojurescript bug

2013-03-05 Thread Weber, Martin S
$ lein search clojurescript
Searching over Artifact ID...
 == Showing page 1 / 2
[org.clojure/clojurescript "0.0-927"] ClojureScript compiler and core
runtime library.
(...)
[org.clojure/clojurescript "0.0-1576"] ClojureScript compiler and core
runtime library.
[org.clojure/clojurescript "0.0-1586"] ClojureScript compiler and core
runtime library.
[com.cemerick/clojurescript.test "0.0.1"] Port of clojure.test targeting
ClojureScript.
[rplevy/lein-clojurescript "1.0.2-SNAPSHOT"] leiningen plugin for
clojurescript
(...)


On 3/5/13 8:56 AM, "Michał Marczyk"  wrote:

>Simplest way is to either search for org.clojure/clojurescript in Central:
>
>http://search.maven.org/#search%7Cga%7C1%7Corg.clojure%2Fclojurescript
>
>or check the name of the latest tag in the repo:
>
>https://github.com/clojure/clojurescript/tags
>
>(the version string is 0.0-N for tag rN).
>
>Also, lein-cljsbuild actually tends to switch to the latest
>ClojureScript version as default pretty soon after release.
>
>Cheers,
>Michał
>
>
>On 5 March 2013 14:26, Tom Hall  wrote:
>>> Sure, just add it as an explicit dependency to your project. In fact,
>>> your example uses r1450 only because you've got an explicit dependency
>>> on it, as lein-cljsbuild 0.3.0 uses r1552 by default, so you could
>>> also drop the explicit dependency. It's best to use the latest release
>>> though.
>>
>> Cheers, I must be dumb as I cant see the latest version number on the
>> github page.
>> Googleing takes me to
>> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-971
>> but im guessing
>> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-1586
>> is the latest
>>
>> How is one to find this information out?
>>
>> Tom
>>
>> --
>> --
>> 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: Possible to suppress some stderr output?

2013-03-05 Thread bruce li
Well, when I pack my project into a stand alone jar and run java -jar
myproject-standalone.jar inside a terminal, the Android controller's debug
information gets printed out which clusters the terminal output, making
other vital information hard to identify. Thus I would want to find a way
to suppress its output.

BTW, I came up with an UGLY solution:

(let [err System/err]
  (System/setErr (java.io.PrintStream. (java.io.FileOutputStream.
"/dev/null")))
  (try
(throw (Exception. "Hello"))
(catch Exception e (.printStackTrace e)))
  (System/setErr err))

This time, the stack trace gets suppressed. But it looks really UGLY and by
no means, in efficient as it opens /dev/null everytime.

What is the difference between *err* and System/err?!


2013/3/5 Jim - FooBar(); 

>  still doesn't work though! strange...
> why would you want to do this anyway?
>
> Jim
>
>
>
> On 05/03/13 14:35, Jim - FooBar(); wrote:
>
> but then it's pretty trivial to adapt it:
>
> (defmacro with-out-err-str
>   "Evaluates exprs in a context in which *out* and *err* ire bound to a fresh
>   StringWriter.  Returns the string created by any nested printing
>   calls."
>   {:added "1.0"}
>   [& body]
>   `(let [s# (new java.io.StringWriter)]
>  (binding [*out* s# *err* s#]
>~@body
>(str s#
>
> Jim
>
>
>
>
> On 05/03/13 14:33, Jim - FooBar(); wrote:
>
> aaa sorry...I guess I should have tested first...
>
> Jim
>
>
> On 05/03/13 14:24, bruce li wrote:
>
> Thanks, Jim. But with-out-str only works for output to *out*(stdout), but
> not *err*(stderr). A quick test is:
> (with-out-str
>   (try
>(throw (Exception. "Hello"))
>(catch Exception e
>   (.printStackTrace e
> which it returns: "" but the stack trace still gets printed out:
> java.lang.Exception: Hello
> at user$eval2774$fn__2775.invoke(NO_SOURCE_FILE:1)
> at user$eval2774.invoke(NO_SOURCE_FILE:1)
> at clojure.lang.Compiler.eval(Compiler.java:6511)
> at clojure.lang.Compiler.eval(Compiler.java:6477)
> at clojure.core$eval.invoke(core.clj:2797)
> at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)
> at clojure.main$repl$fn__6410.invoke(main.clj:266)
> at clojure.main$repl.doInvoke(main.clj:266)
> at clojure.lang.RestFn.invoke(RestFn.java:1096)
> at
> clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1402.invoke(interruptible_eval.clj:57)
> at clojure.lang.AFn.applyToHelper(AFn.java:159)
> at clojure.lang.AFn.applyTo(AFn.java:151)
> at clojure.core$apply.invoke(core.clj:601)
> at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
> at clojure.lang.RestFn.invoke(RestFn.java:425)
> at
> clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:42)
> at
> clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1443$fn__1445.invoke(interruptible_eval.clj:170)
> at clojure.core$comp$fn__4034.invoke(core.clj:2278)
> at
> clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1436.invoke(interruptible_eval.clj:137)
> at clojure.lang.AFn.run(AFn.java:24)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722
>
> 2013/3/5 Jim - FooBar(); 
>
>> I don't know if you can suppress it, but you can certainly ignore it with
>> 'without-str' which will give you what was supposed to be printed out, as a
>> string...then it's up to you what to do with it... :)
>>
>> HTH,
>> Jim
>>
>>
>> On 05/03/13 08:56, bruce li wrote:
>>
>>>  Hi, guys,
>>>
>>> I'm currently playing clojure with android monkey runner. So far it
>>> works fine but just one unpleasant thing -- the android monkey runner
>>> default prints a lot of junk information to stderr such as:
>>>
>>> March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager
>>> sendMonkeyEventAndGetResponse
>>>
>>> These printing operations are evaluated inside its library when I call a
>>> method such as IChimpDevice.touch.
>>>
>>> I'm writing some wrappers around the api:
>>>
>>> (defn send-touch [^IChimpDevice device x y]
>>>   (.touch device x y TouchPressType/DOWN_AND_UP))
>>>
>>> Is it possible to suppress the its output to stderr and make it
>>> something like(in pseudo code):
>>> (with-stderr-discard
>>>   (.touch device x y TouchPressType/DOWN_AND_UP))
>>>
>>> I cannot discard the whole program's stderr output with commands like
>>> java -jar xx.jar 2>/dev/null
>>>
>>> since I need vital stack trace information from other places for debug
>>> purpose.
>>>
>>> Any help would be appreciated.
>>>
>>>
>>>  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be pat

Re: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();

still doesn't work though! strange...
why would you want to do this anyway?

Jim


On 05/03/13 14:35, Jim - FooBar(); wrote:

but then it's pretty trivial to adapt it:

(defmacro with-out-err-str
   "Evaluates exprs in a context in which *out* and *err* ire bound to a fresh
   StringWriter.  Returns the string created by any nested printing
   calls."
   {:added "1.0"}
   [& body]
   `(let [s# (new java.io.StringWriter)]
  (binding [*out* s# *err* s#]
~@body
(str s#

Jim



On 05/03/13 14:33, Jim - FooBar(); wrote:

aaa sorry...I guess I should have tested first...

Jim


On 05/03/13 14:24, bruce li wrote:
Thanks, Jim. But with-out-str only works for output to 
*out*(stdout), but not *err*(stderr). A quick test is:

(with-out-str
  (try
   (throw (Exception. "Hello"))
   (catch Exception e
  (.printStackTrace e
which it returns: "" but the stack trace still gets printed out:
java.lang.Exception: Hello
at user$eval2774$fn__2775.invoke(NO_SOURCE_FILE:1)
at user$eval2774.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)
at clojure.main$repl$fn__6410.invoke(main.clj:266)
at clojure.main$repl.doInvoke(main.clj:266)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1402.invoke(interruptible_eval.clj:57)

at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:42)
at 
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1443$fn__1445.invoke(interruptible_eval.clj:170)

at clojure.core$comp$fn__4034.invoke(core.clj:2278)
at 
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1436.invoke(interruptible_eval.clj:137)

at clojure.lang.AFn.run(AFn.java:24)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722

2013/3/5 Jim - FooBar(); >


I don't know if you can suppress it, but you can certainly
ignore it with 'without-str' which will give you what was
supposed to be printed out, as a string...then it's up to you
what to do with it... :)

HTH,
Jim


On 05/03/13 08:56, bruce li wrote:

Hi, guys,

I'm currently playing clojure with android monkey runner. So
far it works fine but just one unpleasant thing -- the
android monkey runner default prints a lot of junk
information to stderr such as:

March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager
sendMonkeyEventAndGetResponse

These printing operations are evaluated inside its library
when I call a method such as IChimpDevice.touch.

I'm writing some wrappers around the api:

(defn send-touch [^IChimpDevice device x y]
  (.touch device x y TouchPressType/DOWN_AND_UP))

Is it possible to suppress the its output to stderr and make
it something like(in pseudo code):
(with-stderr-discard
  (.touch device x y TouchPressType/DOWN_AND_UP))

I cannot discard the whole program's stderr output with
commands like
java -jar xx.jar 2>/dev/null

since I need vital stack trace information from other places
for debug purpose.

Any help would be appreciated.


-- 
-- 
You received this message because you are subscribed to the

Google
Groups "Clojure" group.
To post to this group, send email to
clojure@googlegroups.com 
Note that posts from new members are moderated - please be
patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to
clojure+unsubscr...@googlegroups.com
.
For more options, visit
https://groups.google.com/groups/opt_out.



-- 
-- 
You received this

Re: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();

but then it's pretty trivial to adapt it:

(defmacro with-out-err-str
  "Evaluates exprs in a context in which *out* and *err* ire bound to a fresh
  StringWriter.  Returns the string created by any nested printing
  calls."
  {:added "1.0"}
  [& body]
  `(let [s# (new java.io.StringWriter)]
 (binding [*out* s# *err* s#]
   ~@body
   (str s#

Jim




On 05/03/13 14:33, Jim - FooBar(); wrote:

aaa sorry...I guess I should have tested first...

Jim


On 05/03/13 14:24, bruce li wrote:
Thanks, Jim. But with-out-str only works for output to *out*(stdout), 
but not *err*(stderr). A quick test is:

(with-out-str
  (try
   (throw (Exception. "Hello"))
   (catch Exception e
  (.printStackTrace e
which it returns: "" but the stack trace still gets printed out:
java.lang.Exception: Hello
at user$eval2774$fn__2775.invoke(NO_SOURCE_FILE:1)
at user$eval2774.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)
at clojure.main$repl$fn__6410.invoke(main.clj:266)
at clojure.main$repl.doInvoke(main.clj:266)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1402.invoke(interruptible_eval.clj:57)

at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:42)
at 
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1443$fn__1445.invoke(interruptible_eval.clj:170)

at clojure.core$comp$fn__4034.invoke(core.clj:2278)
at 
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1436.invoke(interruptible_eval.clj:137)

at clojure.lang.AFn.run(AFn.java:24)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722

2013/3/5 Jim - FooBar(); >


I don't know if you can suppress it, but you can certainly ignore
it with 'without-str' which will give you what was supposed to be
printed out, as a string...then it's up to you what to do with
it... :)

HTH,
Jim


On 05/03/13 08:56, bruce li wrote:

Hi, guys,

I'm currently playing clojure with android monkey runner. So
far it works fine but just one unpleasant thing -- the
android monkey runner default prints a lot of junk
information to stderr such as:

March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager
sendMonkeyEventAndGetResponse

These printing operations are evaluated inside its library
when I call a method such as IChimpDevice.touch.

I'm writing some wrappers around the api:

(defn send-touch [^IChimpDevice device x y]
  (.touch device x y TouchPressType/DOWN_AND_UP))

Is it possible to suppress the its output to stderr and make
it something like(in pseudo code):
(with-stderr-discard
  (.touch device x y TouchPressType/DOWN_AND_UP))

I cannot discard the whole program's stderr output with
commands like
java -jar xx.jar 2>/dev/null

since I need vital stack trace information from other places
for debug purpose.

Any help would be appreciated.


-- 
-- 
You received this message because you are subscribed to the

Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com

Note that posts from new members are moderated - please be
patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.



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

Re: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();

aaa sorry...I guess I should have tested first...

Jim


On 05/03/13 14:24, bruce li wrote:
Thanks, Jim. But with-out-str only works for output to *out*(stdout), 
but not *err*(stderr). A quick test is:

(with-out-str
  (try
   (throw (Exception. "Hello"))
   (catch Exception e
  (.printStackTrace e
which it returns: "" but the stack trace still gets printed out:
java.lang.Exception: Hello
at user$eval2774$fn__2775.invoke(NO_SOURCE_FILE:1)
at user$eval2774.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)
at clojure.main$repl$fn__6410.invoke(main.clj:266)
at clojure.main$repl.doInvoke(main.clj:266)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1402.invoke(interruptible_eval.clj:57)

at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at 
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:42)
at 
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1443$fn__1445.invoke(interruptible_eval.clj:170)

at clojure.core$comp$fn__4034.invoke(core.clj:2278)
at 
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1436.invoke(interruptible_eval.clj:137)

at clojure.lang.AFn.run(AFn.java:24)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

at java.lang.Thread.run(Thread.java:722

2013/3/5 Jim - FooBar(); >


I don't know if you can suppress it, but you can certainly ignore
it with 'without-str' which will give you what was supposed to be
printed out, as a string...then it's up to you what to do with
it... :)

HTH,
Jim


On 05/03/13 08:56, bruce li wrote:

Hi, guys,

I'm currently playing clojure with android monkey runner. So
far it works fine but just one unpleasant thing -- the android
monkey runner default prints a lot of junk information to
stderr such as:

March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager
sendMonkeyEventAndGetResponse

These printing operations are evaluated inside its library
when I call a method such as IChimpDevice.touch.

I'm writing some wrappers around the api:

(defn send-touch [^IChimpDevice device x y]
  (.touch device x y TouchPressType/DOWN_AND_UP))

Is it possible to suppress the its output to stderr and make
it something like(in pseudo code):
(with-stderr-discard
  (.touch device x y TouchPressType/DOWN_AND_UP))

I cannot discard the whole program's stderr output with
commands like
java -jar xx.jar 2>/dev/null

since I need vital stack trace information from other places
for debug purpose.

Any help would be appreciated.


-- 
-- 
You received this message because you are subscribed to the Google

Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com

Note that posts from new members are moderated - please be
patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the
Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to clojure+unsubscr...@googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.



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

Re: Possible to suppress some stderr output?

2013-03-05 Thread bruce li
Thanks, Jim. But with-out-str only works for output to *out*(stdout), but
not *err*(stderr). A quick test is:
(with-out-str
  (try
   (throw (Exception. "Hello"))
   (catch Exception e
  (.printStackTrace e
which it returns: "" but the stack trace still gets printed out:
java.lang.Exception: Hello
at user$eval2774$fn__2775.invoke(NO_SOURCE_FILE:1)
at user$eval2774.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6511)
at clojure.lang.Compiler.eval(Compiler.java:6477)
at clojure.core$eval.invoke(core.clj:2797)
at clojure.main$repl$read_eval_print__6405.invoke(main.clj:245)
at clojure.main$repl$fn__6410.invoke(main.clj:266)
at clojure.main$repl.doInvoke(main.clj:266)
at clojure.lang.RestFn.invoke(RestFn.java:1096)
at
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1402.invoke(interruptible_eval.clj:57)
at clojure.lang.AFn.applyToHelper(AFn.java:159)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1771)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:42)
at
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1443$fn__1445.invoke(interruptible_eval.clj:170)
at clojure.core$comp$fn__4034.invoke(core.clj:2278)
at
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1436.invoke(interruptible_eval.clj:137)
at clojure.lang.AFn.run(AFn.java:24)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722

2013/3/5 Jim - FooBar(); 

> I don't know if you can suppress it, but you can certainly ignore it with
> 'without-str' which will give you what was supposed to be printed out, as a
> string...then it's up to you what to do with it... :)
>
> HTH,
> Jim
>
>
> On 05/03/13 08:56, bruce li wrote:
>
>> Hi, guys,
>>
>> I'm currently playing clojure with android monkey runner. So far it works
>> fine but just one unpleasant thing -- the android monkey runner default
>> prints a lot of junk information to stderr such as:
>>
>> March 05, 2013 4:46:47 pm com.android.chimpchat.**ChimpManager
>> sendMonkeyEventAndGetResponse
>>
>> These printing operations are evaluated inside its library when I call a
>> method such as IChimpDevice.touch.
>>
>> I'm writing some wrappers around the api:
>>
>> (defn send-touch [^IChimpDevice device x y]
>>   (.touch device x y TouchPressType/DOWN_AND_UP))
>>
>> Is it possible to suppress the its output to stderr and make it something
>> like(in pseudo code):
>> (with-stderr-discard
>>   (.touch device x y TouchPressType/DOWN_AND_UP))
>>
>> I cannot discard the whole program's stderr output with commands like
>> java -jar xx.jar 2>/dev/null
>>
>> since I need vital stack trace information from other places for debug
>> purpose.
>>
>> Any help would be appreciated.
>>
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscribe@**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+unsubscribe@**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+unsubscribe@**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+unsubscribe@**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 e

Re: Possible to suppress some stderr output?

2013-03-05 Thread Jim - FooBar();
I don't know if you can suppress it, but you can certainly ignore it 
with 'without-str' which will give you what was supposed to be printed 
out, as a string...then it's up to you what to do with it... :)


HTH,
Jim

On 05/03/13 08:56, bruce li wrote:

Hi, guys,

I'm currently playing clojure with android monkey runner. So far it 
works fine but just one unpleasant thing -- the android monkey runner 
default prints a lot of junk information to stderr such as:


March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager 
sendMonkeyEventAndGetResponse


These printing operations are evaluated inside its library when I call 
a method such as IChimpDevice.touch.


I'm writing some wrappers around the api:

(defn send-touch [^IChimpDevice device x y]
  (.touch device x y TouchPressType/DOWN_AND_UP))

Is it possible to suppress the its output to stderr and make it 
something like(in pseudo code):

(with-stderr-discard
  (.touch device x y TouchPressType/DOWN_AND_UP))

I cannot discard the whole program's stderr output with commands like
java -jar xx.jar 2>/dev/null

since I need vital stack trace information from other places for debug 
purpose.


Any help would be appreciated.


--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient 
with your first post.

To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
--
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: Clojurescript bug

2013-03-05 Thread Michał Marczyk
Simplest way is to either search for org.clojure/clojurescript in Central:

http://search.maven.org/#search%7Cga%7C1%7Corg.clojure%2Fclojurescript

or check the name of the latest tag in the repo:

https://github.com/clojure/clojurescript/tags

(the version string is 0.0-N for tag rN).

Also, lein-cljsbuild actually tends to switch to the latest
ClojureScript version as default pretty soon after release.

Cheers,
Michał


On 5 March 2013 14:26, Tom Hall  wrote:
>> Sure, just add it as an explicit dependency to your project. In fact,
>> your example uses r1450 only because you've got an explicit dependency
>> on it, as lein-cljsbuild 0.3.0 uses r1552 by default, so you could
>> also drop the explicit dependency. It's best to use the latest release
>> though.
>
> Cheers, I must be dumb as I cant see the latest version number on the
> github page.
> Googleing takes me to
> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-971
> but im guessing
> http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-1586
> is the latest
>
> How is one to find this information out?
>
> Tom
>
> --
> --
> 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: Clojurescript bug

2013-03-05 Thread Tom Hall
> Sure, just add it as an explicit dependency to your project. In fact,
> your example uses r1450 only because you've got an explicit dependency
> on it, as lein-cljsbuild 0.3.0 uses r1552 by default, so you could
> also drop the explicit dependency. It's best to use the latest release
> though.

Cheers, I must be dumb as I cant see the latest version number on the
github page.
Googleing takes me to
http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-971
but im guessing
http://mvnrepository.com/artifact/org.clojure/clojurescript/0.0-1586
is the latest

How is one to find this information out?

Tom

-- 
-- 
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: Custom repositories

2013-03-05 Thread BJG145
Brilliant - it works! Many 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: Clojure 1.5 print-table, org-mode babel, and org-mode HTML gen

2013-03-05 Thread greg r
I think I was wrong about the extra elisp code required for nrepl to 
evaluate babel Clojure code blocks.  This was from last year:

https://groups.google.com/forum/?fromgroups=#!searchin/nrepl-el/babel/nrepl-el/txLYH9tH6AU/hj0NkyF8YZ8J

I checked my .emacs file and the extra code for clojure babel is commented 
out, so the later versions of nrepl must have this feature included.
Too many months ago, I really need to put better notes and comments in my 
.emacs file!

Greg

On Monday, March 4, 2013 4:25:23 PM UTC-5, Mark C wrote:
>
> Very cool. Great looking doc! I just installed LaTeX and TeXworks so it's 
> off to play. (Other than incanter I already have the rest working, 
> including nrepl -  though I have to start up nrepl with nrepl-jack-in. Is 
> that what you were planning on doing? It would be cool to have it launched 
> by the first compile!).
>
>
>

-- 
-- 
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: Custom repositories

2013-03-05 Thread Meikel Brandmeyer (kotarak)
Hi,

Am Dienstag, 5. März 2013 13:19:53 UTC+1 schrieb BJG145:
>
> [com.badlogic.gdx/gdx "0.9.9"]
>
>
there is no "0.9.9" in the repository. Try "0.9.9-SNAPSHOT".

Kind regards
Meikel
 

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




Re: Custom repositories

2013-03-05 Thread BJG145
(...the above message seems to have appeared slightly garbled for some 
reason...should have ended like this...)

I came across an Android app called "Bounce Away" which I understood was 
created almost entirely using Clojure and LibGDX, so I was encouraged by 
that...

>
>
> https://play.google.com/store/apps/details?id=com.friendlyvillagers.ballz&hl=en
>

 

-- 
-- 
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: Java interop: "Can't call public method of non-public class"

2013-03-05 Thread Ben Smith-Mannschott
I found the following work-around since I have access to the java code I am
calling:

I had the package-visible ABC Bytes implement a (public) interface
declaring the toHexString method. This placated the compiler.

On Monday, March 4, 2013, Vladimir Tsichevski wrote:

> I think not. But upgrading to clojure 1.5 will do.
>
> On Friday, March 1, 2013 1:20:57 PM UTC+4, Marko Topolnik wrote:
>>
>> I'd say it's a bug. You are invoking a public class's method, which
>> happens to be inherited from a package-private class. Clojure's reflective
>> code accesses the superclass method directly so there's no distinction
>> between direct invocation and invocation through inheritance.
>>
>> If you are interseted in a workaround, type-hinting the code will work
>> (my guess).
>>
>> On Friday, March 1, 2013 10:13:57 AM UTC+1, bsmith.occs wrote:
>>>
>>> Simplified, from a more complex example:
>>>
>>> abstract class Bytes {
>>> public toHexString() { return "..."; }
>>> Bytes { }
>>> }
>>>
>>> public class Hash extends Bytes {
>>> public Hash() { super(); }
>>> }
>>>
>>> This works in Java:
>>>
>>> new Hash().toHexString();
>>>
>>> This fails in Clojure:
>>>
>>> (.toHexString (Hash.))
>>>
>>> IllegalArgumentException Can't call public method of non-public class:
>>> public final java.lang.String at.gv.brz.bjuvj.hashpass.**Bytes.toHexString()
>>> clojure.lang.Reflector.**invokeMatchingMethod (Reflector.java:88)
>>>
>>> Bug?
>>>
>>> // ben
>>>
>>  --
> --
> 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 '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  'clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com  'clojure%2bunsubscr...@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: Custom repositories

2013-03-05 Thread BJG145
Thanks for the replies. I'd experimented with:

:repositories [["libgdx" "http://libgdx.badlogicgames.com/nightlies/maven/";
]]

...but I hadn't been able to get it working, and because I wasn't sure 
whether this was the right approach, I hadn't persevered with it.

I just tried creating a new project with "lein new app newlibgdx" and 
edited project.clj to include:

:dependencies [[org.clojure/clojure "1.4.0"][com.badlogicgames.libgdx/gdx 
"0.9.9"]] :repositories [["libgdx" 
"http://libgdx.badlogicgames.com/nightlies/maven/";]]

When I ran "lein deps" from within the project folder, I got the error:

"Could not find artifact com.badlogicgames.libgdx:gdx:jar::0.9.9 in libgdx 
(http://libgdx.badlogicgames.com/nightlies/maven)"

I took a look at the folder structure of that website, and noticed that the 
gdx folder was in fact located at:

http://libgdx.badlogicgames.com/nightlies/maven/com/badlogic/gdx/gdx

...so I tried changing the entry in "dependencies" to:

[com.badlogic.gdx/gdx "0.9.9"]

...but "lein deps" still doesn't find it. Perhaps I'm still getting the 
syntax wrong...?

Re: the comment about Android, the main reason for using LibGDX was for 
Android deployment...so are you saying that won't work...? I came across an 
Android app called "Bounce Away" which I understood was created almost 
entirely using Clojure and LibGDX, so I was encouraged by that...

https://play.google.com/store/apps/details?id=com.friendlyvillagers.ballz&hl=en

-- 
-- 
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: Clojurescript bug

2013-03-05 Thread Michał Marczyk
On 5 March 2013 11:24, Tom Hall  wrote:
> Thanks Michał, is it easy enough to start using later versions of cljs
> with lein-cljsbuild?

Sure, just add it as an explicit dependency to your project. In fact,
your example uses r1450 only because you've got an explicit dependency
on it, as lein-cljsbuild 0.3.0 uses r1552 by default, so you could
also drop the explicit dependency. It's best to use the latest release
though.

Cheers,
Michał


>
> On 5 March 2013 00:16, Michał Marczyk  wrote:
>> PS. Incidentally, cljs-1450 has a bug which causes it to emit the
>> unmunged property name regardless of the filenames used. The relevant
>> ticket is CLJS-336, fixed in 9824dbd7c8ac658ebc2d5bc9fa6b5b898f17f659
>> (releases >= 1503).
>>
>>
>> On 5 March 2013 01:06, Michał Marczyk  wrote:
>>> This particular problem goes away if you use ClojureScript release
>>> 1586 *and* rename the directory
>>>
>>>   src/cljs/aima-clojure
>>>
>>> to
>>>
>>>   src/cljs/aima_clojure
>>>
>>> and the file
>>>
>>>   tictactoe-frontend.cljs
>>>
>>> to
>>>
>>>   tictactoe_frontend.cljs
>>>
>>> Maybe we should warn on encountering filenames with dashes, or else
>>> treat them as equivalent to underscores?
>>>
>>> Cheers,
>>> Michał
>>>
>>>
>>> On 4 March 2013 21:35, Tom Hall  wrote:
 Hello,

 I have just been stuck for ages trying to figure out what was going on
 in my first clojurescript application and think I have found a bug.

 I took some working game playing code for a simple tictactoe example
 and found that I got incorrectly names JS outputted

 I have created a project with as little clutter as possible.

 The cljs I am runing is at
 https://github.com/thattommyhall/cljs-bug/blob/master/src/cljs/aima-clojure/games/tictactoe-frontend.cljs
 and the commit that fixes it is
 https://github.com/thattommyhall/cljs-bug/commit/f80cdc4e97f94a6228ecf33d58d489af5de56245

 It seems to generate
 game.aima - clojure$game$Game$moves$arity$2
 (ie a subtraction operator) as you can see in the diff.

 I worked around it for now by adding an alias (def moves game/moves)
 outside and calling that rather than calling game/moves inside the
 function.

 Pretty sure this is a cljs bug as the clj tests run ok either way.


 Cheers,
 Tom

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

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

Re: Custom repositories

2013-03-05 Thread Softaddicts
Did you try to add their repo to the default ones alredy handled by leiningen in
your project.clj ?

https://github.com/technomancy/leiningen/blob/master/sample.project.clj

Look at the :repositories entry.

I am assuming that you are using leiningen to build. If not what tooling do you
use ?

Luc P.


> (PS I'm not asking about the programming side of this; I'm just lost with 
> getting the dependencies working.)
> 
> -- 
> -- 
> 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 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: Custom repositories

2013-03-05 Thread Michael Klishin
2013/3/5 BJG145 

> https://code.google.com/p/libgdx/wiki/MavenProjectSetup
>
> At the moment I'm struggling to understand pom files; whether I need them
> and how to generate them.
>

pom.xml for Maven is what project.clj is for Leiningen. You typically don't
need to generate pom.xml but in case you
do, Leiningen can do it for you (from what you have in project.clj) via

lein pom

Is there a specific reason why you don't use the Maven repository
recommended in the article?
If you are not sure how to add it with Leiningen, see

1.
https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#repositories
2.
https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L157

As for native dependencies, GWT and Android compilation support, LibGDX
uses Maven plugins for that
and Leiningen can't use them.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin

-- 
-- 
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: Custom repositories

2013-03-05 Thread Meikel Brandmeyer (kotarak)
Hi,

Adding something like this to your defproject should probably do the trick 
to get the repository known in leiningen. You should check the available 
versions there.

:repositories [["libgdx" "http://libgdx.badlogicgames.com/nightlies/maven/";
]]

Kind regards
Meikel

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




Re: Custom repositories

2013-03-05 Thread BJG145
(PS I'm not asking about the programming side of this; I'm just lost with 
getting the dependencies working.)

-- 
-- 
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: Clojurescript bug

2013-03-05 Thread Giacomo Cosenza
On Mar 5, 2013, at 11:24 AM, Tom Hall wrote:

> Thanks Michał, is it easy enough to start using later versions of cljs
> with lein-cljsbuild?

Hi Tom,
you can eventually take a look at https://github.com/magomimmo/modern-cljs to 
see if it can help you in starting with lein-cljsbuild plugin, which solves 
really a lot of trouble in working with cljs.

mimmo

> 
> On 5 March 2013 00:16, Michał Marczyk  wrote:
>> PS. Incidentally, cljs-1450 has a bug which causes it to emit the
>> unmunged property name regardless of the filenames used. The relevant
>> ticket is CLJS-336, fixed in 9824dbd7c8ac658ebc2d5bc9fa6b5b898f17f659
>> (releases >= 1503).
>> 
>> 
>> On 5 March 2013 01:06, Michał Marczyk  wrote:
>>> This particular problem goes away if you use ClojureScript release
>>> 1586 *and* rename the directory
>>> 
>>>  src/cljs/aima-clojure
>>> 
>>> to
>>> 
>>>  src/cljs/aima_clojure
>>> 
>>> and the file
>>> 
>>>  tictactoe-frontend.cljs
>>> 
>>> to
>>> 
>>>  tictactoe_frontend.cljs
>>> 
>>> Maybe we should warn on encountering filenames with dashes, or else
>>> treat them as equivalent to underscores?
>>> 
>>> Cheers,
>>> Michał
>>> 
>>> 
>>> On 4 March 2013 21:35, Tom Hall  wrote:
 Hello,
 
 I have just been stuck for ages trying to figure out what was going on
 in my first clojurescript application and think I have found a bug.
 
 I took some working game playing code for a simple tictactoe example
 and found that I got incorrectly names JS outputted
 
 I have created a project with as little clutter as possible.
 
 The cljs I am runing is at
 https://github.com/thattommyhall/cljs-bug/blob/master/src/cljs/aima-clojure/games/tictactoe-frontend.cljs
 and the commit that fixes it is
 https://github.com/thattommyhall/cljs-bug/commit/f80cdc4e97f94a6228ecf33d58d489af5de56245
 
 It seems to generate
 game.aima - clojure$game$Game$moves$arity$2
 (ie a subtraction operator) as you can see in the diff.
 
 I worked around it for now by adding an alias (def moves game/moves)
 outside and calling that rather than calling game/moves inside the
 function.
 
 Pretty sure this is a cljs bug as the clj tests run ok either way.
 
 
 Cheers,
 Tom
 
 --
 --
 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.
> 
> 

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

Re: Clojurescript bug

2013-03-05 Thread Tom Hall
Thanks Michał, is it easy enough to start using later versions of cljs
with lein-cljsbuild?

On 5 March 2013 00:16, Michał Marczyk  wrote:
> PS. Incidentally, cljs-1450 has a bug which causes it to emit the
> unmunged property name regardless of the filenames used. The relevant
> ticket is CLJS-336, fixed in 9824dbd7c8ac658ebc2d5bc9fa6b5b898f17f659
> (releases >= 1503).
>
>
> On 5 March 2013 01:06, Michał Marczyk  wrote:
>> This particular problem goes away if you use ClojureScript release
>> 1586 *and* rename the directory
>>
>>   src/cljs/aima-clojure
>>
>> to
>>
>>   src/cljs/aima_clojure
>>
>> and the file
>>
>>   tictactoe-frontend.cljs
>>
>> to
>>
>>   tictactoe_frontend.cljs
>>
>> Maybe we should warn on encountering filenames with dashes, or else
>> treat them as equivalent to underscores?
>>
>> Cheers,
>> Michał
>>
>>
>> On 4 March 2013 21:35, Tom Hall  wrote:
>>> Hello,
>>>
>>> I have just been stuck for ages trying to figure out what was going on
>>> in my first clojurescript application and think I have found a bug.
>>>
>>> I took some working game playing code for a simple tictactoe example
>>> and found that I got incorrectly names JS outputted
>>>
>>> I have created a project with as little clutter as possible.
>>>
>>> The cljs I am runing is at
>>> https://github.com/thattommyhall/cljs-bug/blob/master/src/cljs/aima-clojure/games/tictactoe-frontend.cljs
>>> and the commit that fixes it is
>>> https://github.com/thattommyhall/cljs-bug/commit/f80cdc4e97f94a6228ecf33d58d489af5de56245
>>>
>>> It seems to generate
>>> game.aima - clojure$game$Game$moves$arity$2
>>> (ie a subtraction operator) as you can see in the diff.
>>>
>>> I worked around it for now by adding an alias (def moves game/moves)
>>> outside and calling that rather than calling game/moves inside the
>>> function.
>>>
>>> Pretty sure this is a cljs bug as the clj tests run ok either way.
>>>
>>>
>>> Cheers,
>>> Tom
>>>
>>> --
>>> --
>>> 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: Custom repositories

2013-03-05 Thread BJG145
I'm sure this must be simple when you know, but after several days of 
ransacking the Internet and trying different things I'm still stumped.

I've given up on the LibGDX in Clojars, which is old, and also, I suspect, 
non-functional and/or undocumented.

https://clojars.org/org.clojars.amu/libgdx

I've been trying to get the latest 0.9.8 version running by using 
lein-localrepo to install the .jars in the local .m2 repository. I've also 
been trying to figure out if, alternatively, I need to use LibGDX's maven 
repository and archetype:

https://code.google.com/p/libgdx/wiki/MavenProjectSetup

At the moment I'm struggling to understand pom files; whether I need them 
and how to generate them.

All I want to do is simply draw a line using this popular library and I'll 
be euphoric. If someone can help me figure this out I promise to document 
it nicely.


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




Possible to suppress some stderr output?

2013-03-05 Thread bruce li
Hi, guys,

I'm currently playing clojure with android monkey runner. So far it works
fine but just one unpleasant thing -- the android monkey runner default
prints a lot of junk information to stderr such as:

March 05, 2013 4:46:47 pm com.android.chimpchat.ChimpManager
sendMonkeyEventAndGetResponse

These printing operations are evaluated inside its library when I call a
method such as IChimpDevice.touch.

I'm writing some wrappers around the api:

(defn send-touch [^IChimpDevice device x y]
  (.touch device x y TouchPressType/DOWN_AND_UP))

Is it possible to suppress the its output to stderr and make it something
like(in pseudo code):
(with-stderr-discard
  (.touch device x y TouchPressType/DOWN_AND_UP))

I cannot discard the whole program's stderr output with commands like
java -jar xx.jar 2>/dev/null

since I need vital stack trace information from other places for debug
purpose.

Any help would be appreciated.

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