Fork me on GitHub

Hmm, I'll try and work up a minimal repro case


Does ClojureScript run the test suite on Windows?


I enabled :parallel-build and :aot-cache in a Windows CI run and it passed. This doesn't prove anything, really. Was hoping for an easy repro.


Yeah I think it's a tricky set of dependencies in a large project that will trigger it. Will try and work up a minimal case


hey folks, empty function returns nil for strings on clojure but raise an exception on cljs. is it intentional ?


I think that’s a possible enhancement for unification with JVM clojure. The docstring says it will return nil otherwise. e.g. (empty 1) also returns nil, while cljs throws.


I’ll report this then


I’m not a core cljs dev, so might want to check with @mfikes and @dnolen 🙂


There’s an open question in that ticket regarding extending to natives.


📣 hey core team, finally trying to categorize everything in cljs.core api docs—lemme know if I’m surfacing anything that shouldn’t be used or whatever: 📖


for 2974 we should probably just inline the cases like we do elsewhere


Good call! We can add this more complex logic while speeding things up for SpiderMonkey. For (empty [1 2 3]) speedups with that approach:

V8: 0.83
  SpiderMonkey: 1.81
JavaScriptCore: 1.03
       Nashorn: 1.16
    ChakraCore: 0.98
       GraalVM: 1.33


xposting from #clojurescript: has anyone looked into the performance of add-watch? I'm trying to vet it against using a general JS event emitter/observable. wondering if someone's already done the due-diligence


@lilactown no specific work has been done on add-watch but also no one has complain about it


makes sense. I know that, for instance, reagent implemented their own way of managing subscriptions to their own special atoms. I had this notion it was partially for perf reasons and was just wondering if a comparison already existed


I’m not an expert on it, but I think Reagent atoms add some additional semantics where they do something funky simply when dereferenced, something that regular atoms don’t do (even when you have a watch on it)


@lilactown Reagent atoms weren't for perf reasons

👍 4

@lilactown Looking at the source for add-watch, it's just making use of the IWatchable protocol, so performance is going to depend on the thing you're watching rather than add-watch itself


@mfikes yeah, derefing them also adds a subscription to their changes that does some magic to reactively kick off another render cycle for components that have deref'd it