Helios Auto-Completion

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

Helios Auto-Completion

kilon.alios
So I decided to join you guys and give you a helping hand with amber. Few weeks ago I had no clue about web development besides doing tiny amounts of hmtl4 10 years ago, but the last weeks I have studied js , hmtl5 and css and I think I know enough to be dangerous. 

So I forked amber and created a branch for code-completion. 

I need help how to start Helios from node.js, the server binary I ran on macos opens the old IDE. So any help ?

Also I assume there is no auto completion for Helios as of yet. But better ask than be sorry later on. 

I see that Helios uses CodeMirror as happened with the old IDE. By visiting the website it appears that CodeMirror supports code-completion , I think as an addon. So I would like to give that a try if its not insanely difficult. 

I am open for suggestions. Oh and I would also would like to bring themes, which also CodeMirror supports, I am a big fan of dark themes. All this white hurts my eyes. 

Congratulations with the amazing work you have done with amber, especially Helios looks very nice indeed.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

Herby Vojčík


kilon alios wrote:
> I need help how to start Helios from node.js, the server binary I ran on
> macos opens the old IDE. So any help ?
>
You are mixing things a bit. Server just serves files (and saves them
back when IDE PUTs them), the choice of which IDE you want to appear is
you choice of which html you load (index.html vs helios.html).

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

kilon.alios
yeap, this is my clear lack of knowledge. Expect more ignorant questions in the future, but I am determined to learn. So I will definitely study more to make sure I don't bother you with things that are a google away.

I had a chat at amber irc channel with mkroehnert and he was kind to show me many things I was ignorant about. 

Now I can start Helios via nodejs and know that auto completition is available for Helios. I love how everything is coded in smalltalk you guys have done an amazing job. I did not expect so much to be coded in smalltalk in fear of severe slow downs. 

Looks like Helios is struggling to compute the completion, so I am taking a look at the code to learn from it and see if I can improve it and make it faster.


On Sat, Aug 10, 2013 at 10:36 PM, Herby Vojčík <[hidden email]> wrote:


kilon alios wrote:
I need help how to start Helios from node.js, the server binary I ran on
macos opens the old IDE. So any help ?

You are mixing things a bit. Server just serves files (and saves them back when IDE PUTs them), the choice of which IDE you want to appear is you choice of which html you load (index.html vs helios.html).

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

Herby Vojčík
Please do. For that little time I tried Helios (I am still coding in old IDE), I always get angry when it stopped reacting for three seconds (and then the space character I typed after colon got always lost). I even agrily tapped on Esc trying to get that slow completion away so I can normally type.

Thanks, Herby

kilon alios wrote:
> Looks like Helios is struggling to compute the completion, so I am
> taking a look at the code to learn from it and see if I can improve it
> and make it faster.
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

kilon.alios
With the help once more of mkroehnert he showed me the method responsible for code completion HLCodeWidget class >> hintFor: options: which in turn depending on the type of completion uses either HLCodeWidget >> messageHintFor: token: or HLCodeWidget >> variableHintFor: token: .

As I suspected it seems to rebuild its completion table each time its called , which of course is expensive and it also appears to be doing jquery calls too. 

I am looking at pharo's  NECompletion and NOCompletion , which are the two code completion pharo can use ( you can choose to use one of the two from pharo preferences) and emacs very cool fuzzy completion (meaning the completion is not limited to messages and variables / class names but pretty much anything you type even if its plain text and not code related ie. file names )

Question : I have my fork already , and my own branch in that fork named "code-completion" should I open an issue in github issue track of amber's main repo for code completion ? 

Also I would like to make completion automatic like pharo, though I dont have an issue to keep the shortcut method too as well for those that dont want popups appearing as they type. 

That means however that is time for Helios to start getting a preferences tab, panel , window or whatever you want to call it similar to pharo. 

So how you feel about all that ?   

Suffice to say I plan to implement all that by myself so I am not asking for anyone else to code those for me. No promise about when they will be ready, I am very new to web development and very slow coder too :) 


On Sun, Aug 11, 2013 at 2:45 PM, Herby Vojčík <[hidden email]> wrote:
Please do. For that little time I tried Helios (I am still coding in old IDE), I always get angry when it stopped reacting for three seconds (and then the space character I typed after colon got always lost). I even agrily tapped on Esc trying to get that slow completion away so I can normally type.

Thanks, Herby


kilon alios wrote:
Looks like Helios is struggling to compute the completion, so I am taking a look at the code to learn from it and see if I can improve it and make it faster.


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

Herby Vojčík


kilon alios wrote:
> Question : I have my fork already , and my own branch in that fork named
> "code-completion" should I open an issue in github issue track of
> amber's main repo for code completion ?

It depends. It you feel it is an issue, fgill an issue. But the process
of filling issues can (and maybe should) be separated from process of
issuing pull requests. If you issue a pull request, it appears among
other issues, with a few differences (it contains code, can be merged,
etc.). Also, a github pullreq is "pinned" to the branch name*, so you
can change it on the fly, just push to the branch (I even change hostory
and forcepush sometimes to pullreqs, if I think it makes code and commit
sequence clearer or a quickfix should be included below its head).

Herby

* Of course, pinning is release once pullreq is closed, either by
rejecting or by merging.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

kilon.alios
ok will keep it as a pull request only.

Are there any prerequisites ? For example should I do a pull request each time I add a new feature for code completion or should add all the features together in a single pull request ?  


On Sun, Aug 11, 2013 at 7:18 PM, Herby Vojčík <[hidden email]> wrote:


kilon alios wrote:
Question : I have my fork already , and my own branch in that fork named
"code-completion" should I open an issue in github issue track of
amber's main repo for code completion ?

It depends. It you feel it is an issue, fgill an issue. But the process of filling issues can (and maybe should) be separated from process of issuing pull requests. If you issue a pull request, it appears among other issues, with a few differences (it contains code, can be merged, etc.). Also, a github pullreq is "pinned" to the branch name*, so you can change it on the fly, just push to the branch (I even change hostory and forcepush sometimes to pullreqs, if I think it makes code and commit sequence clearer or a quickfix should be included below its head).

Herby

* Of course, pinning is release once pullreq is closed, either by rejecting or by merging.


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

Herby Vojčík
Well. if it seems it will be big, it should be split, probably. I can
illustrate it with my work which is currently make amberjs packages
outptu as AMD modules and switch the proprietary loader with require.js.
Since it is big thing, and it invloves lot of fixes and improvements
that are unrelated to actual loading using requirejs 9makinf packages
know their load dependencies, refactoring exporter engine, etc.). I did
the approach where I try to keep each such generic sub-feature on its
own, and if it makes at least a little meaning to be in msster, I issue
a pullreq to include it in master. It the meantime, there is requirejs
branch in main repo. Then I have branches in my fork, which do
requirejs-specific features (often, they include merge of generic
sub-feature mentioned above), and issue pullrequest into main repo,
requirejs branch (and accept them as soon as they pass travis tests). I
am not the only one issuing pullreq into main repo's requirejs branch,
some fixes also came from mkroehert, who reviewed and cleaned my changes
into amber compiler, for example.

This way, each feature has its own branch, it reviewed and accepted
independently, but it can also be immeditately of use in parallel
development branch, and if changes appear, only they are merged back
from master.

You can do something similar if you think this model suits you.

Herby

kilon alios wrote:

> ok will keep it as a pull request only.
>
> Are there any prerequisites ? For example should I do a pull request
> each time I add a new feature for code completion or should add all the
> features together in a single pull request ?
>
>
> On Sun, Aug 11, 2013 at 7:18 PM, Herby Vojčík <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>
>     kilon alios wrote:
>
>         Question : I have my fork already , and my own branch in that
>         fork named
>         "code-completion" should I open an issue in github issue track of
>         amber's main repo for code completion ?
>
>
>     It depends. It you feel it is an issue, fgill an issue. But the
>     process of filling issues can (and maybe should) be separated from
>     process of issuing pull requests. If you issue a pull request, it
>     appears among other issues, with a few differences (it contains
>     code, can be merged, etc.). Also, a github pullreq is "pinned" to
>     the branch name*, so you can change it on the fly, just push to the
>     branch (I even change hostory and forcepush sometimes to pullreqs,
>     if I think it makes code and commit sequence clearer or a quickfix
>     should be included below its head).
>
>     Herby
>
>     * Of course, pinning is release once pullreq is closed, either by
>     rejecting or by merging.
>
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "amber-lang" group.
>     To unsubscribe from this group and stop receiving emails from it,
>     send an email to [hidden email]
>     <mailto:amber-lang%[hidden email]>.
>     For more options, visit https://groups.google.com/__groups/opt_out
>     <https://groups.google.com/groups/opt_out>.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

Herby Vojčík


Herby Vojčík wrote:
> a pullreq to include it in master. It the meantime, there is requirejs
> branch in main repo. Then I have branches in my fork, which do

BTW, I wanted to add, I can add a code-completion branch in main repo
for your work, but merging it must be done by someone else, unless you
get commit rights as well (in which case, you can make it yourself).

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

kilon.alios
ok thank you for your help. 

I am ok working at my own branch since I am very new with web dev and I dont know what kind of obstacles I may come against. So for now I will work alone and see how it goes. 


On Sun, Aug 11, 2013 at 7:37 PM, Herby Vojčík <[hidden email]> wrote:


Herby Vojčík wrote:
a pullreq to include it in master. It the meantime, there is requirejs
branch in main repo. Then I have branches in my fork, which do

BTW, I wanted to add, I can add a code-completion branch in main repo for your work, but merging it must be done by someone else, unless you get commit rights as well (in which case, you can make it yourself).

Herby


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Helios Auto-Completion

kilon.alios
Replying to Nicolas how I am doing with the project...

I have created a separate branch in my fork named (suprise , suprise) "code-completion" ( https://github.com/kilon/Ephestos/tree/code-completion ) and yes I have made some changes and played around with the code. I have not committed anything yet worth of your time. 

I am actually spending around 30 minutes per day on it. So I am moving at a very slow pace. 

From what I see, its not as hard I expected it to understand it. The problem is that I want to implement caching , I would like to store a completion table somewhere so it loads automatically each time Helios loads. 

My problem is the web sandbox that does not allow to save to files (hence node.js) . I see 2 options here either use one of the new technologies for offline web apps , like this 


or use node.js i

Option a , would work even for the amber website but I am not so sure about the restrictions and how usable it is

Option b, it would need node.js installed so it wont be usable for anyone using amber without node.js. However from the looks of it node.js looks very powerful

I could even go for solution b and then fallback to solution a for when node.js is not active.

As you may have figured out by now I am a beginner with web development and I do make baby steps. 


On Sun, Aug 11, 2013 at 9:00 PM, kilon alios <[hidden email]> wrote:
ok thank you for your help. 

I am ok working at my own branch since I am very new with web dev and I dont know what kind of obstacles I may come against. So for now I will work alone and see how it goes. 


On Sun, Aug 11, 2013 at 7:37 PM, Herby Vojčík <[hidden email]> wrote:


Herby Vojčík wrote:
a pullreq to include it in master. It the meantime, there is requirejs
branch in main repo. Then I have branches in my fork, which do

BTW, I wanted to add, I can add a code-completion branch in main repo for your work, but merging it must be done by someone else, unless you get commit rights as well (in which case, you can make it yourself).

Herby


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.