Fork me on GitHub
#fulcro
<
2019-10-21
>
tony.kay04:10:43

@thheller Welcome. Wilker actually wrote most of Inspect…I was just trying to speed it up a bit when the data gets large 🙂 Or did you mean optimization?

thheller08:10:51

just interesting to see. what I'm building is somewhat closer to REBL and datafy/nav since one thing I don't want is actually printing and transferring the entire object (eg. repl result) so I'm building a "protocol" that allows inspecting objects remotely and incrementally. hope to finish that soon. building the UI is the next step and using fulcro-inspect and/or re-frame-10x as the inspiration for possible "data viewers"

👍 4
Abhinav Sharma09:10:50

This sounds nice, is this going to be a complement to shadow-cljs in any way or meant to be standalone?

thheller09:10:14

well the first version is going to be coupled to shadow-cljs ... just as a proof of concept basically

thheller09:10:35

but I want most of the stuff generic enough so that it might be useful for other tools too

Abhinav Sharma09:10:06

Cool, looking forward to giving it a go 🙂

thheller09:10:54

I have been working on something like this for over 2 years now and thrown many versions away

thheller09:10:00

so don't get your hopes up too much 😉

😅 4
thheller09:10:39

turns out getting the remote stuff right is really hard since suddenly everything is async 😛

Abhinav Sharma09:10:29

I see, no worries. I do think, these little long term projects have a way of spawning many ideas anyhow

Abhinav Sharma09:10:58

Btw, are you working on it on github?

thheller09:10:56

no, just a local branch

👍 4
thheller09:10:19

will share once I get all the basics done

Abhinav Sharma09:10:01

Mm hmm, got it 🙂

daniel.spaniel14:10:18

curious to know how I can handle a route that has query parameters "places?r=1" in fulcro. the route system specifically the route segment in the defsc-route-target does not seem to recognize them ( but not sure ) so if I have a route segment like

daniel.spaniel14:10:43

:route-segment   (fn [] ["places"])

daniel.spaniel14:10:13

how would i let that route-segment take params like "places?r=1"

tony.kay15:10:57

@dansudol you parse the URI…a route segment like ["places" :r] is the intended usage…you just have to make sure your URI parsing code knows to find/put it there.

daniel.spaniel17:10:55

got it @tony.kay i try that thanks

thheller19:10:54

what is the proper way to add a fulcro remote dynamically? is it enough to just swap it into the runtime-atom?

wilkerlucio19:10:21

@thheller the times I needed something like that, I made the remote itself to be dynamic, not sure if its possible to add during runtime, and if you do, tools like Fulcro Inspect will probably not get it

thheller19:10:18

hmm yeah adding it dynamically kinda works but the websocket isn't speaking EQL and fulcro complains about my remote action

thheller19:10:38

(defmutation select-runtime [{:keys [runtime-id] :as params}]
  (action [env]
    (js/console.log "select-runtime" params))
  (tool-ws [env]
    {:op :request-tap-history :runtime-id runtime-id}))

thheller19:10:11

my intent was to use defmutation and let the tool-ws (the remote) transform it to the websocket message that should be sent

thheller19:10:38

but fulcro doesn't like the return value

thheller19:10:52

guess I'll just send the message out as part of the action itself

thheller19:10:23

> ERROR [com.fulcrologic.fulcro.algorithms.tx-processing:424] - Remote dispatch for :tool-ws returned an invalid value. {:op :request-tap-history, :runtime-id 79}

tony.kay21:10:11

@thheller In F3 you should be able to just add it. In terms of your remote return value: that has to be a boolean, an env (with optionally updated AST) or an AST

tony.kay21:10:56

Transforming that needs to be done by the remote itself

tony.kay21:10:16

The internals for using mutations are all EQL (otherwise things like merge cannot possibly work)

tony.kay21:10:40

So, your custom remote would receive a send node that has the AST in it, and you’d then transform that to your desired network comm

thheller21:10:31

hmm yeah I settled on a hacky approach of just doing it outside fulcro for now

thheller21:10:57

will dig into the internals of what remotes actually do later 🙂

tony.kay21:10:50

Hey all, I got approved for GitHub’s Sponsor beta program, where they do matching funds! If anyone is currently contributing on Patreon or would like to get 2-for-1 mileage out of their contribution dollars in helping me continue to develop Fulcro please head over to https://github.com/sponsors/awkay and sign up.

👍 12
❤️ 20
fulcro 28
parrot 4
tony.kay21:10:38

I can add more tiers if you are interested in contributing but none of those levels match what you’re comfortable with.

thheller21:10:34

sweet. I was accepted too. 🙂

👍 12
❤️ 16
tony.kay21:10:42

I’ll move my donations for shadow-cljs over then

👍 8
parens 8
😂 4
thheller21:10:31

your support is appreciated but really not necessary, your fulcro work already does so much for me. I want to sponsor you back but that seems kinda redundant and we'd probably just exchange github fees 😛

thheller21:10:53

can't remember if we talked about that before 😛

tony.kay22:10:56

Heh. We didn’t really, but I use/recommend shadow-cljs through my consulting work all the time, so I look at it as a tool I use professionally. I also know that none of my clients do much in the way of donations, so think of it as “pass-through” 🙂

Abhinav Sharma03:10:44

Congratulations to you both! 🎉

4
Björn Ebbinghaus12:10:09

@thheller If you support each other through Github and your contribution is matched by Github you will both gain more funds... Except when the fees are ≥50% of your support + githubs match.

thheller12:10:55

@U4VT24ZM3 yes we could but in my book that comes dangerously close to abuse/fraud. I'd much rather not abuse the system and github matching isn't gonna last forever anyways

Björn Ebbinghaus12:10:58

Of course. I think there will be regulations in place, as this loophole is rather obvious.

thheller22:10:44

quick question: is anyone here using REBL? the cognitect REPL UI thing? if so: do you use tap> at all?

souenzzo18:10:49

when I use REBL (usually for #datomic ), i use tap> because I dont use any special repl/nrepl/middlware stuff

kszabo22:10:34

it’s pretty useful, especially if you do develop (defn spytap [x] (tap> x) x)

kszabo22:10:59

then you can just litter this in your code during development as better logging