java.util.concurrent.ConcurrentHashMap has a putIfAbsent method that
could be used with delays to support this use case with a no
recomputation guarantee:
(def chm (java.util.concurrent.ConcurrentHashMap.))
;; this will work as expected whether chm has a value for :foo or not
(let [d (delay (+ 1
Michał, that's quite a bit more straightforward, nice :) Also made me
realize that I should've used delays in synced-memoize.
Den tisdagen den 2:e september 2014 kl. 10:09:47 UTC+2 skrev Michał Marczyk:
>
> java.util.concurrent.ConcurrentHashMap has a putIfAbsent method that
> could be used wi
If the values in the map don't change then why not just drop the map?
Implement the map as a function and memoize it eg (def f (memoize (fn [k]
(calc-value k
On Saturday, August 30, 2014 12:27:05 AM UTC-5, Colin Fleming wrote:
>
> Hi all,
>
> I want to use a map to cache values based on a k
On Tuesday, 2 September 2014 01:36:49 UTC+1, Beau Fabry wrote:
> Just a little bit of showing off of the previous post :-)
> http://i.imgur.com/zpfP9Ja.png
>
Nice! Would love to hear more about how you use it. I've only tinkered with
Hadoop locally, so I'm very fuzzy on the concepts - you need
(All new releases are now on BreakVersioning,
https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md).
*Sente - v1.0.0 / 2014 Sep 2 (today)*
*==*
*Realtime web comms for Clojure/Script (think Socket.IO but with Transit &
core.async).*
https://github
A client library may be another option, I haven't looked into it. Off the
top of my head I doubt the cascalog code distribution for the m/r jobs
would work with any clients. This is akin to deploying new code to run on
the cluster, in this case via a repl, so I don't think any existing API is
g
Hello,
I'm trying to use this Java library on my project:
https://github.com/kichik/pecoff4j
But I'm still very new to the whole ecosystem, I was looking for some way
to first convert this to a jar, and then to load this jar into my Leiningen
project, I found a few posts on internet like this one
If you can't figure out how to build the JAR, you can try copying the Java
source code directly into your Clojure project. Leiningen allows you to
specify :java-source-paths in your project.clj, as seen here
(https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L276).
Then yo
Hi,
I'm writing a pretty simple HTTPS API that, when you make a request to it,
it makes a bunch of requests on your behalf, and eventually reports success
or failure. Because it makes many requests with a bunch of interaction
between them, I'd really like to use core.async. Internally (that is
On Monday, September 1, 2014 7:24:54 PM UTC-4, Beau Fabry wrote:
>
> The pretty-errors leiningen plugin might be worth a look
>
>
Hm... I don't see that particular plug-in in the [main lein plug-in
list](https://github.com/technomancy/leiningen/wiki/Plugins).
Do you mean [clj-stacktrace](https://
Ring uses blocking I/O by default, because that's often sufficient for most
web servers, and is generally easier to reason about. HTTP works best when
the response is returned ASAP, which means blocking I/O typically isn't
much of a bottleneck.
However, since Ring 1.2, all of the standard middlewa
I think if you're going to distribute a Leiningen plugin then you'll either
need to publish pecoff4j to maven/clojars, or include the source in your
build.
Jony
On Tuesday, 2 September 2014 16:07:32 UTC+1, Wilker wrote:
>
> Hello,
>
> I'm trying to use this Java library on my project:
> http
Hi
I was expecting the following example to park, waiting for the 'out'
channel to be cleared. Could anybody explain why 'take' does not
park when the output buffer size is smaller than the number of entries
being taken from the input channel?
(def from (to-chan [1 2 3 4 5 6 7]))
( [1 2 3 4]
It's because into is pulling items as fast as it can from take. Sure the
buffer might get full but then into takes another value allowing take to
continue.
Timothy
On Tue, Sep 2, 2014 at 1:48 PM, cig wrote:
> Hi
>
> I was expecting the following example to park, waiting for the 'out'
> channel
apologies, not a leiningen plugin. https://github.com/AvisoNovate/pretty
On Wednesday, September 3, 2014 2:17:21 AM UTC+10, John Gabriele wrote:
>
> On Monday, September 1, 2014 7:24:54 PM UTC-4, Beau Fabry wrote:
>>
>> The pretty-errors leiningen plugin might be worth a look
>>
>>
> Hm... I don't
Good job! I will adapt Nippy 2.7.0 in my projects soon.
On 09/02/2014 10:28 PM, Peter Taoussanis wrote:
(All new releases are now on BreakVersioning,
https://github.com/ptaoussanis/encore/blob/master/BREAK-VERSIONING.md).
*Sente - v1.0.0 / 2014 Sep 2 (today)*
*=
Thanks guys, I'll try it out :)
---
Wilker Lúcio
http://about.me/wilkerlucio/bio
Woboinc Consultant
+55 81 82556600
On Tue, Sep 2, 2014 at 2:03 PM, Jony Hudson wrote:
> I think if you're going to distribute a Leiningen plugin then you'll
> either need to publish pecoff4j to maven/clojars, or i
The best way: Write maven pom.xml for your Java project for automatically
putting it to maven repo (local or not).
But it not always possible.
I think that the good way is it packaging extern Java code to JAR and
putting it to local repo.
You can do it easly with some IDE (I prefer IntelliJ IDEA
Thanks Timothy, that makes sense.
A follow on question if you don't mind.
I would like to 'take' n items off of a channel, but wait until n items are
available rather than eagerly returning the way take does. Do you have any
ideas on how
I could achieve this?
On Tuesday, 2 September 2014 22:23
19 matches
Mail list logo