Re: java method overloading and clojure interop

2015-07-09 Thread Jo Geraerts
Op woensdag 8 juli 2015 05:20:51 UTC+2 schreef Herwig Hochleitner: > > The way I would do it: Define multiply as a function calling (.multiply > amount ^Number x), for higher order usage, and then add an :inline function > to its metadata, which returns `(.multiply ~amount ~x). > That acts as a

Re: java method overloading and clojure interop

2015-07-09 Thread Herwig Hochleitner
:inline-arities tells the compiler, which arities (i.e. parameter counts) should be inlined: https://github.com/clojure/clojure/blob/9d70bc1051ec8117df6436e07474c586ea9e85b0/src/jvm/clojure/lang/Compiler.java#L6596 2015-07-09 9:49 GMT+02:00 Jo Geraerts : > > > Op woensdag 8 juli 2015 05:20:51 UTC

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
[lein-collisions "0.1.2"] now working properly with resource directories​ -- 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

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Kevin Corcoran
Hi Herwig,​ This looks nice, thanks for contributing. One question, though: The projects on which I work already use lein's :pedantic? flag. Is there any reason we might want to use lein-collisions instead of :pedantic? - Kevin -- You received this message because you are subscribed to the Go

Re: How can I write a string into Redis such that a Java app might see its contents as a primitive string?

2015-07-09 Thread gingersafflower
> As for the escaped quotes, you may be using pr or prn to print, or maybe you are > using pr-str to produce the string representation. I can't be sure. At the moment I create the string like this: document-as-string (str "{\"transaction-id\" : \"" transaction-id "\", \"message\" :

clojure don't support .clj source code file by utf-8.

2015-07-09 Thread Alex Woods
clojure don't support .clj source code file by utf-8. it's ok when the .clj source code files by ascii env: windows7,jdk1.8u45,lein2.5.0 -- 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 N

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
2015-07-08 18:41 GMT+02:00 Kevin Corcoran : > > The projects on which I work already use lein's :pedantic? flag. Is there > any reason we might want to use lein-collisions instead of :pedantic? > > Hi Kevin, if I understand :pedantic correctly, it catches cases, where transitive dependencies wou

Re: How can I write a string into Redis such that a Java app might see its contents as a primitive string?

2015-07-09 Thread Francis Avila
your document-as-byte-array is wrong--it only handles ascii, and very inefficiently too. Just say (.getBytes document-as-string "UTF-8") to get a utf-8 encoding of the string as a byte array. On Thu, Jul 9, 2015 at 10:41 AM, wrote: > > > As for the escaped quotes, you may be using pr or prn to

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Herwig Hochleitner
​So long story short, you want both :pedantic and lein-collisions -- 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 you

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Andy Fingerhut
Herwig: Great examples of why lein-collisions is useful. I think it would be helpful to include that text in your README on Github somewhere. Andy On Thu, Jul 9, 2015 at 9:00 AM, Herwig Hochleitner wrote: > 2015-07-08 18:41 GMT+02:00 Kevin Corcoran : > >> >> The projects on which I work alrea

Re: [ANN] lein-collisions: a plugin to find classpath collisions

2015-07-09 Thread Kevin Corcoran
Herwig, Thanks for the explanation! -- 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

Re: clojure don't support .clj source code file by utf-8.

2015-07-09 Thread Daniel Compton
Hi Alex You'll need to give us some more information about this to help us troubleshoot what's going on. Can you share the file with us? On Fri, 10 Jul 2015 at 3:59 AM Alex Woods wrote: > clojure don't support .clj source code file by utf-8. > it's ok when the .clj source code files by ascii >

Re: How can I write a string into Redis such that a Java app might see its contents as a primitive string?

2015-07-09 Thread gingersafflower
I am sorry, I should have explained this sooner. When I do this: (.getBytes document-as-string "UTF-8") The quote marks are always escaped. When I do this: document-as-byte-array (bytes (byte-array (map (comp byte int) document-as-string))) The quote marks are sometimes escaped, but

Why do I need to include the namespace "clojure.core" in the REPL?

2015-07-09 Thread gingersafflower
If I launch "lein repl" I run into this problem: garlic.guide=> (ns-publics 'garlic.guide) CompilerException java.lang.RuntimeException: Unable to resolve symbol: ns-publics in this context, compiling:(/tmp/form-init8901241567953840232.clj:1:1) I have to type out the namespace name "clojure.

Re: Why do I need to include the namespace "clojure.core" in the REPL?

2015-07-09 Thread James Reeves
Your prompt indicates that the namespace you're in is "garlic.guide". My guess is that you don't have an associated file with that namespace that has an "ns" declaration. - James On 9 July 2015 at 23:21, wrote: > If I launch "lein repl" I run into this problem: > > garlic.guide=> (ns-publics '

Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
Hi :) I've recently broached the subject of Clojure with another dev in my organization, and his response was basically "What's Clojure"? and I'm not sure how to answer that in a way that might inspire him. "It's a dynamically-typed functional Lisp with persistent immutable data structures tha

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Ralf Schmitt
Johanna Belanger writes: > Could anyone tell me how they got from enterprise Java to Clojure? Maybe the following links provide some useful information: http://blog.juxt.pro/posts/selling-clojure.html http://www.pitheringabout.com/?p=693 http://www.lispcast.com/convince-your-boss-to-use-clojure

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
Thank you, Ralf! On Thursday, July 9, 2015 at 3:28:14 PM UTC-7, Ralf Schmitt wrote: > > Johanna Belanger > writes: > > > Could anyone tell me how they got from enterprise Java to Clojure? > > Maybe the following links provide some useful information: > > http://blog.juxt.pro/posts/selling-cloju

Re: How can I write a string into Redis such that a Java app might see its contents as a primitive string?

2015-07-09 Thread Francis Avila
This is what I am doing with Carmine and it seems to work properly. First some setup in the repl: user=>(require '[taoensso.carmine :as car]) nil user=> (def conn {:pool {} :spec {}}) #'user/conn user=> (defn raw-str-set [k ^String v] (car/set k (car/raw (.getBytes v "UTF-8" #'user/raw-str-s

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Colin Yates
It's tricky, but I would ask them what pain points they experience with the Java stack and go from there. I find the biggest barrier is the "yeah, what I've got works fine"/complacency attitude. If they are perfectly happy where they are then great, lesve them to it and go be 10 times more producti

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Sean Corfield
On Jul 9, 2015, at 5:22 PM, Colin Yates wrote: > There are two bookd you might want to give them, Functional Programing for OO > by Brian Marick and another one I can't remember the title of but something > like Functional Programming in Clojure and Scala. They might both help > provide an on-r

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
Thanks, Colin. That's really helpful. He seems very competent in the Java EE stack, too. In .Net, nothing ever stays the same long enough for me to get that comfortable. =\ One good thing is I don't actually need him to switch to Clojure, just to learn it well enough that he can understand my c

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
Thanks Sean =) On Thursday, July 9, 2015 at 5:27:16 PM UTC-7, Sean Corfield wrote: > > On Jul 9, 2015, at 5:22 PM, Colin Yates > > wrote: > > There are two bookd you might want to give them, Functional Programing > for OO by Brian Marick and another one I can't remember the title of but > some

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Raoul Duke
> and I need to be 10 times more productive. =) you mean, after your 2 week ramp-up time, right? -- 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 modera

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
Lol, that's an interesting reply. I'm suspecting it's a warning. Care to expand? On Thursday, July 9, 2015 at 6:16:25 PM UTC-7, raould wrote: > > > and I need to be 10 times more productive. =) > > you mean, after your 2 week ramp-up time, right? > -- You received this message because you are

ANN: clj-rethinkdb 0.10.1

2015-07-09 Thread Daniel Compton
I'm pleased to announce the release of clj-rethinkdb version 0.10.1, an idiomatic driver for RethinkDB . This release brings a number of new features including: * Explicit, tested support for RethinkDB 2.0, including changefeeds. * U

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
I should say, because I'm worried this came across wrong, that I don't expect him, or anyone, to learn Clojure for my sake, but only if they find value in it. That's why I'm looking for a simple way to showcase the value. On Thursday, July 9, 2015 at 5:54:51 PM UTC-7, Johanna Belanger wrote: > >

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Sean Corfield
On Jul 9, 2015, at 7:58 PM, Johanna Belanger wrote: > I should say, because I'm worried this came across wrong, that I don't expect > him, or anyone, to learn Clojure for my sake, but only if they find value in > it. That's why I'm looking for a simple way to showcase the value. One caution I w

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Michael McLellan
That brings up an interesting point - what's the ramp-up time usually like for the Java devs that convert to Clojure? On Thursday, July 9, 2015 at 9:16:25 PM UTC-4, raould wrote: > > > and I need to be 10 times more productive. =) > > you mean, after your 2 week ramp-up time, right? > -- You

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Johanna Belanger
That's a good read, Sean. I'm a dedicated departmental programmer, and to be effective in my position, I need to be quick and nimble. For some of the problems I'm solving, my tools are causing an unsupportable amount of drag. Clojure would be a brilliant match. But because I'm a one-person tea

Re: Advice on introducing a Java dev to Clojure

2015-07-09 Thread Erik Assum
If you're a one-person team, don't be too worried. Your Clojure code will likely not be too big, so it will be fairly easy to understand and possibly rewrite to Java, if the truck thing was to happen. Erik. -- i farta > Den 10. jul. 2015 kl. 07.25 skrev Johanna Belanger > : > > That's a go