Fork me on GitHub
#clojure-spec
<
2019-09-12
>
leongrapenthin18:09:00

im wondering whether spec2 is missing feedback/adoption because of cljs?

hkjels18:09:50

I would definitely have used spec2 if it was available in cljs

✔️ 4
leongrapenthin18:09:59

id love to try it out and give feedback already, but all my projects are fullstack or cljc

ghadi18:09:31

@leongrapenthin spec2 isn't even done

ghadi18:09:37

once the design settles, will be ported to cljs

seancorfield19:09:16

Heh, we're about as leading edge as you'll find, for running pre-release versions of Clojure and Contrib libs but even we're not using Spec2 on the backend yet. Still far too "not done". We do have a branch based on it, passing all our tests, but was a bunch of work to get the Spec1 code running on Spec2.

👍 4
💯 8
andy.fingerhut23:09:27

This is perhaps a bit tangential to spec, but I was reminded recently that a handy technique for making generative testing more time-efficient in finding problems in your code, is if you can tweak parameters in your code to make sub-parts of your data structures smaller. For example, a 32-way branching tree structure like PersistentVector takes 32 conj's or pop's before it actually "does something" to affect the structure of the tree, but if you tweak the code to make it 4-way branching instead, you can make more interesting tree structures and test them with generative testing much, much faster, and the bugs are likely to be identical, except for the size of the test cases.

👍 8
andy.fingerhut23:09:40

A technique I saw used in hardware simulation tests long ago (where the simulations are much much slower than the real hardware devices), but hadn't been reminded of in a while.