This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-18
Channels
- # beginners (13)
- # boot (2)
- # cider (5)
- # cljs-dev (47)
- # cljsrn (5)
- # clojure (34)
- # clojure-berlin (2)
- # clojure-russia (33)
- # clojure-serbia (10)
- # clojure-spec (24)
- # clojurebridge (1)
- # clojurescript (21)
- # code-reviews (8)
- # core-matrix (4)
- # datomic (11)
- # hoplon (1)
- # jobs (1)
- # leiningen (4)
- # lumo (4)
- # off-topic (12)
- # om (3)
- # parinfer (4)
- # pedestal (3)
- # proton (1)
- # reagent (3)
- # ring-swagger (2)
- # rum (2)
- # untangled (9)
- # vim (6)
@dnolen Note, I also change first
to -first
in to-array
, minor optimization. Not sure it matters a lot.
Ok, I thought I'd be safe since first
, if not natively implemented, calls seq
and then -first
, which we know we already did. But I'm not 100% sure.
if you use -foo
then everybody has to hunt around to figure out when it is or isn’t OK
Also, can I add an improved spread
that avoids calling next
twice? Just bind in a let
and re-use.
Until we have CI running on https://github.com/clojure/clojurescript, I’ll pull upstream changes into https://github.com/mfikes/clojurescript periodically. This will allow us to shake out any issues with running tests this way. You can see the latest building at https://travis-ci.org/mfikes/clojurescript
Hold off 2099, I need to move the let bindings which aren't needed in the "simple apply case"
I'm having trouble getting it to work with bootstrapped CLJS. I'm always getting
Can't take value of macro cljs.core/gen-apply-to-simple
gen-apply-to-simple already refers to: cljs.core/gen-apply-to-simple being replaced by: cljs.core$macros/gen-apply-to-simple at line
Benchmarks for 2099: https://gist.github.com/rauhs/b5b713f9cdecf351b1179e823f12164b
@rauh that’s nice, there’s always been a big perf gap between ClojureScript apply
and Clojure apply
and this seems like it significantly closes the gap.
@rauh I’ve left a comment on the ticket, apply-to-simple
is yucky and needs to private and have warning docstring
So I have this idea of --instead of calling first/next-- just dumping it all into an array first with reduce
and then dispatch with a simple case. Though, then the values would need to be plucked out of the array again. Could be faster. But I don't think I feel like doing this implementation right now 🙂
Note, I also messed with the bounded-count
stuff in the apply when calling variadic functions. Just some basic arithmetic, I hope that's ok.
something for later would be helper macros for this stuff to clean up the implementation and hide the names
FYI, because of this apply
there is now no calls to .call
of cljs data structures, this was the last bit of CLJS code that relied on it.
Ugh, I think my changes around bounded-count
might've been bad. Needs some testing/thought. What if mfa
was 3, previously the the count stopped right there and called the arity 3. Now I do (+ 4 (bounded-count some-neg-number ...))
which would be (+ 4 0)
and we call the 4th arity which might not exist. Going to bed now. Gonna think about this tomorrow.