Re: complex numbers in clojure

2015-11-02 Thread 'Alan Forrester' via Clojure
On 2 Nov 2015, at 13:11, Grahack wrote: > I'm resurrecting this thread in case there is something new that happened > concerning complex numbers that was not logged here. > So was there some progress made? > > I also wanted to add that mixing rationals and complex

Re: complex numbers in clojure

2015-11-02 Thread Christopher Small
I'll just add that core matrix complex doesn't prevent you from using rationals, as most of the math happens on real/imaginary matrix pairs. However, any time you try to return a scalar value (not a matrix), it wraps the result using the alanforr library, so you'd be potentially restricted there,

Re: complex numbers in clojure

2015-11-02 Thread Grahack
I'm resurrecting this thread in case there is something new that happened concerning complex numbers that was not logged here. So was there some progress made? I also wanted to add that mixing rationals and complex wuold be super cool, like: (* 1/2 i) => i/2) -- You received this message

Re: complex numbers in clojure

2015-11-02 Thread 'Alan Forrester' via Clojure
On 2 Nov 2015, at 15:57, Christopher Small wrote: > I'll just add that core matrix complex doesn't prevent you from using > rationals, as most of the math happens on real/imaginary matrix pairs. > However, any time you try to return a scalar value (not a matrix), it wraps

Right behavior of core/bean

2015-11-02 Thread Timur
Hi everyone, Is the following the expected behavior after converting an object into a map using bean fn: user> (bean "test") {:bytes #object["[B" 0x546fe214 "[B@546fe214"], :class java.lang.String, :empty false} user> (into [] (bean "test")) [[:bytes

Re: how to speedup lein uberjar?

2015-11-02 Thread Sunil S Nandihalli
Thanks Asim for this suggestion. I wanted to do it but did not have the bandwidth to explore how to do it.. I am new to spark.. I usually do repl-driven dev for local apps... Have you done repl-driven using spark and clojure? do you have pointers as to how to do it.. I can explore if you tell me

Re: how to speedup lein uberjar?

2015-11-02 Thread Asim Jalis
Hi Sunil, Here is something to think about. Can you use the REPL for your workflow instead? If the changes are all in the Spark driver code you can run the driver inside the REPL and then test out the changes in the REPL. Once you have something that works you can save that and deploy an

Re: Right behavior of core/bean

2015-11-02 Thread Alex Miller
Seems buggy to me. Most likely, bean needs to do more work in implementation. Same behavior in 1.7 and 1.8. In 1.6, the into call actually throws an exception as the proxy doesn't implement iterator(). Ticket welcome... On Monday, November 2, 2015 at 1:26:32 PM UTC-6, Sean Corfield wrote: >

Re: If a Java function seems to never return, how do I test?

2015-11-02 Thread Alex Miller
It is possible to rebind System.out to something else inside Java, so the library could be redirecting it from your view. Not saying that's happening, but it's possible. If you you can connect with a debugger, you can set breakpoints based on any thrown exception. On Monday, November 2, 2015

Re: Right behavior of core/bean

2015-11-02 Thread Sean Corfield
user> (bean "test") {:bytes #object["[B" 0x546fe214 "[B@546fe214"], :class java.lang.String, :empty false} user> (into [] (bean "test")) [[:bytes #object[clojure.core$bean$fn__5742$fn__5743 0x4cdc53ad "clojure.core$bean$fn__5742$fn__5743@4cdc53ad"]] [:class

Re: If a Java function seems to never return, how do I test?

2015-11-02 Thread Raoul Duke
flush twice, oracle is far far away? -- 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

Re: If a Java function seems to never return, how do I test?

2015-11-02 Thread Lawrence Krubner
Now there is a new error. Somehow, when the exception happens in our Java library, even though we, in theory, write to System.out.println(), I never see the Exception in the logs. All I can think is that somewhere in the Java library there is an exception that we catch but we forget to do

Re: core.cache limits?

2015-11-02 Thread William la Forge
I am also wondering if lirs is still a good choice when the cache is large and the items are small. Perhaps lru would be better? -- 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

core.cache limits?

2015-11-02 Thread William la Forge
The lirs cache in core.cache looks good, but I don't follow the code for setting the limits. I'd like to use this as a node cache for virtual data structures. So I need a large, but configurable, limit. Did a web search, can't find any examples for setting the limits. Most of what I found was

Re: If a Java function seems to never return, how do I test?

2015-11-02 Thread Rob Lally
Is it possible that the exception is being thrown in a different thread? If that’s the case, you can use: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.UncaughtExceptionHandler.html to

Re: is there a community "best practice" for including your co-workers libraries?

2015-11-02 Thread dmichulke
You don't really need to set up a server infrastructure if you can live with hacks. One way is put the JAR say in a "/lib" dir and point the :resource-paths entry in profiles.clj directly to the JAR, so "lib/my-coworker-lib.jar". The other way is http://stackoverflow.com/a/26997656 but I only

Re: core.cache limits?

2015-11-02 Thread James Elliott
And yes, the first time you look at the details of map destructuring for optional keyword arguments in Clojure functions it can be a bit confusing, but it is such a handy idiom once you get used to it. On Monday, November 2, 2015 at 5:53:33 PM UTC-6, James Elliott wrote: > > If you really do

Re: is there a community "best practice" for including your co-workers libraries?

2015-11-02 Thread Dave Tenny
ok, that must be the part I missed. On Mon, Nov 2, 2015 at 7:01 PM, Sean Corfield wrote: > Dave Tenny wrote on Monday, November 2, 2015 at 3:59 PM: > > I'm slightly confused, is there some reason Clojars > doesn't > work for sharing libraries in this

Re: core.cache limits?

2015-11-02 Thread William la Forge
It is the parameter list that threw me off: [base & {:keys [s-history-limit q-history-limit] :or {s-history-limit 32 q-history-limit 32}}] That's more destructuring than I've ever seen. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: is there a community "best practice" for including your co-workers libraries?

2015-11-02 Thread Dave Tenny
I'm slightly confused, is there some reason Clojars doesn't work for sharing libraries in this context? -- 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

Re: core.cache limits?

2015-11-02 Thread William la Forge
OK, after a bit of digging into destructuring, I THINK I just pass the argument {s-history-limit 1000 q-history-limit 1000} or perhaps {:s-history-limit 1000 :q-history-limit 1000}. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: core.cache limits?

2015-11-02 Thread William la Forge
Solved by repl. (f :s-history-limit 1000 q-history-limit 1000) is what I want. (I'm finding clojure to be a rich language.) -- 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

mbrace style integration?

2015-11-02 Thread Raoul Duke
hi, ignorant question from me: F#/dotnet has 'mbrace' which lets you, apparently, *super* easily spawn things off to a cluster (cloud based). Instead of doing async { /*worker code*/ }; you do cloud { /*worker code*/ }; and all the management of getting it sent to the cloud, run, and back is

Re: core.cache limits?

2015-11-02 Thread James Elliott
If you really do want to set both parameters, you need both to be keywords, i.e: (f :s-history-limit 1000 :q-history-limit 1000) That may have just been a typo in your posting, but I wanted to be sure it was not also in your code. -James On Monday, November 2, 2015 at 5:11:03 PM UTC-6,

Re: is there a community "best practice" for including your co-workers libraries?

2015-11-02 Thread Sean Corfield
Dave Tenny wrote on Monday, November 2, 2015 at 3:59 PM: I'm slightly confused, is there some reason Clojars doesn't work for sharing libraries in this context? Because it’s public and sharing your companies libraries with the world might be frowned upon…? Sean -- You received this message

Re: core.cache limits?

2015-11-02 Thread William la Forge
There was just so much more there than I had ever dreamed. I had looked at destructuring, but had been unaware of the various directives. :D -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Expectations mode not running tests

2015-11-02 Thread JvJ
I've been attempting to use expectations and emacs expectations-mode to run test on namespaces. However, when I attempt to execute tests in expectations mode, I get the following error message: expectations-eval: Symbol’s function definition is void: nrepl-send-string I'm not sure if this has

Any clojure test frameworks support jsonPath macters like rest-assured in java?

2015-11-02 Thread qianyan . lambda
Hi hivemind, In Java, we have > get("/lotto").then().assertThat().body("lotto.winners.winnerId", hasItems(23, > 54)); > > Any test frameworks can support this like below? (deftest should-return-200j (testing "should return 200 ok" (let [{body :body} (my-app (mock/request :get "/"))]