Re: [ANN] clafka 0.1.0 - a clojure kafka client focusing on the SimpleConsumer and KafkaProducer.

2015-06-09 Thread Andrey Antukh
Great work! Thanks for sharing! On Tue, Jun 9, 2015 at 10:19 AM, dan.stone16...@gmail.com wrote: I am pleased to announce the release of the initial version of our new kafka library! I see this library as useful for people that want to... a. Read some data from their kafka logs worry free

Re: Actually using component.

2015-06-09 Thread Jeroen van Dijk
I think the most important rule when using component is to only use local state like Timothy stated, i.e. nothings gets def-ed. You could write an application that a -main function that starts the system and you would never need a global reference to the system. In practise however, you do make

[ANN] clafka 0.1.0 - a clojure kafka client focusing on the SimpleConsumer and KafkaProducer.

2015-06-09 Thread dan . stone16321
I am pleased to announce the release of the initial version of our new kafka library! I see this library as useful for people that want to... a. Read some data from their kafka logs worry free (no consumer groups, no state etc) b. Implement a new kind of consumer, as their needs are not met by

Re: I created a new macro if-let-all

2015-06-09 Thread crocket
Where does if-let-all serve people best? Can anyone help me find the right clojure project to contribute to? On Friday, June 5, 2015 at 2:44:22 PM UTC+9, crocket wrote: The macro below is called if-let-all. (defmacro if-let-all if-let-all evaluates every local binding sequentially and

Problem with loading protocols dynamically from checkouts

2015-06-09 Thread Timur
Hi everyone, I have a mutli-project set-up using Leiningen checkouts. I have a protocols project where I store all my needed protocols and another project depends on this project. I linked the project folder to the checkout folder of the project that depends on the protocols. However, when I

Where should 'if-let-all' macro go?

2015-06-09 Thread crocket
It evaluates true-case only if every local binding evaluates to true values. false-case has no access to local bindings. (defmacro if-let-all if-let-all evaluates every local binding sequentially and evaluates true-case only if every local binding is a truthy value. true-case has access to

Re: Actually using component.

2015-06-09 Thread Atamert Ölçgen
On Tue, Jun 9, 2015 at 6:12 AM, Timothy Baldridge tbaldri...@gmail.com wrote: Stuart addresses two anti-patterns in your PRs. Perhaps I can help explain them. Let's say we have a system that looks like this: (defrecord DBConnection []) (defrecord DBLayer [db-connection]) (defrecord

Re: [ANN] Onyx 0.6.0

2015-06-09 Thread Bruce Durling
Michael, Excellent news. Congrats to everyone working on it! cheers, Bruce On Tue, Jun 9, 2015 at 3:37 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: Congrats! On Tue, Jun 9, 2015 at 10:35 PM, Michael Drogalis madrush...@gmail.com wrote: I'm happy to announce that Onyx

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Andy Fingerhut
There are several 'utility' libraries for Clojure that may have something like this already, or their authors might be willing to add such a thing: https://github.com/Prismatic/plumbing https://github.com/amalloy/useful Andy On Tue, Jun 9, 2015 at 5:00 AM, crocket crockabisc...@gmail.com

[ANN] clasew 0.1.10

2015-06-09 Thread Frank Castellucci
https://github.com/FrankC01/clasew *clasew *- Clojure AppleScriptEngine Wrapper *Intent* - clasew provides an idiomatic Clojure wrapper for Java ScriptManager: specifically apple.AppleScriptManager, as well as providing scriptable applications HOF DSLs. Realizing that the audience for such

Re: [ANN] Onyx 0.6.0

2015-06-09 Thread Ambrose Bonnaire-Sergeant
Congrats! On Tue, Jun 9, 2015 at 10:35 PM, Michael Drogalis madrush...@gmail.com wrote: I'm happy to announce that Onyx 0.6.0 is officially out! Blog post: http://michaeldrogalis.github.io/jekyll/update/2015/06/08/Onyx-0.6.0:-Going-Faster.html GitHub: https://github.com/onyx-platform/onyx

[ANN] Onyx 0.6.0

2015-06-09 Thread Michael Drogalis
I'm happy to announce that Onyx 0.6.0 is officially out! Blog post: http://michaeldrogalis.github.io/jekyll/update/2015/06/08/Onyx-0.6.0:-Going-Faster.html GitHub: https://github.com/onyx-platform/onyx Website: www.onyxplatform.org Chat: https://gitter.im/onyx-platform Thanks to all the

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Jozef Wagner
Dunaj has support for multiple bindings in if-let since version 0.5. http://www.dunaj.org/dunaj.flow.api.html#if_let Related design page that discusses possible approaches is at https://github.com/dunaj-project/dunaj/wiki/Conditionals Jozef On Tuesday, June 9, 2015 at 4:00:35 PM UTC+2, Lars

Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
This might be blindingly obvious to some, but I can't find any discussion about it. Let's say I have code like the following: (def a (atom 1)) ... (swap! a inc) (swap! a dec) Is there any possibility of another thread seeing a=0? If not, what provides this guarantee? -- You received this

Re: Single-atom update ordering guarantees

2015-06-09 Thread Andy Fingerhut
I am not sure why Atamert says No. If the (swap! a inc) and (swap! a dec) are executed in different threads, and they can occur in either order because there is no synchronization between those threads that prevents one of the two possible orders from occurring, then another thread *could* see a

Re: Single-atom update ordering guarantees

2015-06-09 Thread Atamert Ölçgen
On Tue, Jun 9, 2015 at 7:30 PM, Michael Gardner gardne...@gmail.com wrote: This might be blindingly obvious to some, but I can't find any discussion about it. Let's say I have code like the following: (def a (atom 1)) ... (swap! a inc) (swap! a dec) Is there any possibility of another

[ANN] Satellite, Two Sigma's Monitoring, Alerting, and Self-Healing Application for Apache Mesos

2015-06-09 Thread sunil . abraham
We are pleased to announce that Two Sigma is open-sourcing Satellite, a Mesos monitoring and alerting application with self-healing capabilities. Satellite makes it easy to continuously monitor your cluster, automatically add and remove slaves, and alert you via email or PagerDuty if your

Re: [Job Spam] Looking for a clojure devs

2015-06-09 Thread Murtaza Husain
Hi, Thanks to everyone who showed interest and responded to the post, however the startup has already closed the positions and is no longer looking for devs. I would have liked to, but have not been able to respond to each one personally, thus sending in this reply. Thanks to everyone again !

Re: Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
I'm talking about a scenario where a single thread does inc, followed shortly by dec. Obviously from that thread's perspective, the value will never be zero, but what about as seen by other threads? My understanding of Java's memory model is that instructions within a single thread *can* get

Re: Single-atom update ordering guarantees

2015-06-09 Thread Andy Fingerhut
swap! is implemented using Java's AtomicReference class and its compareAndSet method. I haven't dug into the Java source code implementing that class, but you can read the Java documentation for all Atomic* Java classes here:

Re: Single-atom update ordering guarantees

2015-06-09 Thread Michael Gardner
Thanks. That does appear to provide the guarantee I was looking for. On Jun 9, 2015, at 12:14 PM, Andy Fingerhut andy.finger...@gmail.com wrote: swap! is implemented using Java's AtomicReference class and its compareAndSet method. I haven't dug into the Java source code implementing that

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Leon Grapenthin
At least based on my uses, I agree that this would likely bring the most use of the now unused binding space in cores if-let. I can't think of any useful alternatives. Syntactically though, one could worry that the additional bindings would be read as regular let bindings and worry about the

Re: Single-atom update ordering guarantees

2015-06-09 Thread Fluid Dynamics
On Tuesday, June 9, 2015 at 4:24:16 PM UTC-4, Michael Gardner wrote: Thanks. That does appear to provide the guarantee I was looking for. On Jun 9, 2015, at 12:14 PM, Andy Fingerhut andy.fi...@gmail.com javascript: wrote: swap! is implemented using Java's AtomicReference class and

Re: Actually using component.

2015-06-09 Thread James Reeves
On 9 June 2015 at 23:16, Dru Sellers d...@drusellers.com wrote: @James do you only have one component that has all of your routes? or do you have each component supply its own routes? If you imagine a component providing its own routes, I'd love to see a duct example with two routes set up.

Re: Actually using component.

2015-06-09 Thread Dru Sellers
@James do you only have one component that has all of your routes? or do you have each component supply its own routes? If you imagine a component providing its own routes, I'd love to see a duct example with two routes set up. I believe that would be multiple endpoint components. Looking at

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Fluid Dynamics
There's a variant of this in one of my projects as well. If this is in several utility libraries *and* half the world keeps Greenspunning versions of it in their own projects, then it might be something that belongs in core ... -- You received this message because you are subscribed to the

Re: About transients no longer being safe in 1.7-alpha2

2015-06-09 Thread Alex Miller
Yes -- 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 are moderated - please be patient with your first post. To unsubscribe from this group, send email to

Re: Prevayler in Clojure

2015-06-09 Thread Dennis van den Berg
Nice job, so much in a few lines of code. Thanks, Dennis Op zaterdag 30 mei 2015 22:58:23 UTC+2 schreef Klaus Wuestefeld: Prevalence is the fastest possible and third simplest ACID persistence technique, combining the two simplest ones. https://github.com/klauswuestefeld/prevayler-clj --

Re: PersistentTreeMap, seqFrom, subseq and range queries

2015-06-09 Thread Dennis van den Berg
I think the subset and submap would be a nice addition! Op maandag 15 februari 2010 16:23:22 UTC+1 schreef Rich Hickey: On Mon, Feb 15, 2010 at 8:45 AM, George . cloju...@gmail.com javascript: wrote: Currently, if you want to perform a range query on a sorted-seq (AKA PersistentTreeMap),

Re: Problem with loading protocols dynamically from checkouts

2015-06-09 Thread Stuart Sierra
Reloading a protocol definition invalidates any instances of objects which implement the protocol. This may be the problem you are seeing. After reloading a protocol definition, you must also reload any code with `deftype`, `defrecord`, or `reify` which implements the protocol, THEN

Re: Problem with loading protocols dynamically from checkouts

2015-06-09 Thread Timur
Thanks for the answer Stuart. I was receiving an error when I reload deftype, the error was saying that I cannot define a method of a protocol which is not defined in the protocol although I could even see the method in the protocol map. I just discovered the error: I forgot the :aot field

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Sean Corfield
On Jun 9, 2015, at 3:51 PM, Leon Grapenthin grapenthinl...@gmail.com wrote: Syntactically though, one could worry that the additional bindings would be read as regular let bindings and worry about the language clarity. One of the main points that I seem to recall from previous discussions has

reduce-kv and java.util.Map

2015-06-09 Thread Chen Guo
Hi all, Looking at IKVReduce I see it is only implemented for the clojure.lang data structures, whereas CollReduce is implemented in terms of Iterables. Is there a reason IKVReduce isn't extended to cover java.util.Map? It seems it would be natural to call .entrySet(), get an iterator, and

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Lars Andersen
I actually wish this was how the if-let macro in core worked. Once in a blue moon I end up writing nested if-let statements or an if-let with a nested let. Both of these cases look so ridiculous I often re-write the the code just avoid it. On Tuesday, June 9, 2015 at 2:00:53 PM UTC+2,

Re: Where should 'if-let-all' macro go?

2015-06-09 Thread Isaac Zeng
this if-let-all do not support destructure, I writed a improved https://gist.github.com/gfZeng/8e8e18f148d5742b064c On Tuesday, June 9, 2015 at 8:00:53 PM UTC+8, crocket wrote: It evaluates true-case only if every local binding evaluates to true values. false-case has no access to local