This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # 100-days-of-code (12)
- # beginners (116)
- # calva (2)
- # cider (16)
- # cljdoc (5)
- # cljs-dev (26)
- # clojure (161)
- # clojure-italy (7)
- # clojure-nl (9)
- # clojure-spec (49)
- # clojure-uk (112)
- # clojurescript (50)
- # clojutre (4)
- # core-async (2)
- # cursive (4)
- # datomic (192)
- # emacs (10)
- # events (4)
- # figwheel-main (147)
- # fulcro (94)
- # graphql (5)
- # instaparse (1)
- # jobs-rus (1)
- # keechma (10)
- # leiningen (223)
- # luminus (3)
- # mount (23)
- # nrepl (8)
- # off-topic (44)
- # onyx (10)
- # pedestal (5)
- # re-frame (19)
- # reitit (8)
- # shadow-cljs (62)
- # uncomplicate (3)
Should I not be messing with an HTML table at all, and I should just be modifying the order of the data?
Hey, does anyone know if there's an equivelant of delay without the caching behavior?
i downloaded specter from github and there were java, cljc, and clj files. i didnt know where to put the java files
err, sorry, I might not be understanding you correctly. all you need to do is specify it as a dependency in your project.clj:
:dependencies [... [com.rpl/specter "1.1.1"] ...]
@idiomancy I'm not aware of a non-caching delay, but I suspect you could make your own fairly easily
Since this is not a macro, you'd have to pass a thunk as in
(defn non-caching-delay [f] (reify IDeref (-deref [_] (f))))
(def my-non-caching-delay (non-caching-delay (fn  ,,,)))
You could go farther and make a macro that builds the thunk for you, just like the
delay macro does.
From the bigger picture, it seems like you could just define a function and call it. All the above really buys you is the ability to use
Interesting problem. I suppose you have a large value you don't want to hold onto in a
delay or a value that otherwise can become stale.
java.util.concurrent.SynchronousQueue accomplishes the same (if you want interop and no dep)
Heh. I once asked for a napkin when in London. Same language, but different semantics.
well, since we're all here, does anyone want to help me polish this macro off?
(defmacro derefable [& body] `(reify IDeref (-deref [~(gensym)] ((fn  [email protected]))))) (derefable "hello") => ---- Compiler Warning on <cljs form> line:1 column:1 ---- Bad method signature in protocol implementation, clojure.lang.IDeref does not declare method called -deref 1 (derefable "hello") ^--- ---- Compiler Warning ----
@idiomancy You just need to qualify a couple of things:
(defmacro derefable [& body] `(reify cljs.core/IDeref (cljs.core/-deref [~(gensym)] ((fn  [email protected])))))
It is definitely OK. It is used in a few places in the shipping libs. Here is one example https://github.com/clojure/clojurescript/blob/1a155adb0984de26b9606d8aa7c0e1388567eb0b/src/main/cljs/cljs/spec/test/alpha.cljc#L145
You'll also see it if you do
(source simple-benchmark) for unused binding name in
hello, maybe someone could help me 😉 is there some alternative to aget? for e.x. (aget (aget (first (aget data "results")) "name") "first")
you can also do property access (for valid identifiers) with the
(. obj -prop) or
(.-prop obj) syntaxes
@puremonad do note that property access is NOT the same as aget. property access will get munged in advanced compilation unless you have externs defined for the object you are accessing
it's a tricky thing because it will work in development and then potentially fail in production if you're not careful
I had a brief look but I couldn’t find anything useful there. What’s your use case for Vue + CLJS? In my findings, I couldn’t find anything in Vue that transported over to CLJS.
The Vue template language gets directly translated to JS, so you can’t hook CLJS in there. The Vue “instances” rely on proxies etc so they won’t work with CLJS data structures. There is no custom event system like React has so no extra value there. In the end, you’d be using Vue only for the VDom implementation, which I haven’t compared to others yet.