HNHacker News
TopNewBestAskShowJobs

edsko

4 karma · joined December 1, 2012

submissionscomments
edsko··on Falsify: Hypothesis-Inspired Shrinking for Haskell (2023)
(Author of falsify here.) You are absolutely correct that the empty string isn't always the best counter-example. The goal of shrinking is to shrink to the _simplest_ possible value (this is true for all approaches to shrinking). What constitutes "simple" is very much domain specific. It would certainly be possible to write a generator that would shrink to, say, "foo", as the canonical "simplest" example of a simple string. Indeed, since we are working in a lazy language, you could (with a bit of effort) shrink to `undefined` if the other arguments are not used at all.
edsko··on Speeding up PHP with the HipHop VM
Wow, thanks! John and I spent a long time thinking about it :)