What does the ref *loaded-libs* do?

2018-01-29 Thread Raymond Huang
I was poking around `tools.namespace` and I found it interesting that the implementation of `remove-lib` is: ```(defn remove-lib "Remove lib's namespace and remove lib from the set of loaded libs." [lib] (remove-ns lib) (dosync (alter @#'clojure.core/*loaded-libs* disj lib))) ``` I’m wo

Re: [ANN] kibit 0.1.6 - featuring namespaced keyword support!

2017-07-26 Thread Raymond Huang
That is awesome! Looking forward to giving it a spin! Sent from my iPhone > On Jul 26, 2017, at 4:18 PM, Daniel Compton > wrote: > > Hi folks > > I'm excited to announce that kibit 0.1.6-beta1 has been released. > > Kibit is a static analysis tool that looks at your code and suggests ways it

Re: [ANN] CIDER 0.11 Released!

2016-03-03 Thread Raymond Huang
Congrats. This was a really awesome release. I really how jack-in dynamically adds the dependencies & plugins. No more out of sync issues :) On Thu, Mar 3, 2016 at 4:05 AM Phillip Lord wrote: > > This is a really fantastic release. I thought after the debugger, you > could probably just stop, b

Re: The middleware pattern

2015-10-02 Thread Raymond Huang
To follow up on middleware, this is a great picture to demonstrate it. 687474703a2f2f692e737461636b2e696d6775722e636f6d2f68623864422e706e67 On Fri, Oc

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

2015-09-03 Thread Raymond Huang
Another way I can think of decomposing this is to buffer/queue communication between your two components, i.e a core.async channel. This will decouple the two components allowing your MessageQueue to manage it's own reconnection. Interesting question about whether `start` calling `stop` is blasphe

Re: Filter predicates and side-effects

2015-09-02 Thread Raymond Huang
I believe the reason it's not recommended is because it returns a lazy chunked sequence. This means that it's not guaranteed to eagerly perform your side-effects, unless you wrap it in `doall`. On Wed, Sep 2, 2015 at 8:48 AM, James Elliott wrote: > I notice that the documentation for filter and

Boot-CLJ: How to daemonize a run script?

2015-08-22 Thread Raymond Huang
I've been checking out boot lately, and I want to run my application using a boot script. I have an aleph HTTP server started, but the main thread exits so my application never starts. What's the idiomatic way of preventing my main thread from exiting? How does generating an uberjar with lein

Re: What "Counted" interface is for?

2015-08-04 Thread Raymond Huang
That sounds about right. See https://github.com/clojure/clojure/blob/41af6b24dd5be8bd62dc2b463bc53b55e18cd1e5/src/jvm/clojure/lang/Counted.java On Tue, Aug 4, 2015 at 11:06 AM, Gary Verhaegen wrote: > I don't know of it is correct, but I also remember reading that Counted > was a "marker interf

Re: add-watch and writing data into a core.async channel

2015-07-31 Thread Raymond Huang
> [1 2] > [3 4] > [6 7] > [4 5] > > This is because the watches are dispatched in different threads. So just > be careful when doing this. > > Timothy > > On Fri, Jul 31, 2015 at 6:53 AM, Stefan Kamphausen > wrote: > >> >> On Friday, July 31, 201

add-watch and writing data into a core.async channel

2015-07-30 Thread Raymond Huang
I'd like to use `add-watch` on an atom which writes the data to a core.async channel. So far, I've come up with this, but it seems bad because I create a new go-routine everytime something happens. (add-watch ref watch-id #(go (a/>! user-changes %&))) This seems like a bad idea to me because I

Re: [BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-22 Thread Raymond Huang
Not trying to hijack this thread, @andy check out Differential Sync. On Sat, Feb 21, 2015, 4:36 PM Andy Fingerhut wrote: > Sorry if you've already explained this and I'm missing it, but for > example, suppose the current state on both sides is {:x {:y 1}}, and the > 'sender' wants to change to o