carry

kauko 2016-06-30T03:57:59.000187Z

looks good!

kauko 2016-06-30T03:58:16.000188Z

So the atom-sync middleware can also be used for resetting the model from the REPL, right?

kauko 2016-06-30T05:26:23.000189Z

@metametadata: another improvement that came to mind: it would be nice if you could give a white/blacklist of keywords to the logging middleware. I really don't want it to log what happens in the debugger 🙂

kauko 2016-06-30T05:26:42.000190Z

I guess this is a minor issue though, but still

metametadata 2016-06-30T06:11:13.000191Z

yes, for REPL you'll have to create your own external "model atom" and connect it with the app via the middleware, smt like this:

(def repl-model (atom (:initial-model my-spec))
(def my-app (carry/app (-> my-spec (atom-sync/add repl-model))))
; ...
then after app is started repl-model will behave as if it was a model atom.

metametadata 2016-06-30T06:20:52.000192Z

To fix logging try changing the order of applying logging and debugger middleware. If applied last, logging middleware will catch all the signals:

(-> spec ... (debugger/add ...) logging/add)
And this way logger won't see debugger's signals and actions, because they don't propagate into the debugged app:
(-> spec ... logging/add  (debugger/add ...))

kauko 2016-06-30T07:29:50.000193Z

ohh

kauko 2016-06-30T07:29:52.000194Z

cool!

kauko 2016-06-30T07:29:55.000195Z

should document that

kauko 2016-06-30T07:30:34.000196Z

any plans on adding a spec middleware btw?

kauko 2016-06-30T07:31:18.000197Z

Though I was thinking that one good way to develop an app with carry would be that you define a plumatic schema for your whole model, and clojure.specs for individual functions

metametadata 2016-06-30T07:52:57.000198Z

OK I'll prob add this into faq or user guide

metametadata 2016-06-30T07:53:12.000199Z

I haven't digged into core.spec yet

metametadata 2016-06-30T12:38:49.000201Z

@kauko: carry-atom-sync middleware is extracted and there's an example of using it with Devcards/Reagent in counter-devcards. Doc updates are on the way.

kauko 2016-06-30T14:51:17.000205Z

wohoo 🙂