Fork me on GitHub
#cljs-dev
<
2021-08-07
>
namenu18:08:07

I really doubt myself but I think there's a memory leak in hash-map. The code is unchanged since 2012 so this may not be a problem, but filed an issue anyway. https://clojure.atlassian.net/browse/CLJS-3319

borkdude21:08:40

In SCI (a Clojure/Script) interpreter I have a similar implementation of vars as in CLJS, but they are part of the runtime (not compiled away). I'm running into a problem that when going through the var object, it seems you can't pass more than 20 arguments due to a limitation in protocols. I can reproduce this with the CLJS var impl (not only with planck, also with CLJS newest on Node.js)

$ plk
ClojureScript 1.10.597
cljs.user=> (defn foo [& args] (count args))
#'cljs.user/foo
cljs.user=> (#'foo 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6  7 8 9 1 2 3 4 5 1 2 3 4 5 6  7 8)
Execution error (Error) at (<cljs repl>:1).
Invalid arity: 31
cljs.user=> (foo 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6  7 8 9 1 2 3 4 5 1 2 3 4 5 6  7 8)
31

borkdude21:08:06

cljs.user=> (apply #'foo (range 20))
20
cljs.user=> (apply #'foo (range 21))
Execution error (Error) at (<cljs repl>:1).
20 is not ISeqable
cljs.user=> (apply #'foo (range 22))
Execution error (Error) at (<cljs repl>:1).
Invalid arity: 22