Hacker News new | ask | show | jobs
by ChristianBundy 3326 days ago
IIRC you _can_ get this, but it's a huge algorithm that doesn't do things in a way that would probably make sense to a human. It would be amazing to be able to transform code into human language.
1 comments

I was sloppy in my own examples. I’d be perfectly satisfied with an AST, or regex, or other non-English explanation. But something that I can audit is what I’m after. Otherwise this tool would never be trustworthy enough to let lose on billions of rows of data, with silent errors occurring throughout. (Well, I guess it depends on the nature and importance of the data. Cat photos, meh. Drug prescriptions? Ahh!)
Maybe also synthesize and suggest property based tests, by one specify also some invalid examples. Then these checks could be ran for each transformation. For instance:

- 123 456 = 123456 valid

- 1234567 = 123567 not valid (dropped 4)

Properties:

- output may not contain whitespace

- no number characters may be dropped

- characters may not be reordered