@alexmiller: bumping the question above about pasting riddley into test.check
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?
sorry, I didn’t belong to this channel so didn’t get any notifications
haven’t read all the back chat yet but pulling riddley into test-check would require some things wrt license and contribution
maybe this isn’t a problem you should be solving in test.check
yeah, that's why I opened CLJ-1997; I'd rather not solve it :)
unless you're just objecting to it being a problem
(the gen/let
thing in particular)
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
right
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
and/or to let users tell you which is which
I suggested a much more complex macro a while back (analagous to for
) but reid didn't like it :)
so I agree with you actually
sounds like a quorum to me :)
haha
see how easy that was? :)
@alexmiller: do you think a fully-featured analog to clojure.core/for
would be a good fit?
(examples here: https://github.com/gfredericks/test.chuck#for)
the recomendation would then be "if you care about optimizing shrinking, use for
instead of let
"
yeah, I’ve looked at it in the past
it seems fine, but I can’t say for
as a name had much resonance for me
ah yeah; I was just making the analogy to clojure.core/for
I guess
monads and whatnot :)
let+
over
o_O
I’m not known for being very successful at suggesting good names :)
but I would prefer something that’s not a variant of let
and I think it’s different enough from clojure.core/for that I’d be a little leery of overlapping that name
what sort of difference are you thinking of?
but maybe I could be convinced
:parallel
is an extra feature; but I think every aspect of clojure.core/for
has an analog
what does parallel do again?
it's exactly the thing you use to solve the problem with let
just independent
it's how you say "these are independent"
yeah
you could imagine clojure.core/for
having something analogous that would let you iterate over two seqs in parallel
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?
this is one option
what are some others
the problem is that gen/let
is very easy to use and expressing parallelism is comparably difficult (`gen/tuple` and destructuring)
and so people will either naively use gen/let
or else be grumpy that they can't
there’s a lot packed into for (some might argue too much :) - is there some way to take it apart into reusable pieces?
it's also possible to backwards-compatibly just add :parallel
to gen/let
I literally read "hat"
so I needed you to point it out but now I enjoy it
good, thanks :)
hereby trademarking that
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
yeah I like that idea more now that you've made me think about it
pulling in either riddley or tools.analyzer seems like a large step so I would try to avoid it if possible
ACK