Thanks! I figured out how to make the line numbers correct again, by rerunning lein clean, lein figwheel and reloading the page. So what I have works now, but I am interested in better ways, since I am just starting out with this project and now is the lowest cost to change things.
My intention is for iterative development with figwheel: I don't want to reload e.g. all the JS objects every time I change the code. I started out using a global atom state with paths into it, something like a state monad, but without any monad library just passing the state and returning new, but then I figured I wanted to use namespaces and function calls instead of a global state in order to have clearer dependencies. Yeah I figure I should perhaps be using something like a React wrapper (for my DOM related state) or component library like https://github.com/stuartsierra/component (is that what you mean by lifecycle?), but I haven't figured out what the best solution is yet, so I tried starting out with something simple. I want to be doing React-style reloadable development, except most of my data won't render to DOM, it will render to WebGL. Perhaps https://github.com/Izzimach/react-three will be useful, but I prefer something more general. I want to use promises and funcool/promesa in combination with whatever I choose for state and dependency management. I need basically the same solution server side as well (also ClojureScript), for maintaining DB connections etc. -- Eivind Magnus Hvidevold Cell: +47 92 678 423 On Tue, Oct 6, 2015 at 11:15 PM, Leon Grapenthin <[email protected]> wrote: > You are memoizing a 0arg #(~iname) which makes no sense and should be a > starting point for debugging. I am not quite sure if I understand your > intention, but would recommend starting with something simple like > > (defmacro defmemoized [name expr] > `(def ~name (memoize ~expr))) > > I don't see why you'd want to defonce. > > In general I can't recommend using memoize at the top level because it > introduces global state that is inaccessible and never cleaned up. Unless > you know that your function will be called with a limited set of arguments > it is preferable to create the cached function in a lifecycle and pass it > down. > > -- > 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" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- 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" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
