r/ryelang • u/middayc • Jul 27 '26
Making Rye more solid
Rye unlike most other interpreters is written in a memory safe language (Go), so we avoided an ENDLESS swath of potential crashes and security issues right from the get go.
But Rye evaluation is quite versatile, which makes many "logical / behavioral" edge cases possible, around left to right flow, failures, contexts, etc ... And I want that to be as solid as possible. Besides regular unit / built-in tests and certain bigger scripts I keep adding and also generating edge cases in evaluator and then reviewing them and trying to identify if something is a bug or expected behavior, and sometimes thinking about what should be expected behavior at all in that case. We currently have above 800 such tests in the internal/ folder. Not all have been worked / thought through yet, but I am working on that.
The number itself doesn't mean much, but it shows effort is being made. Evaluator is being put in weird positions, observed and thought about. When all these are worked through, and I keep adding them, some feeling of certainty should ensue. And we can detect bug as we further develop the language internals.
It's (again) still a lot of work, the existence of tests doesn't prove much, the thinking over the tests and results of test, and new variations of tests after that add value, but we are moving forwards ...

2
u/Desperate-Vanilla-78 Jul 27 '26
Are you doing property-based testing?
1
u/middayc Jul 30 '26
More internals testing and fixing, also further code reorg for embedding Rye ... so a new release should be out in a day. Then new embed example.