Re:Aroma: Using machine learning for code recommendation
by thedirt0115 on Monday April 08, 2019 @06:49PM
(#19609884)
This is easier with a minimalistic (syntactically) language like Lisp. Check this out, the editor refuses to let you write code that won’t compile: http://danmidwood.com/content/2014/11/21/animated-paredit.ht...
Re:Aroma: Using machine learning for code recommendation
by Keyframe on Monday April 08, 2019 @06:29PM
(#19609722)
Hmm, so https://github.com/SirVer/ultisnips ?
Re:Aroma: Using machine learning for code recommendation
by JudgeWapner on Monday April 08, 2019 @06:52PM
(#19609911)
yes, that is awesome. Now imagine connecting that to a machine-learning backend and letting it slowly train itself on how to write software. yes, I know ML doesn't need this vim-type language specifically, but it should help by only feeding it valid productions.
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:
* <space>+F outputs a function called func1, auto-highlighted for you to rename (or accept default). * <space>+R on the func name lets you set its return type * <space>+A for args, * <space>+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.