Fork me on GitHub
#clojure-spec
<
2017-02-01
>
Yehonathan Sharvit07:02:58

What are the conceptual and practical differences between s/or and s/alt?

mike_ananev07:02:09

hi! if i need to transfer spec via network, how to get "source" of spec by its name?

Yehonathan Sharvit07:02:59

something like s/describe?

mike_ananev07:02:03

@viebel yeah, but any anonymous fn in spec is not readable. i need to get source of spec, like I see in IDE

dergutemoritz08:02:22

@viebel s/alt is a regex op, s/or is not

Yehonathan Sharvit08:02:13

@dergutemoritz But if I put s/alt inside an s/cat expression it seems to work as expected.

Yehonathan Sharvit08:02:37

yeah sorry for the typo: But if I put s/or inside an s/cat expression it seems to work as expected.

dergutemoritz08:02:06

@viebel The difference is that a s/cat within an s/alt will be spliced whereas within an s/or it won't

dergutemoritz08:02:15

Let me cook up an example

dergutemoritz08:02:26

@viebel Here you go - hope it's clear, couldn't come up with a more concise example 😞

Yehonathan Sharvit08:02:10

Now it’s 100% clear!

dergutemoritz08:02:23

You're welcome @viebel, glad it helped!

souenzzo14:02:41

Oh...

(spec/valid?  :my.spec/base  lista)
=> false
(spec/explain  :my.spec/base  lista)
Success!
=> nil

souenzzo14:02:49

There is some debug Tool? lista is a deep nested map My Spec has 10+ referentes/ns and some recursion

souenzzo14:02:41

I'm using 1.8 backport

joshjones14:02:44

well that changes things β€” does alpha14 exhibit the error?

souenzzo16:02:46

No bugs on 1.9.0-alpha14 πŸ™ πŸŽ‰

pesterhazy16:02:24

anyone have a reading/watching/listening list for spec? I'm just getting started

pesterhazy16:02:31

other than https://clojure.org/about/spec of course which I'll start with

gdeer8116:02:47

does anyone fdef their conformer functions?