Fork me on GitHub
#missionary
<
2023-10-31
>
Dustin Getz14:10:55

We made a quickstart. Please try it and give feedback! https://github.com/dustingetz/missionary-quickstart

❤️ 6
telekid14:10:11

> https://github.com/dustingetz/missionary-quickstart/blob/main/src/quickstart.cljs#L141-L145 I've seen the claim of "flows as referentially transparent" in the missionary docs before and struggled to understand it for a long time. I think it's because I am both not used to thinking of an expression as a process, and because I am not used to thinking of a process as a value. I think it would be useful to drive home the fact that flows can be thought of as values and can therefore be referentially transparent. I also think a couple of functional counterexamples that break composition due to their non-referentially-transparent nature would go a long way.

Dustin Getz14:10:49

keep reading lmk if your q is resolved

telekid15:10:26

https://github.com/dustingetz/missionary-quickstart/blob/main/src/quickstart.cljs#L271 is helpful. The term "recipe" is helpful, too. On this https://github.com/dustingetz/missionary-quickstart/blob/main/src/quickstart.cljs#L124C42-L124C47, I ask myself "but what about returning a new promise from a function each time?" And then I wonder "hm, maybe reuse means share work here, not run a process twice."

telekid15:10:14

(Not sure that I'm explaining myself well here.)

telekid15:10:54

I dunno, for me the key to understanding what you mean by "referentially transparent" (to the extent that I do understand) is to remind myself 1) that we're talking about recipes here, and 2) that a recipe can be a value.

telekid15:10:45

generally really like the quickstart though, nice job

👍 1
Daniel Jomphe15:10:33

I suppose it can be considered good prep for today’s talk?

👍 1
☺️ 1
Dustin Getz15:10:53

re work sharing, the way you'd reuse the result of running a flow, is through m/signal or m/stream which are recipes that allocate a memo buffer

Dustin Getz15:10:47

if you did that, in the N <input example, you'd get one input in the DOM and it's latest value would be repeated 3 times. So compare "reuse the recipe 3 times" vs "run the recipe once and buffer the result, reusing the buffered result 3 times"

👍 1
Dustin Getz15:10:22

i will add a new example for that, or even you can add it and send PR!

pez15:10:51

The test results do not show up in the Calva output window. Is that on purpose? (I find them in the dev console of the app).

pez15:10:11

My brain confuses rcf/tap (which referred becomes just tap) with tap>. Might be worth a comment both in the rcf docs and in this starter file?

pez15:10:26

Calva (well, clojure-lsp/clj-kondo) complains about missionary.Cancelled. But the REPL is happy about it. Can we make clj-kondo happy too in some way?

pez16:10:20

Is nil not expected here?

Dustin Getz16:10:24

cannot reproduce nil, invoking task main returns cancellation callback

Daniel Jomphe16:10:56

> The test results do not show up in the Calva output window. Is that on purpose? (I find them in the dev console of the app). This also tripped me. Screenshot of first time I evaled the first test form.

Dustin Getz16:10:25

there is a video in the readme, did you both miss it?

Daniel Jomphe16:10:00

Oh, between the time I decided I’d do it and now, I forgot to go back to check it out!

pez16:10:40

Well, didn’t miss it, but I’m used to see the results in the output window. I’m using a single screen and it’s a bit of a bother to have both browser and vscode side by side, so I mostly have them covering each other.

Daniel Jomphe16:10:34

Yeah, all is right.

pez16:10:59

I sometimes get the test results in the output window, actually.

Daniel Jomphe16:10:12

Yeah, I’m more used to have RCF in my backend’s clojure process, not in a frontend’s clojurescript process. 🙂

Dustin Getz16:10:02

I will look into tweaking the RCF test reporter to report with something other than console.log. There was a reason we chose this that I dont currently recall

Dustin Getz16:10:00

I do not understand editor stdout / nrepl integrations for any editor (not just calva)

Daniel Jomphe16:10:32

My last job’s DevUX involvement did involve taming these things in various contexts. Not always evident.

pez16:10:49

DM please, @U0514DPR7 😃

Daniel Jomphe17:10:13

Here it wasn’t apparent to me why we repeat inc on L29,31 since it’s already part of the flow mapping above on L13. (Subtle highlights)

nivekuil20:10:56

I was able to follow it just reading through! I think of m/observe as "useeffect minus the rules of hooks", and it's shocking how much that opens up. it's scalable metaprogramming, all the power of lisp without the ball of mud!

Dustin Getz20:10:49

should I say that? I kinda avoid talking about useEffect because my react experience is very dated and I dont want to say wrong things

nivekuil20:10:54

not sure, but in my experience you kind of just accept the constraints that react puts on your without too much thinking about the opportunity costs, and that's not obvious until you really dig into electric a bit. the composition across network thing is only a small part of what makes the paradigm interesting but I think most of your marketing has been around that. it's an easy exciting demo but really undersells the potential

nivekuil20:10:43

so maybe "what if you could use hooks without the rules of hooks" is an accessible/intriguing enough pitch that can't misleadingly undersell what electric is about

nivekuil20:10:21

at least for the lisp crowd "what if you didn't have to be scared of macros/dynamic scope" is pretty intriguing I feel. a lot of wasted potential around not using macros because "only pure functions compose" -- well now we have ergonomic managed effects in a language with real metaprogramming

Daniel Jomphe12:11:04

Continuing where I left off yesterday… Nice, very inspiring language, and it does raise my hopes a lot.

Daniel Jomphe12:11:54

Here, it did feel weird that you kept relying on broken-watch till the end. I understand how you relieved it in the next line, “unbreaking” it, though. So it’s just a very minor quibble. The broken-watch name was, I thought, hinting me that you’d later provide a fixed impl. But instead, you decided to fix its uses. And there’s value in seeing that we can indeed rearrange the dynamics of producers.

👀 1
pez19:10:06

Thanks for the presentation @leonoel! So awesome. ❤️ 🙏

❤️ 3
grounded_sage18:11:28

Yes really appreciated the presentation. Very enlightening.

Dustin Getz19:10:34

(defn events [!] (.addEventListener s !) #(.removeEventListener s !)) pseudocode (m/ap (m/?> (m/observe (m/amb= (events "click") (events "touch")))) that made my eyeballs pop out of my head, wow

🤯 2
Daniel Jomphe19:10:45

It’s always funny to see Dustin react like this. Missionary isn’t the regular “fabric”, it’s full of surprises. 😄

🙂 2
Daniel Jomphe19:10:53

Cheers, team Hyperfiddle. Remember to take some time to celebrate significant steps. Sharing publicly like you did there might be one such step again. 🙂

🎉 2