Better Code Completion

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

Re: Better Code Completion

stepharo
In fact NOC is the code of romain robbes (we took the best version that he described in his phd)
Now the code needs some love.

Stef

Le 6/10/15 15:53, Nicolai Hess a écrit :


2015-10-06 15:28 GMT+02:00 Esteban Lorenzano <[hidden email]>:

On 06 Oct 2015, at 15:23, Nicolai Hess <[hidden email]> wrote:



2015-10-06 13:46 GMT+02:00 Henrik Johansen <[hidden email]>:

On 06 Oct 2015, at 1:33 , Nicolai Hess <[hidden email]> wrote:



2015-10-06 11:57 GMT+02:00 Werner Kassens <[hidden email]>:
On 10/06/2015 09:09 AM, Nicolai Hess wrote:
 > Since Object has almost 500 methods whatever I will start typing
Object/TClass/TBehavior/... will have a list of answers...

I think this is difficult, even though this classes are big and you
don't use most of the methods,


Hi Nicolai,
imagine that code-completion is a game and the computer wins, if the user mostly uses the first few proposals. perhaps one could program several different heuristics, that decide, what the user wants. depending on the user choices, the weights for these heuristics get updated accordingly and then the choices get sorted with those weights. this way the code-completion could adapt to the way each user works?


Yes this would be nice, but it is not an easy task.
 
werner



I thought we already had something like that...

I can not load it in a recen pharo image.
Is it used in recent versions of squeak?

OCompletion is already in the image (since Pharo 2.0). 
if you check your settings, under "Code Completion”, Controller… it should say NOCController. 

Funny, I always thought the NOC-Classes are some kind of "Old" NEC-Classes.
 
Is a lot better than older NECController, but still far from good enough.

Some more information on this? What is missing.

 

Esteban



 

Cheers,
Henry




Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

Peter Uhnak
In reply to this post by stepharo
(did you know, that there is a shortcut to jump from one message send argument to another (not related to completion, but very helpful). Sadly this is gone or I couldn't find it in rubrics shortcut handling).

maybe this is related to Settings > Code Browsing > AST navigation? (I've never actually tried to use this.)

On Tue, Oct 6, 2015 at 8:00 PM, stepharo <[hidden email]> wrote:
About an alternative way to do code completion:

This is the paper: http://macbeth.cs.ucdavis.edu/cacheca.pdf
this is the code repository: https://github.com/christinef/CACHECA
and this is the tool in action: https://www.youtube.com/watch?v=3INk0N3JNtc

This was the student I was in contact with.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

kilon.alios
Well I tried to understand how NECompletion works , after a month of reading and rereading code still could not figure out how it works. I understood the basics, but the details were so difficult to really track down. Its very spagetified, a usual pharo issue, and of course undocumented. I decided to move to things that I could be more productive with. This is an area that requires the touch of a Pharo expert. 

On Tue, Oct 6, 2015 at 10:21 PM Peter Uhnák <[hidden email]> wrote:
(did you know, that there is a shortcut to jump from one message send argument to another (not related to completion, but very helpful). Sadly this is gone or I couldn't find it in rubrics shortcut handling).

maybe this is related to Settings > Code Browsing > AST navigation? (I've never actually tried to use this.)

On Tue, Oct 6, 2015 at 8:00 PM, stepharo <[hidden email]> wrote:
About an alternative way to do code completion:

This is the paper: http://macbeth.cs.ucdavis.edu/cacheca.pdf
this is the code repository: https://github.com/christinef/CACHECA
and this is the tool in action: https://www.youtube.com/watch?v=3INk0N3JNtc

This was the student I was in contact with.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

Marcus Denker-4
In reply to this post by Peter Uhnak

On 06 Oct 2015, at 21:20, Peter Uhnák <[hidden email]> wrote:

(did you know, that there is a shortcut to jump from one message send argument to another (not related to completion, but very helpful). Sadly this is gone or I couldn't find it in rubrics shortcut handling).

maybe this is related to Settings > Code Browsing > AST navigation? (I've never actually tried to use this.)


We never used it as we could not use a good key-combination (ctr-arrow keys) due to the VM…

Now I think it is not in the new editor.

We should revisit that: I still like the idea to do navigation by AST structure instead of text.

Marcus

Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

wernerk
In reply to this post by kilon.alios
just fwiw, i looked at http://www.squeaksource.com/OCompletion/ and
there was a paper about ocompletion mentioned, but the access to this
paper was forbidden - at least for me. but at
http://users.dcc.uchile.cl/~rrobbes/p/JASE-completion.pdf there is a
paper about ocompletion by the same author that explains ocompletion and
with that paper ocompletion is easily understandable.
werner

Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

Peter Uhnak
On Wed, Oct 7, 2015 at 2:49 PM, Werner Kassens <[hidden email]> wrote:
just fwiw, i looked at http://www.squeaksource.com/OCompletion/ and there was a paper about ocompletion mentioned, but the access to this paper was forbidden - at least for me. but at http://users.dcc.uchile.cl/~rrobbes/p/JASE-completion.pdf there is a paper about ocompletion by the same author that explains ocompletion and with that paper ocompletion is easily understandable.
werner


This is different paper, I've posted accessible link earlier:

On Mon, Oct 5, 2015 at 9:59 PM, Peter Uhnák <[hidden email]> wrote:

I'm currently going through http://users.dcc.uchile.cl/~rrobbes/p/ASE2008-completion.pdf and http://link.springer.com/article/10.1007/s10515-010-0064-x (dunno if there's non-paywalled link) to get better idea of how it works... and I can already see why there's limited progress :)

But your link provides access to the other (paywalled) paper. :)

Peter 


Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

wernerk
thanks Peter
werner

On 10/07/2015 05:28 PM, Peter Uhnák wrote:

> This is different paper, I've posted accessible link earlier:
>
> On Mon, Oct 5, 2015 at 9:59 PM, Peter Uhnák <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>     I'm currently going through
>     http://users.dcc.uchile.cl/~rrobbes/p/ASE2008-completion.pdf and
>     http://link.springer.com/article/10.1007/s10515-010-0064-x (dunno if
>     there's non-paywalled link) to get better idea of how it works...
>     and I can already see why there's limited progress :)
>
>
> But your link provides access to the other (paywalled) paper. :)
>
> Peter
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

wernerk
In reply to this post by Peter Uhnak
Hi Peter,
the difference between the paper i mentioned (JASE-completion) and
ASE2008-completion (both accessible) is, i think, that in the first one
also the  class-level code completion of ocompletion is explained. (i
think that part was later added to ocompletion or so)
werner


Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

stepharo
the code should be in the image :)

Le 7/10/15 18:31, Werner Kassens a écrit :
> Hi Peter,
> the difference between the paper i mentioned (JASE-completion) and
> ASE2008-completion (both accessible) is, i think, that in the first
> one also the  class-level code completion of ocompletion is explained.
> (i think that part was later added to ocompletion or so)
> werner
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

wernerk
On 10/10/2015 09:50 AM, stepharo wrote:
> the code should be in the image :)

Hi Stephane,
of course. but sometimes i only discover some nice pharo code by reading
a paper. i discovered ocompletion in the image only after having read
that paper mentioned by Peter, and - thinking "yes, that should work" -
after trying out ocompletion i noticed that it is indeed better than the
default setting <g>.
werner

Reply | Threaded
Open this post in threaded view
|

Re: Better Code Completion

stepharo
But we should improve.
It would be good to have someone taking that challenge because he would
impact our all lives :)


Le 10/10/15 12:22, Werner Kassens a écrit :

> On 10/10/2015 09:50 AM, stepharo wrote:
>> the code should be in the image :)
>
> Hi Stephane,
> of course. but sometimes i only discover some nice pharo code by
> reading a paper. i discovered ocompletion in the image only after
> having read that paper mentioned by Peter, and - thinking "yes, that
> should work" - after trying out ocompletion i noticed that it is
> indeed better than the default setting <g>.
> werner
>
>


12