Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Ashish Negi
@bernardH Thanks bernardH for your help. 1. Why subtract 2 ? It is an euler theoram : for finding Modulo inverse , I have written the formula in comments just above the line. ToMod is a big prime number. Euler says for (a/b) mod P where P is big prime number == (a * (b ^ (P-2))mod P) mo

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-14 Thread Zack Maril
ClojureBridge and conj grants are excellent ways to encourage all types of folks to join Clojure and I'm stoked that these programs have emerged from the community. These are Good Things and should be continued and improved upon wherever possible. I'd personally like to know how much good these

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Anil wadghule
Guys, you could use http://gist.github.com to share long code snippets. That way code can have good Clojure syntax highlighting and be readable.  --  Anil — Sent from Mailbox On Wed, Oct 15, 2014 at 5:32 AM, bernardH wrote: > Sorry but I don't feel that I'm understanding your code enough t

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread bernardH
Sorry but I don't feel that I'm understanding your code enough to rewrite it (for instance, why substract 2 at https://gist.github.com/ashishnegi/a9ae3fb3c270c7d3742e#file-calculator-clj-L102 to add 2 at https://gist.github.com/ashishnegi/a9ae3fb3c270c7d3742e#file-calculator-clj-L16 ?). But i

[ANN] logconfig 0.7.1

2014-10-14 Thread Pierre-Yves Ritschard
Hi, While clojure.tools.logging does a great job at logging, writing programs in clojure involves setting up the logging, which for people not familiar with the JVM can mean a lot of head scratching before figuring out how log4j.properties work and can be fed to a JVM. logconfig was meant to help

[ANN] Quickie 0.3.5

2014-10-14 Thread Jake Pearson
Hi, I got to spend some hack days and created a parallel test runner for clojure.test. It is part of an autotester I wrote a couple of years ago called quickie. To run your tests add [quickie "0.3.5"] to your :plugins. Then run lein quickp. Stacktraces get filtered. The return code is equal to

Re: Chestnut memory usage

2014-10-14 Thread Timothy Washington
I created my own browser-repl component (using austin). And that definitely consumed a lot of memory. I haven't used Chestnut. But I'm guessing it's browser-repl implementation (in src/clj/chestnut/dev.clj

Re: [ClojureScript] Re: [ANN] Silk, an isomorphic routing library for Clojure and ClojureScript

2014-10-14 Thread Colin Yates
Thanks both. On 13 October 2014 04:27, Dom Kiva-Meyer wrote: > Thanks for the experience reports, Dylan! > > Colin, Silk is Ring-compatible and meant to be used as a single > replacement for both Compojure and Secretary (or any other server/browser > routing combination with incompatible syntax

Re: [ANN] Clojure Videos (with options for Linux users)

2014-10-14 Thread Timothy Baldridge
Your wish is my command. There is now a Bitcoin link ( https://www.coinbase.com/checkouts/5f6643c872ac24cdb080735c566b5b2b) on the site. Timothy Baldridge On Tue, Oct 14, 2014 at 9:47 AM, Rostislav Svoboda < rostislav.svob...@gmail.com> wrote: > +1 Bitcoins > I can't use paypal. > > > On 10 Octo

Re: book for a beginner with some exercises

2014-10-14 Thread Alex Miller
There are a number of sites with Clojure exercises (Clojure Koans, 4 Clojure, Exercism.io). Of those, I like 4 Clojure the most for what you're describing. Marick's "Functional Programming for the Object-Oriented Programmer" https://leanpub.com/fp-oo has really great exercises in it. Parts of

Re: [ANN] Clojure Videos (with options for Linux users)

2014-10-14 Thread Rostislav Svoboda
+1 Bitcoins I can't use paypal. On 10 October 2014 06:46, Eric Normand wrote: > Hello, > > To plug my own videos, the LispCast core.async videos are coming out soon! I > have a strict deadline of "before the conj". You can get on the mailing list > to get a discount when they come out. You'll al

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-14 Thread Bridget
Great points from everyone about the lack of diversity in the Clojure world and the need to track improvement on that. I like the idea of finding a tangible thing that we can measure. Collecting demographic information in the annual survey is an interesting idea, and I think we should take it u

2014 State of Clojure & ClojureScript Survey ends Oct 17th

2014-10-14 Thread Alex Miller
Just a reminder that this Friday is the last day to complete the 2014 State of Clojure & ClojureScript surveys: http://blog.cognitect.com/blog/2014/10/3/2014-state-of-clojure-clojurescript-survey So far 1110 people have filled out the State of Clojure survey and 544 people have filled out the Sta

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Ashish Negi
@BG Glad to know i am interacting with you :) Of course i understand that you are not criticizing me.. I have refactored my code and have made a gist.. that may help.. I have put some comments. https://gist.github.com/ashishnegi/a9ae3fb3c270c7d3742e please share your comments on that. I am reall

Re: core.async thread behaviour

2014-10-14 Thread Nico Swart
I guess the core.async library creates a thead pool. In the library code: (defonce the-executor (Executors/newFixedThreadPool (-> (Runtime/getRuntime) (.availableProcessors) (* 2) (+ 42)) (conc/counted-thread-factory "async-dispatch-%d" true))) On my machine it turns

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-14 Thread Rick Moynihan
On 13 October 2014 22:05, Alex Miller wrote: > I do not need a poll to see that Clojure developers are predominantly white > men, although that's also true of most programming languages and a > consequence of larger pervasive issues in the industry. However, I think the > Clojure community has bee

Re: book for a beginner with some exercises

2014-10-14 Thread Rangel Spasov
Aphyr's blog is a really good resource for both beginners and advanced users alike, highly recommended, here's the starting tutorial: http://aphyr.com/posts/301-clojure-from-the-ground-up-welcome Just look up all his "Clojure from the ground up" posts on the blog. On Tuesday, October 14, 2014 4

Re: book for a beginner with some exercises

2014-10-14 Thread Michael Klishin
 On 14 October 2014 at 15:59:03, Roelof Wobben (rwob...@hotmail.com) wrote: > Is there a book for a beginner in Clojure where I can learn things > and practice the things I learned with some exercises ? Exercises are provided by several online resources. Books: http://clojure-doc.org/articles/e

book for a beginner with some exercises

2014-10-14 Thread Roelof Wobben
Hello, Is there a book for a beginner in Clojure where I can learn things and practice the things I learned with some exercises ? Roelof -- 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: Programmable drones with Clojure/Java support?

2014-10-14 Thread JPH
Thanks for the amazingly detailed response John! And here's some related news for good timing: http://www.suasnews.com/2014/10/31767/linux-foundation-and-leading-technology-companies-launch-open-source-dronecode-project/. I wonder how much of this is accessible via Clojure? On 10/14/2014 01:08 P

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Baishampayan Ghose
The size of the code doesn't matter, I have read much larger code-bases in less than 10 mins. Your code is unreadable because of weird naming of locals, completely absurd indentation, use of mutation, etc. It's just too much work to interpret the code. I think it will be better if you share the p

Re: core.async with multiple catch blocks causing weird loop behaviour

2014-10-14 Thread David Nolen
File a bug in JIRA, thanks! http://dev.clojure.org/jira/browse/ASYNC David On Sun, Oct 12, 2014 at 5:56 AM, Tom Coupland wrote: > I've been seeing this weird looping behavior with some go loops over the > last few days. An exception is being thrown from a function within the loop > and rather th

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Ashish Negi
Also just for the record.. My first post had Main code and the code that i used it for testing separated by a line saying * Test *** there I am concerned about the Main code and testing code is there if somebody wants to just put every thing in repl and try few

Re: Optimizing code : Fun but now paining me

2014-10-14 Thread Ashish Negi
@Baishampayan Ghose You caught me right.. i am a novice in clojure.. But most of my functions are smaller ( upto problem requirement ) and self containing.. so i think that you might be having issues with some particular function.. If that is so.. i can put some comments and refactor that part