[ANN] [helpshift/gulfstream "0.2.1"] - rapid graph visualizations

2015-09-04 Thread zcaudate
gulfstream (https://github.com/helpshift/gulfstream) is a library with similar functionality to https://github.com/aysylu/loom and https://github.com/ztellman/rhizome Built on top of graphstream(http://graphstream-project.org), it's main advantage lies in rapid visualisation, interaction and

Re: Stuart Sierra's Component: retries & restarts in production

2015-09-04 Thread Dave Tenny
I'm using components to encapsulate Langohr/RabbitMQ interactions in cases where Langohr auto-recovery wasn't happy with what was going on. I make sure the Lifecycle methods are idempotent, built the component stack in the correct order. To make sure that I can deal with the exceptions that

Re: numbers, why?

2015-09-04 Thread dennis zhuang
Because the literal is readed as BigInt: user=> (class 6546546546546546546850348954895480584039545804 ) clojure.lang.BigInt 2015-09-04 22:48 GMT+08:00 Ali M : > why? > > > user=> (+ 6546546546546546546850348954895480584039545804 >

numbers, why?

2015-09-04 Thread Ali M
why? user=> (+ 6546546546546546546850348954895480584039545804 7548979534287548957345843954749357348757897) 6554095526080834095807694798850229941388303701N user=> (+ Long/MAX_VALUE Long/MAX_VALUE) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1501)

Re: Stuart Sierra's Component: retries & restarts in production

2015-09-04 Thread Dave Tenny
Caveat: my approach may have been all wrong. It's the first time I tried stuartsierra components. Frankly I'd have been happier with some CLOS objects and before and after methods, I'm still getting the hang of this clojure stuff. On Fri, Sep 4, 2015 at 7:57 AM, Dave Tenny

Re: numbers, why?

2015-09-04 Thread Ali M
Ok, so to give myself a safe and consistent way to reason about this the addition operator, and probably other arithmetic operator dont promote ouput so long+ long = long or exception long + bigint = bigint if i need outpout promition i can use +' hmmm, a bit tricky On Friday, September 4,

supporting metadata caret reader syntax with deftype

2015-09-04 Thread Gregg Reynolds
I have a deftype that supports with-meta, but I can't figure out how to support caret reader syntax. To support with-meta, I include a "meta" field and implement IObj methods "meta" and "withMeta". Seems to work just fine: (with-meta (entity-map [:A/B] {:a 1}) {:foo "metadata here"}) But

Re: Stuart Sierra's Component: retries & restarts in production

2015-09-04 Thread zcaudate
We make sure the components we build know how to restart themselves. This avoids the use of start/stop. -- 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

Re: some guidance sought

2015-09-04 Thread William la Forge
I've now finished an initial draft of AA Tree Map and it passes collection-check: (deftest tests (assert-map-like (create-aamap) gen-element gen-element ; {:base (sorted-map) :ordered? true} )) Unfortunately I had to comment

Re: supporting metadata caret reader syntax with deftype

2015-09-04 Thread Gregg Reynolds
On Fri, Sep 4, 2015 at 11:30 AM, Gregg Reynolds wrote: > I have a deftype that supports with-meta, but I can't figure out how to > support caret reader syntax. > > To support with-meta, I include a "meta" field and implement IObj methods > "meta" and "withMeta". Seems to

Re: some guidance sought

2015-09-04 Thread William la Forge
Fixed. I left out the n argument, which is not optional when specifying options: (deftest tests (assert-map-like 100 (create-aamap) gen-element gen-element {:base (sorted-map) :ordered? true})) Runs great. :-) On Friday, September 4, 2015 at 2:29:49 PM UTC-4, William la Forge

Re: Stuart Sierra's Component: retries & restarts in production

2015-09-04 Thread Josh Tilles
I just found the other resources from the Component wiki —it may be that something linked from there addresses exactly my situation. On Wednesday, September 2, 2015 at 8:44:07 PM UTC-4, jo...@signafire.com wrote: > > TLDR: how do you

Re: Stuart Sierra's Component: retries & restarts in production

2015-09-04 Thread James Reeves
On 3 September 2015 at 00:03, wrote: > > The HTTP connection may be closed at any time by the server; if that > happens, the app should persistently attempt to reconnect using an > exponential back-off pattern. In addition, if the app goes thirty seconds > without receiving

Re: numbers, why?

2015-09-04 Thread Mikera
You can use *unchecked-math* if you want unchecked arithmetic behaviour: => (set! *unchecked-math* true) true => (+ Long/MAX_VALUE Long/MAX_VALUE) -2 On Friday, 4 September 2015 23:04:27 UTC+8, Ali M wrote: > > Ok, so to give myself a safe and consistent way to reason about this > the addition

Re: some guidance sought

2015-09-04 Thread William la Forge
Here's the link to the test file: https://github.com/laforge49/aatree/blob/master/test/aatree/core_test.clj On Friday, September 4, 2015 at 2:26:52 PM UTC-4, William la Forge wrote: > > I've now finished an initial draft of AA Tree Map and it passes > collection-check: > > > (deftest tests >

Re: supporting metadata caret reader syntax with deftype

2015-09-04 Thread Gregg Reynolds
On Fri, Sep 4, 2015 at 7:51 PM, Mike Rodriguez wrote: > This has came up numerous times in other posts here. I can't hunt them > down currently but the quoted symbol issue you showed is just a > misunderstanding of how the reader macro for metadata works. > > Try (meta '^{:foo

Re: supporting metadata caret reader syntax with deftype

2015-09-04 Thread Mike Rodriguez
This has came up numerous times in other posts here. I can't hunt them down currently but the quoted symbol issue you showed is just a misunderstanding of how the reader macro for metadata works. Try (meta '^{:foo :bar} a) When you put the reader macro in front of the quote it is applied to