machine learning for code completion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

machine learning for code completion

Pharo Smalltalk Developers mailing list
for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great


cheers,
myroslava
Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

ducasse
hello miroslava

you take a NLP approach and I do not know if it will be working 
Now people like proksch and mezini took a statiscal approach.
I would really like to see if we can apply the same technics to Pharo completion and 
measure the difference. It could be a really nice master (even from a data scientist point of view)



On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:


From: Myroslava Romaniuk <[hidden email]>
Subject: machine learning for code completion
Date: 15 August 2019 at 00:01:23 CEST
To: Pharo Development List <[hidden email]>


for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great


cheers,
myroslava




Recommander-a3-proksch.pdf (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

Tudor Girba-2
Hi,

It certainly would be interesting!

The other thing to look for are completion of larger constructs. For example, in the context of Spec, I am sure you can complete larger templates for various methods.

Cheers,
Doru



> On Aug 15, 2019, at 8:48 AM, ducasse <[hidden email]> wrote:
>
> hello miroslava
>
> you take a NLP approach and I do not know if it will be working
> Now people like proksch and mezini took a statiscal approach.
> I would really like to see if we can apply the same technics to Pharo completion and
> measure the difference. It could be a really nice master (even from a data scientist point of view)
>
> <Recommander-a3-proksch.pdf>
>
>> On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:
>>
>>
>> From: Myroslava Romaniuk <[hidden email]>
>> Subject: machine learning for code completion
>> Date: 15 August 2019 at 00:01:23 CEST
>> To: Pharo Development List <[hidden email]>
>>
>>
>> for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great
>>
>> link for the blog post : https://medium.com/@myroslavarm/machine-learning-for-code-completion-2583792997e3
>>
>> cheers,
>> myroslava
>>
>>
>

--
feenk.com

"Innovation comes in the least expected form.
That is, if it is expected, it already happened."


Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

Christopher Fuhrman-3
+1 for the completion of framework (spec) constructs. 


On Thu, Aug 15, 2019, 12:33 Tudor Girba <[hidden email]> wrote:
Hi,

It certainly would be interesting!

The other thing to look for are completion of larger constructs. For example, in the context of Spec, I am sure you can complete larger templates for various methods.

Cheers,
Doru



> On Aug 15, 2019, at 8:48 AM, ducasse <[hidden email]> wrote:
>
> hello miroslava
>
> you take a NLP approach and I do not know if it will be working
> Now people like proksch and mezini took a statiscal approach.
> I would really like to see if we can apply the same technics to Pharo completion and
> measure the difference. It could be a really nice master (even from a data scientist point of view)
>
> <Recommander-a3-proksch.pdf>
>
>> On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:
>>
>>
>> From: Myroslava Romaniuk <[hidden email]>
>> Subject: machine learning for code completion
>> Date: 15 August 2019 at 00:01:23 CEST
>> To: Pharo Development List <[hidden email]>
>>
>>
>> for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great
>>
>> link for the blog post : https://medium.com/@myroslavarm/machine-learning-for-code-completion-2583792997e3
>>
>> cheers,
>> myroslava
>>
>>
>

--
feenk.com

"Innovation comes in the least expected form.
That is, if it is expected, it already happened."


Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

Pharo Smalltalk Developers mailing list
Hi

Stef, thanks for the paper, i'll check it out. I agree that there's many cool things that can be still done statistically, but the ML/NLP approach should be worth trying out, too. Maybe it will give good results, maybe it will turn out to be not applicable to Pharo for whatever reason... But the point is that now the code completion architecture is definitely simpler and more scalable, and especially because of the sorter plugin it will be easy to work on any sorting strategy and then make it one of the options. There's indeed a lot of work that can be done in measuring different strategies and seeing what works better as there's still not *that* much research on the topic.

Tudor and Cris, yeah i haven't really worked with Spec in a while but i get what you mean. I agree it would be great to have that! There's still tons and tons of improvements that could be made, as you say, regarding completing larger templates, but also doing convenient tab usage for jumping between parts of larger templates or even for things like ifTrue:ifFalse:, possible snippet (method name shorthand) completion, etc etc. I'm always happy to extend the todo list haha. Oh and FYI, at ESUG on friday at noon Marcus and i will be doing a presentation about what's been done and also what we want to do in the nearest future so i hope some people stick around even though it's the last day :)

Best,
Myroslava

On Thu, 15 Aug 2019 at 18:52, Christopher Fuhrman <[hidden email]> wrote:
+1 for the completion of framework (spec) constructs. 


On Thu, Aug 15, 2019, 12:33 Tudor Girba <[hidden email]> wrote:
Hi,

It certainly would be interesting!

The other thing to look for are completion of larger constructs. For example, in the context of Spec, I am sure you can complete larger templates for various methods.

Cheers,
Doru



> On Aug 15, 2019, at 8:48 AM, ducasse <[hidden email]> wrote:
>
> hello miroslava
>
> you take a NLP approach and I do not know if it will be working
> Now people like proksch and mezini took a statiscal approach.
> I would really like to see if we can apply the same technics to Pharo completion and
> measure the difference. It could be a really nice master (even from a data scientist point of view)
>
> <Recommander-a3-proksch.pdf>
>
>> On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:
>>
>>
>> From: Myroslava Romaniuk <[hidden email]>
>> Subject: machine learning for code completion
>> Date: 15 August 2019 at 00:01:23 CEST
>> To: Pharo Development List <[hidden email]>
>>
>>
>> for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great
>>
>> link for the blog post : https://medium.com/@myroslavarm/machine-learning-for-code-completion-2583792997e3
>>
>> cheers,
>> myroslava
>>
>>
>

--
feenk.com

"Innovation comes in the least expected form.
That is, if it is expected, it already happened."




--
З повагою, 
Мирослава Романюк.
Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

Mariano Martinez Peck
In reply to this post by Christopher Fuhrman-3
Hi Myroslava,

That sounds very interesting. I guess you did take a look to Romain Robbes work on OCompletion, right? 
I have used it for a long time, many years ago, and AFAIR we had to remove it from Pharo. It had lots of issues with the memory used to keep track of your "history" in order to be "smart". There were memory leaks and some other stuff. And at the end of the day, from what I remember, it was never really "smart"... 
Have you thought how to address that correctly? 


On Thu, Aug 15, 2019 at 12:52 PM Christopher Fuhrman <[hidden email]> wrote:
+1 for the completion of framework (spec) constructs. 


On Thu, Aug 15, 2019, 12:33 Tudor Girba <[hidden email]> wrote:
Hi,

It certainly would be interesting!

The other thing to look for are completion of larger constructs. For example, in the context of Spec, I am sure you can complete larger templates for various methods.

Cheers,
Doru



> On Aug 15, 2019, at 8:48 AM, ducasse <[hidden email]> wrote:
>
> hello miroslava
>
> you take a NLP approach and I do not know if it will be working
> Now people like proksch and mezini took a statiscal approach.
> I would really like to see if we can apply the same technics to Pharo completion and
> measure the difference. It could be a really nice master (even from a data scientist point of view)
>
> <Recommander-a3-proksch.pdf>
>
>> On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:
>>
>>
>> From: Myroslava Romaniuk <[hidden email]>
>> Subject: machine learning for code completion
>> Date: 15 August 2019 at 00:01:23 CEST
>> To: Pharo Development List <[hidden email]>
>>
>>
>> for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great
>>
>> link for the blog post : https://medium.com/@myroslavarm/machine-learning-for-code-completion-2583792997e3
>>
>> cheers,
>> myroslava
>>
>>
>

--
feenk.com

"Innovation comes in the least expected form.
That is, if it is expected, it already happened."




--
Mariano Martinez Peck
Reply | Threaded
Open this post in threaded view
|

Re: machine learning for code completion

Pharo Smalltalk Developers mailing list
Hi Mariano

Yeah, that was probably the first thing i have ever looked at in regards to code completion because the beginning of this journey for me was figuring out the difference between regular and OCompletion (NEC, that used to be the default until a month and a half ago, & NOC, as they are called). The funny thing is, the code for OCompletion was actually still in Pharo until we removed it like a month ago, but using it was disabled by default. I don't think i've ever really used it myself but i understand the concerns :)

There was some brainstorming for it, but mostly last summer. This summer we focused on making the replacement for NEC work well, and so working on OCompletion got pushed back super far because we haven't thought there'd be so many things to fix. So i don't really have a good answer for you at the moment but hopefully will have something more to say sometime not too far in the future. We still want to work on it :) The thing to remember is that both NEC and NOC implementations were complex to the point of being horrible, so there's a chance if we just simplify NOC too and impose some limits for storing the results, as well as do proper caching, it might not be horrible after all. But it needs work.

On Thu, 15 Aug 2019 at 19:53, Mariano Martinez Peck <[hidden email]> wrote:
Hi Myroslava,

That sounds very interesting. I guess you did take a look to Romain Robbes work on OCompletion, right? 
I have used it for a long time, many years ago, and AFAIR we had to remove it from Pharo. It had lots of issues with the memory used to keep track of your "history" in order to be "smart". There were memory leaks and some other stuff. And at the end of the day, from what I remember, it was never really "smart"... 
Have you thought how to address that correctly? 


On Thu, Aug 15, 2019 at 12:52 PM Christopher Fuhrman <[hidden email]> wrote:
+1 for the completion of framework (spec) constructs. 


On Thu, Aug 15, 2019, 12:33 Tudor Girba <[hidden email]> wrote:
Hi,

It certainly would be interesting!

The other thing to look for are completion of larger constructs. For example, in the context of Spec, I am sure you can complete larger templates for various methods.

Cheers,
Doru



> On Aug 15, 2019, at 8:48 AM, ducasse <[hidden email]> wrote:
>
> hello miroslava
>
> you take a NLP approach and I do not know if it will be working
> Now people like proksch and mezini took a statiscal approach.
> I would really like to see if we can apply the same technics to Pharo completion and
> measure the difference. It could be a really nice master (even from a data scientist point of view)
>
> <Recommander-a3-proksch.pdf>
>
>> On 15 Aug 2019, at 00:01, Myroslava Romaniuk <[hidden email]> wrote:
>>
>>
>> From: Myroslava Romaniuk <[hidden email]>
>> Subject: machine learning for code completion
>> Date: 15 August 2019 at 00:01:23 CEST
>> To: Pharo Development List <[hidden email]>
>>
>>
>> for anyone interested, made a blog post about researching some of the existing approaches of combining ML to improve code completion. in pharo we want to try training the n-gram model. have a slight idea of how it might be implemented in practice but mostly still trying to figure it out, so if anyone else has some suggestions/ideas/tips that would be great
>>
>> link for the blog post : https://medium.com/@myroslavarm/machine-learning-for-code-completion-2583792997e3
>>
>> cheers,
>> myroslava
>>
>>
>

--
feenk.com

"Innovation comes in the least expected form.
That is, if it is expected, it already happened."




--
Mariano Martinez Peck


--
З повагою, 
Мирослава Романюк.