This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-17
Channels
- # admin-announcements (4)
- # beginners (21)
- # boot (37)
- # cider (41)
- # cljs-dev (3)
- # cljsjs (11)
- # cljsrn (4)
- # clojure (31)
- # clojure-austin (21)
- # clojure-belgium (30)
- # clojure-canada (1)
- # clojure-dusseldorf (2)
- # clojure-poland (7)
- # clojure-russia (20)
- # clojure-taiwan (1)
- # clojure-uk (45)
- # clojurescript (90)
- # core-async (8)
- # cursive (4)
- # data-science (1)
- # datomic (5)
- # dirac (6)
- # docker (1)
- # emacs (8)
- # hoplon (102)
- # ldnproclodo (2)
- # lein-figwheel (3)
- # leiningen (13)
- # off-topic (9)
- # om (54)
- # onyx (4)
- # other-languages (101)
- # pedestal (8)
- # planck (2)
- # protorepl (1)
- # re-frame (15)
- # reagent (13)
- # spacemacs (4)
- # untangled (126)
- # yada (4)
yea I've come across that myself multiple times
@dimiter: I found an aget-in useful as well
Has anyone here tried to analyze the render calls of a component tree in reagent/om
Id like to be able to create a visualization of how the component tree is re-rendering after a change for debugging purposes
kind of asking where I could start I suppose š
@pataprogramming @mvaline: writing cljs without knowing much about underlying JS seems scaryāusing JS libs in that condition seems really risky? I guess it depends on the libāreact seems pretty completely wrapped with re-frame/reagent, so reading its docs might be sufficient (e.g., I've never written a JS react app, but made re-frame apps). I did use d3.js extensively in JS before cljs, so I should probably just break down and learn how to use d3 from cljs.
does that show the render cycle and life cycles?
Not sure, but in any case, you shouldnāt be too worried about performance when re-rendering from the root.
you dont really need to use d3 from cljs aside from the different syntax right now @fasiha
In my reagent apps I completely differ to d3
I just have "container" components wrapping coordination
and everything else ends up being in the component-did-update lifecycle
React does a pretty great job of only modifying the parts of the DOM that need changing.
I dont see a difference from using d3 in js and cljs is what I'm trying to say I guess
Good to know @sbmitchell! That's great to hear it's not a big baroque production. I'm rendering map-oriented geoJSON data to SVG "manually" (i.e., no d3/SVG libs), and it works fine now, but eventually I'll want to use d3 for clipping and performance.
yea I clipped d3 in some of our graphic components like a gauge, sparkline, chart, pie-chart
its just straight svg
@sbmitchell: You might want to take a look at https://github.com/circleci/frontend/blob/master/src-cljs/frontend/instrumentation.cljs That has a pretty good start.
but for something like a force directed graph..there is no way Im figuring that out in svg over a day
thanks @dimiter interesting
I guess Im a little confused as to what I am wrapping
I mean this looks like you need to wrap specific components to get the stats per component
what id prefer is a monkeypatch to turn on during dev mode or something that looks at the render queue or something
for everything~
@dimiter: not sure how I never knew about react dev tools...seems to be quite useful š
Thanks for the discussion on d3/cljs...it's useful. I know I'll be limited in how far I can take this without actually figuring out the JS layer, but I'm trying to skunkworks it as far as possible before the "real" JS devs get involved.
@pataprogramming: anyone considering using Reagent
and D3
should read the following, taking particular note of the links at the bottom of the page (to @zachcp's D3 specific explanations and examples):
https://github.com/Day8/re-frame/wiki/Using-Stateful-JS-Components
Clojurescript maps and vectors are different from Javascript objects and arrays. You can either use the #js
reader macro, or the clj->js
function. The difference is that clj->js
will work recursively, whereas #js
will only convert the outer expression
Basically, a function call in the framework isnāt getting defined, so I thought maybe Iāve done something wrong with populating the map
Does anyone have any experience with working with the servant
or butler
libraries for web-workers? I'm having trouble with making sure my code isn't called from the worker thread (or at least I think that's the problem)
@risto: Just saw your post from last week: Is there any way to have "core.async" fetch things in paralell but still maintain the given order?
. How about this?
How can I implement toString on goog.Uri? This is hard because this is an infinite recursion:
(extend-type goog.Uri
Object
(toString [this] (str "#<URI " (-> goog.Uri .-prototype .toString (.call this)) ">ā))
@dustingetz: pretty sure Uri already implements toString?
It prints as #Object since bumping deps
but calling the prototype directly works
i canāt imagine what i did wrongt
did this behavior change at some point?
so if they don't implement the IPrintWithWriter protocol, they will print as #object ...
Yeah I think this happens on JVM also, on clojure 1.6 pr-str gives me a <Uri ā¦> but in 1.8 it gives me an <Object>
i dont udnerstand why it used to be known and now it isnāt?
(I now understand the solution is -pr-write, thanks)
ah, pr-str is only writing edn-readable strings
and it used to write out any old string
thanks for your help, all is clear now, the infinite recursion makes sense thanks
Hi, guys. Somebody might be interested here in my sample spa on clojurescript https://github.com/arevkov/clojure-web-app. Since I have been programming on clojure for last 3 months or so any recommendations on stack of libraries, idiomatic code structure or even code review are highly welcome.