(no title)
mjw1007 | 10 months ago
Suppose I have a function which takes four string parameters, and I have a bug which means it crashes if the third is empty.
I'd rather see this in the failure report:
("ldiuhuh!skdfh", "nd#lkgjdflkgdfg", "", "dc9ofugdl ifugidlugfoidufog")
than this:
("", "", "", "")
chriswarbo|10 months ago
> ("ldiuhuh!skdfh", "nd#lkgjdflkgdfg", "", "dc9ofugdl ifugidlugfoidufog")
I would prefer LazySmallcheck's result, which would be the following:
Where `_` indicates that part of the input wasn't evaluated.edsko|10 months ago
mjw1007|10 months ago
So I think it would be a decent quality-of-life improvement to make generators of the sort you suggest easily available, and have the tutorial docs use them from the start.
yorwba|10 months ago
Maybe an alternative shrinking procedure could directly minimize the number of instructions that need to be executed to hit a failure...
gwern|10 months ago
chriswarbo|10 months ago
I agree that non-empty strings are worse, but unfortunately `("", "", "", "")` wouldn't only make me think of empty strings; e.g. I'd wonder whether duplicate/equal values are the problem.
unknown|10 months ago
[deleted]
dullcrisp|10 months ago
I guess if we were even more clever we could get to something more like (…, …, "", …).