Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
DRMacIver
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
DRMacIver
5mo ago
So with the caveat that I'm not super familiar with Validity... The biggest thing that leaps out at me looking at it is that Hegel is very built around flexible user-specified data generation (using the library's base generators a
2.
▲
by
DRMacIver
6mo ago
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 Py
3.
▲
by
DRMacIver
6mo ago
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<dyn MyTrait>` which it would make sense to
4.
▲
by
DRMacIver
6mo ago
> 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 w
5.
▲
by
DRMacIver
6mo ago
You're very welcome! I'm glad it's been useful for you.
6.
▲
by
DRMacIver
6mo ago
Ugh, yeah. Duplicating the code under test is a bad habit that Claude has had when writing property-based tests from very early on and has never completely gone away. Hmm now that you mention it we should add some instructions not to do tha
7.
▲
by
DRMacIver
6mo ago
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
8.
▲
by
DRMacIver
6mo ago
Please let us know how it goes! As Liam says, the derive generator is not very well dogfooded at present. The claude skill is a bit better, but we've only been through a few iterations of using it and getting Claude to improve it, and
9.
▲
by
DRMacIver
6mo ago
Answered this over here: https://news.ycombinator.com/item?id=47506274
10.
▲
by
DRMacIver
6mo ago
The short answer to how it fits into existing ecosystems is... in competition I suppose. We've got a lot of respect for the people working on these libraries, but we think the Hypothesis-based approach is better than the various approa
11.
▲
by
DRMacIver
6mo ago
Ouch. Classic Claude. It does tend to cheat when it gets stuck, and I've had some success with stricter harnesses, reflection prompts and getting it to redo work when it notices it's cheated, but it's definitely not a solved
12.
▲
by
DRMacIver
6mo ago
TBF PBT has been the present in Python for a while now. 10 years ago might have been a little early (Hypothesis 1.0 came out 11 years ago this coming Thursday), but we had pretty wide adoption by year two and it's only been growing. It
13.
▲
by
DRMacIver
6mo ago
So I think a short list of big API differences are something like: * Hypothesis/Hegel are very much focused on using test assertions rather than a single property that can be true or false. This naturally drives a style that is much mo
14.
▲
by
DRMacIver
6mo ago
> But the problem remains verifying that the tests actually test what they're supposed to. Definitely. It's a lot harder to fake this with PBT than with example-based testing, but you can still write bad property-based tests an
15.
▲
by
DRMacIver
6mo ago
It's on the agenda! We definitely want to rewrite the Hegel core server in rust, but not as much as we wanted to get it working well first. My personal hope is that we can port most of the Hypothesis test suite to hegel-rust, then poin
16.
▲
by
DRMacIver
6mo ago
We looked at it and given that the repo was archived nearly two years ago decided it wasn't a problem.
17.
▲
by
DRMacIver
6mo ago
Conversation with Will (Antithesis CEO) a couple months ago, heavily paraphrased: Will: "Apparently Hegel actually hated the whole Hegelian dialectic and it's falsely attributed to him." Me: "Oh, hm. But the name is funn
18.
▲
by
DRMacIver
6mo ago
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?"
19.
▲
by
DRMacIver
11mo ago
How popular do you want it to be? The Python survey data ( https://lp.jetbrains.com/python-developers-survey-2024/ ) holds pretty consistently at 4% of Python users saying they use it, which isn't as large as I'
20.
▲
Teaching My Younger Self to Program
(thinkfeelplay.substack.com)
1 points
by
DRMacIver
2y ago
|
0 comments
21.
▲
by
DRMacIver
2y ago
Interesting. I've not seen that before. My best guess is that it might be an old trio version or something, but I'm not sure.
22.
▲
by
DRMacIver
2y ago
FWIW shrinkray gets to 162 bytes if I leave it to run for about 10 minutes. https://gist.github.com/DRMacIver/ee025c90b4867125b382a13aaa... I think it might do a little but not a lot better if I left it to run for long
23.
▲
by
DRMacIver
2y ago
I think the easiest way to think about it is that it's gradient descent, it's just a slightly weird form of it over a discrete space. If you imagine you've got some neighbourhood function N(x) that takes a program and returns
24.
▲
by
DRMacIver
2y ago
Yes, that's me. I accidentally got obsessed with test-case reduction as a result of writing Hypothesis, and wrote shrinkray because I thought it was ridiculous that I hadn't put all of the things I'd learned about test-case r
25.
▲
by
DRMacIver
2y ago
Well, I do have my own reducer (shrinkray is mine), but I actually hadn't considered using TreeSitter grammars for it. That's a good idea, thanks!
26.
▲
by
DRMacIver
2y ago
This isn't a coincidence. I wrote both.
27.
▲
by
DRMacIver
2y ago
Perses isn't language agnostic, it just knows the syntax of a lot of languages because there are antlr grammars for most commonly used languages. Really there's no such thing as a language-agnostic test-case reducer. shrink ray is
28.
▲
by
DRMacIver
8y ago
I think mathematicians have mostly moved past the idea of fighting over whether something is or isn't a number. There are lots of interesting number systems that never made it into widespread use in the same way that the "core&quo
29.
▲
by
DRMacIver
8y ago
I mean, I guess I am? I'm technically doing a PhD in it at the moment, but my opinions on philosophy of mathematics don't have much to do with the finer details of test-case reduction. My actual degree, which is where most of my p
30.
▲
by
DRMacIver
8y ago
> I think the writer is understating the importance of the exercises. I think it's not so much that I'm understating the importance of the exercises as that I'm coming from a position where by the time I want to read a tex
More ›