robert-hooke icon indicating copy to clipboard operation
robert-hooke copied to clipboard

Hooke your Clojure functions!

Results 9 robert-hooke issues
Sort by recently updated
recently updated
newest added

It was possible for two threads to interleave their execution in such a way that the map of hooks in the ::hooks metadata would be missing one of the hooks....

I expected hooks to wrap each other (i.e., to be executed in the opposite order that they were added). They don't - because they're added to a hash-map, they are...

Hi, There seems to be a small issue with vars in clojure.core: (defn ping [f & args](println "ping" f args) (apply f args)) (add-hook #'+ #'ping) (+ 1 1) ;the...

Why not just use `hooks` instead of `#'hooks`? It's likely that the `hooks` function will change dynamically. ``` (defmacro with-hooks-disabled [f & body] `(do (when-not (#'hooks (var ~f)) (throw (Exception....

Isn't `clear-hooks` redundant? Eventually all hooks are cleared anyways. ``` (defn- clear-hook-mechanism [target-var] (alter-var-root target-var (constantly (original target-var)))) (defn clear-hooks "Remove all hooks from target-var." [target-var] (when-let [hooks (hooks target-var)]...

Added "with-hooks-disabled-1" macro that doesn't throw an exception when there is no hooks with function. Fixed issue 12. https://github.com/technomancy/robert-hooke/issues/12

This originally started because I introduced Dire to a project, which had an out of date version of robert-hooke. But I updated the dependencies, which I though would fix the...

If you add too many hooks to a fn, you will unsurprisingly encounter a `java.lang.StackOverflowError`. These calls appear between each fn invocation: ``` clojure.lang.AFn.applyToHelper (AFn.java:167) clojure.lang.AFn.applyTo (AFn.java:151) clojure.core$apply.invoke (core.clj:619) robert.hooke$compose_hooks$fn__1381.doInvoke...

When a function doesn't have hooks,the `with-hooks-disabled` macro will throw an exception. I think it should not throw this exception,i don't care if the function has hooks, maybe i want...