calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
Zaymon 2021-06-23T02:04:18.297500Z

Mucking around with core.async:

(ns try-core-async.hotdog
  (:require [clojure.core.async
             :refer [<! >!! <! go chan]]
            [clojure.tools.logging :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?

alexmiller 2021-06-23T02:07:19.298600Z

echo-chan is unbuffered (0 length)

alexmiller 2021-06-23T02:08:49.299400Z

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

Zaymon 2021-06-23T02:26:17.299500Z

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)

Zaymon 2021-06-23T02:27:03.299700Z

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

Marc O'Morain 2021-06-23T10:11:26.300300Z

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.

pez 2021-06-23T10:55:35.301500Z

The Calva command for this runs the cider test runner. Maybe you can use a custom REPL command for this? https://calva.io/custom-commands/

Marc O'Morain 2021-06-24T17:44:47.304100Z

Perfect. I’ll give that a go