Re: Thoughts on clojure.spec

2016-07-10 Thread kovas boguta
On Sun, Jul 10, 2016 at 6:04 AM, Mark Engelberg wrote: > > This isn't due to anything inherent in clojure.spec, it's just that for > non-trivial functions, coming up with relevant random input is a very hard > problem. > This is a very interesting observation. I've written generators (we'd call

Re: Thoughts on clojure.spec

2016-07-10 Thread Michael Gardner
It might be possible to leverage something like American Fuzzy Lop[1] for better random input generation. I've never used AFL myself, but I know SQLite (one of the best-tested libraries I know of) has had good success with it[2], and it does work on Java. [1] http://lcamtuf.coredump.cx/afl/ [2]

Thoughts on clojure.spec

2016-07-10 Thread Mark Engelberg
I've played around now with implementing specs for a couple of my projects. What I'm finding is that writing specs to check the inputs of a function is easy-ish, but building useful random generators is very hard -- in my projects, this seems too hard to do with any reasonable amount of effort. T

Is there a sortBy function in Sparkling ?

2016-07-10 Thread rogergl
I can do something like this val sortedCounts = counts.sortBy(kvPair => kvPair._2, false) in Scala. So far I only found the *sort-by-key *function in Sparkling, which doesn't exactly do what I need... Regards Roger -- You received this message because you are subscribed to the Google Group

Re: Rationale for `keys` not supporting vectors?

2016-07-10 Thread Daniel Compton
keys is implemented here against the abstract class APersistentMap. That it doesn’t work against vectors is an implementation detail, but I could imagine that the reason it was done this way was a