April 21, 2012
On Saturday, 21 April 2012 at 15:15:42 UTC, Roman D. Boiko wrote:
> KISS in action. There is a lot to learn from.

KISS is one of my guiding principles on this project. The learning may be in the other direction though. One of the reasons that I started this project was to learn about how to implement tokenizers and parsers.

> Some questions:
> * Are there any plans for semantic analysis?
> * Is it possible to change license to Boost?
> * Do you accept contributons?

* Only enough to get autocomplete working properly in most cases
* Yeah. I set it to MIT mostly out of habit back before the discussion of compiler library licenses.
* Github! (yes)

The only thing that I see anyone re-using is the tokenizer. It's the result of at least one redesign and several runs though callgrind and avgtime . I'm fairly confident that it's fast. The "parser" is rather dilberatly stupid since the goal is to get enough information for summaries and autocomplete.
April 21, 2012
On Saturday, 21 April 2012 at 17:46:18 UTC, Brian Schott wrote:
> The only thing that I see anyone re-using is the tokenizer.

Huh, cute. Except for
string open = to!string(inputString[endIndex]);
May be, open=inputString[endIndex..endIndex+1]; ?
April 21, 2012
switch (open)
{
case "[":

switch (open[0])
{
case '[':

How string switches are optimized? Also if-else chain should work better here.
April 22, 2012
On Friday, 20 April 2012 at 03:33:43 UTC, H. S. Teoh wrote:
> One thing I miss, though, is ctags support for D.

1. It seems that everything can understand Ctags
2. The format's not complicated at all.

I just committed support for a --ctags option to my brain-dead D tool (https://github.com/Hackerpilot/Dscanner). Don't expect magic from it, but it should at least be functional.

April 22, 2012
> One thing I miss, though, is ctags support for D. You don't know how
> powerful such a simple concept is; it lets you navigate 50,000-line
> source files without even batting an eyelid.  :-) (Just try that in an
> IDE, and you'll soon get an aneurism from trying to scroll with a
> 1-pixel high scrollbar...)


 You need to use a better IDE then, and get a faster computer, and a mouse with a scroll wheel.

 With Visual Studio + Visual Assist navigating huge solutions is fairly trivial, and extremely fast.

 VAX can instantly take you to the definition of any symbol with alt-g(not the build in crap in VS, VAX has better capabilities by far), list all references(not just variables with the same name, it actually understands the code), rename any symbol throughout the entire codebase, and a bunch of other things that only a tool which actually understands the code can do.  All of these operations are extremely fast btw.



April 22, 2012
On Sun, Apr 22, 2012 at 04:29:00AM +0200, Froglegs wrote:
> 
> >One thing I miss, though, is ctags support for D. You don't know how powerful such a simple concept is; it lets you navigate 50,000-line source files without even batting an eyelid.  :-) (Just try that in an IDE, and you'll soon get an aneurism from trying to scroll with a 1-pixel high scrollbar...)
> 
> 
>  You need to use a better IDE then, and get a faster computer, and a
>  mouse with a scroll wheel.

Or I can just stick with vim. It's wayyy faster than any IDE can ever hope to be, works over a text-only remote ssh connection, and doesn't need constant moving hands back and forth to the mouse. :-)

(I'll admit, I'm a command-line freak. I don't do GUIs. The only real GUI that I use on a regular basis is the browser. Which is configured to strip off all unnecessary toolbars, menus, squint-inducing icons and other such junk, leaving just the necessary navigation buttons, maximized area for the page itself (gee what a concept), and keyboard shortcuts for scrolling, tabbing, etc.. IOW, it behaves almost like a console app. :-) So my view of the world is probably very warped relative to yours, just as yours is to mine. :-P)


>  With Visual Studio + Visual Assist navigating huge solutions is
>  fairly trivial, and extremely fast.
> 
>  VAX can instantly take you to the definition of any symbol with
>  alt-g(not the build in crap in VS, VAX has better capabilities by
>  far), list all references(not just variables with the same name, it
>  actually understands the code), rename any symbol throughout the
>  entire codebase, and a bunch of other things that only a tool which
>  actually understands the code can do.  All of these operations are
>  extremely fast btw.
[...]

That's what ctags does for vim. And as many have pointed out, somebody *has* written D support for ctags, so now I'm a very happy man.


T

-- 
Tell me and I forget. Teach me and I remember. Involve me and I understand. -- Benjamin Franklin
April 22, 2012
On Sunday, 22 April 2012 at 00:58:58 UTC, Brian Schott wrote:
> On Friday, 20 April 2012 at 03:33:43 UTC, H. S. Teoh wrote:
>> One thing I miss, though, is ctags support for D.
>
> 1. It seems that everything can understand Ctags
> 2. The format's not complicated at all.
>
> I just committed support for a --ctags option to my brain-dead D tool (https://github.com/Hackerpilot/Dscanner). Don't expect magic from it, but it should at least be functional.

Hello Brian Schott. Thanks for creating this tool.
Do you plan on adding support to win32 sources? ex. https://github.com/AndrejMitrovic/DWinProgramming/tree/master/Samples it seems dscanner doesn't like 'extern (Windows)' functions.
April 25, 2012
On 4/21/12, Brian Schott <briancschott@gmail.com> wrote:
> On Friday, 20 April 2012 at 08:01:08 UTC, Jacob Carlborg wrote:
>> There's a vim plugin that uses Clang for autocompletion, if I recall correctly. We need the same for D.
>
> Pre-alpha is on Github: https://github.com/Hackerpilot/Dscanner/

This is very cool! There seems to be an ICE when compiling with -inline, something to do with CTFE. I'm reducing it with dustmite right now.
April 25, 2012
On Wednesday, 25 April 2012 at 20:49:58 UTC, Andrej Mitrovic wrote:
> This is very cool! There seems to be an ICE when compiling with
> -inline, something to do with CTFE. I'm reducing it with dustmite
> right now.

I found it first. :-)
http://d.puremagic.com/issues/show_bug.cgi?id=7900
April 25, 2012
On 4/26/12, Brian Schott <briancschott@gmail.com> wrote:
> I found it first. :-) http://d.puremagic.com/issues/show_bug.cgi?id=7900
>

And while dustmite was reducing it found a dustmite bug! https://github.com/CyberShadow/DustMite/issues/8