test-check

2016-08-04T14:22:39.000171Z

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

2016-08-04T14:23:54.000172Z

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?

alexmiller 2016-08-04T20:07:50.000174Z

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

alexmiller 2016-08-04T20:13:49.000175Z

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

alexmiller 2016-08-04T20:14:04.000176Z

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

2016-08-04T20:14:44.000177Z

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

2016-08-04T20:15:06.000178Z

unless you're just objecting to it being a problem

2016-08-04T20:15:16.000179Z

(the gen/let thing in particular)

alexmiller 2016-08-04T20:17:05.000180Z

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

2016-08-04T20:18:09.000181Z

right

alexmiller 2016-08-04T20:18:11.000182Z

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

alexmiller 2016-08-04T20:18:33.000183Z

and/or to let users tell you which is which

2016-08-04T20:18:39.000184Z

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

2016-08-04T20:18:47.000185Z

so I agree with you actually

alexmiller 2016-08-04T20:19:00.000186Z

sounds like a quorum to me :)

2016-08-04T20:19:05.000187Z

haha

alexmiller 2016-08-04T20:19:18.000188Z

see how easy that was? :)

2016-08-04T20:19:34.000189Z

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

2016-08-04T20:20:05.000190Z

(examples here: https://github.com/gfredericks/test.chuck#for)

2016-08-04T20:20:31.000192Z

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

alexmiller 2016-08-04T20:20:40.000193Z

yeah, I’ve looked at it in the past

alexmiller 2016-08-04T20:21:02.000194Z

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

2016-08-04T20:21:16.000195Z

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

2016-08-04T20:21:30.000196Z

monads and whatnot :)

2016-08-04T20:21:56.000197Z

let+

alexmiller 2016-08-04T20:22:07.000198Z

over

2016-08-04T20:22:15.000199Z

o_O

alexmiller 2016-08-04T20:22:44.000200Z

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

alexmiller 2016-08-04T20:23:03.000201Z

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

alexmiller 2016-08-04T20:23:40.000202Z

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

2016-08-04T20:23:53.000203Z

what sort of difference are you thinking of?

alexmiller 2016-08-04T20:23:58.000204Z

but maybe I could be convinced

2016-08-04T20:24:33.000205Z

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

alexmiller 2016-08-04T20:25:12.000206Z

what does parallel do again?

2016-08-04T20:25:27.000207Z

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

alexmiller 2016-08-04T20:25:33.000208Z

just independent

2016-08-04T20:25:33.000209Z

it's how you say "these are independent"

2016-08-04T20:25:36.000210Z

yeah

2016-08-04T20:26:00.000211Z

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

alexmiller 2016-08-04T20:28:08.000212Z

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?

alexmiller 2016-08-04T20:28:17.000213Z

this is one option

alexmiller 2016-08-04T20:28:20.000214Z

what are some others

2016-08-04T20:28:52.000215Z

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

2016-08-04T20:29:18.000216Z

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

alexmiller 2016-08-04T20:30:11.000217Z

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

2016-08-04T20:30:46.000218Z

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

2016-08-04T20:31:09.000220Z

I literally read "hat"

2016-08-04T20:31:23.000221Z

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

alexmiller 2016-08-04T20:31:28.000222Z

good, thanks :)

alexmiller 2016-08-04T20:31:42.000223Z

hereby trademarking that

alexmiller 2016-08-04T20:32:26.000224Z

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

2016-08-04T20:32:40.000225Z

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

alexmiller 2016-08-04T20:33:06.000226Z

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

2016-08-04T20:33:15.000227Z

ACK