Fork me on GitHub
#clojure-europe
<
2021-12-08
>
dharrigan07:12:49

Good Morning!

genRaiy13:12:33

moroning god

genRaiy13:12:39

Stories that demonstrate how gods are dumb

reefersleep09:12:56

(that include gods)

reefersleep09:12:23

Hm. I shouldn’t offend. But like the example you gave, I find that in most stories, gods have weird motivations and/or act weirdly. That’s a general thing when people are writing about sentient human-like entities that aren’t quite human, I find. Another example is ghosts. In most movies I’ve seen, ghosts are assholes or just random, for no apparent reason.

reefersleep09:12:00

I guess, because in both fables and ghost stories, the human-like entities often serve as a plot device; generating a situation that the human protagonist(s) can react to (like divine intervention, or throwing around pots and pans)

reefersleep09:12:10

(I’m conflating nonsensical and dumb here)

reefersleep09:12:42

Thus concludes my TED talk 🙂

genRaiy23:12:57

Just seen - a ghost thread :)

genRaiy23:12:35

With gods, even if you conceded that they exist, it’s still difficult to understand what they want with us or how we are meant to respond to them

genRaiy23:12:34

That’s the strangest part to me: there is no evidence of them expressing their Will and none of the holy books withstand any serious examination

genRaiy23:12:00

Thanks for the TED talk

🍻 1
genRaiy13:12:39

Example: making a snake that can speak just to undermine human happiness

borkdude13:12:44

Continuing on making clojure.spec.alpha compatible with bb by making minimal changes to the original repo, I've now got coax by exoscale working:

(require '[babashka.deps :as deps])

(deps/add-deps
 '{:deps {babashka/spec.alpha {:git/url ""
                               :git/sha "4fb8ef0f8ca1700e7ff152b7691e5170eeb8690f"}
          exoscale/coax {:mvn/version "1.0.0-alpha14"}}})

(require '[clojure.spec.alpha :as s])

(require '[exoscale.coax :as c])
(s/def ::foo keyword?)
(prn (c/coerce ::foo "bar")) ;; -> :bar

(s/def ::dude int?)
(s/def ::bar (s/keys :req-un [::dude]))
(prn (c/coerce ::bar {:dude "1"}))
$ time ./bb /tmp/hato.clj
:bar
{:dude 1}
./bb /tmp/hato.clj   0.08s  user 0.03s system 95% cpu 0.111 total

borkdude19:12:03

user=> (require 'exoscale.coax-test)
nil
user=> (require '[clojure.test :as test])
nil
user=> (test/run-tests 'exoscale.coax-test)

Testing exoscale.coax-test

Ran 18 tests containing 145 assertions.
0 failures, 0 errors.
{:test 18, :pass 145, :fail 0, :error 0, :type :summary}
(in bb repl)

mpenet20:12:57

We have another related lib that we might open source eventualy. Something that has to do with "humanized" error messages for spec. Nothing too exotic in its source either, pretty sure it would work with bb out of the box

borkdude20:12:23

awesome. expound also works with bb

mpenet20:12:05

It's similar, but slightly different. It actually started from frustrations with expound & others and the need to have more structured/data output to feed error messages for, say, forms (so "row" level messages/problems).

borkdude13:12:18

(oh the file is called hato.clj because originally I tested that because it defines one spec somewhere in a util ns)

borkdude13:12:31

All clojure.spec tests pass, except those that were added last month because of the changes in clojure 1.11 with respect to kwargs... The changes to spec to support that look really complicated.

borkdude13:12:12

Ran 11 tests containing 115 assertions.
0 failures, 0 errors.
{:test 11, :pass 115, :fail 0, :error 0, :type :summary}
😎

borkdude14:12:02

I wonder what libraries that use spec I should test.

reefersleep15:12:50

Having a weird css problem. Using the :read-only selector, but hitting a bunch of input elements (like :select) that don’t have readonly set.

reefersleep15:12:02

Anyone here have any experience with that?

reefersleep15:12:10

makes me unhappy 😞

p-himik15:12:53

Probably because <select> does not support readonly.

p-himik15:12:23

E.g. <body> does not support it as well, of course, and document.querySelector('body:read-only') returns the right element still.

reefersleep15:12:44

sorry, I was imprecise. I’m talking about e.g. [:input {:type :checkbox}] , [:input {:type :select}]

reefersleep15:12:32

The thing is, these elements do not have readonly applied to them, but they are still hit with a .myClass:read-only selector

reefersleep15:12:45

and no docs are convincing me that this makes sense

p-himik15:12:27

What is <input type="select">? I don't think it's valid HTML.

p-himik15:12:41

And yeah, readonly is applicable only to some types of <input>: https://html.spec.whatwg.org/multipage/input.html#do-not-apply And all other elements are considered "read only", at least for the purpose of that selector: https://html.spec.whatwg.org/multipage/semantics-other.html#selector-read-only > The `:read-only` https://drafts.csswg.org/selectors/#pseudo-class must match all other https://html.spec.whatwg.org/multipage/infrastructure.html#html-elements.

reefersleep08:12:29

ARgh. You’re right, it was [:select and [:input {:type :checkbox

reefersleep08:12:46

Thank you! That’s a better source than those I managed to find.

👍 1
reefersleep09:12:45

I fixed my problem through annoyed determination and your help, @U2FRKM4TW

👍 1
lread15:12:05

Good morning!

orestis15:12:10

Good morning