This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-01
Channels
- # beginners (10)
- # cljs-dev (33)
- # cljsjs (4)
- # cljsrn (12)
- # clojure (39)
- # clojure-belgium (2)
- # clojure-russia (80)
- # clojure-spec (9)
- # clojure-uk (6)
- # clojurescript (22)
- # core-async (141)
- # cursive (2)
- # datomic (20)
- # devops (1)
- # emacs (20)
- # hoplon (1)
- # jobs (3)
- # lambdaisland (12)
- # leiningen (3)
- # lumo (44)
- # onyx (2)
- # pedestal (1)
- # quil (1)
- # re-frame (9)
- # reagent (4)
- # robots (1)
- # rum (3)
- # spacemacs (5)
- # uncomplicate (80)
- # untangled (46)
- # yada (2)
@dnolen I’m seeing an issue where js->clj
doesn’t convert under Node.js for objects that are the result of JSON.parse
the problem is that they don’t pass this check: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L10185
I wonder if we need to change that check under *target* "nodejs"
a la https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L204
@anmonteiro is there a better way to check for Object in modern JS?
not that I know of
I’ll open a ticket and do some research
oh wow this is even weirder than I thought
I think js/Object
is different across V8 contexts
and identical?
fails because I’m moving the JSON.parse
d object across 2 contexts
@anmonteiro well all natives types are different across JS contexts
Yeah I guess not a bug after all
Just didn't realize it sooner that that was the problem
FWIW, another “meta” observation: :advanced
is probably still a useful thing for hybrid mobile apps for the time being.
React Native launch latency—from icon tap to UI active—is 3 seconds with :simple
, but 2 seconds with :advanced
on an iPad 2. My older Goby-based app (pre-React Native) has a 1-second launch latency with :advanced
so, a lot of that 2 seconds is not ClojureScript but React Native itself.
I think I've found a regression in 1.9.671:
(find (hash-map) 1)
fails with:
core.cljs:7536 Uncaught TypeError: Cannot read property 'inode_find' of null
at cljs.core.PersistentHashMap.cljs$core$IFind$_find$arity$2 (core.cljs:7536)
at Object.cljs$core$_find [as _find] (core.cljs:551)
at cljs$core$find (core.cljs:2246)
at core.cljs:6
although (find {} 1)
works fine. Shall I report an issue?Thanks @metametadata. I've filed https://dev.clojure.org/jira/browse/CLJS-2145
I believe fixed in master now w/ more tests. Good catch @metametadata
Messing around a little with aget
warning:
cljs.user=> (aget #js {:a 1} "a")
WARNING: cljs.core/aget, first argument must be an array and remaining arguments must be numbers, got [object string] instead. at line 1 <cljs repl>
1
It seems pretty straightforward to do. Added a patch for general feedback to https://dev.clojure.org/jira/browse/CLJS-2148 (just to ensure going in right direction)
Perhaps even such a warning could suggest goog.object/get
(or the variadic variant, based on argument count)