3 ms·
I haven't looked at this in detail, but where I could see this technology going is by doing a kind of lint. We've got hand built linters for most languages and
by mikekchar 7y ago
I haven't looked at this in detail, but where I could see this technology going is by doing a kind of lint. We've got hand built linters for most languages and some of them are really good (Clippy in Rust is amazingly good -- it practically writes my code sometimes). However, a tool that analysed my code, picked out things that were idiomatically strange and then suggested example code that might be better would be quite useful, I think.
- mabrocks 7y ago[I'm one of the Microsoft Research people who worked on this] There are many interesting ideas that you could build on top of this kind of data, and we only scratched the surface so far. For example, the simple "search" technique we are using as a baseline is based on the idea of joint embeddings: We learn functions f_query and f_js/f_python/... to map from the inputs into some vector space such that, for example, for a (python method, docstring) pair, f_query(docstring) is near to f_python(method). To search given a query, we just do f_query(query) and look for nearest neighbours in all the code we indexed before. Now, we could also just do f_python(def bubblesort(...): ...) and look for the nearest neighbour that is in C#, and should get out a C# implementation of bubblesort. Similarly, we could apply all kinds of filters on the results (code from highly-starred repos, code that uses framework X, ...) to do more interesting thing.
- melling 7y agoI’d like to type my code in one language and have it translated into another. Someday I’d like to learn Rust, for example. If I could leverage the languages that I already know, I could more quickly build something more useful.
- nestorD 7y agoA seq2seq model trained on something like roseta code might be a viable way to do that...