Hacker News new | past | comments | ask | show | jobs | submit login

To be clear my comment was meant to be an awareness that it is good old fashioned computer science. Without LLMs, which this predates, it is surprising to me that you'd have a lot of success reducing a program in an arbitrary language and still having something that's valid syntax!

I do get that it will reject a lot of stuff as not working (and has to even in the target language) and I also get that algol-like languages are all very similar, but I am still surprised that it works well enough to function on ~arbitrary languages.

These are very LLM-era properties for a program to have. The question is not "does it work for language x" but "how well does it work for language x", and the answer is not "is it one of the languages it was designed for" but instead "idunno try it out and see".




An AST for you favourite language is readily availble so get one and go nuts.

I am sure in 2006 or so I was doing "extract method" in Resharper. And Lispers probably doing it for centuries ;)


The fascinating part isn't that it can modify code accordingly to some rules - it's that it can modify code from _arbitrary_ languages without having a grammar or semantic analysis for them.


I think the tool has some grammar info: C, C++, C#, Java, Go, JS are similar.

And that is enough when:

1. Most code in a code file is irrelevant to whatever specifc bug is being looked at.

2. It is removal of code at play not writing code.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: