Fork me on GitHub
#clojure
<
2021-07-04
>
didibus01:07:37

So, has anyone tried Github's Copilot with Clojure yet?

reefersleep09:07:48

Is the jury not still out on whether it’s unethical?

reefersleep09:07:09

(per Hacker News, I’ve only read cursorily about it)

didibus16:07:37

I think what I've seen is a lot of: • Not ethical • Maybe not totally in spirit of copyright and licenses • Will probably still use it 😜

fubar01:07:13

I was browsing for wireframing tools and found one called Whimsical, was surprised to find out it was made in Clojure! Looks like it might be a good alternative to Balsamiq. Has anyone tried it?

lukasz15:07:01

It's amazing - my team uses it for diagrams, mockups, designs and lots of other things. Recently they've added docs support so it makes it a simple alternative to notion/confluence/etc

fubar01:07:09

Here is the blog link from that screenshot https://whimsical.com/blog/how-we-built-whimsical

danielgrosse19:07:39

How could I write a let in a clojure test and in the body some is statements?

seancorfield19:07:20

@danielgrosse Do you mean like this:

dev=> (deftest example
 #_=>   (let [x 1 y 2]
 #_=>     (is (= 1 x))
 #_=>     (is (= x y))))
#'dev/example
dev=> (example)

FAIL in (example) (dev.clj:4)
expected: (= x y)
  actual: (not (= 1 2))
nil

danielgrosse20:07:44

Yes. But running it in Cider doesn’t recognize the test so I thought it is not possible.

vemv20:07:41

doesn't sound like that's the case. cider in fact recognises arbitrary custom macros that would expand to deftest could you post a snippet?

danielgrosse05:07:18

(deftest init-game-test
  (testing "Init the game state"
    (let [state {}
          stack [:foo :bar :baz]
          state' (sw/init-game! (atom state) stack)]
      (is (= true (contains? (:stack @state') :foo))))))
No assertions (or no tests) were run.Did you forget to use 'is' in your tests?

👍 3
Ed09:07:33

how are you running the tests? is the test in what cider would consider a test namespace? (ie. it ends in -test, and the file name is correct). This works for me in multiple projects using Cider.

vemv10:07:09

The snippet looks good (assuming that is refers to clojure.test/is) No assertions (or no tests) were run.Did you forget to use 'is' in your tests? indicates that your tests were run. But for some reason it didn't detect that is was in fact run (it detects so for ensuring that the ran deftests are valid). First I'd check if lein test <the namespace> succeeds and reports at least 1 assertion being run. If that succeeds, then you might find help in #cider