Fork me on GitHub
#missionary
<
2023-10-24
>
leonoel10:10:59

New topic - core principles https://gorgeous-sorbet-a5a2bf.netlify.app/core-principles

šŸ‘€ 2
šŸ‘ 5
šŸ™Œ 2
Dustin Getz12:10:35

this is great. the clear definitions for italicized words are great. Multiple new learnings for me here

Dustin Getz12:10:47

ā€¢ Examples of prior art and how they classify would be helpful (e.g. example of a synchronous vs async system). ā€¢ I propose linking a new page "functional effect system" (I have an unpublished article about this that you could use as a starting point) ā€¢ propose to link to your 2021 talk about supervision?

leonoel18:10:45

@U09K620SG does it answer your questions about coroutine scheduling ?

Dustin Getz13:10:37

i am surprised, because > user code evaluation is never implicitly transferred to another thread this is what intuitively makes sense and what I expected, but the behavior i was observing, as i understand it, was the coroutine transferring threads actually, as demonstrated by *out* changing values when using println inside a flow which booted at the REPL. The first println goes to the repl and subsequent printlns go to stdout (i.e. are not intercepted by the REPL which rebound out away from stdout to the REPL )

Dustin Getz12:10:33

i don't understand this one, a clear definition of "operator" in the first sentence would help. Perhaps also a conclusion sentence that summarizes the lesson

nivekuil19:10:13

"Compare this behavior with future" I would prefer that not to be an exercise for the reader

adamfrey12:10:02
replied to a thread:

related to publishers, I could use help understanding what I'm doing wrong here:

(do
    ;; keeping track of how many times the fl flow runs
    (def *run-count (atom 0))
    (def fl
      (m/ap
        (let [i (m/?> (m/seed (range 10)))]
          (swap! *run-count inc)
          i)))

    ;; creating a publisher for multiple subscribers
    (def fl-stream (m/stream fl))

    (defn my-rf
      ([] [])
      ([acc] acc)
      ([acc x]
       (println "rf" x)
       (conj acc x)))

    (def joined
      (m/join vector
        (m/reduce my-rf (m/eduction (map #(* % 10)) fl-stream))
        (m/reduce my-rf (m/eduction (map #(* % 100)) fl-stream))))

    ;; (m/? joined) hangs forever
    (joined prn prn) ;; only reduces the first eduction

    ;; question: am I incorrectly initializing multiple subscribers to my stream?
    
    @*run-count
    )