Fork me on GitHub
#test-check
<
2016-08-04
>
gfredericks14:08:39

@alexmiller: bumping the question above about pasting riddley into test.check

gfredericks14:08:54

I just looked at the source and it's just a few hundred lines. I'm guessing licensing/CA issues would be the biggest thing?

Alex Miller (Clojure team)20:08:50

sorry, I didn’t belong to this channel so didn’t get any notifications

Alex Miller (Clojure team)20:08:49

haven’t read all the back chat yet but pulling riddley into test-check would require some things wrt license and contribution

Alex Miller (Clojure team)20:08:04

maybe this isn’t a problem you should be solving in test.check

gfredericks20:08:44

yeah, that's why I opened CLJ-1997; I'd rather not solve it :)

gfredericks20:08:06

unless you're just objecting to it being a problem

gfredericks20:08:16

(the gen/let thing in particular)

Alex Miller (Clojure team)20:08:05

if I read all this correctly, let allows you to handle both dependent and independent generators but because it can’t tell the difference it performs the more complicated dependent expansion

Alex Miller (Clojure team)20:08:11

to which maybe I would suggest that you should add something that just lets you do the independent generator case with the less complicated expansion rather than trying to detect the difference

Alex Miller (Clojure team)20:08:33

and/or to let users tell you which is which

gfredericks20:08:39

I suggested a much more complex macro a while back (analagous to for) but reid didn't like it :)

gfredericks20:08:47

so I agree with you actually

Alex Miller (Clojure team)20:08:00

sounds like a quorum to me :)

Alex Miller (Clojure team)20:08:18

see how easy that was? :)

gfredericks20:08:34

@alexmiller: do you think a fully-featured analog to clojure.core/for would be a good fit?

gfredericks20:08:31

the recomendation would then be "if you care about optimizing shrinking, use for instead of let"

Alex Miller (Clojure team)20:08:40

yeah, I’ve looked at it in the past

Alex Miller (Clojure team)20:08:02

it seems fine, but I can’t say for as a name had much resonance for me

gfredericks20:08:16

ah yeah; I was just making the analogy to clojure.core/for I guess

gfredericks20:08:30

monads and whatnot :)

Alex Miller (Clojure team)20:08:44

I’m not known for being very successful at suggesting good names :)

Alex Miller (Clojure team)20:08:03

but I would prefer something that’s not a variant of let

Alex Miller (Clojure team)20:08:40

and I think it’s different enough from clojure.core/for that I’d be a little leery of overlapping that name

gfredericks20:08:53

what sort of difference are you thinking of?

Alex Miller (Clojure team)20:08:58

but maybe I could be convinced

gfredericks20:08:33

:parallel is an extra feature; but I think every aspect of clojure.core/for has an analog

Alex Miller (Clojure team)20:08:12

what does parallel do again?

gfredericks20:08:27

it's exactly the thing you use to solve the problem with let

gfredericks20:08:33

it's how you say "these are independent"

gfredericks20:08:00

you could imagine clojure.core/for having something analogous that would let you iterate over two seqs in parallel

Alex Miller (Clojure team)20:08:08

I guess putting on my Rich hair, I would say: what problem are we trying to solve and what are some alternatives and tradeoffs between them?

gfredericks20:08:52

the problem is that gen/let is very easy to use and expressing parallelism is comparably difficult (`gen/tuple` and destructuring)

gfredericks20:08:18

and so people will either naively use gen/let or else be grumpy that they can't

Alex Miller (Clojure team)20:08:11

there’s a lot packed into for (some might argue too much :) - is there some way to take it apart into reusable pieces?

gfredericks20:08:46

it's also possible to backwards-compatibly just add :parallel to gen/let

gfredericks20:08:09

I literally read "hat"

gfredericks20:08:23

so I needed you to point it out but now I enjoy it

Alex Miller (Clojure team)20:08:42

hereby trademarking that

Alex Miller (Clojure team)20:08:26

unfortunately, I have to go pick up my dog right now, but I think it’s worth considering the tradeoffs of adding :parallel to let

gfredericks20:08:40

yeah I like that idea more now that you've made me think about it

Alex Miller (Clojure team)20:08:06

pulling in either riddley or tools.analyzer seems like a large step so I would try to avoid it if possible