2 ms·
I really like this and think it could be very useful. You're really on a roll, alehander42, with pseudo and hivemind both on the HN front page the same weekend
by legutierr 11y ago
I really like this and think it could be very useful. You're really on a roll, alehander42, with pseudo and hivemind both on the HN front page the same weekend.
Regarding pseudo, could you explain a little about your testing strategy? How rigorous are you able to be in verifying that your code generators are generating code that compiles/runs properly and outputs the correct data?
And do you have plans for targeting other languages (C or PHP maybe)?
- alehander42 11y agoOh yes, my plans for v0.3 include adding support for at least 2-3 of Java, Swift, PHP, Perl and C. My goal with the first 5 was to choose several very different languages in order to prepare Pseudo to deal with all of them efficiently instead of skewing it to be e.g. best for dynamic ones. That's why it's a lot less work now to add support for other languages, because most of the time one can bootstrap their tests and generators from already implemented ones. Testing: Currently there is a suite covering almost all functions of pseudo's standard library and most of the AST nodes. However it was basically a by-product of TDD(I was surprised how well TDD works for that kind of project). Now, when I am closer to a more stable 0.3 version, I'll probably: * Generate a lot more examples in Python * Generate Pseudo AST nodes from them, check for incorrect ones and use them as a test suite for Pseudo-Python (because I've only tested Pseudo until now) * Reuse the already proven correct AST examples in Pseudo's suite and apply the same strategy to test for the target language input * Add tests that run and check the result files in their target language to the current travis ci infrastructure (it would be easy to target several supported versions of each of them that way)