This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-01
Channels
- # aleph (71)
- # aws (1)
- # bangalore-clj (4)
- # beginners (36)
- # boot (153)
- # cider (23)
- # clara (9)
- # cljs-dev (67)
- # cljsjs (2)
- # cljsrn (22)
- # clojure (348)
- # clojure-argentina (4)
- # clojure-austin (12)
- # clojure-berlin (9)
- # clojure-dusseldorf (6)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-russia (358)
- # clojure-spain (2)
- # clojure-spec (28)
- # clojure-uk (109)
- # clojurescript (130)
- # core-typed (1)
- # cursive (35)
- # datascript (6)
- # datomic (18)
- # emacs (12)
- # hoplon (4)
- # klipse (64)
- # lein-figwheel (13)
- # leiningen (3)
- # luminus (4)
- # lumo (51)
- # mount (22)
- # off-topic (83)
- # om (22)
- # om-next (8)
- # onyx (3)
- # pedestal (8)
- # perun (6)
- # portland-or (2)
- # re-frame (50)
- # ring (8)
- # ring-swagger (5)
- # untangled (10)
- # yada (9)
What are the conceptual and practical differences between s/or
and s/alt
?
hi! if i need to transfer spec via network, how to get "source" of spec by its name?
something like s/describe
?
@viebel yeah, but any anonymous fn in spec is not readable. i need to get source of spec, like I see in IDE
@viebel s/alt
is a regex op, s/or
is not
@dergutemoritz But if I put s/alt
inside an s/cat
expression it seems to work as expected.
@viebel You mean s/or
?
yeah sorry for the typo: But if I put s/or
inside an s/cat
expression it seems to work as expected.
@viebel The difference is that a s/cat
within an s/alt
will be spliced whereas within an s/or
it won't
Let me cook up an example
@viebel Here you go - hope it's clear, couldn't come up with a more concise example π
Thanks a lot @dergutemoritz !
Now itβs 100% clear!
You're welcome @viebel, glad it helped!
And to make it 200% clear here is your code snippet @dergutemoritz inside klipse for a live demo http://app.klipse.tech/?eval_only=1&cljs_in.gist=viebel/6bdefe58f4a38591399f0628fb775418
Oh...
(spec/valid? :my.spec/base lista)
=> false
(spec/explain :my.spec/base lista)
Success!
=> nil
There is some debug Tool?
lista
is a deep nested map
My Spec has 10+ referentes/ns and some recursion
anyone have a reading/watching/listening list for spec? I'm just getting started
other than https://clojure.org/about/spec of course which I'll start with
@pesterhazy for gen related stuff I really like https://github.com/clojure/test.check/blob/master/doc/cheatsheet.md
and then there are some vids Stu has done at https://www.youtube.com/watch?v=nqY4nUMfus8&list=PLZdCLR02grLrju9ntDh3RGPpWSWBvjwXg
Thanks!