4 ms·
I was looking for signs that the tests and examples worked afterwards. Those are missing. Its javascript to typescript, which unless I'm missing something, can
by JonChesterfield 1y ago
I was looking for signs that the tests and examples worked afterwards. Those are missing.
Its javascript to typescript, which unless I'm missing something, can be done with `mv foo.js foo.ts`. No examples of any transforms done by the tool.
And it wasn't one sentence, it was a sequence of questions and answers.
I guess they started with the title for the blog post and didn't really worry about showing whether it did anything useful or not.
- anentropic 1y agoit was Python -> Typescript
- hsuduebc2 1y agoPython to typescript is far more impressive. Assuming it's working of course.
- JonChesterfield 1y agoAh yes, reading fail on my part. Yes, successfully compiling python to typescript would be a headache. I think some things would essentially have to turn into eval of strings. Though not if the project was sufficiently uninteresting python.
- JaggerJo 1y ago> .. excluding all tests and examples, .. How would you verify that the ported code actually works if you don't port the tests and examples? I see tremendous use in a tool that could be used to port "any" library to any language. I'm very skeptical if this works if the library itself depends on other language specific libraries, ... but we'll see. If you'd seriously want to use that port in production it only makes sense to port the tests and examples. How would you verify the ported code works otherwise? This also means that if the original library has bad test coverage.. you have too.
- JonChesterfield 1y agoIt's much more convincing evidence that the port worked if you run the same tests and examples as before. If you've let the llm change the tests too it's very hard to tell whether the new codebase does the same thing as the original.
- JaggerJo 1y agoYes, that would be even better - but also way harder for unit tests as you’d need to interop between the langauges.
- frumplestlatz 1y agoClaude Sonnet has a funny habit of fixing test failures by deleting the failing tests.
- Anonbrit 1y agoIt really is like an over enthusiastic college intern!
- hn8726 1y ago> How would you verify that the ported code actually works if you don't port the tests and examples? Port tests, run them against unported code. Port code, run it against unported tests? That way you also verify that the public api hasn't changed