This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-15
Channels
- # admin-announcements (1)
- # alda (12)
- # announcements (1)
- # beginners (5)
- # boot (241)
- # clara (2)
- # cljs-dev (7)
- # cljsrn (9)
- # clojure (54)
- # clojure-conj (7)
- # clojure-russia (12)
- # clojurescript (118)
- # cursive (11)
- # editors (3)
- # hoplon (58)
- # immutant (17)
- # off-topic (58)
- # om (1)
- # onyx (12)
- # re-frame (10)
- # reagent (8)
- # spacemacs (6)
super cool http://blog.fikesfarm.com/posts/2015-11-14-try-clojurescript-parallel-compilation.html
After a few years working on a compiler heavily based on immutability, David says, “I've got some time to kill. I know—I'll throw in a couple of fns to parallelize the whole shebang.” :)
@dnolen: what happens if eg there are 8 cores & 9 or more deps earlier than a common ns in the queue? Deadlock? Also, even if full deadlock doesn't occur there could be wasted opportunity for the blocked agents who could be working on ns further into the queue whose deps are already resolved.
@johanatan: can’t happen, already topologically sorted
as far as wasted opportunity yes this could be true, would need something that actually partitions distinct significant subtrees of work.
but my hunch is that it will probably be wash and improvements beyond this will be much more incremental.
in the end 30%-50% speed bump across a large spectrum of contemporary hardware for 20-30 lines of code is a clear victory
@dnolen: there may be a simple solution to the wasted opportunity tho: like a priority queue of sub trees
@johanatan: sure but I’m not gonna to work on this any more though It’s now clear where this logic can go and we’ll happily take enhancement patches.
(well not work on it beyond error reporting issues for the current implementation anyway)
to answer my question re: deep prop gets/sets: aget
and aset
do accept multiple levels. Unfortunately I could find nothing better than (aset "the" "props" (clj->js (merge (js->clj (aget "the" "props")) {:new :props})))
for doing the merge / property update/addition.
there's https://github.com/purnam/purnam if you need a lot of interop
@johanatan: aget
and aset
really isn’t for dealing with Objects, see goog.object
Can we assume that “public" functions in cljs.core which are not in clojure.core are not implementation details? I’m thinking particularly of random-uuid
. This function is cljs only and I’m not sure if it’s to be considered part of the public API?
Why do I get "goog.require could not find: cljs.core$macros" with :whitespace optimization, and not with :none? Also, I don't think I'm even using that namespace ...
@dnolen I know it’s public, that’s why I’m asking. I have previously considered all functions that exists both in clojure and cljs as set in stone (thanks to http://clojure.github.io/clojure/). Since cljs doesn’t have a separate api documentation it’s difficult to know what’s part of the public api and won’t change/be removed in future versions.
There’s an obvious advantage in having the two (clj and cljs) apis as much as possible the same.. so perhaps we can push for having random-uuid
in clojure.core as well?
@jonas: sure I would talk to @alexmiller about that
my suspicion is that the parallel stuff really takes off for bigger projects that have independent nses like that
@dnolen: Yes, my activity monitor shows 100% vs 2000%, so I think that there is about 20x the work being done… something fishy I’d like to understand...
there might also be some small heuristic to implement here that give more consistent behavior across a wide variety of project structures
still we have a nice clean way to introduce such enhancements with little affect on anything else
@dnolen: I tested with your “error handling” patch. My iOS project didn’t break when recompiled with it, and the fith-postulate test runs properly (at the same speed as previously). My CPU is actually running around 2200% and 2300%—its using all the cores so I want a 24x speedup. Gonna have to dig into that mystery.
@mfikes could you do me a favor and run lein cljsbuild once parallel
a second time (without clean
)?
$ time lein cljsbuild once parallel
Compiling ClojureScript...
real 0m8.770s
user 0m39.605s
sys 0m2.806s
@dnolen I'm aware of a couple of bugs related to caching ... but not excatly sure how/where to report them
With debug-prn I can see that it plows through blocks of 20 or so namespaces at a time owing to them all being the same size. This gist shows that behavior, with me manually adding newlines between each chunk or wave: https://gist.github.com/mfikes/32efc0c717b141b6ea43
yeah the issue is that it currently tries to determine whether a recompile is needed based off of one timestamp
(reposting from the clojure channel, since there are more clojurescript peeps here) Hi. I'd like to deploy a reagent project to tomcat. I created a "lein new reagent myapp" project, then I added the lein-ring plugin. Then I "uberwar" and deploy. But I get the "ClojureScript has not been compiled!" message.... despite it being compiled during the "lein ring uberwar" What am I missing?
I have no idea where the bugs are just how to trigger them (since I fixed it in shadow-build) which was using the same logic requires-compilation?
or requires-analysis?
https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L1509
Hey, anyone knows why I get "goog.require could not find cljs.core$macros" if I have [cljs.js :refer [eval js-eval empty-state]] in my ns require? Works with :none optimizations, but fails with :whitespace (compiles without warnings, but I get the error message when loading the document).
hey, anybody know if it’s possible to get figwheel to refresh when i change a non-cljs/css file? i am editing a plain js file and it would be awesome to have my reload-fn triggered on changes
How do I get a CLJS repl running in cursive? I don't need any reloading into a browser, I just want to be able to evaluate code for library development. Maybe this is a question for #C0744GXCJ... sorry just noticed that channel
thank you @danielcompton. figured it out, am thoroughly enjoying it