Fork me on GitHub
#clojure-europe
<
2022-03-08
>
dharrigan07:03:26

Good Morning!

pez07:03:39

Morning!

pez07:03:20

Was a while ago since I bought a domain. Maybe I am running out of ideas?

Ben Sless07:03:37

Maybe domains are a thing of the past. Abandon DNS, talk to your friends over IP 🙂

😂 1
genRaiy11:03:31

sounds link snack ... yes I'm peckish

pez11:03:00

The need for IPv6 enters.

genRaiy09:03:34

Good morning

😎 1
orestis10:03:19

Morning. Pic is yesterday, today we have clouds again.

🙌 5
😻 4
🌞 1
mccraigmccraig13:03:37

whereabouts are you @U7PBP4UVA ?

orestis14:03:20

Athens, Greece. I live downtown but the photo is from the south areas (Vouliagmeni)

simongray15:03:09

Looks like Paradise…

simongray15:03:59

Slightly jealous

reefersleep10:03:41

What awesome photos 👏

mccraigmccraig10:03:06

we have the full joy of british winter

😆 3
otfrom11:03:00

I think you'll find that weather is English 😉

😂 1
mccraigmccraig11:03:16

to be completely fair to the english weather, it looked a bit different when i looked up

otfrom11:03:54

and it has been frosty here, even though lovely and clear

otfrom11:03:05

more frost since the tail end of Feb than all winter

otfrom16:03:49

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)

1
Ben Sless17:03:54

(map #(% x) fs)

otfrom17:03:16

I've done that before

thomas09:03:21

I never really understood juxt but this (finally) makes sense

mccraigmccraig18:03:01

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)

borkdude18:03:57

@mccraigmccraig I'm using deftest + async from cljs.test

mccraigmccraig19:03:52

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)

borkdude22:03:55

@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)))

nbb 3
wow 2
mccraigmccraig09:03:15

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...

borkdude09:03:53

It's only supposed to work on the top level

borkdude09:03:04

Just a convenience for exploring async stuff in the REPL

borkdude15:03:49

@mccraigmccraig Btw, in nbb for nbb itself I have a deftest-async macro

borkdude15:03:08

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))))))

borkdude15:03:49

It is promise based and does the async bit for you in a promise finally

mccraigmccraig15:03:43

yeah, that's what i do in my hack - make both clj and cljs tests promise-based (well, manifold in the case of clj)

mccraigmccraig15:03:23

hmm... i wonder if i could use nbb to drive our gulp-based build stuff...

borkdude15:03:36

if gulp has a library API, then probably yes

borkdude16:03:03

I'm making an example now