Live data from Hacker News

Hypothesis, Antithesis, synthesis

antithesis.com

91–100 of 107 posts

Re: Hypothesis, Antithesis, synthesis

#91

To all you amateur Hegel enthusiasts out there: there is no synthesis in Hegel. Otherwise: Congratulations on the QuickCheck-style testing in Rust. At work, I’m always surprised that property-based testing is so little known and so rarely used outside of functional programming.

> To all you amateur Hegel enthusiasts out there: there is no synthesis in Hegel.

Looks like the mods deleted the last long thread about this, so best not to relitigate, but short version: Yes, we know. We liked the name and thought it was funny so we kept it.

> Otherwise: Congratulations on the QuickCheck-style testing in Rust. At work, I’m always surprised that property-based testing is so little known and so rarely used outside of functional programming.

Actually, it's Hypothesis-style testing in Rust. There was already QuickCheck style.

Property-based testing is in fact far more widely used in Python than in functional programming (probably not as a percentage of users, but in terms of raw numbers), which I'm always surprised that the functional programming community seems mostly unaware of.

Re: Hypothesis, Antithesis, synthesis

#92

To all you amateur Hegel enthusiasts out there: there is no synthesis in Hegel. Otherwise: Congratulations on the QuickCheck-style testing in Rust. At work, I’m always surprised that property-based testing is so little known and so rarely used outside of functional programming.

The correct name would've been Fichte.

https://en.wikipedia.org/wiki/Johann_Gottlieb_Fichte

Re: Hypothesis, Antithesis, synthesis

#93
post #76

Earlier quoted context omitted.

What do you think we're currently missing that Python's `from_type` has? I actually think the auto-deriving stuff we currently have in Rust is as good or better than from_type (e.g. it gets you the builder methods, has support for enums), but I've never been a heavy from_type user.

`from_type` just supports a bunch more things than rust ever can due to the flexibility of python's type system. `from_type(object)` is amazing, for example, and not something we can write in rust.

Yeah, that's true. I was going to say that it's maybe not fair to count things that just don't even make sense in Rust, but I guess the logical analogue is something like `Box` which it would make sense to have a default generator for but also we're totally not going to support that.

Re: Hypothesis, Antithesis, synthesis

#94

To all you amateur Hegel enthusiasts out there: there is no synthesis in Hegel. Otherwise: Congratulations on the QuickCheck-style testing in Rust. At work, I’m always surprised that property-based testing is so little known and so rarely used outside of functional programming.

> To all you amateur Hegel enthusiasts out there: there is no synthesis in Hegel. Looks like the mods deleted the last long thread about this, so best not to relitigate, but short version: Yes, we know. We liked the name and thought it was funny so we kept it. > Otherwise: Congratulations on the QuickCheck-style testing in Rust. At work, I’m always surprised that property-based testing is so little known and so rarel…

> We liked the name and thought it was funny so we kept it.

It is funny, and I really like the reference.

> ... , which I'm always surprised that the functional programming community seems mostly unaware of.

Oh, I should have clicked on the Hypothesis link in the first paragraph. Thanks for pointing that out!

Edit: And it makes me smile that there was a long thread about it.

Re: Hypothesis, Antithesis, synthesis

#95

Earlier quoted context omitted.

My claim is that genuinely all of those previous analytical forms are absolutely useless if you have the capacity to utilize a more mathematical framework The problem is, those more mathematically challenging frameworks are inaccessible to the majority of the people so they don’t actually take off because there’s no mechanism to translate more rigor in social studies and social sciences in large part because humans r…

> Hegel is irrelevant in the age of measurement That’s bs. Even just the preface to Phenomenology of Spirit is chock full of ideas that folks would be better off if they contemplated. Hegel can be considered a visual thinker (or visionary) whose ideas don’t need “measurement”. If folks understand his thoughts on the master-slave dialectic, for example, they would have an idea as to why we have such incompetent leader…

The point is not “could someone get benefit from this” it’s that there are better heuristics to use and using old ones means you’re operating on old software

By that standard literally anything is valuable even as just an example of what not to do so it’s a meaningless measurement

Re: Hypothesis, Antithesis, synthesis

#96

Post author here btw, happy to take questions, whether they're about Hegel in particular, property-based testing in general, or some variant on "WTF do you mean you wrote rust bindings to a python library?"

One thing I'm curious about, which I couldn't figure out from a skim of your post, is whether the generated test inputs are random, sequential, or adversarial.

IIRC there are fuzz testers that will analyze the branches of the code to look for edge cases that might break it -- that seems like something that would be wonderful to have in a property tester, but it also seems very difficult to do, especially in a language agnostic way.

How long does it take to find breaking cases like "0/0" or "ß"? Do they pop up immediately, or does it only happen after hundreds or thousands of runs?

Re: Hypothesis, Antithesis, synthesis

#97

Earlier quoted context omitted.

> Hegel is irrelevant in the age of measurement That’s bs. Even just the preface to Phenomenology of Spirit is chock full of ideas that folks would be better off if they contemplated. Hegel can be considered a visual thinker (or visionary) whose ideas don’t need “measurement”. If folks understand his thoughts on the master-slave dialectic, for example, they would have an idea as to why we have such incompetent leader…

The point is not “could someone get benefit from this” it’s that there are better heuristics to use and using old ones means you’re operating on old software By that standard literally anything is valuable even as just an example of what not to do so it’s a meaningless measurement

> there are better heuristics to use and using old ones means you’re operating on old software

You’re making a lot of pronouncements that are arbitrary to you

Re: Hypothesis, Antithesis, synthesis

#98

Post author here btw, happy to take questions, whether they're about Hegel in particular, property-based testing in general, or some variant on "WTF do you mean you wrote rust bindings to a python library?"

One thing I'm curious about, which I couldn't figure out from a skim of your post, is whether the generated test inputs are random, sequential, or adversarial. IIRC there are fuzz testers that will analyze the branches of the code to look for edge cases that might break it -- that seems like something that would be wonderful to have in a property tester, but it also seems very difficult to do, especially in a languag…

They're random but with a lot of tweaks to the distribution that makes weird edge cases pop up with fairly high probability, and with some degree of internal mutation, followed by shrinking to turn them into nice tidy test cases. In Python we do a little bit of code analysis to find interesting constants, but Hegel doesn't do that, it's just tuned to common edge cases.

I think all the examples I had in the post are typically found in the first 100 test cases and reliably found in the first 1000, but I wouldn't swear that that's the case without double checking.

We don't do any coverage-guidance in Hegel or Hypothesis, because for unit testing style workflows it's rarely worth it - it's very hard to do good coverage guidance in under like... 10k test runs at a minimum, 100k is more likely. You don't have enough time to get really good at exploring the state space, and you haven't hit the point where pure random testing has exhausted itself enough that you have to do something smarter to win.

It's been a long-standing desire of mine to figure out a way to use coverage to do better even on short runs, and there are some kinda neat things you can do with it, but we've not found anything really compelling.

Re: Hypothesis, Antithesis, synthesis

#99
post #50

Earlier quoted context omitted.

Seth Godin made the case that its more important for people to make remarks than to be favorable ( https://en.wikipedia.org/wiki/Purple_Cow:_Transform_Your_Bus... ) Trump did this a lot with the legacy media in his first term. He would make inaccurate statements to the media on the topic he wanted to be in the spotlight, and the media would jump to "fact check" him. Guess what, now everyone is talking about illegal i…

"No such thing as bad publicity" is a very old idea. That quote is usually attributed to PT Barnum, but the idea is much older than him.

People always need to be reminded, though. It seems to be in human nature to fear bad publicity, and the people who fear it less end up with disproportionate power as a result.

Re: Hypothesis, Antithesis, synthesis

#100
post #82

Using Python from other languages is terrible. I love this kind of testing but this implementation is not for me. I was so excited before learning it depends on Python.

Yeah, having `cargo test` require another binary like `uv` is not idiomatic. 99% of the time, I should be able to walk up to a Rust project and run `cargo test` and it should just work.

`uv` isn't even a Python interpreter. I prefer to build my systems without Python support.
Post reply on HN