Live data from Hacker News

Aroma: Using machine learning for code recommendation

ai.facebook.com

31–40 of 62 posts

Re: Aroma: Using machine learning for code recommendation

#32
post #29

Maybe ontopic: I would like a voice controlled system that works with me. For example: saying, "I need a loop over a list" and promptly I get served in my text editor the loop. Or "I need to open a file and read contents". Or "Create an object ThisAndThat, with three properties" ... etc. Of course ideally would even ask for more details like, what kind of list is that, or how shall the file be read. How hard would be…

Chain a text-to-speech component to tranx and you're done Paper: https://arxiv.org/pdf/1810.02720v1.pdf Code: https://github.com/pcyin/tranX Live demo (try Django out): http://moto.clab.cs.cmu.edu:8081/

This seems to be a lot better those those Seq-to-Seq natural language to SQL networks. Can you elaborate more about them?

Re: Aroma: Using machine learning for code recommendation

#33
post #26
post #4

The most interesting (and I think difficult) approach here is properly representing the ASTs as vectors. There is a lot more possible when you get this right.

This. ML is so vector-y. And code is so graph-y. Can you point out some SOTA on bridging this ?

I think you'll find a good amount of material if you search for 'deep graph learning'.

Re: Aroma: Using machine learning for code recommendation

#34
post #24

If anyone wants to get a PhD in this topic, let me know :)

Not for PhD, but for research purposes ;) Can u point out any work on refactoring existing code for reduced code complexity? Obtaining same (non)functional behavior using less code. EDIT: i will read the CodeDeviant paper

The related work cited in the CodeDeviant paper may help.

CodeDeviant itself is a tool to help programmers perform manual refactorings without unit tests (in a visual programming language), so it may not be helpful for you :)

Re: Aroma: Using machine learning for code recommendation

#35
post #22

If anyone wants to get a PhD in this topic, let me know :)

Your website is the first I've heard of "Information Foraging" as a field of study. Absolutely fascinating. Any recommendations on where I might dive into the topic?

A good start that is easy to read would be:

An Information Foraging Theory Perspective on Tools for Debugging, Refactoring, and Reuse Tasks https://dl.acm.org/citation.cfm?id=2430551

The paper applies IFT to software engineering, but IFT has also been applied to navigating websites or even physical offices. Use Scholar.Google.com to find a PDF of the paper if you don't have ACM access.

Re: Aroma: Using machine learning for code recommendation

#36
post #10

Was anyone able to find a link to Aroma in that document? I found the colours made it very difficult to differentiate the links from the text and I couldn't find it. A quick search through Facebook's profile on Github turned up nothing.

There's a paper describing the approach in detail " rel="nofollow">https://arxiv.org/abs/1812.01158> , but Aroma itself is not open source yet.

Sorry, HN screwed up my URL: https://arxiv.org/abs/1812.01158

Re: Aroma: Using machine learning for code recommendation

#37
post #29

Maybe ontopic: I would like a voice controlled system that works with me. For example: saying, "I need a loop over a list" and promptly I get served in my text editor the loop. Or "I need to open a file and read contents". Or "Create an object ThisAndThat, with three properties" ... etc. Of course ideally would even ask for more details like, what kind of list is that, or how shall the file be read. How hard would be…

I've envisioned something like this even for written code. Basically unify the language and the editor, so that you could (theoretically) right-click on main() and say "add loop" and have the correct code auto-generated. Not because a mouse is somehow better (it's much worse in fact), but basically an editor/UI that only allows you to produce valid code.

Currently for most languages, we have: "type productions of a particular syntax and try really-really-hard to color between the lines, and subject yourself to the chinese-water-torture of syntax errors till YOU get better at it".

Why not invert that, whether via mouse input, a visual (as in literally, visual, not microsoft-visual) connection, or a text editor that simply doesn't let you type invalid productions. Like Intellisense, but taken to the function or block level. You cannot save the file or even leave insert mode until the code compiles. Or even better, you cannot even temporarily input invalid syntax. From the first keystroke, it inserts a variable declaration, click/type up or down to choose a function call, conrol structure, etc.

Some vim-like integration would go as follows:

command mode:

* +F outputs a function called func1, auto-highlighted for you to rename (or accept default). * +R on the func name lets you set its return type * +A for args, * +B to edit the function body

At no point would you be allowed to input non-compiling syntax. Things like indentation would be non-issues, set uniformly by defaults.

Re: Aroma: Using machine learning for code recommendation

#38
post #29

Maybe ontopic: I would like a voice controlled system that works with me. For example: saying, "I need a loop over a list" and promptly I get served in my text editor the loop. Or "I need to open a file and read contents". Or "Create an object ThisAndThat, with three properties" ... etc. Of course ideally would even ask for more details like, what kind of list is that, or how shall the file be read. How hard would be…

As you expanded your database of common tasks, do you think that would eventually become a repository of “things I shouldn’t have to remember”, which could then be used to redesign languages?

Machine code instructions designed by hand are not necessarily the best fit for the code we actually generate. Similarly, might our approach to language design lack pragmatic insight as to which constructs should be favoured, adopted, simplified etc?

“Data-driven language design”.

Re: Aroma: Using machine learning for code recommendation

#39
post #29

Maybe ontopic: I would like a voice controlled system that works with me. For example: saying, "I need a loop over a list" and promptly I get served in my text editor the loop. Or "I need to open a file and read contents". Or "Create an object ThisAndThat, with three properties" ... etc. Of course ideally would even ask for more details like, what kind of list is that, or how shall the file be read. How hard would be…

I've envisioned something like this even for written code. Basically unify the language and the editor, so that you could (theoretically) right-click on main() and say "add loop" and have the correct code auto-generated. Not because a mouse is somehow better (it's much worse in fact), but basically an editor/UI that only allows you to produce valid code. Currently for most languages, we have: "type productions of a p…

Hmm, so https://github.com/SirVer/ultisnips ?

Re: Aroma: Using machine learning for code recommendation

#40

Earlier quoted context omitted.

There's a paper describing the approach in detail " rel="nofollow">https://arxiv.org/abs/1812.01158> , but Aroma itself is not open source yet.

Sorry, HN screwed up my URL: https://arxiv.org/abs/1812.01158

Great, thanks very much for finding that paper. Hopefully Facebook follows this up in the not to distant future with at least a rudimentary example.

I can learn from a paper, but I learn much faster from an example!

Post reply on HN