Re: [ANN] Prone: Exception/debugging middleware

2014-09-02 Thread László Török
Fantastic! 2014-09-02 5:35 GMT+01:00 Kurt Schrader kschra...@gmail.com: Outstanding work! Just plugged it locally and used it to debug a particularly hairy issue on my side. This is super useful. -Kurt On Mon, Sep 1, 2014 at 10:48 PM, James Reeves ja...@booleanknot.com wrote: This

Re: Using an atom for a caching map

2014-09-02 Thread Michał Marczyk
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

Re: Using an atom for a caching map

2014-09-02 Thread Marcus Magnusson
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 with

Re: Using an atom for a caching map

2014-09-02 Thread Daniel
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 key.

Re: [ANN] Gorilla REPL 0.3.3 - inline docs, CIDER compatibility

2014-09-02 Thread Jony Hudson
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 to

[ANN] Taoensso library updates / 2014 September

2014-09-02 Thread Peter Taoussanis
(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).*

Re: [ANN] Gorilla REPL 0.3.3 - inline docs, CIDER compatibility

2014-09-02 Thread Beau Fabry
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

How to use Java library from sources

2014-09-02 Thread Wilker
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

Re: How to use Java library from sources

2014-09-02 Thread adrian . medina
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

HTTP server that supports ring handlers, but asynchronously?

2014-09-02 Thread Laurens Van Houtven
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

Re: Useless Java error messages

2014-09-02 Thread John Gabriele
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

Re: HTTP server that supports ring handlers, but asynchronously?

2014-09-02 Thread James Reeves
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

Re: How to use Java library from sources

2014-09-02 Thread Jony Hudson
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:

core.async take behaviour

2014-09-02 Thread cig
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])) (!! (into []

Re: core.async take behaviour

2014-09-02 Thread Timothy Baldridge
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 clifford.goldb...@gmail.com wrote: Hi I was expecting the following example to park,

Re: Useless Java error messages

2014-09-02 Thread Beau Fabry
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 see that

Re: [ANN] Taoensso library updates / 2014 September

2014-09-02 Thread Sun Ning
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)*

Re: How to use Java library from sources

2014-09-02 Thread Wilker
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 jonyepsi...@gmail.com wrote: I think if you're going to distribute a Leiningen plugin then you'll either need to publish pecoff4j to

Re: How to use Java library from sources

2014-09-02 Thread Maksim Karandashov
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