Fork me on GitHub
Dustin Getz16:05:40

fullstack web view with query/view composition and render, database on server. With stable hot code reloading

Peter Nagy18:05:36

lines 55 and 56 both use ~@ but we're not in a backticked form. I guess you're reusing the operators in p/defn compiler for something?

Dustin Getz18:05:31

~@ outside of ` is the current syntax for client/server transfer, we have not gotten to implementing the better (p/client) syntax yet

Peter Nagy18:05:47

you mean the p/client and p/server code samples you showed where wishful thinking?

Dustin Getz19:05:16

To communicate clearly the talk uses our target syntax as the ~@ was a mistake and is not readable, we should have the good syntax soon

Peter Nagy19:05:16

should I read it as a toggle? Like toplevel starts as cljs, first ~@ toggles to server, next ~@ toggles to client again?

Dustin Getz19:05:39

yes it's a toggle currently

Peter Nagy19:05:03

understood, thanks

Daniel Jomphe13:05:42

My colleagues want a quick demo of photon. I improved the webview example with state-preserving hot-reloading of the server db. I had to wrap the reader conditionals in e.g. do or let exprs, otherwise e.g. defonce thought I passed it only 1 arg, the name conn.

(defonce conn (let [c (do #?(:clj (d/create-conn {:order/email {}})))]
                #?(:clj (d/transact! c [{:order/email "" :order/gender :order/female}
                                        {:order/email "" :order/gender :order/male}
                                        {:order/email "" :order/gender :order/male}]))

Daniel Jomphe13:05:35

I tried defonce-ing the !state atom of the client too, hoping that the input would preserve its email filter value. No luck there. Anyway this'll already be a very nice demo! @U2DART3HA I think I should ping you about this small improvement to the demo(s). If you didn't get what I mean by all this, I'll screencast a 1 minute demo for you, showing before & after the change.

👀 1
👋 1
Dustin Getz13:05:16

Understood, will push the fix in a minute

Daniel Jomphe13:05:16

Will pull in days, unless other interesting stuff surfaces. 🙂 No urgency but thanks a lot!