This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-26
Channels
- # announcements (7)
- # aws (1)
- # babashka (15)
- # beginners (144)
- # calva (8)
- # chlorine-clover (15)
- # clara (4)
- # clojure (65)
- # clojure-europe (131)
- # clojure-france (1)
- # clojure-nl (6)
- # clojure-nlp (3)
- # clojure-spec (10)
- # clojure-uk (52)
- # clojuredesign-podcast (2)
- # clojurescript (28)
- # cryogen (1)
- # datomic (17)
- # events (2)
- # figwheel-main (2)
- # fulcro (8)
- # hugsql (2)
- # jackdaw (4)
- # jobs (1)
- # leiningen (8)
- # lumo (1)
- # malli (4)
- # off-topic (23)
- # parinfer (3)
- # pathom (3)
- # pedestal (5)
- # re-frame (9)
- # reagent (26)
- # reitit (13)
- # reveal (25)
- # shadow-cljs (45)
- # spacemacs (7)
- # sql (7)
- # tools-deps (40)
- # vrac (2)
- # xtdb (22)
Hey, I noticed the clojurescript compiler seems to compile to uses of document.write
. Is there any particular reason it does that over something like appendChild
?
The code that does it is in cljs.closure/output-main-file
, so it has nothing to do with Figwheel, I think.
well technically its not even CLJS. it is the debug load mechanism of the closure library. CLJS just adopted that.
(When the build is optimized, I'm getting an error saying a.aZa is not a function
, which I suspect means something that should be an extern is getting optimized, but obviously I have no idea what a.aZa
is so its kind of hard to debug that without figuring that out first...
you can set :pseudo-names true
in your compiler options. that will make the name recognizable
Also the advanced optimizations compile size is 7 MB, while the simple one is 10 MB, so ya. :)
Which Makes sense. It looks like Object.Modal
is making it into the inferred_exports.js
file, but not Object.Modal.Header
Hi. Could somebody please point me to benchmark json vs transit-cljs? I’m trying to find it without any success
what would you want to benchmark? it is always going to be slower given that it is built on top of json and uses persistent collections
@karol.wojcik there’s https://swannodette.github.io/2014/07/23/a-closer-look-at-transit/ and it links to http://jsperf.com/json-vs-transit/2 (archive link https://web.archive.org/web/20160310101542/http://jsperf.com/json-vs-transit/2 doens’t seem to useful?). @thheller I do remember @dnolen talking about it being faster than json in some cases due to compression.
there were some interesting moments in the past where I think it was faster on V8 or something, but not generally true
yeah comparing to JSON is not very interesting since we don't want to work with JS objects/strings. when we actually want CLJS datastructures then the transit overhead is very minimal and well worth it. also a whole lot faster than cljs.reader
. the compression is nice too. overall I don't see an argument against transit 😉
Anyone have a link to some good example projects that use datascript for the application state?
Can anyone point me to any docs on Clojurescript's core.async support (given its a subset of Clojure's)?
I think the only difference is you can't use blocking calls (double exclamation mark) due to JS event loop. https://cljdoc.org/d/org.clojure/core.async/0.7.559/api/cljs.core.async