Re: When arithmetic on a computer bite back

2012-06-01 Thread kawas
I've checked with a python repl, the correct value seems to be the one using BigDecs >>> from decimal import * >>> Decimal('1.4411518807585587E17') / Decimal(2) Decimal('72057594037927935') I've submitted a bug and commented on it about BigDecimal constructors but I may have made a mistake about

Re: using -> on a nested hash-map with string keywords.

2012-06-01 Thread Sean Corfield
On Fri, Jun 1, 2012 at 12:08 AM, Boris V. Schmid wrote: > Thanks, it was get-in that I was looking for, but couldn't find. At this point I'll give a plug for http://clojureatlas.com as a great way to explore the Clojure core/libraries by concept. -- Sean A Corfield -- (904) 302-SEAN An Architect

Re: clojure.reflect annotations

2012-06-01 Thread Jon Rose
Cool thanks for the info. I just pasted the code snippet in from stack overflow so it must copy the styles too. On Friday, June 1, 2012 1:39:05 PM UTC-7, Armando Blancas wrote: > > That's the only way I've seen it done. > > Cool source box; how did you get it? > > > On Friday, June 1, 2012 11:42

Re: clojure.reflect annotations

2012-06-01 Thread Armando Blancas
That's the only way I've seen it done. Cool source box; how did you get it? On Friday, June 1, 2012 11:42:19 AM UTC-7, Jon Rose wrote: > > sorry, typo. My bluetooth keyboard is geeking out. I meant, is it possible > to do this with out using the Jave Reflection classes through interop. > > On

Re: [ANN] Itsy 0.1.0 released, a threaded web spider written in Clojure

2012-06-01 Thread László Török
Hi, don't want to turn this to a lengthy discussion about crawling, but happy to continue off list. ;) Sitemaps work surprisingly well in certain domains (web shops powered by standard web shop software, large e-commerce sites) and can make life easier based on our experience. Another point: i n

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Phil Hagelberg
On Fri, Jun 1, 2012 at 11:38 AM, Jim - FooBar(); wrote: > How come building preview5 from source works just  fine? The JLine/repl bug was due to a mistake I made while generating the uberjar, so building from source will take care of that. But the SSL problem is actually something plaguing most

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Michael Klishin
Phil Hagelberg: > tl;dr: hold off on upgrading if you use Oracle's JDK or the repl task; > sorry for the inconvenience. travis-ci.org now uses preview 5 for lein2, we fixed Oracle JDK issues by installing the missing certificate during provisioning. Workarounds for OS X and Linux can be found i

Re: [ANN] Itsy 0.1.0 released, a threaded web spider written in Clojure

2012-06-01 Thread Michael Klishin
László Török: > I was wondering though how do you make sure two > crawlers do not crawl the same URL twice if there is no global state? :) By adding sharing state, for a single app instance, typically an atom. As for separating different instances, it is not uncommon to hash seed URLs (or domain

Re: clojure.reflect annotations

2012-06-01 Thread Jon Rose
sorry, typo. My bluetooth keyboard is geeking out. I meant, is it possible to do this with out using the Jave Reflection classes through interop. On Friday, June 1, 2012 11:38:17 AM UTC-7, Jon Rose wrote: > > Hello, > > I am wondering if anyone knows how to get method annotations from a method

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Jim - FooBar();
How come building preview5 from source works just fine? Jim On 01/06/12 18:27, Phil Hagelberg wrote: It turns out the problem with SSL is an issue with Oracle's JDK rather than being specific to Windows; Oracle revoked the certificate authority used by Clojars. So if you are not using OpenJDK

clojure.reflect annotations

2012-06-01 Thread Jon Rose
Hello, I am wondering if anyone knows how to get method annotations from a method using the clojure.reflect library. I going of a Stuart Sierra poston Stack Overflow which game me this user=> (pp

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Phil Hagelberg
On Thu, May 31, 2012 at 10:11 PM, Phil Hagelberg wrote: > A few bugs to watch for: > > * Traffic to/from Clojars now uses SSL, except on Windows: > https://github.com/technomancy/leiningen/issues/613 > * Startup takes a few hundred milliseconds more than preview4 for > unknown reasons: https://git

Re: When arithmetic on a computer bite back

2012-06-01 Thread Tassilo Horn
kawas writes: Hi Laurent, > (defn prime-factors [n] > (loop [f 2 n n res []] > (cond > (<= n 1) res > (zero? (rem n f)) (recur f (quot n f) (conj res f)) > :else (recur (inc f) n res > > Problem 1 (solved): If you use (= n 1) in the first cond clause, the > function m

Re: ANN factual-clojure-driver 1.3.1, Factual's officially supported Clojure driver

2012-06-01 Thread dirtyvagabond
Thanks Sun Ning! Please let me know if there's anything I can do to help. Very interested in feedback and suggestions... 8-] On Thursday, May 31, 2012 8:14:07 PM UTC-7, Sun Ning wrote: > > Awesome geo-data service! Can't wait to try out your APIs. > > On 06/01/2012 10:33 AM, dirtyvagabond wrote

When arithmetic on a computer bite back

2012-06-01 Thread kawas
Hi, Can someone explain to me the behavior of this function when applied to different kind of numbers. (defn prime-factors [n] (loop [f 2 n n res []] (cond (<= n 1) res (zero? (rem n f)) (recur f (quot n f) (conj res f)) :else (recur (inc f) n res Problem 1 (solved):

Re: [ANN] Itsy 0.1.0 released, a threaded web spider written in Clojure

2012-06-01 Thread László Török
Hi, interesting project. I was wondering though how do you make sure two crawlers do not crawl the same URL twice if there is no global state? :) If I read it correctly you're going to have to spawn a lot of threads to have at least a few busy with extraction at an point in time, as most of them

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Sun Ning
I'm running preview5 on OpenJDK 7, also got this issue both when upgrade and self-install. On 06/01/2012 02:40 PM, mnicky wrote: After upgrade from preview4 and installation of OpenJDK, 'lein2 repl' worked exactly once. Since then, it fails with: Exception in thread "main" java.lang.Exception

Re: Network Visual Layout Algorithm

2012-06-01 Thread atucker
Spectral Graph Theory? http://cs-www.cs.yale.edu/homes/spielman/TALKS/haifa1.pdf On Thursday, 31 May 2012 14:37:21 UTC+1, Sean Devlin wrote: > > Hey folks, > I'm looking for help demonstrating Clojure's superiority to Scala :) > > I have a contest going with a colleague, where we each have to rend

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Jim - FooBar();
Your error seems very similar with mnicky's error which is a known issueMy error on the other hand seems to be completely different from yours! Jim On 01/06/12 09:35, Baishampayan Ghose wrote: And I am facing a JLine related error when I launch the repl. Full stack trace here https://www

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Baishampayan Ghose
And I am facing a JLine related error when I launch the repl. Full stack trace here https://www.refheap.com/paste/2956 I am using Java6 on Mac OS X. Regards, BG On Fri, Jun 1, 2012 at 1:59 PM, Jim - FooBar(); wrote: > After upgrading from preview4 to preview5 I get this when trying to do > "le

Re: [ANN] Leiningen 2.0.0-preview5 released

2012-06-01 Thread Jim - FooBar();
After upgrading from preview4 to preview5 I get this when trying to do "lein2 repl" inside any project folder... Is this a known issue? I'm using Jdk 1.7... Could not find artifact reply:reply:pom:0.1.0-beta8 in central (http://rep

Re: using -> on a nested hash-map with string keywords.

2012-06-01 Thread Boris V. Schmid
Thanks, it was get-in that I was looking for, but couldn't find. Also thanks to Dave for explaining that keywords have some internal magic compared to strings. will remember! On Thursday, 31 May 2012 19:22:50 UTC+2, Alan Malloy wrote: > > Yes, but really to GET a value nested IN a series of maps