Fork me on GitHub

Mucking around with core.async:

(ns try-core-async.hotdog
  (:require [clojure.core.async
             :refer [<! >!! <! go chan]]
            [ :refer [info]]))

(def echo-chan (chan))

(go (println (<! echo-chan)))

(>!! echo-chan "ketchup")
When I execute the last line in the repl, it happens once, and then the REPL / calva becomes unresponsive. Does anyone have any insight on this?

Alex Miller (Clojure team)02:06:19

echo-chan is unbuffered (0 length)

Alex Miller (Clojure team)02:06:49

I’m not sure how that relates to the greater env but try it with (chan 1)


Ah. Thanks Alex. I was mixing up the behaviour of go and go-loop. Also executing blocking operations in the REPL naturally blocks execution :man-facepalming: (like trying to >!! onto a full channel)


The core async API reference is really good. Excited to explore and learn more

Marc O'Morain10:06:26

Does anyone use Kaocha with Calva to run tests? I’m wondering how I should trigger a run of tests in the current namespace using the Kaocha runner. I can run tests with (kaocha.repl/run *ns*), but running “Calva: Run Tests for current namespace” from the command pallet doesn’t run them.


The Calva command for this runs the cider test runner. Maybe you can use a custom REPL command for this?

Marc O'Morain17:06:47

Perfect. I’ll give that a go