This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-05
Channels
- # beginners (229)
- # cider (54)
- # cljs-dev (187)
- # cljsrn (1)
- # clojure (187)
- # clojure-dev (5)
- # clojure-italy (31)
- # clojure-losangeles (1)
- # clojure-russia (3)
- # clojure-spec (76)
- # clojure-uk (29)
- # clojurescript (94)
- # cursive (18)
- # datascript (8)
- # datomic (26)
- # docker (6)
- # emacs (19)
- # figwheel (6)
- # fulcro (41)
- # garden (1)
- # graphql (1)
- # hoplon (33)
- # jobs (1)
- # jobs-discuss (1)
- # lein-figwheel (14)
- # leiningen (7)
- # nrepl (10)
- # nyc (1)
- # off-topic (2)
- # onyx (2)
- # parinfer (25)
- # portkey (6)
- # powderkeg (1)
- # protorepl (1)
- # re-frame (14)
- # reagent (14)
- # shadow-cljs (31)
- # spacemacs (3)
- # test-check (33)
- # uncomplicate (1)
- # unrepl (40)
- # vim (5)
- # yada (16)
@gfredericks what's going on with https://dev.clojure.org/jira/browse/TCHECK-2 ? we just got bit by that
what's a good solution w.r.t. not breaking things? deprecate the old poorly named things and make new things with good names?
IIRC it just so happens that spec filters out by doing (such-that pos-int? gen/pos-int) -- but if you use test.check directly you'll see 0
yeah:
user> (clojure.spec.gen.alpha/sample (clojure.spec.alpha/gen pos-int?))
(1 1 1 4 2 4 31 1 8 4)
user> (clojure.test.check.generators/sample clojure.test.check.generators/pos-int)
(0 0 1 1 0 5 1 2 1 4)
I think it was always a case of a bad name; I have no idea where those names came from, but I think the docstrings have reflected the actual behavior
so changing the behavior & docstrings to match the names would potentially break anybody using them
"strictly" -- which points even more strongly to the bad names theory
there's a relevant section on integer generators here: https://dev.clojure.org/display/design/Generators+Reboot
in rich's compatibility algebra of provides and requires -- is not returning 0 a breaking change? Is it possible that certain random seeds never see 0?
I've wondered about how the compatibility algebra applies to generators and distributions 😄
I do think reducing the distribution is a breaking thing
you're silently causing users' generators to test less than they used to
my 2c: this generator is busted and it's not that big of a deal to remove 0. (There is an argument around people relying on behavior whether correct or not)
no I don't think "leave everything as-is" is a good solution
given zero is such an important edge case a lot of the time, silently making people's tests less effective is also a bad idea I think
I think the bigger question that needs deciding is the one from the link above -- whether to start a new namespace or improve things by deprecating individual generators
I feel like rich's paradigm could use some good deprecation tooling
woah the spec alias of the exact same name has different behavior?
gee willickers
about deprecation or about generator aliasing?
like whether deprecation is a good idea at all, or the specific question of how we should do it exactly?