This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-08
Channels
- # aleph (2)
- # announcements (2)
- # asami (50)
- # babashka (39)
- # beginners (17)
- # calva (61)
- # cider (9)
- # clj-kondo (5)
- # clojure (37)
- # clojure-europe (52)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (5)
- # clojurescript (28)
- # cursive (3)
- # datahike (11)
- # datomic (28)
- # deps-new (11)
- # events (3)
- # fulcro (18)
- # google-cloud (1)
- # graphql (8)
- # introduce-yourself (4)
- # jobs (2)
- # leiningen (7)
- # lsp (15)
- # pathom (9)
- # re-frame (6)
- # reagent (35)
- # reitit (17)
- # releases (1)
- # shadow-cljs (20)
- # specter (1)
- # test-check (106)
- # tools-deps (8)
- # uncomplicate (1)
- # vim (29)
Maybe domains are a thing of the past. Abandon DNS, talk to your friends over IP 🙂
SYN ACK
sounds link snack ... yes I'm peckish
Good morning!
måning!
whereabouts are you @U7PBP4UVA ?
What awesome photos 👏
to be completely fair to the english weather, it looked a bit different when i looked up
same here
Morning!
tfw you realise that juxt is like map but with a seq of functions over the same data rather than a seq of data that goes through one function (which I sort of knew before, but just hit me again)
do any of y'all have a solution for running async .cljc tests which is not horrible ? (i've got one, but it is horrible)
@mccraigmccraig I'm using deftest
+ async
from cljs.test
right @borkdude - but without something additional that leads to different test code under clj and cljs ... i've got a solution which lets me use the same (promise-based) test code for both clj and cljs, but making it work on both was pretty hacky (mostly because of clojure.test's dynvars iirc)
@mccraigmccraig Yeah, dynvars do not really play well with async code. I added an experimental function to #nbb now where you can block on promises on the top level in scripts or in the REPL:
(def response (await (fetch "")))
(def text (await (.text response)))


oh! what does that do @borkdude ? my first line of thought was a code transform like https://github.com/funcool/cats/blob/master/src/cats/core.cljc#L233 - but that wouldn't work at the top-level...
@mccraigmccraig Btw, in nbb for nbb itself I have a deftest-async
macro
E.g.:
(deftest-async as-alias
(-> (nbb/load-string "(require '[rando.ns :as-alias dude]) ::dude/foo")
(.then (fn [v]
(is (= :rando.ns/foo v))))))
yeah, that's what i do in my hack - make both clj and cljs tests promise-based (well, manifold in the case of clj)
hmm... i wonder if i could use nbb to drive our gulp-based build stuff...