These are chat archives for carymrobbins/intellij-haskforce

20th
Sep 2016
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:20
@carymrobbins I agree that we should reuse the alex/happy-generated code
Cary Robbins
@carymrobbins
Sep 20 2016 17:20
yup
i actually wrote the Cabal parser by hand using the intellij api, so that might give you a good idea about how it works
also, if we start using ghcvm, i'd like to migrate away from scala and start replacing scala code with ghcvm
having to depend on scala and ghcvm will probably result in a huge jar, which i'd like to avoid
scala already increased the size by nearly 20 MB, although if i used something like proguard i might be able to get it down
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:22
Cool. I think the best way to transition is to maintain a separate ghcvm branch. ghcvm is still quite experimental so I'm a bit worried if it'll be a bit heavyweight.
Scala is comparatively lightweight because it tries to be as close to Java as possible
Cary Robbins
@carymrobbins
Sep 20 2016 17:23
true
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:23
Have you looked at Kotlin?
It's even more lightweight than Scala and cuts down on boilerplate to a similar level as Scala
Cary Robbins
@carymrobbins
Sep 20 2016 17:24
yeah, i agree with your idea of having a separate branch, which we could tie to a separate "experimental" release process
yeah, kotlin is ok, i do like scala's approach at improving the type system (although it certainly does make other things more complicated than they need to be cough implicits cough)
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:25
GHCVM I think would be great to implement the complicated parts of the plugin - like the parser, syntax highlighter, autocompleter
Cary Robbins
@carymrobbins
Sep 20 2016 17:25
syntax highlighting is done by tapping into the lexer, so it's actually quite simple
but yes, autocompletion is complicated
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:26
For autocompletion, is there a need to override lots of IntellIj Plugin API classes?
Cary Robbins
@carymrobbins
Sep 20 2016 17:26
there is a separate level of highlighting you can do via an Annotator which would be helpful in ghcvm to traverse the AST
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:27
If not, GHCVM would be a good fit there as well. As a general rule of thumb it's good to avoid excessive foreign imports/exports in GHCVM and to have gateways between the two to avoid excessive serialization/deserialization of types.
gateways between GHCVM and Java
Cary Robbins
@carymrobbins
Sep 20 2016 17:27

For autocompletion, is there a need to override lots of IntellIj Plugin API classes?

There are extension points that need to be java classes, we can probably get away with using classes as minimally as possible and deferring everything to haskell code where possible

Rahul Muttineni
@rahulmutt
Sep 20 2016 17:28
Ok in that case we can make it work.
I'll spend the next couple days going over the HaskForce architecture so I can provide better help in the transition
Do you have any written docs that can speed this process up?
Cary Robbins
@carymrobbins
Sep 20 2016 17:30
@LeanderK is interested in cleaning up the architecture and documenting stuff better
but sadly, no, there's not much documentation outside of the README and a few things in the wiki
:disappointed:
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:31
Haha no issues. Getting the momentum to start documenting can be quite tough when there's more interesting stuff you can add on :)
I'm facing it for GHCVM. I'm at the phase where I need to start documenting and it ends up being the last thing on my priority list.
Cary Robbins
@carymrobbins
Sep 20 2016 17:32
sort of, although i try not to be that way. good docs are almost more important than a nice feature
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:32
Yeah of course. When a feature isn't documented, it's almost like it's not there for the end users.
Cary Robbins
@carymrobbins
Sep 20 2016 17:33
:+1:
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:34
Ok cool I'll go through the HaskForce codebase some more and ping if I have any questions.
Cary Robbins
@carymrobbins
Sep 20 2016 17:34
sounds great, and i'll try to get those things documented as we go along
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:34
When are you looking at starting the transition?
Cary Robbins
@carymrobbins
Sep 20 2016 17:35
it'd probably be better to have a docs/ dir instead of using the wiki so we can version it more appropriately
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:35
Yeah that sounds good.
Cary Robbins
@carymrobbins
Sep 20 2016 17:35
honestly, i'm looking start doing this sooner rather than later. the parser is really the number one pain point
once we can get that done, we'll have a much better product
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:37
Ok sounds good.
What are the specific problems with the parser? It seemed OK to me when I took a look at it. Are there any particular code samples that cause problems?
^^ about 21 issues with it
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:42
Thanks for pointing them out. I'll take a look.
Cary Robbins
@carymrobbins
Sep 20 2016 17:43
np, thanks for your help
Leander Kurscheidt
@LeanderK
Sep 20 2016 17:49
i would wait for a few days until i get my pull request ready
then we can join forces, or at least coordinate better
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:50
Sounds good. It'll take me at least that much time to get acquainted with the code base.
Leander Kurscheidt
@LeanderK
Sep 20 2016 17:51
i will refactor the code-base quite a bit, so expect some changes. They are mostly organisational changes, i try to not introduce new functionality
but i try to separate some deep dependencies between packages (like cabal, or factor out the HLint features)
Rahul Muttineni
@rahulmutt
Sep 20 2016 17:53
Great. Looking forward to your changes.
Cary Robbins
@carymrobbins
Sep 20 2016 17:53
thanks @LeanderK and @rahulmutt for your help
@LeanderK, be sure to let me know about murky parts so we can start documenting them. i plan on creating a docs/ dir for the documentation instead of using the wiki, so feel free to add anything there in the meantime as part of your branch