Re: [clojure-rabbitmq] Re: Socket Exception thrown when trying to make a remote connection to server over adhoc network

2014-06-18 Thread Samuel Nelson
Any idea what the possible causes of this problem are? sorry I know its not much information to work with.. On Wednesday, June 11, 2014 2:34:42 PM UTC-4, Samuel Nelson wrote: I tested via telnet: telnet 10.10.10.3 5672 and the rabbitMQ server reports in the log that it accepted the

Re: fn and let are special forms or macros?

2014-06-18 Thread Ambrose Bonnaire-Sergeant
Hi Mark, Here's a brief doc on special forms: http://clojure-doc.org/articles/language/macros.html#special-forms-in-detail Thanks, Ambrose On Wed, Jun 18, 2014 at 12:13 PM, Mark P pierh...@gmail.com wrote: Thanks Tassilo for the explanation - much appreciated! I have been searching the web

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Stefan Kamphausen
Hi, FWIW... On Wednesday, June 18, 2014 5:06:09 AM UTC+2, Sean Corfield wrote: works for me... Does *not* work for me. I see the same error inside and outside of projects: $ java -version java version 1.7.0_11 Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) 64-Bit

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Ambrose Bonnaire-Sergeant
Someone was having the same issue, solved by upgrading Eastwood plugin to 0.1.2. Hope that helps. Thanks, Ambrose On Wed, Jun 18, 2014 at 11:05 AM, Sean Corfield s...@corfield.org wrote: works for me... Leiningen 2.4.2; Java build 1.8.0_05-b13; OS X 10.8.5 - lein help new works fine

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Ambrose Bonnaire-Sergeant
Rather upgrading *from* 0.1.2 fixes. Thanks, Ambrose On Wed, Jun 18, 2014 at 5:08 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Someone was having the same issue, solved by upgrading Eastwood plugin to 0.1.2. Hope that helps. Thanks, Ambrose On Wed, Jun 18, 2014

Re: Defs with %

2014-06-18 Thread Christophe Grand
thanks for the report, fixed On Wed, Jun 18, 2014 at 1:30 AM, Mike Thompson m.l.thompson...@gmail.com wrote: Colin, many thanks. Issue created: https://github.com/cgrand/sjacket/issues/19 On Wednesday, June 18, 2014 4:08:53 AM UTC+10, Colin Jones wrote: Yeah the latter version parses as

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Stefan Kamphausen
Oh, great, yes, that helped. Unexpected. Thanks, stefan On Wednesday, June 18, 2014 11:09:52 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: Rather upgrading *from* 0.1.2 fixes. Thanks, Ambrose On Wed, Jun 18, 2014 at 5:08 PM, Ambrose Bonnaire-Sergeant abonnair...@gmail.com javascript:

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread gvim
On 18/06/2014 04:05, Sean Corfield wrote: works for me... Leiningen 2.4.2; Java build 1.8.0_05-b13; OS X 10.8.5 - lein help new works fine outside of a project and also inside the context of a project that depends on Clojure 1.6.0. Are you running lein inside a project or outside? What do you

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread gvim
On 18/06/2014 04:05, Sean Corfield wrote: Leiningen 2.4.2; Java build 1.8.0_05-b13; OS X 10.8.5 - lein help new works fine outside of a project and also inside the context of a project that depends on Clojure 1.6.0. Are you running lein inside a project or outside? What do you have in your

Re: macro question

2014-06-18 Thread gianluca torta
you can also use macroexpand-1 to see how your macro expands for example, having defined your macro as suggested by Gary and James above, you can write something like: (macroexpand-1 '(if-zero (- 4 2 2) (+ 1 1) (+ 2 2))) and see that it correctly to: (if (clojure.core/= (- 4 2 2) 0) (+ 1 1) (+

Re: BeagleBone Black Continuous Analog Reads

2014-06-18 Thread Linus Ericsson
I would say it's not so much about programming paradigm rather than system calls. It all boils down to how often you would want to read the data. If it's not more than some times per second, and it's not super important with timing, you could probably put a reading function in a

Clojure equivalent of 3-level enumeration in Ruby?

2014-06-18 Thread gvim
I have a method in Ruby that involves 3-level enumeration and would like to rewrite it in Clojure. Without asking anyone to do the job :), what is the best equivalent to this kind of Ruby iteration in Clojure? I looked at prewalk and postwalk but wasn't convinced that was what's required. Map

Re: Clojure equivalent of 3-level enumeration in Ruby?

2014-06-18 Thread Gary Trakhman
Try http://clojuredocs.org/clojure_core/clojure.core/for On Wed, Jun 18, 2014 at 11:56 AM, gvim gvi...@gmail.com wrote: I have a method in Ruby that involves 3-level enumeration and would like to rewrite it in Clojure. Without asking anyone to do the job :), what is the best equivalent to

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Sean Corfield
I am using Eastwood 0.1.2 without problems with Leiningen 2.4.2 but perhaps Stefan and others are seeing conflicts because of other stuff in ~/.lein/profiles.clj with Eastwood? gvim seems to have isolated it to pulsar. Nearly all of the problems I see reported with Leiningen end up being due

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Andy Fingerhut
Recommendation: If you see this problem, and you have Eastwood in your ~/.lein/profiles.clj file, upgrade Eastwood to version 0.1.4, or go back to Leiningen 2.3.4. More details: I have been able to reproduce an exception when running 'lein help new' outside of any Leiningen project in these

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Andy Fingerhut
A little more data: I can reproduce the same thing on Ubuntu 12.04.3 LInux running OpenJDK 1.6.0_31, so there is nothing OS or JVM-specific about this that I can tell. Also, it happens with the following being the complete contents of my ~/.lein/profiles.clj file: {:user {:plugins

ClojureScript ^:export defprotocol

2014-06-18 Thread Mike Fikes
Is there a way to indicate that a (ClojureScript) protocol is intended to be used from the host? Details: I can define a protocol and an implementation of it in ClojureScript using defprotocol and reify. I can also successfully call methods on reified instances returned to the host (Obj-C

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread David Nolen
On iOS is advanced compilation really necessary? :simple + :static-fns true should suffice. On Wednesday, June 18, 2014, Mike Fikes mikefi...@me.com wrote: Is there a way to indicate that a (ClojureScript) protocol is intended to be used from the host? Details: I can define a protocol and

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread Gary Trakhman
'any problem.. fixed.. by another layer of indirection' You could also just make exportable functions that call the protocols, keeping them more as impl-details, core.cljs does this, and you gain things like varargs (hmm, do protocol-varargs work on cljs? nope:

Re: 56 second GC on Heroku - seems a bit long

2014-06-18 Thread Michael Swierczek
On Monday, June 16, 2014 1:47:14 PM UTC-4, Brian Marick wrote: We have a small Clojure app on Heroku that performs backend tasks for a Rails app. Low traffic (like a request a minute). Heap is 400M. We've been having long (10 sec) GC pauses using both the default and G1 GC (both untuned).

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread Mike Fikes
Even without JIT available in JavaScriptCore, I have been unable to notice a difference in the on-device performance of the “view controller” code I have been writing when turning on :advanced. Thanks for the suggestion, I'll go with :simple and :static-fns. The reified protocol instance works

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread Mike Fikes
Right, Gary, Initially I simply wrote exported functions. The motivation for experimenting with protocols is so that I can write a ClojureScript protocol that mimics, say the iOS UITableViewDataSource Objective-C @protocol. Then, with that in place, I can write ClojureScript reifications of

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread Gary Trakhman
I was just telling a local ios dev there's like five guys using clojure + objective-c. To me it's impressive. To them, well, I don't know what they'd think :-). On Wednesday, June 18, 2014, Mike Fikes mikefi...@me.com wrote: Right, Gary, Initially I simply wrote exported functions. The

Re: ClojureScript ^:export defprotocol

2014-06-18 Thread Mike Fikes
That's cool. I see no reason why Clojure / ClojureScript's “reach” can't extend significantly into iOS. On Wednesday, June 18, 2014 3:58:18 PM UTC-4, Gary Trakhman wrote: I was just telling a local ios dev there's like five guys using clojure + objective-c. To me it's impressive. To them,

Re: fn and let are special forms or macros?

2014-06-18 Thread Mark P
Interesting - thanks! Looks like doing `symbol is a good way of telling whether something is a special symbol or not. If syntax-quote results in namespace-qualification it then it *is not* special (with the exception of import*); if it does not namespace qualify it, then it *is* special.

Re: fn and let are special forms or macros?

2014-06-18 Thread Andy Fingerhut
user= (source special-symbol?) (defn special-symbol? Returns true if s names a special form {:added 1.0 :static true} [s] (contains? (. clojure.lang.Compiler specials) s)) nil user= (keys (. clojure.lang.Compiler specials)) ( monitor-exit case* try reify* finally loop* do letfn* if

Re: fn and let are special forms or macros?

2014-06-18 Thread Mark P
Wonderful - thanks Andy! On Thursday, June 19, 2014 12:40:24 PM UTC+9:30, Andy Fingerhut wrote: user= (source special-symbol?) (defn special-symbol? Returns true if s names a special form {:added 1.0 :static true} [s] (contains? (. clojure.lang.Compiler specials) s)) nil