Idiomatic stage refreshes

2015-03-24 Thread Sean Inglis
I'm trying to get to grips with requesting and caching progressively more detailed information from a data source, and I'd appreciate some pointers on idiomatic ways to achieve this in Clojure. The current implementation is in Angular, and the actual implementation would be in ClojureScript, bu

[ANN][book] Clojure Reactive Programming

2015-03-24 Thread Leonardo Borges
Hi all, Some of you may know that I have been working on a book for the better part of last year. I'm happy to announce it has finally been published! Here's the link: https://www.packtpub.com/web-development/clojure-reactive-programming I hope you find it useful! I've had a great time putting i

[ANN][book] Clojure Reactive Programming

2015-03-24 Thread Mike Haney
This is the first new Clojure book that has looked interesting to me in some time. I just picked it up, I'll let you know my thoughts when I've had time to read through it. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: Current state of automatic generation of externs file for CLJS Advanced Compilation?

2015-03-24 Thread Nathan B
We use https://github.com/ejlo/lein-externs for this and it seems to work pretty well for our purposes. On Monday, March 23, 2015 at 10:42:40 PM UTC-4, james borden wrote: > > Is there a way to automatically generate externs files for js libraries > for use with the cljs advanced compilation mod

Re: Current state of automatic generation of externs file for CLJS Advanced Compilation?

2015-03-24 Thread David Nolen
This is part of the proposed GSoC ClojureScript & Closure project so we're likely to see support for this by sometime this fall. Dvid On Mon, Mar 23, 2015 at 10:42 PM, james borden wrote: > Is there a way to automatically generate externs files for js libraries > for use with the cljs advanced

Re: [GSoC] Typed Overtone proposal

2015-03-24 Thread Christopher Medrela
I've updated my proposal. The main changes are in this section [1]. [1] https://gist.github.com/chrismedrela/7fe431fa5189c2c64bd8#porting-overtone -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegrou

Re: Packaging JNI extensions

2015-03-24 Thread Jason Felice
I'm a little weirded out by writing binary code out of a jar to a temporary directory; on the other hand, this does improve distribution, doesn't it? I imagine all sorts of potential problems, though: 1) multiple copies of the program overwrite the same file (if a predictable name is used), and als

Change data using seesaw/table or Jtable

2015-03-24 Thread Soham Jarhad
I have list of persistent hash-map. I want to write function such that user can input in UI (using seesaw/table or swing Jtable) . (Set some column input as checkbox) And function Returns entered value in list of hash-maps. Thanks. -- You received this message because you are subscribed to the G

Re: Packaging JNI extensions

2015-03-24 Thread Fluid Dynamics
On Tuesday, March 24, 2015 at 1:46:23 PM UTC-4, Jason Felice wrote: > > I'm a little weirded out by writing binary code out of a jar to a > temporary directory; on the other hand, this does improve distribution, > doesn't it? I imagine all sorts of potential problems, though: 1) multiple > copi

Re: [ANN][book] Clojure Reactive Programming

2015-03-24 Thread Shaun Mahood
Congratulations, it looks really interesting. Registered on Packtpub to buy it and they sent me a 50% off any eBook promo, plus I just got my first Re-Frame application started this morning. I think you guys must all be in on a big conspiracy to make me learn something new! On Tuesday, March

Re: [ANN][book] Clojure Reactive Programming

2015-03-24 Thread Shahrdad Shadab
Awesome! It was about the time that someone shows the power of clojure in reactive programming (and in particular core async) to the practitioners that use Scala / AKKA for orchestration. I personally work in a company that some ignorant architect decided to Java8 + Akka + play's promise facilit

[ANN] Synthread with Clojurescript support

2015-03-24 Thread myguidingstar
Hi all, I've just ported this very interesting library to Clojurescript (and Boot build tool, too) Hope you all enjoy it! https://github.com/myguidingstar/synthread -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: [GSoC] Typed Overtone proposal

2015-03-24 Thread atucker
Best of luck with your proposal! The main part of my proposal is porting Overtone, that is type checking it > using core.typed, which is a great optional type system with stuff like > dependent types built in > This caught my eye. Does core.typed support dependent types? I might start lookin

Re: [GSoC] Typed Overtone proposal

2015-03-24 Thread Ambrose Bonnaire-Sergeant
core.typed supports a restricted form of dependent types via occurrence typing. Refinement types will also be coming later this year. See some examples here . Thanks, Ambrose On Tue, Mar 24, 2015 at 4:34 PM, atucker wrote: > Best of lu

Re: [GSoC] Typed Overtone proposal

2015-03-24 Thread Ambrose Bonnaire-Sergeant
Try them out here . Thanks, Ambrose On Tue, Mar 24, 2015 at 4:40 PM, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > core.typed supports a restricted form of dependent types via occurrence > typing. Refinement types will also be > comin

Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Sven Richter
Hi, I wrote a function to trackdown a path in a vector containing nested maps: (defn get-files-from-folder-path [ffs folder-path] (filter #(= :file (:type %)) (loop [tree-path-position 0 acc [] fof ffs] (let [folder (first (filter #(and

Given a list of maps, produce a sublist having distinct values for one key

2015-03-24 Thread Simon Brooke
I'm rewriting a very odd e-commerce website I first wrote in 1996, for a friend. The website features categories, which are supposed to be arranged into an acyclic directed graph (actually there are currently cycles in the graph, but there shouldn't be, and that is not the problem I'm trying to

Re: Given a list of maps, produce a sublist having distinct values for one key

2015-03-24 Thread Ben Wolfson
why not just accumulate the interested customers in a set rather than a seq in the first place? On Tue, Mar 24, 2015 at 2:50 PM, Simon Brooke wrote: > I'm rewriting a very odd e-commerce website I first wrote in 1996, for a > friend. > > The website features categories, which are supposed to be

Re: Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Francis Avila
Separate out traversal from selection to make this clearer. We make a generic traversal function get-in-via. It accepts a via function which takes the current result and some value which determines the next result, and returns the next result. (defn get-in-via [m via ks] (reduce (fn [m' k] (v

Re: Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Francis Avila
Notice that get-in-via is simply reduce: (defn get-in-via [m via ks] (reduce (fn [m' k] (via m' k)) m ks)) Same as: (defn get-in-via [m via ks] (reduce via m ks)) Same as: (reduce via m ks) So once you write your "step" function, traversal is taken care of by the reduction. On Tues

Re: Kwargs vs explicit parameter map for APIs?

2015-03-24 Thread Marcus Magnusson
How come this is so debated, but normal variadic functions are not? Is it only because there's nothing equivalent to apply for kwarg functions? Would it really be such a huge addition to clojure.core to add a simple mapply function, especially given that the core API have kwarg functions? (this

Eclipse Public License

2015-03-24 Thread Mike Milinkovich
I just wanted to make people here aware that the Eclipse community is discussing revising the Eclipse Public License. As the Clojure community makes use of the EPL, some folks may be interested in the discussion. Please see the mail archives at https://dev.eclipse.org/mailman/listinfo/epl-discu

Eclipse Public License

2015-03-24 Thread Alex Miller
Thanks Mike! -- 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 e

[ANN] trapperkeeper-webserver-jetty9 v1.3.0

2015-03-24 Thread Jeremy Barlow
Hi! Just wanted to let everyone know that we recently released a new version of trapperkeeper-webserver-jetty9 to clojars. The new version is v1.3.0. https://clojars.org/puppetlabs/trapperkeeper-webserver-jetty9 In this release, we updated our dependency on Jetty to version v.9.2.10, largely

Re: Kwargs vs explicit parameter map for APIs?

2015-03-24 Thread Leon Grapenthin
I guess with "mapply" using kwarg defined functions in compositional context would be helpful. It would have to be implemented as a method of the function object itself so that the map can be passed directly without any transformation. On Tuesday, March 24, 2015 at 11:03:17 PM UTC+1, Marcus Ma

Best way to test multiple implementations of a protocol?

2015-03-24 Thread Leif
If I have a protocol that supposedly satisfies some constraints, and multiple implementations that supposedly implement the protocol, what is the best way to test them all? A minimal example is here: https://gist.github.com/leifp/bf5c74eea98026329a76 This question on SO is basically the same

map-in

2015-03-24 Thread Steve Ashton
Is there anything for map which operates like update-in and assoc-in, where we can call a function with the value looked up in a nested structure? What I've come up with: (defn map-in "Returns a lazy sequence consisting of the results of calling map on coll, for each value in the coll, extr

Clojure Culture Question on TDD

2015-03-24 Thread Daniel Hinojosa
What is TDD culture in Clojure like? Is it strong in the community and other projects? I am aware of Rich Hickey's guard rail analogy. Did that have an effect on how Clojurists view TDD or testing in general? Just asking for my own personal research. -- You received this message because you a

Re: Clojure Culture Question on TDD

2015-03-24 Thread Michael Blume
It is rare to see an open source clojure project without tests. Clojure itself is pretty thoroughly tested, as is leiningen. I don't know about test-first. I think it's actually more common to see "REPL-first" -- build something through exploration in the REPL and then turn whatever you did in the

Re: Clojure Culture Question on TDD

2015-03-24 Thread Mikera
Guess this is somewhat a personal perspective, but here are some thoughts on testing in Clojure: - People do a lot of automated testing in general and there are some great testing libraries available (e.g. test.check) - People tend not to strictly follow "Test Driven Development" practices. e.g

Re: map-in

2015-03-24 Thread Francis Avila
The reduce in your mapped function is already implemented by get-in. Other possible implementations using get-in: (defn map-in [coll ks f & args] (->> coll (map #(get-in % ks)) (map #(apply f % args Or: (defn map-in [coll ks f & args] (map #(apply f (get-in % ks) args) col

is ok use a blocking get

2015-03-24 Thread coco
Hi guys...I've a code similar to this: (defn user-data [] (!/go (let [a (!/http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from i

Re: Use reduce or something appropriate instead of loop / recur

2015-03-24 Thread Sven Richter
Thank you very much. I had the feeling I should reduce over the tree-path, but was not able to come up with something good like you did. Best Regards, Sven Am Dienstag, 24. März 2015 22:58:18 UTC+1 schrieb Francis Avila: > > Notice that get-in-via is simply reduce: > > (defn get-in-via [m via ks