This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-24
Channels
- # aws (3)
- # aws-lambda (1)
- # beginners (16)
- # boot (36)
- # cider (3)
- # cljs-dev (90)
- # cljsjs (1)
- # cljsrn (27)
- # clojure (240)
- # clojure-austin (1)
- # clojure-berlin (3)
- # clojure-dusseldorf (2)
- # clojure-france (2)
- # clojure-germany (12)
- # clojure-russia (19)
- # clojure-spec (20)
- # clojure-uk (56)
- # clojurescript (218)
- # clojurex (1)
- # cursive (21)
- # datomic (10)
- # events (1)
- # hoplon (18)
- # instaparse (19)
- # jobs-discuss (3)
- # lein-figwheel (3)
- # luminus (3)
- # lumo (14)
- # off-topic (4)
- # om (76)
- # onyx (67)
- # protorepl (12)
- # re-frame (54)
- # reagent (35)
- # ring (2)
- # spacemacs (5)
- # specter (2)
- # sql (11)
- # untangled (144)
- # yada (34)
it is a graph database, and idents are the graph edges. The table entries are the nodes
@tony.kay: alright, so we squint, untangled state = really a db, since it's a COLLECTION of TABLES (with keyword = table, id = pointer to row of table) ui components = (data->dom (some-query)) because ui components have two parts: (1) what do I need to render this UI (the query part) (2) how do I render the data (the data->dom) part is the above correct?
To anyone interested in Untangled and related tech: I'm going to be at clj west. I'm willing to do an Unsession around anything there is interest in. Open to suggestions. Let me know.
@qqq I wouldn't say it hides anything. It exposes exactly what is needed and no more. A query + a render + a way to understand where in the database a given UI component's data lives (ident)
@tony.kay: by "hide" I meant in the sense that a neighbor playing loud rock music "hides" the beethoven sonata you're trying to listen
the idea is still there, but the first thing a n00b sees is the datomic pull syntax / om/dom stuff
of course. It is an unfortunate truth of abstract concepts: knowing what/how/why of something is not self-evident
I can show you syntax for Haskell Monads, but you'll be reading for a few weeks to "get it"
I'm coming from regent/re-frame, and basically everyone told me how complicated om/next would be -- and in many ways, I don't disagree with them; this really unfortunately makss the elegance of untangled
Rich Hickey said it best: as developers, many of us are too enamored with "easy". Can I start using it right now and not have to think? Is it already familiar?
Good developers are open to learning and the wider context of simplicity, which is not necessarily always easy
I do think the docs can be improved a bit though; it wasn't until I got the untangled todomvc server/client example working that I realized "untangled makes it worthwhile to learn om/next"
Feel free to make suggestions. But make sure you've looked over what's available. I've done a lot of work on the docs/videos
's not until I get halfway through that I come across something that can't be easily done in re-frame
I believe that if the full client/server power was shown off earlier, there'd be more converts
Yep: data-driven wins once you go beyond simple examples. But that is the problem: you have to get to the "in the large" problems before it pays off...but then, that is what most of us are building: stuff that gets large.
so keeping someone's attention long enough to get there is hard. That is a good observation, though. More advocates stressing the full-stack story.
or even the in-the-large story. You can make a mess in anything. As things get large, better abstractions lead to an ability to keep things simpler. Still, people still manage to tangle up Untangled 🙂
@tony.kay: I agree that untangled is the right framework. I also think that more users = more libraries, more bug reports, faster bug fixes. In this sense, a way to make people immediately aware what untangle offers over other frameworks would be beneficial.
Always open to suggestions/contributions. I have a feeling it is advertising some of the stuff we already have as resources (e.g. videos) in a venue that gets more visibility
I'm trying to get around this problem: start from scratch ==> people have to go through om/next + datomic/pull before starting to see power of untangled start with existing codebase ==> have to pick boot vs lein, cursive vs emacs, etc ... so some group of ppl put off, and it becomes fragile to maintain
yeah, we already decided lein+cursive. Most widely approachable...and with nREPL support the emacs ppl are covered.
btw, the todo mvc is out dated, it uses a version of data-fetch that doesn't work wil the devguide
data-fetch API has had additions (and deprecations) but I don't think any of it has been removed. But worth checking
I have the weirdest bug:
`
(. js/console log (= (om/get-query Ex2-Child) [:id :n])) ;; returns true
(query [this] [{:items [:id :n]}]) ;; works fine
(query [this] [{:items (om/get-query Ex2-Child)}]) ;; fails to extract data
http://www.parens-of-the-dead.com/ <-- this is what switched me from vim to emacs
(om/get-query Ex2-Child) // returns ['*]
(query [this] [{:items ['*]}]) // returns {:items [{:id 1, :n 3} {:id 2, :n 9}]}
(query [this] (om/get-query Ex2-Child)) // returns {:items [{:child/by-id 2} {:child/by-id 2}]}
I'm completely confusedsorry, (was copying/pasting from other machine) for the second one, I meant to write
(query [this] [{:items (om/get-query Ex2-Child)}])
http://untangled-web.github.io/untangled/guide.html#!/untangled_devguide.G_Mutation_Exercises
would a less patient person say "the problem is you don't understand datomic pull syntax" ?
the get-query
adds metadata to the query. So when you compose queries using get-query
it augments the query data structure
so, I don't have enough context (and I have to leave to meet someone, so I cannot take the time to establish that context), but yes: the metadata affects how things work. Normalization in particular
it is how normalization gets done. If you don't have it, your initial database gets hosed (not normalized)
David Nolen's tutorial on normalization on the Om wiki. The dev guide certainly tries to explain it. My clojure west unsession (youtube from last year).
from a component/default database format perspective. Untangled adds a lot of the glue.
The dev guide sections on app state database and queries is possibly the most approachable source...but you've done those already
should: (query [this] ['*]) and (query [this] '[*]) be equivalent (note the order or ' vs [ ). If not, why not?
I do not (immediately) see a reason for a difference. But quoting is one of those weird things
okay, so I've just read through parts of the devguide a second time; I don't see this part: where is the claim that: om/get-query adds metadata and may effect how the query is run stated ?
It is talked about quite a lot in various docs. As long as you always use get-query
for subqueries in your components I don't think you will be hurt too much. I just did a google search: 'om next query metadata' - plenty of info there.
@tony.kay: finally got to section H: http://untangled-web.github.io/untangled/guide.html#!/untangled_devguide.H_Server_Interactions it may be that I'm slow, but it took me 2 days to get through the basics of untangled to get to the interesting (networking) part 😕
https://github.com/untangled-web/untangled-ui <-- is the only way to view the components to clone the repo and run it locally ? 🙂
@qqq It takes a while but it is worth it
Is there a "minimal" untangled client/server example? The todo-mvc is > 600 LOC, I'm looking for something at ~ 50LOC where it's minimal client/server, and nothing else.
@qqq have you tried the getting started videos? I know you are not interested in the Cursive parts, but there is a lot of info in there, and many ppl have found them easier to get going on. I'd be interested in your experience
@mitchelkuijpers @wilkerlucio @currentoor @jasonjckn @therabidbanana I've proposed a "Why Om Next/Untangled" Unsession at clj west. I'd be really interested in input you might have on your experience with competing popular tools and why you are here. I don't have a lot of explicit experience with things like Re-frame et al, so it would be helpful to have some external input. In particular, if any of you would be willing to have a skype/hangout/voice chat of some sort in the coming weeks it would be really helpful. Trying to do some community building.
I am in @tony.kay we are still migrating away from re-frame
@tony.kay the major Untangled selling point to me is: you gonna have to write this anyway, so better have this as a library we can all collaborate on instead of trying to rewrite every time
I was really impressed on the beginning, when I was trying to write my own, and then you came with Untangled solving the exact same stuff I was doing, so was love at first sight 🙂
@tony.kay: I randomly sampled a few snippets of the getting started videos: please corrrect me if I'm wrong: (1) those videos don't start from scratch (2) those videos jump into an existing code base
@qqq I'd like to know if the getting started videos seem to advanced for a cljs dev that has no Om Next
this is not a comment on the videos, but at this point, I actually find the "untangle reference manual" to be better written than the "untangle devguide"
if this section: https://untangled-web.github.io/untangled/reference/reference.html#_untangled_server_and_full_stack_integration had actual sample code, I'd probably be complete
@qqq I’m planning on working on server documentation on the weekend and/or next week, so I’ll make sure I add code samples to that while im there
so the simplest untangle example is a counter ;;
current count is: N
[ click this button to increment N ]
now, the simplest example I would want -- is one where N is stored remotelyi dont think i’ve seen that example, but the gist of is that you would do :remote true in the client mutation, and implement a server mutation to update the server state
this seems relevant https://www.youtube.com/watch?v=fH0DX0Dubx8&list=PLVi9lDx-4C_T_gsmBQ_2gztvk6h_Usw6R&index=10
ah sorry, you also want index=7, "server basics"
personally i like watching videos at 1.5x speed, but that can be too fast if you arent used to it
now, to see a particular page of code, it's "hmm, let me guess which minute/second time stamp was this on the screen at" ?
someone needs videos that are synched with git tags; so at any point, I can say "in video X, at time MM:SS", what does the git repo look like?