Re: [ClojureScript] Couple Reference Cursor questions

2015-03-25 Thread Andrew S
Thanks Colin. Couple of followups: 1) What is re-frame? I couldn't find that on the Om documentation page. 2) If I have a parent observe an entire reference cursor (or any cursor for that matter), then wouldn't the parent re-render when any individual key/value in the reference cursor updates?

Re: [ClojureScript] Couple Reference Cursor questions

2015-03-25 Thread Colin Yates
If those calculations are very inexpensive then maybe consider storing them directly in the app-state? I would be surprised if you can observe just a subset of a reference cursor (no idea really), but if you can't then just create a parent which observes the entire cursor and delegates to the

[ClojureScript] re-frame: updating data in app-db tree

2015-03-25 Thread Jamie Orchard-Hays
In Om, I didn't have to think about how to find the data in app-db to update as Om has cursors. In the cursorless world of re-frame, I am wondering what are favorite strategies for updating data deep inside a decently rich app-db tree. ie, say I want to update a field that is in a map that is

[ClojureScript] Is this the correct way to do a tooltip on a Reagent component?

2015-03-25 Thread Jonathon McKitrick
(defn edit-button-component [attrs] [:button.btn.btn-default attrs [:span.glyphicon.glyphicon-pencil]]) (defn edit-button-component-dec [] (with-meta edit-button-component {:component-did-mount #(.tooltip (js/$ (reagent.core/dom-node %)) #js {:title Test}) :component-will-mount

Re: [ClojureScript] Getting started with re-frame?

2015-03-25 Thread Colin Yates
Thanks Jamie. On 25 March 2015 at 14:59, Jamie Orchard-Hays jamie...@gmail.com wrote: I've been playing with it the past week or so. I started with the figwheel template. lein new figwheel name-of-dir -- --reagent Then added re-frame and other dependencies. Diggin' figwheel Jamie On

Re: [ClojureScript] Getting started with re-frame?

2015-03-25 Thread Daniel Kersten
I did the same. Started a new reagent figwheel project and added re-frame as a dependency manually. On Wed, 25 Mar 2015 15:01 Colin Yates colin.ya...@gmail.com wrote: Thanks Jamie. On 25 March 2015 at 14:59, Jamie Orchard-Hays jamie...@gmail.com wrote: I've been playing with it the past

[ClojureScript] INTERNAL COMPILER ERROR with 0.0-3126 advanced compilation

2015-03-25 Thread Yehonathan Sharvit
Applying optimizations :advanced Compiling public/clojurescript/prod/main.min.js failed. java.lang.RuntimeException: INTERNAL COMPILER ERROR. Please report this problem. null Node(BLOCK): /controller_run_test.js:643:80 return (function $test$controller_run_test$on_scope_render_change($scope,_){

Re: [ClojureScript] Re: Is this the correct way to do a tooltip on a Reagent component?

2015-03-25 Thread jmckitrick
Well, actually, that might work. I was hoping for something more attention-grabbing, but this will work for now. Thanks! On Wed, Mar 25, 2015 at 11:54 AM Colin Yates colin.ya...@gmail.com wrote: Might be my ignorance of reagent, but why can't you just {:title My tooltip} to the button

Re: [ClojureScript] INTERNAL COMPILER ERROR with 0.0-3126 advanced compilation

2015-03-25 Thread David Nolen
Looks like a Closure Compiler issue, you probably need to report this elsewhere. On Wednesday, March 25, 2015, Yehonathan Sharvit vie...@gmail.com wrote: Applying optimizations :advanced Compiling public/clojurescript/prod/main.min.js failed. java.lang.RuntimeException: INTERNAL COMPILER

Re: [ClojureScript] Re: Is this the correct way to do a tooltip on a Reagent component?

2015-03-25 Thread Colin Yates
Looking at your code, I think your question is more about using the jquery tooltip plugin, which I know even less about ;). On 25 March 2015 at 17:14, jmckitr...@gmail.com wrote: Well, actually, that might work. I was hoping for something more attention-grabbing, but this will work for now.

Re: [ClojureScript] INTERNAL COMPILER ERROR with 0.0-3126 advanced compilation

2015-03-25 Thread Yehonathan Sharvit
It didn't happen in earlier versions of cljs. On Wed, Mar 25, 2015 at 7:30 PM, David Nolen dnolen.li...@gmail.com wrote: Looks like a Closure Compiler issue, you probably need to report this elsewhere. On Wednesday, March 25, 2015, Yehonathan Sharvit vie...@gmail.com wrote: Applying

[ClojureScript] Re: re-frame: updating data in app-db tree

2015-03-25 Thread Taylor Sando
There was handler middleware for helping with deeply nested structure middleware/path A middleware factory which supplies a sub-tree of `db` to the handler. Works a bit like update-in. Supplies a narrowed data structure for the handler. Afterwards, grafts the result of the handler back into

Re: [ClojureScript] INTERNAL COMPILER ERROR with 0.0-3126 advanced compilation

2015-03-25 Thread David Nolen
We periodically upgrade the Closure Compiler and it's not feasible for us to test the world. If you don't take the time to deliver a minimal reproducer there's not much we can do. Google Closure Compiler is a normal dependency like anything else and we avoid relying on internal details as much as

Re: [ClojureScript] Re: re-frame: updating data in app-db tree

2015-03-25 Thread Jamie Orchard-Hays
Thanks, Taylor. I'd seen path. It doesn't do what I need, but after reviewing and thinking about it, it may be a good part of a solution. Mainly what is the hard part is dealing with a tree of nested maps/vectors. You won't necessarily know the path until run-time, and certainly don't want to

[ClojureScript] Re: [ANN] Browserific, cross-platform app development in cljs

2015-03-25 Thread Ivan L
Chenex makes me a curious - can you define any target you want? For example, say I want to slice between :nodejs vs :nashorn in a clojurescript target? -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are

[ClojureScript] Re: Getting started with re-frame?

2015-03-25 Thread Mike Thompson
On Thursday, March 26, 2015 at 1:07:56 AM UTC+11, Colin Yates wrote: Hi all, What is the recommended approach? Cloning the example project, the re-frame-template (which is still using re-frame 0.1.8) or sticking it together by hand? Thanks! We do have the mandatory lein template in

[ClojureScript] Re: re-frame: updating data in app-db tree

2015-03-25 Thread Mike Thompson
On Thursday, March 26, 2015 at 2:08:23 AM UTC+11, Jamie Orchard-Hays wrote: In Om, I didn't have to think about how to find the data in app-db to update as Om has cursors. In the cursorless world of re-frame, I am wondering what are favorite strategies for updating data deep inside a decently

Re: [ClojureScript] Couple Reference Cursor questions

2015-03-25 Thread Andrew S
Thanks Colin. My response to your points: 1) The row gets the data and then does some additional calculations on it before displaying. If the data doesn't change, the row shouldn't re-render or these calculations are unnecessarily done again, since they are part of the Om render. 2) If I'm

[ClojureScript] Couple Reference Cursor questions

2015-03-25 Thread Andrew S
I am restructuring an Om app to take advantage of Reference Cursors. I am doing so because my current app, which processes, manipulates and displays large amounts of data several times per second, is not running so efficiently and reworking it in the old hierarchical manner to only pass very

Re: [ClojureScript] Couple Reference Cursor questions

2015-03-25 Thread Colin Yates
Hi Andrew - my first thought is are you *sure* your performance problem is where you think it is? And secondly, *why* don't you want a row to re-render - does it have side effects or is it about performance? 1) My anecdotal evidence is that yes, a re-render happens if the content of an observed

Re: [ClojureScript] Re: [ANN] Browserific, cross-platform app development in cljs

2015-03-25 Thread Ed Babcock
can you define any target you want? Yes, that was the main motivation. I would have used cljx but it wasn't compatible with anything but clojure and clojurescript. say I want to slice between :nodejs vs :nashorn in a clojurescript target? To declare a new target, change the :features and

Re: [ClojureScript] INTERNAL COMPILER ERROR with 0.0-3126 advanced compilation

2015-03-25 Thread David Nolen
FWIW, I see there are several similar looking reports on the Google Closure Compiler GitHub issues: https://github.com/google/closure-compiler/issues/811 David On Wed, Mar 25, 2015 at 1:32 PM, Yehonathan Sharvit vie...@gmail.com wrote: It didn't happen in earlier versions of cljs. On Wed,

[ClojureScript] Clojurescript Protocol Usage

2015-03-25 Thread Michael McLellan
I've recently been reading a lot about core.async and the different ways it can be useful for building interactive/reactive interfaces. I was reading through David Nolen's blog (http://swannodette.github.io/2013/08/17/comparative/) and the corresponding code

Re: [ClojureScript] Re: re-frame: updating data in app-db tree

2015-03-25 Thread Mike Thompson
On Thursday, March 26, 2015 at 2:03:21 PM UTC+11, Jamie Orchard-Hays wrote: Thanks for that, Mike. Like I've written earlier in this thread, I've been trying a few approaches and have been wondering what others have come up with. (I don't need to reinvent the wheel.) I hadn't quite gotten