This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-07
Channels
- # admin-announcements (19)
- # announcements (1)
- # beginners (14)
- # boot (244)
- # cider (2)
- # clojure (23)
- # clojure-dev (23)
- # clojure-poland (55)
- # clojure-russia (118)
- # clojure-uk (4)
- # clojurescript (143)
- # core-async (31)
- # core-logic (1)
- # cursive (30)
- # datascript (2)
- # datomic (3)
- # emacs (7)
- # hoplon (40)
- # ldnclj (8)
- # off-topic (2)
- # om (64)
- # reagent (10)
- # ring (1)
- # yada (71)
feedback welcome on this now - https://github.com/omcljs/om/wiki/Quick-Start-%28om.next%29
@dnolen: https://github.com/omcljs/om/wiki/Quick-Start-%28om.next%29#checkpoint the println call there failed with no print-fn defined
@dnolen: not a fix but a suggestion. You had a slide about the different query and mutation forms in your recent om.next talk. I think it would be useful to see that diagram when you introduce the parser. Also, don’t know if you have any drawings for the indexer concept but since its a somewhat new concept (at least for me), it would be nice to have something to help visualize it. I imagine it as a hash map lookup with several different indexes but I’m not sure if thats the right way to think about it. The content felt well thought out and was easy to follow without any large logical jumps
needs more explication but rough DataScript integration bits up https://github.com/omcljs/om/wiki/DataScript-Integration-Tutorial
@dnolen What's the expected CLJS fluency for the target audience for OM-Next quick start?
If you want this to be beginner friendly you may want to make sure the REPL snippets can be run as-is, for example by adding the necessary requires.
@ivern good point in this case you don’t need requires when using Figwheel, just some (in-ns …)
stuff
> The reconciler will do this on our behalf as it may need request data from an endpoint first.
I'm not clear if 'request data' is a noun there, or it should be 'to request data'
@mcgivernsa: thanks fixed
that tutorial is really good, the first moment when you reset the state to a previous UUID is pretty special
@mcgivernsa: glad you’re enjoying it
@dnolen: I'm trying to play with om.next in a boot project. Since boot can't handle git dependencies, I've included om from master as a git submodule. Anyway, it seems the "static" in "static om/IQuery breaks my app. Do I need a specific CLJS version or something else for it?
Right. I think somehow I'm not including om in my sources correctly because it's not pushing next.cljc to my boot build results in target/.
@jannis have you tried installing om to your local maven repo and then including [org.omcljs/om “0.9.0-SNAPSHOT”]?
@dnolen: I read that om/transact! is intended for components and only works against the reconciler for "development convenience". If a non-UI part of the app (e.g. something that polls a server for data in the background) wants to update the application state, is it still a good idea to use om/transact! or would you recommend something else?
Another example would be a secretary-based routing solution that parses the new location into path segments and sets something like :app/route so that a UI routing component can query the route and decide which child to render.
it is mostly there for development convenience but I’m sure people will have lots of ideas that I haven’t thought about
and we’ll suss out what should be better supported as we transition to alpha and then beta
@dnolen: I'll be playing with it more over the next couple of days and see how I like it.
Something like (om/query reconciler [:app/counter :app/something-else])
that returns the results of the query?
@jannis this is what om.next/parser
let’s you do, create a parser you can pass that to the reconciler and hold onto it as well
but you would need to supply the env
parameter yourself, normally the reconciler does this
Wouldn't a query counterpart to om/transact!
make sense that can operate against the reconciler, so the reconciler would provide the env (since it already knows about it anyway)?
this is less clear - this just sounds like a convenience for something that doesn’t have a rationale yet
transact is very different since many actors will want to transition the application state
Right. I might be incorrectly looking at parts of the reconciler as an API to access and modify the app state. Coming from the old om world...
It feels asymmetric to have a powerful interface to mutate the application state but having to use something else (e.g. a bare atom) for getting state information out.
in a real application you can just a) look at the atom b) query DataScript c) query Datomic or your end point directly
I'm new to this (ClojureScript, Om, DataScript, everything really), you know this world much better
been reading the Om Next wiki and it's filled with cool ideas. one thing I didn't understand is for a query expression like
[{:app/counter [:db/id :app/title :app/count]}]
after evaluating what is the advantage of the value for :app/counter being a vector containing a map rather than just a map?