Mmrnmhrm 0.1 released

Bruno Medeiros brunodomedeiros+spam at com.gmail
Mon Aug 20 06:51:03 PDT 2007


 > Bill Baxter escribió:
 >> Bruno Medeiros wrote:
 >>> This is the announcement of the first public release of Mmrnmhrm.
 >>> What is Mmrnmhrm? Mmrnmhrm (pronounced mer-nem-herm :P ) is an
 >>> Eclipse IDE I've been working on, partially based on Descent, and
 >>> aimed at bringing semantic IDE functionality (such as code
 >>> completion, find definition, find references, etc.) to D.
 >>
 >> What exactly is the relationship with descent?  The urls point to
 >> descent's Dsource download area, and you say it's based in part on
 >> descent, but yet the announcement makes it sound like it is not
 >> descent.  Is this going to become descent 2.0 or something?  Like egcs
 >> vs gcc?
 >>
 >> --bb


Hum, yes, I should have clarified that a bit in my announcement, (even 
though of that info is in the Descent forums). Ary explained it well, so 
let just add:

Ary Manzana wrote:
> The main difference is that it has a big different point of view in 
> developing the IDE. While Descent copies JDT and tries to adapt it from 
> Java's logic to D (which can result in being very hard to understand for 
> further modifications), Mmrnmhrm is made almost from scratch, reusing 
> Descent's ported parser and copying some ideas from JDT, but not just 
> copying the source code and changing what's appropriate.
> 

That's correct, but for the record, another of the reasons it's made 
from scratch (except for the ported DMD parser), is because this is my 
MSc. thesis work, and my thesis professor advised me to have a body of 
work that would work standalone, and that was done in it's majority by 
me (or at least that it's dependencies were below (the parser), and not up).

> Also, (at least for now) it is more focused on semantic stuff, so it has 
> "go to definition" and autocompletion funcionalities, which Descent lacks.
> 
> I think it's a great project, and what I think is the greatest thing is 
> that Descent and Mmrnmhrm have disjoint funcionalities, so in some point 
> they may merge into a single project which has both of the two worlds. 
> One other possibility is that any or both projects will be merged into 
> one that is based on DLTK ( http://www.eclipse.org/dltk/ ).
> 
> Descent sooner or later will have "go to definition" and autocompletion, 
> but I'd like to try reusing DMD's semantic code first, which we know 
> it's ok (except for some bugs, of course), instead of implementing 
> semantic based on the specs like in Mmrnmhrm (this has the disadvantage 
> that it may have more bugs, but the advantage that is not so 
> compiler-oriented, so it's easier to understand). As you see, there are 
> a lot of points in consideration for implementing a D IDE.
> 

It would be nice to have DMD's semantic analysis available in the IDE, 
for example, by having semantic errors highlighted without having to 
compile externally.
However, I think trying to do any semantic feature that isn't already 
exactly supported by DMD (like find-ref), will require understanding and 
subsequent modification/use of DMD semantic code. However I find that 
Walter's code is very unstructured and user-unfriendly (to put it in 
nice terms ;p), and trying to use it in it's original form for IDE 
features is not the best approach. That's why in Mmrnmhrm/dtool DMD's 
AST is converted to a different, more structured AST hierarchy.
For example, in Mmrnmhrm's editor hyperlinking, how does it know how to 
underline the element under the mouse cursor or not? It simply finds the 
ASTNode in the cursor's text offset, and then checks to see if that node 
is an instance of a Reference class. That's 2-3 lines of code. How would 
one do that in DMD's AST, without having both false positives (selecting 
non-references) and false negatives (not selecting references), I ask? 
Anyone is welcome to answer, including Walter. ;)
Ary, if you're still interested in that avenue, don't forget you can 
reuse Mmrnmhrm find-ref test cases :)


-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-announce mailing list