Fork me on GitHub
#cljs-dev
<
2016-06-02
>
mfikes02:06:46

instrument and unstrument always return the var in Clojure. In ClojureScript, calling instrument on an already-instrumented var returns nil. The docstring doesn’t seem to specify what should occur, but perhaps ClojureScript could be made to behave like Clojure. Can do a JIRA if there’s interest.

dnolen02:06:15

@mfikes: I'm OK with that

rohit12:06:35

@dnolen: i’ve applied Rich’s improvements for seq destructuring to clojurescript. Jira ticket with patch is here: http://dev.clojure.org/jira/browse/CLJS-1662

dnolen12:06:59

@rohit sweet thanks!

dnolen19:06:35

@rohit if you have a second can you fix your benchmark in the patch

dnolen19:06:07

(if xs …) should be (if-not (nil? xs) …) and rerun and put the updated numbers in

dnolen19:06:18

I think we should be seeing much better than only 2X

rohit19:06:54

@dnolen: I'll do that. Cheers!

dnolen19:06:10

if Clojure is seeing 10X, I would be suprised if we can't at least get 5X as well

dnolen19:06:08

to explain, (if xs …) is a slow test in ClojureScript due to the need to check for 0 and the blank string

dnolen19:06:10

ah JavaScript

rohit19:06:18

Ah. Thanks for the tip!

dnolen19:06:29

not a big deal for most code, but for understanding peak perf, it matters

rohit20:06:22

@dnolen: the perf improvement is there but somehow I am not getting the improvement you are expecting. So for v8 and spidermoney the perf is about the same. For JSC, it improves from 1.4x to 2.2x

dnolen20:06:25

@rohit JSC is looking good

dnolen20:06:43

we may not be able to achieve Clojure’s gains without some more fiddling

dnolen20:06:59

due to protocol indirection

rohit20:06:08

cool. i’ll update the patch and the benchmarks on the jira ticket.

rohit20:06:10

thanks for the guidance. 🙏

dnolen20:06:29

@rohit I noticed you didn’t have sufficient JIRA privileges to do everything on that ticket, fixed now

rohit20:06:09

excellent. thanks!

rohit20:06:20

@dnolen: I’m trying to shepherd this jira ticket as well: http://dev.clojure.org/jira/browse/CLJS-1650. its a very minor fix. if you could have a look, that’d be great.

dnolen20:06:36

@rohit hrm, looks OK though we’re missing out on a big optimization here with read-delimited-list

dnolen20:06:01

we could be reading into an array and calling the super fast array adopting ctors instead of using apply which is crazy slow

rohit20:06:34

i’ll definitely give it a shot. cheers!

dnolen20:06:02

@rohit: I would do that in separate patch though, this one is OK

rohit20:06:35

@dnolen: just got what you meant. makes sense! 😊

darwin21:06:04

just updated to Dirac to 1.9.14, found a tiny regression: (doc filter) in REPL prints “Spec” with empty info, I assume this should not be printed if given fn does not have spec attached https://travis-ci.org/binaryage/dirac/builds/134871220#L924

mfikes21:06:00

@darwin I noticed that someone mentioned this to Alex and he said it will be fixed in Clojure. Presumably changes in Clojure will somehow make their way to ClojureScript over time.

dnolen22:06:50

sometimes working on the ClojureScript compiler is bananas

dnolen23:06:16

and sometimes the flexibility of JavaScript comes to rescue

dnolen23:06:21

feel free to install master and check it out

dnolen23:06:27

planning on cutting a release of master tomorrow

richiardiandrea23:06:52

wow didn't know it was possible to extend objects like this

dnolen23:06:42

@mfikes not sure if you have any time tomorrow, but I noticed that multi-arity fns don’t return vars

dnolen23:06:50

not a big deal but I thought you might be better person to look at that one

dnolen23:06:39

@darwin fix in master thanks

darwin23:06:06

thanks, testing master...

darwin23:06:56

btw. I wonder why compilation caches do not get invalidated when I change clojurescript version in my lein dependencies, got bitten by this several times

mfikes23:06:37

@dnolen: Yes, I’ll take a look. Assigned http://dev.clojure.org/jira/browse/CLJS-1611 to me just now.

mfikes23:06:27

I’ll also see if I can fix a similar case: (defn f [& r])

darwin23:06:34

confirmed, the unwanted “Spec” printing is fixed in master