Clojurians
#cljs-dev
<
2018-11-15
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

danielcompton00:11:07

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

danielcompton01:11:51

Does ClojureScript run the test suite on Windows?

mfikes02:11:48

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. https://ci.appveyor.com/project/mfikes/clojurescript/builds/20313492

danielcompton03:11:18

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

lxsameer11:11:45

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

borkdude11:11:57

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.

lxsameer11:11:47

I’ll report this then

borkdude11:11:09

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

mfikes13:11:45

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

shaunlebron14:11:49

:mega: 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: :book: http://cljs.github.io/api/#cljs.core

dnolen16:11:41

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

mfikes18:11:08

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

lilactown21:11:44

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

dnolen21:11:09

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

lilactown21:11:51

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

mfikes21:11:19

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)

dnolen21:11:24

@lilactown Reagent atoms weren't for perf reasons

jesse.wertheim22:11:02

@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

jesse.wertheim22:11:18

@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 https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.cljs#L142-L145