Re: restricting test check input size

2016-07-04 Thread Sebastian Oberhoff
g the right balance is a bit >> of an art. >> >> If you could share a bit more about how you are testing this, it might >> suggest some other options. Are you generating data with gen/generate or >> gen/sample, using clojure.spec.test/test, or something else? >>

Re: restricting test check input size

2016-07-04 Thread Sebastian Oberhoff
ple, using clojure.spec.test/test, or something else? > > > On Monday, July 4, 2016 at 1:19:22 PM UTC-5, Sebastian Oberhoff wrote: >> >> I set myself the exercise of converting k-SAT CNF-formulas to 3-SAT >> formulas, a task that most theoretical computer scientists will be famil

restricting test check input size

2016-07-04 Thread Sebastian Oberhoff
I set myself the exercise of converting k-SAT CNF-formulas to 3-SAT formulas, a task that most theoretical computer scientists will be familiar with. For that purpose I defined the spec (s/def ::literal (s/or :symbol symbol? :negated-symbol (s/spec (s/cat :not #{'not} :symbol symbol? (s

Re: lazy-cat's memoization obscuring runtime exceptions

2016-06-13 Thread Sebastian Oberhoff
What's surprising is that I executed a pure function twice in succession and got different results. Furthermore the second execution papers over an exception. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloju

lazy-cat's memoization obscuring runtime exceptions

2016-06-13 Thread Sebastian Oberhoff
The following lines are copied straight from tryclj.com > (def expexp (lazy-cat [2] (map #(* % %) expexp))) #'sandbox20298/expexp > (take 100 expexp) java.lang.ArithmeticException: integer overflow > (take 100 expexp) (2 4 16 256 65536 4294967296) I'm wondering if this behavior is known, because