Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 08 2015 23:19
    @kingsleyh moved kingsleyh/DLanguage#21 from Ready to Backlog
  • Jan 08 2015 23:19
    @kingsleyh moved kingsleyh/DLanguage#33 from Backlog to Ready
  • Jan 08 2015 23:18
    @kingsleyh moved kingsleyh/DLanguage#21 from Backlog to Ready
  • Jan 08 2015 23:18
    @kingsleyh moved kingsleyh/DLanguage#29 from Ready to Working
  • Jan 08 2015 23:18
    @kingsleyh moved kingsleyh/DLanguage#29 from Working to Done
  • Jan 08 2015 23:18
    @kingsleyh moved kingsleyh/DLanguage#9 from Working to Done
  • Jan 08 2015 23:18
    @kingsleyh moved kingsleyh/DLanguage#13 from Ready to Working
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#18 from Working to Done
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#15 from Working to Done
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#14 from Working to Done
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#16 from Working to Done
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#23 from Working to Done
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#17 from Ready to Working
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#16 from Ready to Working
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#17 from Backlog to Ready
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#31 from Backlog to Ready
  • Jan 08 2015 23:17
    @kingsleyh moved kingsleyh/DLanguage#29 from Backlog to Ready
  • Jan 04 2015 11:47
    @kingsleyh moved kingsleyh/DLanguage#18 from Backlog to Working
  • Jan 04 2015 11:47
    @kingsleyh moved kingsleyh/DLanguage#24 from Ready to Done
  • Jan 04 2015 11:47
    @kingsleyh moved kingsleyh/DLanguage#24 from Backlog to Ready
Kingsley Hendrickse
@kingsleyh
I made the grammar by looking at the grammar docs on the D site an also from HackerPilots D grammar stuff - but turns out there are issues with the Docs
so adding a comma at the end of an Enum could either be a 5 second task or a 5 hours one - which is the main problem with messing about with the bnf - one tiny change can cause tons of other stuff to break
pirocks
@pirocks
So this isn't the case with all enums
but only some enums. I'm trying to figure out exactly what the cause is.
Kingsley Hendrickse
@kingsleyh
I found a few issues when inside blocks e.g. something worked fine at the top level but broke when inside a class or struct block
pirocks
@pirocks
#110 is an example of that. Might have another go at figuring that out soon.
Kingsley Hendrickse
@kingsleyh
ok - might be something to do with being inside the unittest block
pirocks
@pirocks
One question I had. The DUtil.findDefinitionNode(file,name,namedelement,result) method seems like it could be refactored. The for loops could be replaced with addAll(), however long term it should probably call other methods based n what is being resolved.
Actually looking again addall isn't practical due to getIdentifier being called.
However I still think it should be refactored
Kingsley Hendrickse
@kingsleyh
I borrowed that code from another plugin I found - the current code base is a bit of a big mess - I hacked in parts of several plugins to get something working
pirocks
@pirocks
So at some point everything should be cleaned up?
Another question: How actively is this still being developed?
Kingsley Hendrickse
@kingsleyh
in many places you have to follow the pattern that the IntelliJ code forces on you - and that really sucks as you have to extend from certain classes etc so it really reduces the freedom to write clean elegant code - which is a big part of why I stopped working on the plugin
There is not much activity on the plugin - I ran out of time and haven't really done anything much for over a year
if there were clearer docs on how various parts of the plugin architecture is supposed to work and be coded - then things would be much easier - but the docs suck unfortunatley
I think the last thing I helped with was the move to gradle - but only really because Russel Winder said he would love to start working on the plugin in Kotlin - but then he was unable to contribute
I'm not particularly keen on Kotlin either to be honest - I assumed it would more like Scala than Java - but it's totally not
Kingsley Hendrickse
@kingsleyh
It seems like Java but with a less clunky syntax
pirocks
@pirocks
That was also my initial impression of kotlin
So I think that my next pr will be all bug fixes. I hope that the bnf will be reliable enough to implement safe delete, inspections and better references
Kingsley Hendrickse
@kingsleyh
I did have lots of stuff working by utilising 3rd party tools from HackerPilot - like dfmt for formatting, dscanner for inspections, dcd for completion
but in general I find they don't work at all well with intellij
pirocks
@pirocks
Yeah I saw. There seem to be numerous performance/reliability issues with outside tools.
Kingsley Hendrickse
@kingsleyh
I think in the long run it's better to implement everything within intellij
do you know Scala?
pirocks
@pirocks
Agreed and no I do not know scala
Kingsley Hendrickse
@kingsleyh
I really like the functional programming benefits of Scala - some of which is now available in Java 8
previously in Java I was using the totally_lazy java project to get that stuff
but having access to map, flatMap, filter, etc would allow a lot of clean up in some areas of the existing code
pirocks
@pirocks
Does scala java interop work?
Maps and filter etc. could definitely be helpful.
Kingsley Hendrickse
@kingsleyh
yeah I think so
Kotlin has some of those functional constructs as well
pirocks
@pirocks
Do you(or anyone else on this chat) now how the block comments work?
Kingsley Hendrickse
@kingsleyh
you mean in the lexer?
I couldn't get all the different types of comments working in the lexer
pirocks
@pirocks
Having looked at how the comments work I think the key will be to implement the nesting comments in the parser.
Russel Winder
@russel
I may have reached the point where I can begin to do some work to help with this plugin. Writing Kotlin not Java is the goal, obviously. :-)
Samael
@SingingBush
I've tagged v1.12 for release to plugin repo (intellij 2017.* versions only) https://github.com/kingsleyh/DLanguage/releases
Russel Winder
@russel
Might it be worth sifting through the 55 issues and closing the ones that are no longer useful, ones open for 2 years or more are likely in the wrong context to be relevant.
Are there some small projects I could get stuck into here to help progress things?
pirocks
@pirocks
What about quick fixes? Something like alt+enter iterate=adds for loop around an identifier
alternatively you could look into BNF recover rules to get a more robust poster, which highlights errors where they are, instead of long before the syntax error
pirocks
@pirocks
I'm currently working on enhanced resolve, potentially with type deduction.
Russel Winder
@russel
Is there some "low hanging fruit" stuff that I can stuck into, and can get others to get stuck into. With DConf 2017 now over, we need to strike to get resource into this project to help move it along faster. I certainly want to get the plugin working in CLion as well as IntelliJ IDEA, but that means CMake not Dub. I am going to suss out CMake_D and see what the LDC build is doing.
Samael
@SingingBush

it's a good idea to start by getting familiar with the Intellij API, maybe getting a little plugin project running from scratch and looking through example code from other plugins such as intellij-rust and https://github.com/JetBrains/intellij-community/tree/master/plugins

I've found that as a general rule there is no such thing as quick and easy when trying to get a new feature working within intellij. I've put in hours of work into local branches that ended up going nowhere.

do you have any experience with BNF grammar / JFlex?

Russel Winder
@russel
I have not used JFlex, but many, many, many moons ago I was fairly proficient at lex and yacc, later flex and bison. BNF grammars are not usually though LALR(1). I'll take a look at the JetBrains documentation. I might also talk to the CLion folk about making a plugin workable with both IntelliJ and CLion.
Kingsley Hendrickse
@kingsleyh
It should be possible to support both dub and cmake as well as all jetbrains products - just prepare for endless hours of frustration and trial and error - and don't be surprised if there are no docs or incorrect docs. I love using IntelliJ but the internals and plugin development are horrible!
Russel Winder
@russel
So we complain to the JetBrains folk. They may even give us a bit of help.
pirocks
@pirocks
If we do get help, I think recover rules and other bnf related stuff are fairly high priority.