Fork me on GitHub

on the most recent defn episode with mr. thompson, there was some talk about statecharts and behavior trees - is there any work in that direction to check out yet? just curious

Oliver George00:05:11

I got curious and read the paper he mentioned. It does seem like a good model. That said working out a good development experience is going to be non trivial... how to visualise, what source code looks like etc


yeah, i read that as well, and there are a couple (at least one?) project that tried it out ( ) but i couldn't really get over the mental hurdle, so i was wondering if there was a more blessed by re-frame folks stab at it to try out


@tomi.hukkalainen_slac @mikethompson I also believe that reg-sub-raw is more powerful than the other since you can have subscriptions depend on the value (or derived value) of other subscriptions in your subs. Just mentioning it since it has been a case that led me to need reg-sub-raw. However I ended up making my own macro over it so I didn’t have to keep doing the reaction return val and subscribe part stuff over and over. But that’s just because I kept making subtle mistakes when I had a lot of them.


Looks fine to me


@mikethompson Hm, true. I'm not yet at the point where the computations are visible outside the reg-sub, so that didn't come into my mind


any chance to get merged today? doing a re-frame introduction today at the local meetup and would be nice if people start out with the latest versions


I’m available here to address further change requests


Matthew is quite the globe trotter, so there's no knowing what timezone he's in


I'm having a weird set of bugs with re-frame-10x in a new app. I'm slowly splitting the difference with another app, to see if I can find the problem. Posting here too, in the hope that someone recognizes the symptoms and can save me some time... At startup, I get this error, apparently because js/ returns nil:

router.cljc?rel=1526558777065:200 Uncaught TypeError: Cannot read property 'document' of null
    at day8$re_frame_10x$events$open_debugger_window (events.cljs?rel=1526558782271:287)
    at events.cljs?rel=1526558782271:298
    at mranderson047$re_frame$v0v10v2$re_frame$std_interceptors$fx_handler__GT_interceptor_$_fx_handler_before (std_interceptors.cljc?rel=1526558777144:133)
    at mranderson047$re_frame$v0v10v2$re_frame$interceptor$invoke_interceptor_fn (interceptor.cljc?rel=1526558776779:67)
    at mranderson047$re_frame$v0v10v2$re_frame$interceptor$invoke_interceptors (interceptor.cljc?rel=1526558776779:105)
    at mranderson047$re_frame$v0v10v2$re_frame$interceptor$execute (interceptor.cljc?rel=1526558776779:196)
    at mranderson047$re_frame$v0v10v2$re_frame$events$handle (events.cljc?rel=1526558776964:64)
    at mranderson047.re_frame.v0v10v2.re_frame.router.EventQueue.mranderson047$re_frame$v0v10v2$re_frame$router$IEventQueue$_process_1st_event_in_queue$arity$1 (router.cljc?rel=1526558777065:175)
    at mranderson047$re_frame$v0v10v2$re_frame$router$_process_1st_event_in_queue (router.cljc?rel=1526558777065:83)
    at mranderson047.re_frame.v0v10v2.re_frame.router.EventQueue.mranderson047$re_frame$v0v10v2$re_frame$router$IEventQueue$_run_queue$arity$1 (router.cljc?rel=1526558777065:194)
Despite that, c-H seems to work fine, and I can pop out the re-frame-10x window, and even navigate most of it. But, parts are not working. In particular, in the app-db tab, I can look at the db, the the "expand me" triangles don't work, so I can't see more than one line in each path inspector. Any of this sound familiar to anyone?


We've had other reports of this


Someone reported that they browsed to this URL to reset their profile settings, and it worked thereafter:


ALSO: check that you are consistently using React16 OR React15


and not mixing the two through dependencies


For example be sure to use [ "0.3.3"] for React15


and [ "0.3.3-react16"] for React16


Plus look at the other dependencies to make sure they line up


Thanks. Good news is that I just managed to reproduce the problem in a clean lein new luminus ...., but in my existing chrome env. So trying that reset now to see if it fixes


Didn't help.


Is supposed to show me any gui? I just see a blank tab.


never mind. "open in new tab" fails, but manually it seems to do something. one minute


I see this ^^^^^


I use Canary for dev (well away from my actual Chrome) so i don't lose anything when i have to take this kind of drastic action.


Yup. Copying the link and opening in a fresh tab gave me the reset option


And, it looks like it fixed the problem. (Sadly, in my main chrome, so I'll need to re-enable my extensions. But small price to pay).


Hmm. I wonder what is going on.


To be exact: it fixed the problem in the clean project. I need to still test in my real project and test after I re-enable extensions.


I'll post here if I find any clues.


But, short answer: this reset definitely seems to be relevant.


Any thoughts about what you did immediately before the problem showed up?


No. It's not clear when it first showed up. I was intermittently having the problem of the "expand me" triangles not working, and was klduging around it by opening many inspectors, each pointing at something I needed to see. ....


Did not reload the app for a while, as I was tweaking code. Then, did a major code refactor, a rebuild and saw the nil.


Did a bit of testing then. Verified that I could open a window in javascript from the chrome inspector; but got nil when I tried from a cljs repl (in emacs+cider, if that is relevant)


After that, everything I did was garbage ... assumed it was something in my changes, and made many inconsequential tweaks. Then, finally, reached out for help just now.


I'm running Chrome Version 67.0.3396.18 (Official Build) beta (64-bit) on Ubuntu 16.04.


Oh, damn, I was dumb. If the problem was one of my extensions, I was stupid. I did not write down which extensions were running. And, I normally have dozens turned off, and only a few on. Now, I have "dozens_plus_a_few_more" turned off, and need to remember which to turn back on. For my sake, I'll start with very few on; but that may be losing a clue for you. Sorry.


Ok. So I've re-enabled the extensions I use heavily and I've tested on my regular app. So far, all is good. I'll let you know if this happens again.


Oh... forgot. a big Thank You for saving me a few hours now with your quick answer!!


Thanks for the report. BTW, React15 or React16 ?


I think still 15, but not sure how to check. .... hmm, looks like 16 now. IIRC correctly, I changed version of -10x mid-problem. I think to the version for 16. So, quite possible that this problem began when I had a classh.


Hmm, in which case, I think I found a problem in the Luminus template.


I created the new project with lein new luminus diffusion +http-kit +cider +re-frame +kibit +swagger and see

$ lein deps :tree | grep react

   [cljsjs/react-flip-move "2.9.17-0"]
   [cljsjs/react-highlight "1.0.7-1" :exclusions [[cljsjs/react]]]
   [cljsjs/create-react-class "15.6.2-0"]
   [cljsjs/react-dom-server "16.3.0-1"]
   [cljsjs/react-dom "16.3.0-1"]
   [cljsjs/react "16.3.0-1"]

$ lein deps :tree | grep 10x
 [ "0.3.3"]

That's a clash, right?


Yeah, should be [ "0.3.3-react16"]


But I'm not sure that would cause this problem


(Genuinely not sure)


I certainly don't know. And, it certainly didn't cause the problem immediately. But, I guess you should open a PR at Luminus to fix it anyways??


Is there any way you can check at runtime for a 15 vs 16 clash?


@danielcompton can we report to Luminus please. ^^^^


@kommen @mikethompson I can get that out in about 2 hours, once I get back to my computer :)


@mikethompson haha yeah, in Toronto right now, will be in Germany on Saturday 😂


@gadfly361 nice, 2 hours will be just in time delivery 👌


hey, any idea why re-frame-10x shows me the ::initialize-db event in the events tab only after the next re-frame event was dispatched?


it seems the event tab is always lagging one event behind


very strange: emptying cache and restarting chrome fixed this issue for me


@philippmarkovics I think i saw a thread about this earlier (so just blindly repeating without any knowledge on the matter) ... but i think it has to do with 10x not handling dispatch-sync the same way as normal distpatch


@kommen new version of re-frame-template should be available now