www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DMD 0.141 release

reply "Walter Bright" <newshound digitalmars.com> writes:
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.

2) The submissions for bug reports on complex numbers has risen a lot
lately, and I never get them for the C compiler. This means that nobody uses
complex numbers in C, but they do in D. Interesting!

3) This incorporates a new 'header' generator capability, written by Dave
Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
the source for it is included). I hope to get it working by the next update.

http://www.digitalmars.com/d/changelog.html
Dec 04 2005
next sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Walter Bright" <newshound digitalmars.com> wrote in message 
news:dn0i6d$2pgk$1 digitaldaemon.com...
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to 
 tweak.
 I shoulda done it a long time ago. I can't believe some third party tools 
 to
 do this cost $800+.
Sounds very cool! Any kind of code analyzation tools are welcome, especially for those of us trying to make high-performance programs.
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment 
 (just
 the source for it is included). I hope to get it working by the next 
 update.
My hopes were built up, only to be shattered into a million pieces, all within two seconds ;) Hopefully that'll be out soon.
Dec 04 2005
next sibling parent John Reimer <terminal.node gmail.com> writes:
Jarrett Billingsley wrote:
 "Walter Bright" <newshound digitalmars.com> wrote in message 
 news:dn0i6d$2pgk$1 digitaldaemon.com...
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to 
 tweak.
 I shoulda done it a long time ago. I can't believe some third party tools 
 to
 do this cost $800+.
Sounds very cool! Any kind of code analyzation tools are welcome, especially for those of us trying to make high-performance programs.
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment 
 (just
 the source for it is included). I hope to get it working by the next 
 update.
My hopes were built up, only to be shattered into a million pieces, all within two seconds ;) Hopefully that'll be out soon.
LOL ... yep more to be excited about, I guess. -JJR
Dec 04 2005
prev sibling parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:dn0kr7$2rk4$1 digitaldaemon.com...
 Sounds very cool!  Any kind of code analyzation tools are welcome,
Heh, I just realized I typed "analyzation." Where the heck did that come from? _analysis_.
Dec 04 2005
next sibling parent reply Derek Parnell <derek psych.ward> writes:
On Mon, 5 Dec 2005 01:00:44 -0500, Jarrett Billingsley wrote:

 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
 news:dn0kr7$2rk4$1 digitaldaemon.com...
 Sounds very cool!  Any kind of code analyzation tools are welcome,
Heh, I just realized I typed "analyzation." Where the heck did that come from?
From the 'Official Geekdom Dictionary' analyzation (n): The act of analyzing anything past the point of diminishing returns. A natural behaviour. -- Derek (skype: derek.j.parnell) Melbourne, Australia "A learning experience is one of those things that says, 'You know that thing you just did? Don't do that.'" - D.N. Adams 5/12/2005 5:06:15 PM
Dec 04 2005
parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message 
news:1wsrogqlqzr5u$.csgg5emymae2$.dlg 40tude.net...
 analyzation (n): The act of analyzing anything past the point of
 diminishing returns. A natural behaviour.
lol :)
Dec 05 2005
prev sibling parent Bruno Medeiros <daiphoenixNO SPAMlycos.com> writes:
Jarrett Billingsley wrote:
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
 news:dn0kr7$2rk4$1 digitaldaemon.com...
 
Sounds very cool!  Any kind of code analyzation tools are welcome,
Heh, I just realized I typed "analyzation." Where the heck did that come from? _analysis_.
Is "analyzation" not proper english? It shows up here (Websters): http://www.answers.com/analyzation -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Dec 07 2005
prev sibling next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
 the source for it is included). I hope to get it working by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 
When I type 'dmd' on linux with no options it gives me the help menu and then it displays the following... arc profiling: Can't open output file /home/clark/cbx/mars/access.da. arc profiling: Can't open output file /home/clark/cbx/mars/array.da. arc profiling: Can't open output file /home/clark/cbx/mars/attrib.da. arc profiling: Can't open output file /home/clark/cbx/mars/bcomplex.da. arc profiling: Can't open output file /home/clark/cbx/mars/bit.da. arc profiling: Can't open output file /home/clark/cbx/mars/blockopt.da. arc profiling: Can't open output file /home/clark/cbx/mars/cast.da. arc profiling: Can't open output file /home/clark/cbx/mars/code.da. arc profiling: Can't open output file /home/clark/cbx/mars/cg87.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgcod.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgcs.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgcv.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgelem.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgen.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgreg.da. arc profiling: Can't open output file /home/clark/cbx/mars/cgsched.da. arc profiling: Can't open output file /home/clark/cbx/mars/class.da. arc profiling: Can't open output file /home/clark/cbx/mars/cod1.da. arc profiling: Can't open output file /home/clark/cbx/mars/cod2.da. arc profiling: Can't open output file /home/clark/cbx/mars/cod3.da. arc profiling: Can't open output file /home/clark/cbx/mars/cod4.da. arc profiling: Can't open output file /home/clark/cbx/mars/cod5.da. arc profiling: Can't open output file /home/clark/cbx/mars/constfold.da. etc.
Dec 04 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"clayasaurus" <clayasaurus gmail.com> wrote in message
news:dn0l15$2rqf$1 digitaldaemon.com...
 When I type 'dmd' on linux with no options it gives me the help menu and
 then it displays the following...

 arc profiling: Can't open output file /home/clark/cbx/mars/access.da.
Criminy, I put the wrong executable up. It's fixed now.
Dec 04 2005
parent reply clayasaurus <clayasaurus gmail.com> writes:
Walter Bright wrote:
 "clayasaurus" <clayasaurus gmail.com> wrote in message
 news:dn0l15$2rqf$1 digitaldaemon.com...
 
When I type 'dmd' on linux with no options it gives me the help menu and
then it displays the following...

arc profiling: Can't open output file /home/clark/cbx/mars/access.da.
Criminy, I put the wrong executable up. It's fixed now.
Thanks. Also, you're still using 'printf' with '\n' for the sieve example? ;) The code coverage analysis is a neat little tool and is very much appreciated. : )
Dec 04 2005
parent reply clayasaurus <clayasaurus gmail.com> writes:
On the code coverage documentation page it says

dmd sieve -cov
sieve

Shouldn't it be

dmd sieve.d -cov
sieve

? This one through me for a little loop.

clayasaurus wrote:
 Walter Bright wrote:
 
 "clayasaurus" <clayasaurus gmail.com> wrote in message
 news:dn0l15$2rqf$1 digitaldaemon.com...

 When I type 'dmd' on linux with no options it gives me the help menu and
 then it displays the following...

 arc profiling: Can't open output file /home/clark/cbx/mars/access.da.
Criminy, I put the wrong executable up. It's fixed now.
Thanks. Also, you're still using 'printf' with '\n' for the sieve example? ;) The code coverage analysis is a neat little tool and is very much appreciated. : )
Dec 05 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"clayasaurus" <clayasaurus gmail.com> wrote in message
news:dn30jp$2sl5$1 digitaldaemon.com...
 On the code coverage documentation page it says

 dmd sieve -cov
 sieve

 Shouldn't it be

 dmd sieve.d -cov
 sieve

 ? This one through me for a little loop.
The two are the same. A .d default extension is applied if there isn't one already.
Dec 05 2005
prev sibling next sibling parent reply kris <fu bar.org> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
 the source for it is included). I hope to get it working by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
 
Nice! The -cov is gonna be *really* useful
Dec 04 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"kris" <fu bar.org> wrote in message news:dn0nnf$2ulb$1 digitaldaemon.com...
 Nice! The -cov is gonna be *really* useful
I know. When I've used them before, the results were very rewarding.
Dec 04 2005
prev sibling next sibling parent John Reimer <terminal.node gmail.com> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
 the source for it is included). I hope to get it working by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 
And, of course, Walter was sly enough not to mention the new ".mangleof" property. I'm curious to see what wanders it is capable of!! :-) -JJR
Dec 04 2005
prev sibling next sibling parent Chris Lajoie <ctlajoie yahoo.com> writes:
Those are some cool new features.
The std.cover documentation isn't on the site yet. 

Chris

 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov
 should work for gdc users). I've been wanting to add this for 20
 years, I finally realized it was a piece of cake. Took me 3 hours to
 write, 3 hours to tweak. I shoulda done it a long time ago. I can't
 believe some third party tools to do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that
 nobody uses complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by
 Dave Fladebo. I goofed it up merging it in, so it is disabled at the
 moment (just the source for it is included). I hope to get it working
 by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
Dec 04 2005
prev sibling next sibling parent reply John Reimer <terminal.node gmail.com> writes:
Okay, I've tried the .mangleof property:

 module test;

 import std.stdio;

 int funcA()
 {
 }
 
 class A 
 {
 }

 void main()
 {
 	
 	A a = new A;

 	alias long B;
 	
 	writefln( A.mangleof );
	writefln( a.mangleof ); 
 	writefln( B.mangleof );
 	writefln( funcA.mangleof );
 }
OUTPUT: C4test1A C4test1A l i So I see that functions still aren't really supported, since the mangled output just returns the return type. It would be fairly useful if we could get the actual mangled name of the whole function somehow. -JJR
Dec 05 2005
next sibling parent reply Don Clugston <dac nospam.com.au> writes:
John Reimer wrote:
 Okay, I've tried the .mangleof property:
 int funcA()
 {
 }
 void main()
 {
     writefln( funcA.mangleof );
 }
 OUTPUT:
 
 C4test1A
 C4test1A
 l
 i
 
 So I see that functions still aren't really supported, since the mangled 
 output just returns the return type. It would be fairly useful if we 
 could get the actual mangled name of the whole function somehow.
It works for function pointers. So you can say: writefln((&funcA).mangleof) and get: PFZi. AWESOME!! I think in your example, funcA was evaluated as a property, hence it's an int. Looks like DMD is correct.
Dec 05 2005
next sibling parent pragma <pragma_member pathlink.com> writes:
In article <dn1e5b$u70$1 digitaldaemon.com>, Don Clugston says...
John Reimer wrote:
 Okay, I've tried the .mangleof property:
 int funcA()
 {
 }
 void main()
 {
     writefln( funcA.mangleof );
 }
 OUTPUT:
 
 C4test1A
 C4test1A
 l
 i
 
 So I see that functions still aren't really supported, since the mangled 
 output just returns the return type. It would be fairly useful if we 
 could get the actual mangled name of the whole function somehow.
It works for function pointers. So you can say: writefln((&funcA).mangleof) and get: PFZi. AWESOME!! I think in your example, funcA was evaluated as a property, hence it's an int. Looks like DMD is correct.
I'm going to file this under "really freaking awesome" myself. - EricAnderton at yahoo
Dec 05 2005
prev sibling parent reply John Reimer <terminal.node gmail.com> writes:
Don Clugston wrote:
 John Reimer wrote:
 Okay, I've tried the .mangleof property:
 int funcA()
 {
 }
 void main()
 {
     writefln( funcA.mangleof );
 }
 OUTPUT:

 C4test1A
 C4test1A
 l
 i

 So I see that functions still aren't really supported, since the 
 mangled output just returns the return type. It would be fairly useful 
 if we could get the actual mangled name of the whole function somehow.
It works for function pointers. So you can say: writefln((&funcA).mangleof) and get: PFZi. AWESOME!! I think in your example, funcA was evaluated as a property, hence it's an int. Looks like DMD is correct.
Yeah... I figured that out, and it's a great feature. But I guess I'm just expecting it to do more than what it can do. Being able to access the function name is still critical to me. Why can't I get that in any sort of way? I was really hoping I could outdo the C preprocessor with D templates in this regard. I'm trying to convert a C macro to D:
 #define REGISTER_AS_REMOTE_PROCEDURE_CALL(Object, functionName)
(Object)->Register((#functionName),(functionName))
If I can't get the symbol name converted to a string at compile time... all is lost and D is still limited. Oh well... I must be getting spoiled with these new features. It makes me want more! :-P -JJR
Dec 05 2005
next sibling parent reply jicman <jicman_member pathlink.com> writes:
John Reimer says...
Don Clugston wrote:
 John Reimer wrote:
 Okay, I've tried the .mangleof property:
 int funcA()
 {
 }
 void main()
 {
     writefln( funcA.mangleof );
 }
 OUTPUT:

 C4test1A
 C4test1A
 l
 i

 So I see that functions still aren't really supported, since the 
 mangled output just returns the return type. It would be fairly useful 
 if we could get the actual mangled name of the whole function somehow.
It works for function pointers. So you can say: writefln((&funcA).mangleof) and get: PFZi. AWESOME!! I think in your example, funcA was evaluated as a property, hence it's an int. Looks like DMD is correct.
Yeah... I figured that out, and it's a great feature. But I guess I'm just expecting it to do more than what it can do. Being able to access the function name is still critical to me. Why can't I get that in any sort of way? I was really hoping I could outdo the C preprocessor with D templates in this regard. I'm trying to convert a C macro to D:
 #define REGISTER_AS_REMOTE_PROCEDURE_CALL(Object, functionName)
(Object)->Register((#functionName),(functionName))
If I can't get the symbol name converted to a string at compile time... all is lost and D is still limited. Oh well... I must be getting spoiled with these new features. It makes me want more! :-P -JJR
Hey, don't feel bad. You're just following society's motto: "Gimme, gimme, gimme, gimme!" :-) Thanks Walter. This is another great release. Woowoowoowoooo! josé
Dec 05 2005
next sibling parent John Reimer <terminal.node gmail.com> writes:
jicman wrote:

 
 Hey, don't feel bad.  You're just following society's motto: "Gimme, gimme,
 gimme, gimme!" :-)
 
 Thanks Walter.  This is another great release.  Woowoowoowoooo!
 
 josé
 
 
 
LOL! Yeah... that's about right! I'm certainly thankful for all Walter's done, nonetheless. -JJR
Dec 05 2005
prev sibling parent Georg Wrede <georg.wrede nospam.org> writes:
 #define REGISTER_AS_REMOTE_PROCEDURE_CALL(Object, functionName)
 (Object)->Register((#functionName),(functionName))
If I can't get the symbol name converted to a string at compile time... all is lost and D is still limited. Oh well... I must be getting spoiled with these new features. It makes me want more! :-P
Hey, don't feel bad. You're just following society's motto: "Gimme, gimme, gimme, gimme!" :-) Thanks Walter. This is another great release. Woowoowoowoooo!
The motto is (C) ABBA of sweden! Goes like "Gimme gimme gimme, a man at the midnight...." (And with this single song, they've made more money than the entire D newsgroup combined will, in their entire lifetime. It's so wrong!)
Dec 10 2005
prev sibling parent John Reimer <terminal.node gmail.com> writes:
John Reimer wrote:

 #define REGISTER_AS_REMOTE_PROCEDURE_CALL(Object, functionName) 
 (Object)->Register((#functionName),(functionName))
If I can't get the symbol name converted to a string at compile time... all is lost and D is still limited.
I just want to say that all is NOT lost... that sounded very melodramatic. I can get around this simply enough with with more typing... it would be just kind of nice to be able to do everything with D. ;-) -JJR
Dec 05 2005
prev sibling parent reply BCS <BCS_member pathlink.com> writes:
I think this is related to a bug that still exists from .140.

(http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5671)

The essence of the problem is that DMD can't tell the argument list of a
function from just the name.

example:

int fn(int);
int fn(char);
void fn(void);

// what type is fn?

auto fnp = &fn;

// what type is fnp and what does it point to



In article <dn0smb$763$1 digitaldaemon.com>, John Reimer says...
Okay, I've tried the .mangleof property:

 module test;

 import std.stdio;

 int funcA()
 {
 }
 
 class A 
 {
 }

 void main()
 {
 	
 	A a = new A;

 	alias long B;
 	
 	writefln( A.mangleof );
	writefln( a.mangleof ); 
 	writefln( B.mangleof );
 	writefln( funcA.mangleof );
 }
OUTPUT: C4test1A C4test1A l i So I see that functions still aren't really supported, since the mangled output just returns the return type. It would be fairly useful if we could get the actual mangled name of the whole function somehow. -JJR
Dec 05 2005
next sibling parent reply John Reimer <terminal.node gmail.com> writes:
BCS wrote:
 I think this is related to a bug that still exists from .140.
 
 (http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5671)
 
 The essence of the problem is that DMD can't tell the argument list of a
 function from just the name.
 
 example:
 
 int fn(int);
 int fn(char);
 void fn(void);
 
 // what type is fn?
 
 auto fnp = &fn;
 
 // what type is fnp and what does it point to
 
 
Interesting. I was actually experimenting a little more: int testfunc( char[] s, int i, int j, int k ) {} void main() { writelfn( typeid(typeof(&testfunc)) ); writelfn( (&testfunc).mangleof ); } OUTPUTS: int()* PFAaiiZi So as we see above, the typeid of the function pointer cannot be extracted similar to what you describe. Only that it returns an int and that it is a function pointer is represented. -JJR
Dec 05 2005
parent BCS <BCS_member pathlink.com> writes:
In article <dn2e4h$2c4h$1 digitaldaemon.com>, John Reimer says...
BCS wrote:
 I think this is related to a bug that still exists from .140.
 
 (http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5671)
 
 The essence of the problem is that DMD can't tell the argument list of a
 function from just the name.
 
..
 
 
Interesting. I was actually experimenting a little more: int testfunc( char[] s, int i, int j, int k ) {} void main() { writelfn( typeid(typeof(&testfunc)) ); writelfn( (&testfunc).mangleof ); } OUTPUTS: int()* PFAaiiZi So as we see above, the typeid of the function pointer cannot be extracted similar to what you describe. Only that it returns an int and that it is a function pointer is represented. -JJR
It gets worse :-o try overloding test with different return types, then it gest nothing right! import std.stdio; // switch these and the type changes char test(char v){} int test(int i){} void main() { writef( typeid(typeof(&test)) , \n); writef( (&test).mangleof , \n); }
Dec 05 2005
prev sibling parent reply Georg Wrede <georg.wrede nospam.org> writes:
BCS wrote:
 The essence of the problem is that DMD can't tell the argument list of a
 function from just the name.
 
 example:
 
 int fn(int);
 int fn(char);
 void fn(void);
 
 // what type is fn?
 
 auto fnp = &fn;
 
 // what type is fnp and what does it point to
(Admittedly, not knowing crap, (since I've been doing Honest Work lately)) I'd assume that this problem would go away about the same time we get implicit template instatiation. Yeayeayea, they're not related, but getting one of these to work, would at least give a clue to get the other one fixed, too. Ahhh, IMHO. (Almost forgot!)
Dec 10 2005
parent reply BCS <BCS_member pathlink.com> writes:
No, the point is that the without context there is no way to tell with fn is
intended. The solution (for us) is to cast it as one or the other. For D the
solution is to make any such ambiguity an error and require that the compiler
check to see if any other symbol could also be used and if so throw an error.


In article <439B5685.7030408 nospam.org>, Georg Wrede says...
BCS wrote:
 The essence of the problem is that DMD can't tell the argument list of a
 function from just the name.
 
 example:
 
 int fn(int);
 int fn(char);
 void fn(void);
 
 // what type is fn?
 
 auto fnp = &fn;
 
 // what type is fnp and what does it point to
(Admittedly, not knowing crap, (since I've been doing Honest Work lately)) I'd assume that this problem would go away about the same time we get implicit template instatiation. Yeayeayea, they're not related, but getting one of these to work, would at least give a clue to get the other one fixed, too. Ahhh, IMHO. (Almost forgot!)
Dec 10 2005
parent Chris Sauls <ibisbasenji gmail.com> writes:
BCS wrote:
 No, the point is that the without context there is no way to tell with fn is
 intended. The solution (for us) is to cast it as one or the other. For D the
 solution is to make any such ambiguity an error and require that the compiler
 check to see if any other symbol could also be used and if so throw an error.
In other words, we have to do this sort of thing: it worse Maybe what we need is a syntax like: Where any expression that parses as an address operator followed by a function call where all parameters are typeid's, is an explicit address-of-function expression. Its not perfectly context free grammar, but should be an easy case to check, since presumably if even the first parameter is a typeid, they would all have to be. (I don't know of any case where passing types to functions is currently valid syntax.) This would be nifty in templates: -- Chris Sauls
Dec 10 2005
prev sibling next sibling parent reply Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
Hm, for one of my projects -cov crashes dmd, and for some of the others .lst file isn't created. What could be the problem?
Dec 05 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Ivan Senji" <ivan.senji_REMOVE_ _THIS__gmail.com> wrote in message
news:dn11qv$dr0$1 digitaldaemon.com...
 Walter Bright wrote:
 Some things of note:

 1) This includes a new code coverage analyzer for dmd (I think gcov
should
 work for gdc users). I've been wanting to add this for 20 years, I
finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to
tweak.
 I shoulda done it a long time ago. I can't believe some third party
tools to
 do this cost $800+.
Hm, for one of my projects -cov crashes dmd, and for some of the others .lst file isn't created. What could be the problem?
I don't know. Can you cut it down to size and file a bug report?
Dec 05 2005
parent Ivan Senji <ivan.senji_REMOVE_ _THIS__gmail.com> writes:
Walter Bright wrote:
 I don't know. Can you cut it down to size and file a bug report?
It's done. From ~4000 to <30 lines of code. In bugs NG.
Dec 05 2005
prev sibling next sibling parent pragma <pragma_member pathlink.com> writes:
In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.

2) The submissions for bug reports on complex numbers has risen a lot
lately, and I never get them for the C compiler. This means that nobody uses
complex numbers in C, but they do in D. Interesting!

3) This incorporates a new 'header' generator capability, written by Dave
Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
the source for it is included). I hope to get it working by the next update.

http://www.digitalmars.com/d/changelog.html
Walter, this is a fantastic release, thank you! - EricAnderton at yahoo
Dec 05 2005
prev sibling next sibling parent reply James Dunne <james.jdunne gmail.com> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
 the source for it is included). I hope to get it working by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 
On WinXP SP2, DMD 0.141 says Error: unrecognized switch '-Hdheaders' and Error: unrecognized switch '-Hfheaders' NOTE: these are listed as options on the help screen output from DMD.exe invoked without any arguments. Also, the -cov switch is missing from that screen. I have no idea what code coverage is, but the header file generation code is pretty freakin' cool (if I can get it to work?)! Way to go Walter.
Dec 05 2005
next sibling parent reply James Dunne <james.jdunne gmail.com> writes:
James Dunne wrote:
 Walter Bright wrote:
 
 Some things of note:

 1) This includes a new code coverage analyzer for dmd (I think gcov 
 should
 work for gdc users). I've been wanting to add this for 20 years, I 
 finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to 
 tweak.
 I shoulda done it a long time ago. I can't believe some third party 
 tools to
 do this cost $800+.

 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that 
 nobody uses
 complex numbers in C, but they do in D. Interesting!

 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment 
 (just
 the source for it is included). I hope to get it working by the next 
 update.

 http://www.digitalmars.com/d/changelog.html
On WinXP SP2, DMD 0.141 says Error: unrecognized switch '-Hdheaders' and Error: unrecognized switch '-Hfheaders' NOTE: these are listed as options on the help screen output from DMD.exe invoked without any arguments. Also, the -cov switch is missing from that screen. I have no idea what code coverage is, but the header file generation code is pretty freakin' cool (if I can get it to work?)! Way to go Walter.
After looking at code in dmd/src/mars.c ... Did you forget to #define _DH ? lol. or perhaps it was wrong exe copied?
Dec 05 2005
parent Chris Lajoie <ctlajoie yahoo.com> writes:
I'm not sure if you realized you quoted the point where Walter explains why 
they are not working. see 3).
My appologies if I'm the one being thick-headed ;)

Chris

 James Dunne wrote:
 
 Walter Bright wrote:
 
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov
 should
 work for gdc users). I've been wanting to add this for 20 years, I
 finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours
 to
 tweak.
 I shoulda done it a long time ago. I can't believe some third party
 tools to
 do this cost $800+.
 2) The submissions for bug reports on complex numbers has risen a
 lot
 lately, and I never get them for the C compiler. This means that
 nobody uses
 complex numbers in C, but they do in D. Interesting!
 3) This incorporates a new 'header' generator capability, written by
 Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the
 moment
 (just
 the source for it is included). I hope to get it working by the next
 update.
 http://www.digitalmars.com/d/changelog.html
 
On WinXP SP2, DMD 0.141 says Error: unrecognized switch '-Hdheaders' and Error: unrecognized switch '-Hfheaders' NOTE: these are listed as options on the help screen output from DMD.exe invoked without any arguments. Also, the -cov switch is missing from that screen. I have no idea what code coverage is, but the header file generation code is pretty freakin' cool (if I can get it to work?)! Way to go Walter.
After looking at code in dmd/src/mars.c ... Did you forget to #define _DH ? lol. or perhaps it was wrong exe copied?
Dec 05 2005
prev sibling next sibling parent reply James Dunne <james.jdunne gmail.com> writes:
James Dunne wrote:
 I have no idea what code coverage is, but the header file generation 
 code is pretty freakin' cool (if I can get it to work?)!  Way to go Walter.
*goes to read code_coverage.html* =-O. OMG! OMG! Code coverage rocks! Such a simple concept and I never thought to do it! >:o Man, I think you've made us all feel a bit dumber today Walter! :) (well at least I do, I can't speak for everyone) Friggin' brilliant! This will help so much in debugging, especially from a DLL context. Now if only WinDbg would get symbols from a D EXE/DLL, my life would be complete. =P How about an alternative, easier-to-parse output format for the .lst files? Say, something like CSV (line number comma execution count), or if overkill is really necessary, XML. I still like the original .lst; it's nice for humans to look at, but perhaps not as nice for programs.
Dec 05 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"James Dunne" <james.jdunne gmail.com> wrote in message
news:dn255d$203n$1 digitaldaemon.com...
 OMG! OMG!  Code coverage rocks!  Such a simple concept and I never
 thought to do it!  >:o
I first saw it done in the mid 80's and have been smitten ever since. I *finally* got around to implementing it.
  Man, I think you've made us all feel a bit
 dumber today Walter! :)  (well at least I do, I can't speak for
 everyone)  Friggin' brilliant!  This will help so much in debugging,
 especially from a DLL context.

 Now if only WinDbg would get symbols from a D EXE/DLL, my life would be
 complete. =P
The windbg.exe from the Digital Mars CD will get it.
 How about an alternative, easier-to-parse output format for the .lst
 files?  Say, something like CSV (line number comma execution count), or
 if overkill is really necessary, XML.  I still like the original .lst;
 it's nice for humans to look at, but perhaps not as nice for programs.
To parse it, look at std/cover.d. It has a parser for it <g>.
Dec 05 2005
parent reply James Dunne <james.jdunne gmail.com> writes:
Walter Bright wrote:
 "James Dunne" <james.jdunne gmail.com> wrote in message
 news:dn255d$203n$1 digitaldaemon.com...
 
OMG! OMG!  Code coverage rocks!  Such a simple concept and I never
thought to do it!  >:o
I first saw it done in the mid 80's and have been smitten ever since. I *finally* got around to implementing it.
 Man, I think you've made us all feel a bit
dumber today Walter! :)  (well at least I do, I can't speak for
everyone)  Friggin' brilliant!  This will help so much in debugging,
especially from a DLL context.

Now if only WinDbg would get symbols from a D EXE/DLL, my life would be
complete. =P
The windbg.exe from the Digital Mars CD will get it.
How about an alternative, easier-to-parse output format for the .lst
files?  Say, something like CSV (line number comma execution count), or
if overkill is really necessary, XML.  I still like the original .lst;
it's nice for humans to look at, but perhaps not as nice for programs.
To parse it, look at std/cover.d. It has a parser for it <g>.
As I keep telling others... I really should produce brain-waves before sound-waves. (Proverbial sound waves in this case, I guess) Also it's not that hard to parse... just find the first | on the line... it could also be as simple as fixed record sizes and an atoi call.
Dec 06 2005
next sibling parent Derek Parnell <derek psych.ward> writes:
On Tue, 06 Dec 2005 23:01:51 -0600, James Dunne wrote:

 it could also be as simple as fixed record sizes and an atoi call.
Not really, as I ran a test that did over a billion hits and that shifted the "|" to the right. -- Derek (skype: derek.j.parnell) Melbourne, Australia "A learning experience is one of those things that says, 'You know that thing you just did? Don't do that.'" - D.N. Adams 7/12/2005 4:10:02 PM
Dec 06 2005
prev sibling parent reply "Chris Miller" <chris dprogramming.com> writes:
On Wed, 07 Dec 2005 00:01:51 -0500, James Dunne <james.jdunne gmail.com>  
wrote:

 How about an alternative, easier-to-parse output format for the .lst
 files?  Say, something like CSV (line number comma execution count), or
 if overkill is really necessary, XML.  I still like the original .lst;
 it's nice for humans to look at, but perhaps not as nice for programs.
To parse it, look at std/cover.d. It has a parser for it <g>.
As I keep telling others... I really should produce brain-waves before sound-waves. (Proverbial sound waves in this case, I guess) Also it's not that hard to parse... just find the first | on the line... it could also be as simple as fixed record sizes and an atoi call.
If the number is large it'll push the | over more columns. One thing strange about the .lst file is 0 is the only number padded with 0s. Kind of makes it harder to skim the file looking for bigger numbers, I'll get thrown off seeing a number with many digits yet is 0.
Dec 06 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Chris Miller" <chris dprogramming.com> wrote in message
news:op.s1ed6eu6po9bzi esi...
 On Wed, 07 Dec 2005 00:01:51 -0500, James Dunne <james.jdunne gmail.com>
 wrote:
   To parse it, look at std/cover.d. It has a parser for it <g>.
As I keep telling others... I really should produce brain-waves before sound-waves. (Proverbial sound waves in this case, I guess) Also it's not that hard to parse... just find the first | on the line... it could also be as simple as fixed record sizes and an atoi call.
If the number is large it'll push the | over more columns.
Yup. Just scan for the |.
 One thing strange about the .lst file is 0 is the only number padded with
 0s. Kind of makes it harder to skim the file looking for bigger numbers,
 I'll get thrown off seeing a number with many digits yet is 0.
It makes it easy to do a grep for untested lines of code. It'll also correctly parse as the number 0, so no special case code is necessary.
Dec 06 2005
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"James Dunne" <james.jdunne gmail.com> wrote in message
news:dn24a7$1utp$1 digitaldaemon.com...
 On WinXP SP2, DMD 0.141 says

    Error: unrecognized switch '-Hdheaders'

 and

    Error: unrecognized switch '-Hfheaders'

 NOTE: these are listed as options on the help screen output from DMD.exe
 invoked without any arguments.
That's because it's disabled at the moment.
 Also, the -cov switch is missing from
 that screen.
I'll fix that.
 I have no idea what code coverage is,
See www.digitalmars.com/d/code_coverage.html
 but the header file generation
 code is pretty freakin' cool (if I can get it to work?)!  Way to go
Walter. Dave Fladebo is the author of that <g>.
Dec 05 2005
prev sibling next sibling parent Ivan <Ivan_member pathlink.com> writes:
In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.

2) The submissions for bug reports on complex numbers has risen a lot
lately, and I never get them for the C compiler. This means that nobody uses
complex numbers in C, but they do in D. Interesting!

3) This incorporates a new 'header' generator capability, written by Dave
Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
the source for it is included). I hope to get it working by the next update.

http://www.digitalmars.com/d/changelog.html
What a miracle! During the weekend I was thinking about writinq one program, considering to use Java or D. Because I like D it was big temptation to use it, but also I know Java quite well and know few useful tools, e.g. Cobertura http://cobertura.sourceforge.net/ which is Java code coverage tool. Because better tools available for serious testing on Java platform I almost started in Java. And today we have code coverage in D! Working! Included directly in the compiler. Very usable and useful! Excellent job, Walter! Thank you very much!
Dec 05 2005
prev sibling next sibling parent reply =?iso-8859-1?q?Knud_S=F8rensen?= <12tkvvb02 sneakemail.com> writes:
Wow Thanks Walter

I got so happy about it that i added it on digg.com

http://digg.com/programming/DMD_0.141_release
Dec 05 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Knud Sørensen" <12tkvvb02 sneakemail.com> wrote in message
news:pan.2005.12.05.21.31.54.211262 sneakemail.com...
 Wow Thanks Walter

 I got so happy about it that i added it on digg.com

 http://digg.com/programming/DMD_0.141_release
Ok, everyone, go and 'digg' it so it will appear on the front page!
Dec 05 2005
prev sibling next sibling parent Hasan Aljudy <hasan.aljudy gmail.com> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
 
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
 
 3) This incorporates a new 'header' generator capability, written by Dave
 Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
 the source for it is included). I hope to get it working by the next update.
 
 http://www.digitalmars.com/d/changelog.html
 
 
 
Wow!! Code Coverage looks awesome! specially that I'm new to the concept!! Good job!
Dec 05 2005
prev sibling next sibling parent pragma <pragma_member pathlink.com> writes:
In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.

2) The submissions for bug reports on complex numbers has risen a lot
lately, and I never get them for the C compiler. This means that nobody uses
complex numbers in C, but they do in D. Interesting!

3) This incorporates a new 'header' generator capability, written by Dave
Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
the source for it is included). I hope to get it working by the next update.

http://www.digitalmars.com/d/changelog.html
In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.

2) The submissions for bug reports on complex numbers has risen a lot
lately, and I never get them for the C compiler. This means that nobody uses
complex numbers in C, but they do in D. Interesting!

3) This incorporates a new 'header' generator capability, written by Dave
Fladebo. I goofed it up merging it in, so it is disabled at the moment (just
the source for it is included). I hope to get it working by the next update.

http://www.digitalmars.com/d/changelog.html
Walter, I just tested the new features out and they look great! One critique about .mangleof() if I may:
 static char[] mangleof(char[] namespace);
This way, one can get mangleof to emit a fully-qualified symbol:
 writefln("_D",typeof(char[]).mangleof("my.string.ident"));
Which would emit:
 _Dmy6string5identAa
I think this adjustment might prove very useful. - EricAnderton at yahoo
Dec 05 2005
prev sibling next sibling parent reply Dave <Dave_member pathlink.com> writes:
In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.
Wow, this is very cool! I think mention of this should be added to http://digitalmars.com/d/comparison.html and http://digitalmars.com/d/overview.html
Dec 05 2005
next sibling parent reply clayasaurus <clayasaurus gmail.com> writes:
Is this a compiler specific feature, or is it part of the language?

~ Clay

Dave wrote:
 In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
 
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov should
work for gdc users). I've been wanting to add this for 20 years, I finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
I shoulda done it a long time ago. I can't believe some third party tools to
do this cost $800+.
Wow, this is very cool! I think mention of this should be added to http://digitalmars.com/d/comparison.html and http://digitalmars.com/d/overview.html
Dec 05 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"clayasaurus" <clayasaurus gmail.com> wrote in message
news:dn30oc$2sl5$2 digitaldaemon.com...
 Is this a compiler specific feature, or is it part of the language?
Compiler specific.
Dec 05 2005
prev sibling parent "Walter Bright" <newshound digitalmars.com> writes:
"Dave" <Dave_member pathlink.com> wrote in message
news:dn30a9$2sct$1 digitaldaemon.com...
 In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...
Some things of note:

1) This includes a new code coverage analyzer for dmd (I think gcov
should
work for gdc users). I've been wanting to add this for 20 years, I
finally
realized it was a piece of cake. Took me 3 hours to write, 3 hours to
tweak.
I shoulda done it a long time ago. I can't believe some third party tools
to
do this cost $800+.
Wow, this is very cool! I think mention of this should be added to http://digitalmars.com/d/comparison.html
Weeelll, I wanted to, but it isn't really a language feature, it's a dmd implementation feature. I expect that the gdc version will instead work with gcov.
 and

 http://digitalmars.com/d/overview.html
Dec 05 2005
prev sibling parent reply Don Clugston <dac nospam.com.au> writes:
Walter Bright wrote:
 Some things of note:
 
 1) This includes a new code coverage analyzer for dmd (I think gcov should
 work for gdc users). I've been wanting to add this for 20 years, I finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to tweak.
 I shoulda done it a long time ago. I can't believe some third party tools to
 do this cost $800+.
Wow! (And it doesn't seem to have increased the size of dmd.exe by much. Is that the smallest ever exe size for a code coverage tool? :-) )
 2) The submissions for bug reports on complex numbers has risen a lot
 lately, and I never get them for the C compiler. This means that nobody uses
 complex numbers in C, but they do in D. Interesting!
I bet that applies to nans, infinities, and 80-bit reals, as well. I think it's the inverse of "give a dog a bad name, and hang it": they are so accessable, that you look for opportunities to use them. BTW, any chance of getting those implicit conversions real->creal and ireal->creal removed? I have most of the complex functions almost ready to go, once the implicit conversions are gone they can be folded in, and we'll be close to supporting all of the C99 math functions.
Dec 06 2005
parent reply "Walter Bright" <newshound digitalmars.com> writes:
"Don Clugston" <dac nospam.com.au> wrote in message
news:dn3nua$gsv$1 digitaldaemon.com...
 Walter Bright wrote:
 Some things of note:

 1) This includes a new code coverage analyzer for dmd (I think gcov
should
 work for gdc users). I've been wanting to add this for 20 years, I
finally
 realized it was a piece of cake. Took me 3 hours to write, 3 hours to
tweak.
 I shoulda done it a long time ago. I can't believe some third party
tools to
 do this cost $800+.
Wow! (And it doesn't seem to have increased the size of dmd.exe by much. Is that the smallest ever exe size for a code coverage tool? :-) )
It's about 25 lines of code <g>. The problem with 3rd party tools, is that to instrument the source, they have to build in a full compiler front end. Then you have to come up with some horrible hack to feed the real compiler the altered source code. The actual code coverage implementation work is 0.001% of the effort. I don't know how gcov is implemented, but it seems excessively complicated. For one thing, for each source file analyzed, it creates 3 extra files in addition to the report file. What's up with that?
 BTW, any chance of getting those implicit conversions real->creal and
 ireal->creal removed? I have most of the complex functions almost ready
 to go, once the implicit conversions are gone they can be folded in, and
 we'll be close to supporting all of the C99 math functions.
I guess I should work on that <g>.
Dec 06 2005
parent "Kris" <fu bar.com> writes:
"Walter Bright" <newshound digitalmars.com> wrote

 I guess I should work on that <g>.
I don't suppose you could whack this one too, while you're at it? :-) http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/5641
Dec 06 2005