Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 12 2021 12:30
    fahtative commented #26
  • Sep 12 2021 12:17
    fahtative commented #26
  • Sep 12 2021 12:17
    fahtative commented #26
  • Sep 12 2021 12:13
    fahtative commented #26
  • Sep 12 2021 12:01
    fahtative commented #26
  • Sep 12 2021 12:01
    fahtative commented #26
  • Sep 12 2021 11:59
    fahtative commented #26
  • Sep 12 2021 11:59
    fahtative commented #26
  • Nov 30 2020 19:39
    metasoarous closed #34
  • Nov 30 2020 19:39
    metasoarous commented #34
  • Nov 16 2020 05:16
    metasoarous commented #34
  • Nov 14 2020 12:15
    jpmonettas commented #34
  • Nov 14 2020 12:14
    jpmonettas synchronize #34
  • Nov 14 2020 00:59
    metasoarous commented #34
  • Nov 14 2020 00:58
    metasoarous commented #34
  • Nov 14 2020 00:57
    metasoarous commented #34
  • Jul 22 2020 12:14
    jpmonettas commented #34
  • Jul 21 2020 21:34
    metasoarous commented #34
  • Jul 11 2020 13:34
    jpmonettas synchronize #34
  • Jul 07 2020 12:12
    xlfe commented #35
Christopher Small
@metasoarous
@bamarco Awesome!
Is the remaining issue that it won't garbage collect properly/automatically?
Brian Marco
@bamarco
the :on-dispose issue is related to that. The worse problem is that make-reaction is not updating period. If you use the atoms directly it works, but not inside a derived-atom.
I fixed a small bug that was hiding the big one from me.
It may only be a problem with nil starting values. haven't tested yet because all my code in onyx-sim is re-com based and not rum compatible
I also tried using build-defc from rum, but couldn't get that to work either.
Brian Marco
@bamarco
Okay I found a fix, but now I need to test to make sure I didn't break the reagent plugin. It'll have to be tomorrow
Christopher Small
@metasoarous
Awesome man! Thanks for working on that!
Brian Marco
@bamarco
Got it tested will push to my pr after i get wifi back
Brian Marco
@bamarco
Okay. The pr is in good shape except for the comment by @alexandergunnarson. The only reason I made any changes to posh.ratom at all was because it was putting errors and warnings in my figwheel project.
Anybody know the right fn call for array? mpdairy/posh#30
Brian Marco
@bamarco
@alexandergunnarson I think I figured out the issue. The if-cljs macro may be functioning off a little bit. Testing to see if that's the problem now.
Brian Marco
@bamarco
Nope just needed to fully qualify the name cljs.core/array works
Okay rum support pr should be good to go now
Christopher Small
@metasoarous
Dope!
Brian Maddy
@bmaddy
Is there a way to do a pull-all in posh? I'm trying to write a pull-all version of this: https://github.com/denistakeda/re-posh/blob/master/src/re_posh/subs.cljc#L16
Mapping over ids with p/pull gives errors. I suspect because it returns a reaction (which I don't really understand yet).
Brian Marco
@bamarco
@bmaddy try using deref after each individual pull (add it to your mapping function). This will give the value for the reaction. You may need to wrap the whole thing in a reagent.core/make-reaction function if re-posh isn't doing that automatically where you are calling the derefs.
Brian Maddy
@bmaddy
Awesome, that totally worked @bamarco, thanks!
(defmethod re-posh.subs/execute-sub :pull-many
  [{:keys [pattern ids]}]
  (reaction
   (mapv #(deref (p/pull @re-posh.db/store pattern %)) ids)))
Tyler Tolton
@Defunctionalize

okay! So, I'm starting out with dat[ascript|omic] for the first time via re-posh and it's terrifying! I don't know how doing things works :sweat_smile: :

okay, so I have the following value in my app-db:

@re-frame.db/app-db
=> [{:db/id -1, :app/type :type/account, :account/balance 800}]

and I made a subscription like so:

(rp/reg-sub
  :account-balance-id
  (fn [_ _]
    {:type :query
     :query '[:find ?id .
              :where [?id :app/type :type/account]]}))
and, firstly, it seems to be getting nil. secondly, I have no idea what the dot in :find ?id . is for. I just copied it from the todomvc
I just don't understand enough about the workflow to debug and troubleshoot. :/
Tyler Tolton
@Defunctionalize
figured it out. sorry for the newb question. I was dispatching using the reframe reg-event-db function.. :sweat:
Tyler Tolton
@Defunctionalize
This message was deleted
Brian Hurlow
@bhurlow
Hello Posh folks! Apologies if this topic is ongoing somewhere else, but I wanted to check and see if anyone has any progress on the combining client queries into a "scoped" datomic view? as outlined in this thread: mpdairy/posh#3 I'm curious if anyone has attempted to analyze the query data to produce a set of datoms suitable for bootstrapping the datascript client :fishing_pole_and_fish:
Will
@Lokeh
are there any examples of plugins for other view frameworks? e.g. rum, quiescent, etc.
Christopher Small
@metasoarous
@lokeh To my understanding there is a rum plugin, or at least some work on one, but it may still be under code review. Check the PRs and issues. Would love to see a quiescent binding.
Brian Marco
@bamarco
@Lokeh I wrote a rum plugin. There were a few bugs with it. I’ve fixed most of them, but haven’t had time to test them to make sure the fixes didn’t introduce new problems. I was also working on a refactor to make the plugin process more robust (the combination of libraries is going to become burdonsome without a more generic way to bind libraries) but I think my solution was too complex so I have abandoned it for now (I think the latest version of spec will address some of these issues)
Tyler Tolton
@Defunctionalize
Is there like, a whitepaper on the concept of pattern matching event data to determine if a subscription needs to be updated? The concept seems so incredibly valuable I'm surprised it isn't discussed more
Christopher Small
@metasoarous
Differential datalog
Tyler Tolton
@Defunctionalize
holy crap, thats amazing
this could be really awesome
Christopher Small
@metasoarous
Yes, and this has been worked on now in Rust, with a Clojure API: https://www.youtube.com/watch?v=ZgqFlowyfTA
drew
@drewverlee

Greetings, hopefully this is the right place to ask this type of question, otherwise i would be happy to move the discussion else where.

Anyone want to try their hand at comparing re-posh (or maybe just posh) to Fulcro? As a starting point, im trying to understand why Fulcro isn't taking advantage of Datascript. The only comment i can find on the subject dates back a year ago when i specifically asked about it on reddit and the short answer was "performance, maybe".

In a larger sense, i see both approaches as very similar in nature. With the key being that client Db is a materialized view of your persisted database. Assuming we have reactive datalog (do we? whats the state of that???) Then i'm some what confused we weren't just building systems that look like datomic queries with some html around them.

In approaching this, im reading through the docs for a lot of projects and i assume ill be doing spikes in them as well as diving into code. None of this is meant to lessen the work anyone is going, rather i assume there are very real trade offs in each approach that matter and mostly this is trying to ferret out the differences because im assuming there enlightening!

Christopher Small
@metasoarous
A big difference is that Fulcro is Om based, while Posh's main API is reagent based (though there's a rum plugin as well, and in theory it could be redesigned to work with om as well).
We do sort of have true reactive datalog via 3df now, but it is mainly designed for running with datomic on the JVM for now. The main obstacle to using on the browser is that the 3df implementation is written in rust (timely dataflow). I've heard tell that this has been successfully compiled to web assembly, but I have yet to try this myself, and have no idea what the distribution details look like there. So for now, assume that this is just going to be useful on the server, and that Posh's query filters are probably the best you're going to get for the moment.
Christopher Small
@metasoarous
Also note that because 3df is rust, you can't do reactive queries that require calling functions, because these would need to run in rust. So even on the server, with 3df, we're going to be a little limited about what we'll be able to do fully differentially.
But here again, where we need to, we can build things to fall back to simple tx filters.
For now at least. Eventually, maybe we'll build our own differential dataflow and datalog. But trying to take it one step at a time.
Datsync has been getting some more attention lately, and may continue to this next month or two.
drew
@drewverlee
thanks! sorry i just saw this.
Erik Kaplun
@erikkaplun
quick question: should posh be considered to be in working condition as of currently?
Christopher Small
@metasoarous
Hi @eallik. More or less, yes. However, there are a couple of outstanding bugs which remain to be fixed.
Basically, as long as you avoid recursive queries, you should be mostly fine.
If you need a recursive query, you can still use a custom match pattern for triggering updates.
Erik Kaplun
@erikkaplun
alright, that seems good
Christopher Small
@metasoarous
Sure thing. If you find anything amiss, please post an issue on GitHub.
Erik Kaplun
@erikkaplun
yes
Erik Kaplun
@erikkaplun
working support for Datomic would currently require datsys, as datomic.clj is mostly todo?