[ClojureScript] ANN: re-frame 0.8.0

2016-08-21 Thread Mike Thompson
Version 0.8.0 is a substantial release https://github.com/Day8/re-frame/blob/master/CHANGES.md#080--20160819 -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups

[ClojureScript] Re: re-frame why only 1 handler per [:some-event-id]?

2016-03-29 Thread Mike Thompson
On Wednesday, March 30, 2016 at 9:40:46 AM UTC+11, Luke Horton wrote: > I see, thanks for that. I guess I was avoiding that strategy initially > because it sort of felt like monkey patching in ruby/js, which is just bound > to break eventually. It's not monkey-patching in this respect, though,

[ClojureScript] Re: re-frame why only 1 handler per [:some-event-id]?

2016-03-29 Thread Mike Thompson
On Wednesday, March 30, 2016 at 8:00:50 AM UTC+11, Luke Horton wrote: > > With respect to this concern, I wrote up a quick gh issue that may or may not > prove helpful to re-frame: https://github.com/Day8/re-frame/issues/160 Thanks for that issue, I'll cycle back around and address it fully in

[ClojureScript] Re: re-frame why only 1 handler per [:some-event-id]?

2016-03-29 Thread Mike Thompson
On Wednesday, March 30, 2016 at 8:00:50 AM UTC+11, Luke Horton wrote: > > BTW, do you have an OO background? Your talk of code firing in module a and > > module b, and then async channels, etc, gave me the sense of someone trying > > to understand re-frame through a "message passing" mindset. I

[ClojureScript] Re: re-frame why only 1 handler per [:some-event-id]?

2016-03-29 Thread Mike Thompson
On Tuesday, March 29, 2016 at 7:13:39 AM UTC+11, Luke Horton wrote: > Why does the re-frame framework restrict a 1:1 between dispatches and > handlers? > > At first I found it a little weird. I can think of lots of realistic cases > where: > > ``` > some event happens -> module a responds;

[ClojureScript] Re: Some Questions Regarding Hybrid Setings with JS

2015-11-26 Thread Mike Thompson
On Friday, November 27, 2015 at 1:28:08 AM UTC+11, Timur wrote: > Hi all, > > I want to use reagent and CLJS in my next project however some collaborators > prefer Javascript. I wanted to ask if anyone has tried a hybrid setting where > some components are developed in Javascript and some are

Re: [ClojureScript] Re: Clojurescript async not yeilding for CPU intensive work

2015-08-25 Thread Mike Thompson
On Tuesday, August 25, 2015 at 7:45:28 PM UTC+10, Thomas Heller wrote: On Tuesday, August 25, 2015 at 10:59:53 AM UTC+2, Daniel Kersten wrote: The browser does not support threads so neither can core.async. To expand on that, core.async uses cooperative multitasking, which means you

[ClojureScript] Re: How to use js/React.addons.CSSTransitionGroup with reagent ?

2015-08-10 Thread Mike Thompson
On Tuesday, August 11, 2015 at 4:29:25 AM UTC+10, Roger Gilliar wrote: I'm trying to use a CSSTransitionGroup with a reagent component that looks like this: (defmethod render-page :code-example [{:keys [title origin content lang explanation output]}] (let [content-indexed (map-indexed

[ClojureScript] Re: Custom Closure @define

2015-08-02 Thread Mike Thompson
On Sunday, August 2, 2015 at 10:32:27 PM UTC+10, Martin Klepsch wrote: Hey! Is it currently possible to create custom @define’s from Clojurescript as described here: https://developers.google.com/closure/compiler/docs/js-for-compiler#tag-define ? I tried using `js*` but I think this

Re: [ClojureScript] boot cljs - how to put generated main.js in resources/public?

2015-07-09 Thread Mike Thompson
On Friday, July 10, 2015 at 3:48:17 AM UTC+10, Colin Yates wrote: Thanks David. On 9 Jul 2015, at 18:38, David Nolen dnolen...@gmail.com wrote: If you don't get an answer here note there is also a boot specific discussion area - http://hoplon.discoursehosting.net/ The boot

Re: [ClojureScript] Performance tuning a Reagent/Re-frame application

2015-07-04 Thread Mike Thompson
On Sunday, July 5, 2015 at 12:46:19 AM UTC+10, Mike Thompson wrote: On Saturday, July 4, 2015 at 7:24:15 PM UTC+10, Daniel Compton wrote: Are you using Re-com as well? That relies heavily on Flexbox which is only just starting to be optimised in Firefox. I think Firefox 38 from memory

Re: [ClojureScript] Performance tuning a Reagent/Re-frame application

2015-07-04 Thread Mike Thompson
On Saturday, July 4, 2015 at 7:24:15 PM UTC+10, Daniel Compton wrote: Are you using Re-com as well? That relies heavily on Flexbox which is only just starting to be optimised in Firefox. I think Firefox 38 from memory was where it started to get better performance, although still not as fast

[ClojureScript] Re: Performance tuning a Reagent/Re-frame application

2015-07-04 Thread Mike Thompson
On Saturday, July 4, 2015 at 12:42:36 AM UTC+10, Russell Dunphy wrote: Does anyone have any tips for performance tuning a reagent/re-frame application they can share? We're running into very slow rendering performance when changing pages on Firefox on Windows (ie sometimes several seconds)

[ClojureScript] Re: Reagent: Removing a child component altogether.

2015-06-18 Thread Mike Thompson
On Thursday, June 18, 2015 at 5:21:18 PM UTC+10, Atamert Ölçgen wrote: Hi, Reagent makes it easy to manage the state but I couldn't find a clean and straightforward way to manage a component tree. I have a component with local state that may be installed at some point (or not at all) and

[ClojureScript] Re: Re-frame design

2015-06-14 Thread Mike Thompson
On Saturday, June 13, 2015 at 9:00:25 PM UTC+10, Andreas Liljeqvist wrote: I couldn't find any place to discuss it on the relevant github. Can anyone explain to me why dispatch, subscribe, register-handler and register-sub all use a vector as an argument? Like this: (dispatch

[ClojureScript] Re: re-frame - when to use subscription arguments?

2015-06-09 Thread Mike Thompson
On Tuesday, June 9, 2015 at 8:44:02 PM UTC+10, Colin Yates wrote: I understand that you can provide parameters when subscribing to something, but I am unsure when it is idiomatic to do so. The example in the documentation is for a static value (the number of results), but what about if

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
On Thursday, May 28, 2015 at 4:55:09 PM UTC+10, Ruslan Prokopchuk wrote: (meta #'f) Hmm. I think there's something fundamental I'm not grasping here. But I'm struggling to ask the right question to get the ahhh moment. Perhaps this: why, in my original example code, does (meta f) return

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
2015 г., 10:30:14 UTC+3 пользователь Mike Thompson написал: On Thursday, May 28, 2015 at 4:55:09 PM UTC+10, Ruslan Prokopchuk wrote: (meta #'f) Hmm. I think there's something fundamental I'm not grasping here. But I'm struggling to ask the right question to get the ahhh moment

[ClojureScript] Metadata via defn

2015-05-28 Thread Mike Thompson
I'd like to do this: (defn ^{:a 1} f [] 5);; notice the metadata {:a 1} But it doesn't work: (meta f) ;; = nil But I can do this: (def ff (with-meta f {:b 1})) and it works: (meta ff) ;; = {:b 1} So, if I want to attach recoverable metadata, I must do it in two

[ClojureScript] Re: Metadata via defn

2015-05-28 Thread Mike Thompson
On Thursday, May 28, 2015 at 6:37:56 PM UTC+10, Ruslan Prokopchuk wrote: fns are normal values, I guess you got strange glitch, try with the fresh vm/repl: (def fff ^{:a 1} (fn [] 4)) #[object Object] = nil (meta fff) = {:a 1} (meta ^{:a 1} (fn [] 4)) = {:a 1} Many Thanks

[ClojureScript] Re: Using Angular as a view layer for re-frame

2015-05-25 Thread Mike Thompson
On Monday, May 25, 2015 at 5:56:01 PM UTC+10, Sean Tempesta wrote: So, I just saw Colin's post: https://groups.google.com/forum/#!topic/clojurescript/jYjTCsyMRAA and using Ratom/Run! seems to fix it. I've updated my example code if anyone is interested in seeing it. Please let me know

[ClojureScript] Re: re-frame/reagent - reacting to changes in the model outside of a component

2015-05-24 Thread Mike Thompson
On Monday, May 25, 2015 at 12:13:53 AM UTC+10, Colin Yates wrote: I am finding more and more use-cases for doing something when data changes that aren't necessarily to do with a UI component. Ideally I want to do something like (outside any GUI): (defn my-controller-for-concern-x (let

Re: [ClojureScript] Re: Using a state machine to design/program UI ?

2015-05-18 Thread Mike Thompson
On Tuesday, May 19, 2015 at 3:13:23 AM UTC+10, Daniel Kersten wrote: From my understanding of it: Use higher level states and decouple them somewhat from the data. For example, games do have lots of dynamically changing data. In a modern shooter you might have dozens of characters with

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-15 Thread Mike Thompson
On Saturday, May 16, 2015 at 1:03:49 AM UTC+10, Colin Yates wrote: Data for the win. I remember in the olden days when AOP reared its head and people were talking about retrying updates against stale data/exceptions. I was always/still am a bit cynical because I just don't see that many

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-15 Thread Mike Thompson
On Saturday, May 16, 2015 at 12:36:02 AM UTC+10, Colin Yates wrote: For me, I can't use the 'snapshot app-db and discard' as the app-db is synchronised with the server periodically. As you mention, I have a number of roots in my app, one for 'ui' entries and one for 'views' which are

Re: [ClojureScript] Using a state machine to design/program UI ?

2015-05-14 Thread Mike Thompson
On Friday, May 15, 2015 at 10:27:46 AM UTC+10, Daniel Kersten wrote: Personally I find that moving state out of components as re-frame's subscriptions and handlers encourage is a desirable trait and would be cautious about reintroducing local state. Keeping my data in one place (and

Re: [ClojureScript] cljs compiler options :closure-defines {:goog.DEBUG false}

2015-05-05 Thread Mike Thompson
On Tuesday, May 5, 2015 at 11:02:15 AM UTC+10, Jamie Orchard-Hays wrote: WRT wiki: looking at this commit, it looks like a keyword works: https://github.com/clojure/clojurescript/commit/cb7e97f13ae6a03086f5d96ba58e5f3d5cba7dc3 (name key) Jamie On May 4, 2015, at 8:55 PM,

[ClojureScript] Re: Fresh Google Closure API Docs

2015-05-04 Thread Mike Thompson
On Friday, May 1, 2015 at 6:09:22 PM UTC+10, Mike Thompson wrote: You have probably been looking at stale Google Closure docs. The freshly generated API docs are available here: http://google.github.io/closure-library/api/index.html Background on the staleness: https://groups.google.com

[ClojureScript] Fresh Google Closure API Docs

2015-05-01 Thread Mike Thompson
You have probably been looking at stale Google Closure docs. The freshly generated API docs are available here: http://google.github.io/closure-library/api/index.html Background on the staleness: https://groups.google.com/forum/#!topic/closure-library-discuss/l2_rx0ROFNc -- Mike -- Note

[ClojureScript] [ANN] re-com v0.5.3 - New Interactive Demo for h-box

2015-04-29 Thread Mike Thompson
In this release, there's a shinny new interactive demo for h-box. Edit the hiccup and see the changes in realtime. Its like an amusement ride for your re-com knowledge: http://re-demo.s3-website-ap-southeast-2.amazonaws.com/#/h-box Release Notes:

Re: [ClojureScript] [ANN] re-com v0.5.3 - New Interactive Demo for h-box

2015-04-29 Thread Mike Thompson
On Thursday, April 30, 2015 at 6:55:37 AM UTC+10, marc fawzi wrote: It's actually very refined work. My issue with it is the number of configuration params and the approach to styling. Could be far simpler using default-stylesheet along with a user-stylesheet to override the defaults.

[ClojureScript] Re: where do you put your animation logic?

2015-04-29 Thread Mike Thompson
On Wednesday, April 29, 2015 at 5:21:05 AM UTC+10, marc fawzi wrote: Hi, I'm still processing the revolution in front end architecture that brought me here and to Reactive CLojureScript! :)  One part is this whole thing about putting ALL logic outside of the component/view. 

Re: [ClojureScript] [ANN] re-com v0.5.3 - New Interactive Demo for h-box

2015-04-29 Thread Mike Thompson
On Wednesday, April 29, 2015 at 11:11:47 PM UTC+10, Jamie Orchard-Hays wrote: This looks fantastic. If it worked in all browsers, I'd be tempted to use it. What are the ultimate goals of the re-com project? We use it to develop apps in Electron (aka atom shell). So it's already pretty

[ClojureScript] Re: re-frame event input validation thoughts

2015-04-25 Thread Mike Thompson
not be using enrich. Instead, perhaps I'll be using this (or variations of it): https://gist.github.com/mike-thompson-day8/76812d5452747bc79aac -- Mike -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed

[ClojureScript] Re: Reflow Minimization in React: How it works?

2015-04-23 Thread Mike Thompson
On Friday, April 24, 2015 at 10:18:56 AM UTC+10, marc fawzi wrote: Given that React works hard to make sure the DOM remains as snappy as possible, I'm assuming that it batches DOM reads and writes separately so as not to trigger reflow (as shown in the article below)

[ClojureScript] Sizing The CLJS Community

2015-04-23 Thread Mike Thompson
I'm curious about the approximate size of the clojurescript community, and its current trajectory numerically speaking. So, absolute numbers like: how many active cljs programmers are there? And/or relative numbers like: growing at X%. I'm wondering where useful numbers might live.

Re: [ClojureScript] Re: re-frame - handling default values

2015-04-22 Thread Mike Thompson
On Wednesday, April 22, 2015 at 9:02:04 AM UTC+10, Mike Thompson wrote: On Tuesday, April 21, 2015 at 11:43:12 PM UTC+10, Colin Yates wrote: Yes, that is a valid reduction. Specifically my register-handler, which only has access to db needs to know the result of f. The general principle

Re: [ClojureScript] re-frame - handling default values

2015-04-22 Thread Mike Thompson
On Thursday, April 23, 2015 at 12:49:31 AM UTC+10, Jamie Orchard-Hays wrote: Very cool. And probably useful for what I'm working on right now. Typo: (defn on-changed...) = (on-change...). Actually, I like the name on-change or on-changes. I've altered the GIST to use on-changes --

Re: [ClojureScript] Re: re-frame - handling default values

2015-04-22 Thread Mike Thompson
On Thursday, April 23, 2015 at 12:39:12 AM UTC+10, Colin Yates wrote: A cursive glance at this makes me want to marry you (if you don't mind me bringing my current wife and 4 kids?). Thanks Mike. I'm glad we got there (hopefully)! This has been nagging at me. -- Mike -- Note that

Re: [ClojureScript] re-frame - handling default values

2015-04-22 Thread Mike Thompson
On Thursday, April 23, 2015 at 12:54:34 AM UTC+10, Mike Thompson wrote: On Thursday, April 23, 2015 at 12:49:31 AM UTC+10, Jamie Orchard-Hays wrote: Very cool. And probably useful for what I'm working on right now. Typo: (defn on-changed...) = (on-change...). Actually, I like the name

Re: [ClojureScript] Re: re-frame - handling default values

2015-04-21 Thread Mike Thompson
hasn't lost the will to live yet ... :). On 21 April 2015 at 13:08, Mike Thompson m.l.thompson...@gmail.com wrote: On Tuesday, April 21, 2015 at 4:52:05 AM UTC+10, Colin Yates wrote: Hi, This is somewhat reframe specific, but how do people handle default-values that can change? My

[ClojureScript] Re: re-frame - handling default values

2015-04-21 Thread Mike Thompson
On Tuesday, April 21, 2015 at 4:52:05 AM UTC+10, Colin Yates wrote: Hi, This is somewhat reframe specific, but how do people handle default-values that can change? My specific use-case is that I have a tree which can be expanded and collapsed. By default the tree should be expanded to a

[ClojureScript] Re: [Help] unsubscribe from reframe subscription?

2015-04-21 Thread Mike Thompson
On Wednesday, April 22, 2015 at 6:18:34 AM UTC+10, Matt Ho wrote: First off, thanks for putting together such a wonderful framework in reframe. We've been using it pretty extensively and loving it. One question came up recently though. Subscribing to an event is straightforward enough,

Re: [ClojureScript] Re: re-frame - handling default values

2015-04-21 Thread Mike Thompson
.. (reaction (subscribe [:reference-data/locations (register-sub :page-1/location .. (reaction (if (following-defaults? (- db ...) @(subscribe [:reference-data/active-locations the value of :page-1/location is of interest. On 21 April 2015 at 14:27, Mike Thompson m.l.thompson

[ClojureScript] Re: autocomplete/typeahead in Reagent/re-frame

2015-04-18 Thread Mike Thompson
On Saturday, April 18, 2015 at 1:26:13 AM UTC+10, Jamie Orchard-Hays wrote: Bumping this. Anyone have a favorite solution? Jamie On Apr 16, 2015, at 8:37 PM, Jamie Orchard-Hays jamie...@gmail.com wrote: What are folks out there using for autocomplete/typeahead in Reagent/re-frame

[ClojureScript] ANN: re-com components for Reagent

2015-04-08 Thread Mike Thompson
re-com is a CojureScript library of reusable components for Reagent. https://github.com/Day8/re-com Features: - 100% ClojureScript. No javascript wrapping. - components for widgets and layout - a bootstrap-ish sorta look and feel. With some material design icons. - a demo app -

Re: [ClojureScript] re-frame: how to create dependent handlers and run them without delay

2015-04-05 Thread Mike Thompson
On Sunday, April 5, 2015 at 9:13:57 PM UTC+10, whodidthis wrote: On Saturday, April 4, 2015 at 7:10:00 AM UTC+3, Mike Thompson wrote: So the problem sequence would be: 1. first event handler called with db snapshot 2. sync-dispatch called, making changes to app-db 3. first

Re: [ClojureScript] Re: re-frame/react - controlled input losing key presses

2015-04-04 Thread Mike Thompson
On Sunday, April 5, 2015 at 7:59:13 AM UTC+10, whodidthis wrote: On Sunday, April 5, 2015 at 12:33:01 AM UTC+3, marc fawzi wrote: From leaking to leaky? There must be another way. But can you explain @whodidthis (awesome nick) why async dispatch loses data when you type fast? Very

Re: [ClojureScript] re-frame: how to create dependent handlers and run them without delay

2015-04-04 Thread Mike Thompson
On Sunday, April 5, 2015 at 2:20:39 AM UTC+10, Karsten Schmidt wrote: Thanks, Mike. I implemented this and had to make some changes to make it work. I.e. since `register-handler` auto-injects the `pure` middleware, any of these :next-tick child handlers need to be registered via

Re: [ClojureScript] re-frame: how to create dependent handlers and run them without delay

2015-04-03 Thread Mike Thompson
On Saturday, April 4, 2015 at 9:07:56 AM UTC+11, Daniel Kersten wrote: Have you tried using dispatch-sync?  https://github.com/Day8/re-frame/wiki/Bootstrap-An-Application#a-cheat and  https://github.com/Day8/re-frame/blob/master/src/re_frame/router.cljs#L54 dispatch-sync should never be

Re: [ClojureScript] re-frame: how to create dependent handlers and run them without delay

2015-04-03 Thread Mike Thompson
On Saturday, April 4, 2015 at 9:51:07 AM UTC+11, Karsten Schmidt wrote: Thanks, Daniel. Didn't know about `dispatch-sync` and this would definitely help to avoid the delay, but the fundamental question to me still is how to create reactions to handler changes *outside* reagent components. I'm

[ClojureScript] Re: re-frame/reagent - calling via () or []

2015-03-29 Thread Mike Thompson
On Sunday, March 29, 2015 at 11:38:44 PM UTC+11, Colin Yates wrote: Hi all, I have read the docs but might have overlooked something. I keep seeing components being updated in response to state changes but I don't see the latest state in that component. For example, in the following:

Re: [ClojureScript] re-frame - sanity check for re-usable components

2015-03-27 Thread Mike Thompson
On Saturday, March 28, 2015 at 12:58:17 AM UTC+11, Khalid Jebbari wrote: On Friday, March 27, 2015 at 2:39:37 PM UTC+1, Jamie Orchard-Hays wrote: Does it make sense to pass the reusable component's context as an argument to it? ie, (defn ReusableComponent [some-context] )

Re: [ClojureScript] Re: re-frame - rationale for not allowing subscriptions in handlers

2015-03-27 Thread Mike Thompson
. :). On 27 March 2015 at 20:47, Mike Thompson m.l.thompson...@gmail.com wrote: On Saturday, March 28, 2015 at 7:36:26 AM UTC+11, Colin Yates wrote: I have various chunks of reference data, say a tree or a list of _all_ (i.e. active and historical) entities. I then have various subscriptions

Re: [ClojureScript] Re: re-frame - rationale for not allowing subscriptions in handlers

2015-03-27 Thread Mike Thompson
they weren't appropriate, more the concept, which you explained - thanks. On 27 March 2015 at 21:15, Mike Thompson m.l.thompson...@gmail.com wrote: On Saturday, March 28, 2015 at 7:52:13 AM UTC+11, Colin Yates wrote: Hi Mike, yep, that is what I meant by I can work around this - the subscription

[ClojureScript] Re: re-frame - validating the entire db, not just handler specific context

2015-03-26 Thread Mike Thompson
On Thursday, March 26, 2015 at 8:19:28 PM UTC+11, Colin Yates wrote: First - loving re-frame, mainly because it names the abstractions I found myself fudging around with when using om (which is also great). Anyway, in om I attached a watcher to the root app-db which validated against a

Re: [ClojureScript] Re: re-frame - validating the entire db, not just handler specific context

2015-03-26 Thread Mike Thompson
On Thursday, March 26, 2015 at 11:22:10 PM UTC+11, Colin Yates wrote: And this would need to be in the 'after' part of the middleware. I wonder if there is merit in splitting relevant handlers into 'db-changes' and 'side-effects' (in my application, not re-frame) so that the middleware can

[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] 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

[ClojureScript] Re: Macros and type hints

2015-03-24 Thread Mike Thompson
On Monday, March 23, 2015 at 6:58:27 PM UTC+11, Mike Thompson wrote: I have a macro: (defmacro m [x] `(if-not ^boolean js/goog.DEBUG ~x));;; NOTICE the type hint I use it: (macroexpand-1 '(m blah)) ;; = (clojure.core/if-not js/goog.DEBUG blah) Notice how the type hint

Re: [ClojureScript] Macros and type hints

2015-03-23 Thread Mike Thompson
On Monday, March 23, 2015 at 8:40:37 PM UTC+11, Karsten Schmidt wrote: Hi Mike, is that by any chance meant for re-frame? If so, I've got an updated fork with refactored logging using cljs-log[1] and will send PR later today... Cljs-log fully elides logging calls at compile time based on log

[ClojureScript] Macros and type hints

2015-03-23 Thread Mike Thompson
I have a macro: (defmacro m [x] `(if-not ^boolean js/goog.DEBUG ~x));;; NOTICE the type hint I use it: (macroexpand-1 '(m blah)) ;; = (clojure.core/if-not js/goog.DEBUG blah) Notice how the type hint is gone. But I need that type hint there otherwise the if test on js/goog.DEBUG

[ClojureScript] Re: [re-frame] structuring handler and subs

2015-03-22 Thread Mike Thompson
On Sunday, March 22, 2015 at 12:37:20 AM UTC+11, Sven Richter wrote: Hi, I was integrating re-frame in the last days into an application that I am working on. Now, after finishing one page I get the feeling that my structure is messy and after a few days of a break I have a hard time to

Re: [ClojureScript] Re: re-framing re-frame

2015-03-19 Thread Mike Thompson
On Friday, March 20, 2015 at 9:29:44 AM UTC+11, Karl Guertin wrote: By my understanding, the core pattern is a flux variation. Differences from Facebook's original flux pattern: There's only one store and it's a global ratom. You can compute views from the root store or other derived

Re: [ClojureScript] Re: re-frame with a large application

2015-03-18 Thread Mike Thompson
On Wednesday, March 18, 2015 at 9:18:16 PM UTC+11, Colin Yates wrote: Not to go too far down the 'communicate with local state' tangent, but isn't a global event-bus (eg. a (chan)) sufficient? I use om and app-state for all state (except projections) and haven't found any of the given

Re: [ClojureScript] Re: re-frame with a large application

2015-03-17 Thread Mike Thompson
On Wednesday, March 18, 2015 at 1:09:12 PM UTC+11, Mike Haney wrote: In my experience, using component local state seems harmless enough in the beginning, but I almost always find a need to move it to global state as an app matures. A few common examples: - text input: local state works

[ClojureScript] Re: Again re-frame and external javascript lib needing db state

2015-03-14 Thread Mike Thompson
On Sunday, March 15, 2015 at 4:30:35 AM UTC+11, Sven Richter wrote: Hi, I am still trying to integrate resumable.js. Got it mostly working so far. What I currenlty do is this. Define a global resumable object: (defonce resumable (js/Resumable. (clj-js {:target /files/upload

[ClojureScript] Re: ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-14 Thread Mike Thompson
On Saturday, March 14, 2015 at 2:52:45 PM UTC+11, AndyR wrote: On Friday, March 6, 2015 at 11:28:59 PM UTC-5, Mike Thompson wrote: re-frame is a pattern for writing SPAs, using Reagent. https://github.com/Day8/re-frame [...] - pushes Reagent's FRP capabilities (via use of reaction

[ClojureScript] Re: re-frame pattern with external javascript

2015-03-13 Thread Mike Thompson
On Friday, March 13, 2015 at 10:10:55 PM UTC+11, Sven Richter wrote: Hi, I am trying the re-frame pattern with resumable.js. Resumable.js needs one to execute a function on an existing dom element like this: r.assignBrowse(document.getElementById('browseButton')); Now, the problem is,

[ClojureScript] Re: namespacing re-frame handlers

2015-03-12 Thread Mike Thompson
On Friday, March 13, 2015 at 1:31:01 PM UTC+11, Mike Thompson wrote: On Friday, March 13, 2015 at 6:04:21 AM UTC+11, Jamie Orchard-Hays wrote: As I'm starting to explore re-frame in a playground app, one of my first questions is how does one namespace handlers in a medium to large app

[ClojureScript] Re: namespacing re-frame handlers

2015-03-12 Thread Mike Thompson
On Friday, March 13, 2015 at 6:04:21 AM UTC+11, Jamie Orchard-Hays wrote: As I'm starting to explore re-frame in a playground app, one of my first questions is how does one namespace handlers in a medium to large app? I'm thinking you'd just simple namespace the keyname: (register-handler

[ClojureScript] Re: ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-10 Thread Mike Thompson
On Tuesday, March 10, 2015 at 2:03:00 PM UTC+11, Mike Thompson wrote: On Tuesday, March 10, 2015 at 2:14:42 AM UTC+11, Mike Haney wrote: I'm really enjoying re-frame. I've tried several different architectures over the last 6 months and ended up with something about 80% similar to the re

Re: [ClojureScript] ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-10 Thread Mike Thompson
On Tuesday, March 10, 2015 at 4:18:41 PM UTC+11, marc fawzi wrote: The miscommunication I see is this: In many SPA frameworks like Angular and Ember, the resuable components cannot work as is across frameworks. Therefore, they have certain dependencies on the framework that cannot be

[ClojureScript] Dead Code Elimination

2015-03-10 Thread Mike Thompson
This issue from David Nolen, caught my eye: https://github.com/andrewmcveigh/cljs-time/issues/21 Feels like there is important information there, but I just don't know enough to interpret what's said. Can anyone help? If I have this: (def x {:a 1 :b 2}) David is saying that x can't be

Re: [ClojureScript] ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-09 Thread Mike Thompson
On Tuesday, March 10, 2015 at 2:35:24 PM UTC+11, marc fawzi wrote: Since when can an Angular component work as is in a React environment or a Backbone component (view) work in another Backbone implementation without changes? That is what I mean, and I don't have to get into the re-frame

Re: [ClojureScript] ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-09 Thread Mike Thompson
On Tuesday, March 10, 2015 at 3:35:19 AM UTC+11, marc fawzi wrote: one glance at the re-frame wiki (searched for: reaction)  https://github.com/Day8/re-frame/search?utf8=%E2%9C%93q=reaction and I realize now it's some form of pub-sub ... so I can guess the kind of abstraction Mike

Re: [ClojureScript] ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-09 Thread Mike Thompson
On Tuesday, March 10, 2015 at 3:26:30 AM UTC+11, marc fawzi wrote: I'm sure it is!  The only issue I have at a very high level is that SPA frameworks should intrinsically support re-usable component at the architecture level. If this one does then I'm def going into it head first. But I

[ClojureScript] Re: Reagent: What is the proper way of defining component properties?

2015-03-08 Thread Mike Thompson
On Sunday, March 8, 2015 at 5:51:06 PM UTC+11, Nils Blum-Oeste wrote: Thanks Mike, I had seen that already. IMHO it does not really explain this properly because props are only used in the render function in that example but not in the lifecycle hooks. My current solution is to use

[ClojureScript] Re: ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-08 Thread Mike Thompson
On Sunday, March 8, 2015 at 10:11:43 PM UTC+11, Mike Thompson wrote: How would you allow an event handler to register for all events? Right now each one is required to explicitly register for each event via keyword. I have modified re-frame to allow handlers to also register a function

[ClojureScript] Re: ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-08 Thread Mike Thompson
How would you allow an event handler to register for all events? Right now each one is required to explicitly register for each event via keyword. I have modified re-frame to allow handlers to also register a function that does the test. re-frame is quite a flexible base. You should be

[ClojureScript] Re: Reagent: What is the proper way of defining component properties?

2015-03-07 Thread Mike Thompson
On Sunday, March 8, 2015 at 8:10:07 AM UTC+11, Nils wrote: Ilya, did you figure something out to do this in a nicer way? I am struggling with this too. This should help: https://github.com/Day8/re-frame/wiki/Creating-Reagent-Components#form-3-a-class-with-life-cycle-methods -- Note that

[ClojureScript] ANN: re-frame v0.2.0 - an FRP MVC pattern for writing SPAs in Reagent. (Woah, so many LTAs!!)

2015-03-06 Thread Mike Thompson
re-frame is a pattern for writing SPAs, using Reagent. https://github.com/Day8/re-frame This release includes the obligatory TodoMVC example: https://github.com/Day8/re-frame/tree/master/examples/todomvc Improvements to documentation in the Wiki: https://github.com/Day8/re-frame/wiki Change

Re: [ClojureScript] Re: ANN: re-frame 0.1.7 Initial Release

2015-03-04 Thread Mike Thompson
On Saturday, February 28, 2015 at 1:44:52 AM UTC+11, Erik Price wrote: On Thu, Feb 26, 2015 at 7:55 PM, Mike Thompson m.l.tho...@gmail.com wrote:  The key thing for me is:  JUST. DON'T. USE. CURSORS. There I said it. They appear convenient, I know. They are a way of achieving reference

Re: [ClojureScript] Re: ANN: re-frame 0.1.7 Initial Release

2015-02-27 Thread Mike Thompson
How would your cursor-less architecture help this case? If it's hard to visualize or vague I would be happy to document it in a video. Reframe is about overall (in client) architecture, not reusable components We're releasing a library of reusable Reagent components in the next week or so

[ClojureScript] Re: ANN: re-frame 0.1.7 Initial Release

2015-02-27 Thread Mike Thompson
On Saturday, February 28, 2015 at 1:14:08 AM UTC+11, Martin Klepsch wrote: Strangeloop talk: https://www.youtube.com/watch?v=fU9hR3kiOK0 The talk is about Turning The Database Inside Out, apparently nothing to do with FRP. The discussion about Derived Data (streams everywhere) happens around

[ClojureScript] Re: ANN: re-frame 0.1.7 Initial Release

2015-02-27 Thread Mike Thompson
On Friday, February 27, 2015 at 7:13:31 PM UTC+11, Sven Richter wrote: Hi Mike, This looks good :-) Do you consider releasing a library with some convenience functions and an exposed API for this? Hi Sven, The re-frame repo contains a reference implementation. It is in clojars.

[ClojureScript] Re: ANN: re-frame 0.1.7 Initial Release

2015-02-26 Thread Mike Thompson
On Thursday, February 26, 2015 at 10:19:05 AM UTC+11, Jane Dampney wrote: On Wednesday, February 25, 2015 at 10:52:23 PM UTC+11, Mike Thompson wrote: A Reagent Framework For Writing SPAs, in ClojureScript. README and source code: https://github.com/Day8/re-frame Derived data, flowing

[ClojureScript] Re: Saving a file

2015-02-14 Thread Mike Thompson
On Friday, February 13, 2015 at 6:05:37 PM UTC+11, Jensontech wrote: I need to allow the user to save content generated by Clojurescript to their local drive. I do it using this code - (defn- save-file [filename content] (let [lnk (get-element-by-id file-export-link) blob

Re: [ClojureScript] Om reagent: keys in components

2015-02-07 Thread Mike Thompson
On Sunday, February 8, 2015 at 12:11:22 AM UTC+11, Colin Yates wrote: Reading Dynamic Children in https://facebook.github.io/react/docs/multiple-components.html might provide clarity. I think the key needs to be globally unique (where globally refers to the set of rendered elements rather

[ClojureScript] Re: Om or quiescent ?

2014-12-08 Thread Mike Thompson
On Sunday, November 30, 2014 3:42:52 PM UTC+11, James MacAulay wrote: On Saturday, 29 November 2014 08:44:42 UTC-5, Nikita Dudnik wrote: I don't think FRP and virtual-dom based frameworks are mutually exclusive approaches to building front-ends. React (or any stand-alone implementation

[ClojureScript] Re: Turning off optimization to speed compilation during development

2014-11-27 Thread Mike Thompson
is really significant. If you want to mix `:none` with a unittest framework, then this may help: https://github.com/mike-thompson-day8/cljsbuild-none-test-seed -- Mike -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because

Re: [ClojureScript] Re: Turning off optimization to speed compilation during development

2014-11-27 Thread Mike Thompson
On Friday, November 28, 2014 3:21:09 AM UTC+11, Kyle Cordes wrote: On Thu, Nov 27, 2014 at 7:08 AM, Colin Yates colin.ya...@gmail.com wrote: Mike, that's brilliant. Downloading it now. It is a great thing to have handy, and it is also points to another example of the problem I was

[ClojureScript] Re: Om or quiescent ?

2014-11-27 Thread Mike Thompson
On Friday, November 28, 2014 6:42:47 AM UTC+11, Dein Diener wrote: Hi, i am new to clojurescript and want to build a small webapp with it to learn. I took a detailed look at the todo sample-app of 1. om and 2. quiescent and found the second one (quiescent) easier to understand... so i would

[ClojureScript] Re: js-clj in node

2014-11-03 Thread Mike Thompson
I think i'm having this same problem again, with [org.clojure/clojurescript 0.0-2371] : 'files' comes from http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback when i call (type (js-clj files)) i get #function Array() { [native code] } This function turns the

[ClojureScript] Re: reagent: how to initialize state?

2014-09-16 Thread Mike Thompson
Just for completeness, I note that you could also have done this: (defn weeks-view [calendar] (fn [calendar];; calendar added here (let [weeks (partition 7 calendar)] [:tbody.weeks (for [week weeks] [week-view week])]))) -- Note that

[ClojureScript] Re: Evaluating js compiled with :optimization :none in Nashorn

2014-08-06 Thread Mike Thompson
(specifically his PhantomJs runner file https://github.com/mike-thompson-day8/cljsbuild-none-test-seed/blob/master/test/bin/runner-none.js), but since he's using PhantomJs rather than Nashorn I'm a little stuck on my issue. (let [js (doto (.getEngineByName (ScriptEngineManager.) nashorn

[ClojureScript] Re: Dependent picklists using Reagent

2014-08-05 Thread Mike Thompson
On Sunday, August 3, 2014 5:48:14 AM UTC+10, Jonathon McKitrick wrote: I have three select components (picklists) which are dependent. The first determines the values of the second, and so on to the third. I'm able to get the first pair working, but the second pair has been tricky. Has

[ClojureScript] String Interning

2014-07-18 Thread Mike Thompson
In CLJS the following evaluate to true: (identical? abcd (join [\a \b \c \d])) (identical? 24.5 (str 24.5)) But they return false in CLJ. So it appears as if CLJS is interning strings. My two questions: 1. Is this *currently* always true? Or are there limits and edge cases?

[ClojureScript] Re: Comparing React.js libraries

2014-06-22 Thread Mike Thompson
On Monday, June 23, 2014 1:32:27 AM UTC+10, Jonathon McKitrick wrote: On Friday, June 20, 2014 10:29:38 AM UTC-4, Jonathon McKitrick wrote: I discovered that along with Om, there are Reagent and Quiescence. Has anyone worked with the latter alternatives, and how might I decide what the

  1   2   >