Re: d2tags - converts DMD2's JSON output to Exuberant Ctags format
On 05/07/2010 01:36 AM, Robert Clipsham wrote: I love it! I don't suppose you have a guide for how to get it set up and working in vim do you? I've never managed to get ctags working, even with C/C++ :/ The only tag-related configuration in my Vim setup is: set tags=./tags; in ~/.vimrc (Note the semicolon: it makes Vim look for tags file upward to the root directory).
Re: d2tags - converts DMD2's JSON output to Exuberant Ctags format
On 05/07/2010 01:48 AM, Andrei Alexandrescu wrote: > I wonder if this is of enough general utility to warrant inclusion > within the D distribution, along with rdmd. Thoughts? That's my pleasure, actually! > One small suggestion, Masahiro: you may want to replace the file reading > loop in main() with simply std.file.readText(args[1]). Done, thank you for the advice. I'm considering an enhancement: "d2tags " reads all JSON files in the directory. However I'm not sure if it should recurse into subdirectories.
d2tags - converts DMD2's JSON output to Exuberant Ctags format
Hi, Being happy to see issue 3415 (broken JSON format) fixed, I have written a utility to convert DMD2's JSON output to Exuberent Ctags format. This enables you to tagjump in Vim and other editors/IDEs. It's just 150+ lines, thanks to D2's powerful string handling. Enjoy! http://github.com/Dubhead/d2tags usage: % dmd -Xftags.json foo.d % d2tags tags.json > tags
Re: dmd 1.050 and 2.035 release
MIURA Masahiro wrote: > I have built QtD r304 (latest) with DMD > 2.050, Of course that's 2.035. I'm screwed by rapid releases :-) (I do welcome rapid releases, though)
Re: dmd 1.050 and 2.035 release
Walter Bright wrote: > The main purpose of this is to correct a couple of regressions that were > blocking QtD and Tango. > > http://www.digitalmars.com/d/1.0/changelog.html > http://ftp.digitalmars.com/dmd.1.050.zip > > > http://www.digitalmars.com/d/2.0/changelog.html > http://ftp.digitalmars.com/dmd.2.035.zip > > Many thanks to the numerous people who contributed to this update. Thanks for the new release! I have built QtD r304 (latest) with DMD 2.050, and a tutorial example worked successfully. Bugzilla admin, could you add 1.050 and 2.035 to the versions dropdown list?
Re: dmd 1.048 and 2.033 releases
Walter Bright wrote: > Please post to bugzilla. Done! http://d.puremagic.com/issues/show_bug.cgi?id=3368
Re: dmd 1.048 and 2.033 releases
Jason House wrote: > The standard gdb 6.8 can show > backtraces but can't list code, even if the code is linked in libraries from > C++. Can gdb *always* list code for you? For me, it sometimes does, sometimes doesn't. cut here % cat -n foo.d 1 import std.stdio; 2 3 void main() 4 { 5 *(cast(ubyte*)0) = 0; // intentional SEGV 6 // writefln("hello"); 7 } % dmd -gc foo.d; /usr/bin/gdb --quiet ./foo (gdb) run Starting program: /home/miura/work/foo [Thread debugging using libthread_db enabled] [New Thread 0xb7dde6f0 (LWP 12300)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7dde6f0 (LWP 12300)] 0x08049239 in _Dmain () at foo.d:5 5 *(cast(ubyte*)0) = 0; // intentional SEGV (gdb) list 1 import std.stdio; 2 3 void main() 4 { 5 *(cast(ubyte*)0) = 0; // intentional SEGV 6 // writefln("hello"); 7 } (gdb) backtrace #0 0x08049239 in _Dmain () at foo.d:5 #1 0x08049514 in _D2rt6dmain24mainUiPPaZi7runMainMFZv () #2 0x0804931d in _D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv () #3 0x08049556 in _D2rt6dmain24mainUiPPaZi6runAllMFZv () #4 0x0804931d in _D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv () #5 0x080492c8 in main () (gdb) cut here Uncomment the line 6, and gdb is now unable to list code: cut here % dmd -gc foo.d; /usr/bin/gdb --quiet ./foo (gdb) run Starting program: /home/miura/work/foo [Thread debugging using libthread_db enabled] [New Thread 0xb7d696f0 (LWP 12311)] Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) list 1 // Written in the D programming language. 2 3 /** 4 Standard I/O functions that extend $(B std.c.stdio). $(B std.c.stdio) 5 is $(D_PARAM public)ally imported when importing $(B std.stdio). 6 7 Macros: 8 WIKI=Phobos/StdStdio 9 10 Copyright: Copyright Digital Mars 2007 - 2009. Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) backtrace Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) cut here That's Kubuntu 32bit 9.04, gdb 6.8, and DMD 2.033.
Re: reddit.com: first Chapter of TDPL available for free
Andrei Alexandrescu wrote: > http://www.reddit.com/r/programming/comments/975ng/diving_into_the_d_programming_language_tdpl/ > Thanks for sharing it! Typos: in section 1.1, there are inchPerFoot's and inchperfoot's.
Re: dmd 1.046 and 2.031 releases
Thanks for the new release! Are case ranges limited to 256 cases? % cat -n foo.d 1 import std.conv; 2 import std.stdio; 3 4 void main(string[] args) 5 { 6 int i = to!int(args[0]); 7 8 switch (i) { 9 case int.min: .. case -1: // line 9 10 writefln("negative"); 11 break; 12 case 0: 13 writefln("zero"); 14 break; 15 default: 16 writefln("positive"); 17 break; 18 } 19 } % dmd foo.d foo.d(9): Error: more than 256 cases in case range %