digitalmars.D.announce - DMD 0.141 release
- Walter Bright (13/13) Dec 04 2005 Some things of note:
- Jarrett Billingsley (6/18) Dec 04 2005 Sounds very cool! Any kind of code analyzation tools are welcome,
- John Reimer (3/26) Dec 04 2005 LOL ... yep more to be excited about, I guess.
- Jarrett Billingsley (5/6) Dec 04 2005 Heh, I just realized I typed "analyzation." Where the heck did that com...
- Derek Parnell (11/17) Dec 04 2005 From the 'Official Geekdom Dictionary'
- Jarrett Billingsley (3/5) Dec 05 2005 lol :)
- Bruno Medeiros (7/19) Dec 07 2005 Is "analyzation" not proper english? It shows up here (Websters):
- clayasaurus (27/47) Dec 04 2005 When I type 'dmd' on linux with no options it gives me the help menu and...
- Walter Bright (3/6) Dec 04 2005 Criminy, I put the wrong executable up. It's fixed now.
- clayasaurus (5/17) Dec 04 2005 Thanks. Also, you're still using 'printf' with '\n' for the sieve
- clayasaurus (8/30) Dec 05 2005 On the code coverage documentation page it says
- Walter Bright (4/11) Dec 05 2005 The two are the same. A .d default extension is applied if there isn't o...
- kris (2/21) Dec 04 2005 Nice! The -cov is gonna be *really* useful
- Walter Bright (2/3) Dec 04 2005 I know. When I've used them before, the results were very rewarding.
- John Reimer (4/24) Dec 04 2005 And, of course, Walter was sly enough not to mention the new ".mangleof"...
- Chris Lajoie (3/22) Dec 04 2005 Those are some cool new features.
- John Reimer (10/30) Dec 05 2005 OUTPUT:
- Don Clugston (8/27) Dec 05 2005 It works for function pointers. So you can say:
- pragma (3/30) Dec 05 2005 I'm going to file this under "really freaking awesome" myself.
- John Reimer (12/43) Dec 05 2005 Yeah... I figured that out, and it's a great feature. But I guess I'm
- jicman (5/48) Dec 05 2005 Hey, don't feel bad. You're just following society's motto: "Gimme, gim...
- John Reimer (4/14) Dec 05 2005 LOL! Yeah... that's about right! I'm certainly thankful for all
- Georg Wrede (4/17) Dec 10 2005 The motto is (C) ABBA of sweden!
- John Reimer (6/12) Dec 05 2005 I just want to say that all is NOT lost... that sounded very
- BCS (12/46) Dec 05 2005 I think this is related to a bug that still exists from .140.
- John Reimer (15/35) Dec 05 2005 Interesting. I was actually experimenting a little more:
- BCS (13/37) Dec 05 2005 It gets worse :-o
- Georg Wrede (7/21) Dec 10 2005 (Admittedly, not knowing crap, (since I've been doing Honest Work
- BCS (5/26) Dec 10 2005 No, the point is that the without context there is no way to tell with f...
- Chris Sauls (25/29) Dec 10 2005 In other words, we have to do this sort of thing:
- Ivan Senji (3/10) Dec 05 2005 Hm, for one of my projects -cov crashes dmd, and for some of the others
- Walter Bright (7/17) Dec 05 2005 should
- Ivan Senji (2/3) Dec 05 2005 It's done. From ~4000 to <30 lines of code. In bugs NG.
- pragma (3/16) Dec 05 2005 Walter, this is a fantastic release, thank you!
- James Dunne (10/30) Dec 05 2005 On WinXP SP2, DMD 0.141 says
- James Dunne (3/47) Dec 05 2005 After looking at code in dmd/src/mars.c ...
- Chris Lajoie (4/55) Dec 05 2005 I'm not sure if you realized you quoted the point where Walter explains ...
- James Dunne (14/16) Dec 05 2005 *goes to read code_coverage.html*
- Walter Bright (6/18) Dec 05 2005 I first saw it done in the mid 80's and have been smitten ever since. I
- James Dunne (5/37) Dec 06 2005 As I keep telling others... I really should produce brain-waves before
- Derek Parnell (10/11) Dec 06 2005 Not really, as I ran a test that did over a billion hits and that shifte...
- Chris Miller (6/16) Dec 06 2005 If the number is large it'll push the | over more columns.
- Walter Bright (5/17) Dec 06 2005 Yup. Just scan for the |.
- Walter Bright (7/18) Dec 05 2005 That's because it's disabled at the moment.
- Ivan (10/23) Dec 05 2005 What a miracle! During the weekend I was thinking about writinq one prog...
- =?iso-8859-1?q?Knud_S=F8rensen?= (3/3) Dec 05 2005 Wow Thanks Walter
- Walter Bright (3/6) Dec 05 2005 Ok, everyone, go and 'digg' it so it will appear on the front page!
- Hasan Aljudy (3/23) Dec 05 2005 Wow!! Code Coverage looks awesome! specially that I'm new to the concept...
- pragma (8/37) Dec 05 2005 Walter, I just tested the new features out and they look great! One cri...
- Dave (6/12) Dec 05 2005 Wow, this is very cool!
- clayasaurus (3/26) Dec 05 2005 Is this a compiler specific feature, or is it part of the language?
- Walter Bright (3/4) Dec 05 2005 Compiler specific.
- Walter Bright (9/24) Dec 05 2005 should
- Don Clugston (11/21) Dec 06 2005 Wow!
- Walter Bright (15/30) Dec 06 2005 should
- Kris (3/4) Dec 06 2005 I don't suppose you could whack this one too, while you're at it? :-)
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
"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
Jarrett Billingsley wrote:"Walter Bright" <newshound digitalmars.com> wrote in message news:dn0i6d$2pgk$1 digitaldaemon.com...LOL ... yep more to be excited about, I guess. -JJR1) 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
"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
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...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 PMSounds very cool! Any kind of code analyzation tools are welcome,Heh, I just realized I typed "analyzation." Where the heck did that come from?
Dec 04 2005
"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
Jarrett Billingsley wrote:"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message news:dn0kr7$2rk4$1 digitaldaemon.com...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."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 07 2005
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.htmlWhen 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
"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
Walter Bright wrote:"clayasaurus" <clayasaurus gmail.com> wrote in message news:dn0l15$2rqf$1 digitaldaemon.com...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. : )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
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...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. : )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 05 2005
"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
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.htmlNice! The -cov is gonna be *really* useful
Dec 04 2005
"kris" <fu bar.org> wrote in message news:dn0nnf$2ulb$1 digitaldaemon.com...Nice! The -cov is gonna be *really* usefulI know. When I've used them before, the results were very rewarding.
Dec 04 2005
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.htmlAnd, 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
Those are some cool new features. The std.cover documentation isn't on the site yet. ChrisSome 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
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
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
In article <dn1e5b$u70$1 digitaldaemon.com>, Don Clugston says...John Reimer wrote:I'm going to file this under "really freaking awesome" myself. - EricAnderton at yahooOkay, 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
Don Clugston wrote:John Reimer wrote: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: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.#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
John Reimer says...Don Clugston 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éJohn Reimer wrote: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: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.#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
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
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!)Hey, don't feel bad. You're just following society's motto: "Gimme, gimme, gimme, gimme!" :-) Thanks Walter. This is another great release. Woowoowoowoooo!#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
Dec 10 2005
John Reimer wrote: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#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.
Dec 05 2005
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
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 toInteresting. 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
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.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); }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
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
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
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
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
"Ivan Senji" <ivan.senji_REMOVE_ _THIS__gmail.com> wrote in message news:dn11qv$dr0$1 digitaldaemon.com...Walter Bright wrote:shouldSome things of note: 1) This includes a new code coverage analyzer for dmd (I think gcovfinallywork for gdc users). I've been wanting to add this for 20 years, Itweak.realized it was a piece of cake. Took me 3 hours to write, 3 hours totools toI shoulda done it a long time ago. I can't believe some third partyI don't know. Can you cut it down to size and file a bug report?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
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
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.htmlWalter, this is a fantastic release, thank you! - EricAnderton at yahoo
Dec 05 2005
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.htmlOn 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
James Dunne wrote:Walter Bright wrote:After looking at code in dmd/src/mars.c ... Did you forget to #define _DH ? lol. or perhaps it was wrong exe copied?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.htmlOn 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
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 ;) ChrisJames Dunne wrote:Walter Bright wrote:After looking at code in dmd/src/mars.c ... Did you forget to #define _DH ? lol. or perhaps it was wrong exe copied?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.htmlOn 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
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
"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! >:oI 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. =PThe 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
Walter Bright wrote:"James Dunne" <james.jdunne gmail.com> wrote in message news:dn255d$203n$1 digitaldaemon.com...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.OMG! OMG! Code coverage rocks! Such a simple concept and I never thought to do it! >:oI 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. =PThe 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 06 2005
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
On Wed, 07 Dec 2005 00:01:51 -0500, James Dunne <james.jdunne gmail.com> wrote: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.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.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 06 2005
"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:Yup. Just scan for the |.If the number is large it'll push the | over more columns.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.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
"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.htmlbut the header file generation code is pretty freakin' cool (if I can get it to work?)! Way to goWalter. Dave Fladebo is the author of that <g>.
Dec 05 2005
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.htmlWhat 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
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
"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_releaseOk, everyone, go and 'digg' it so it will appear on the front page!
Dec 05 2005
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.htmlWow!! Code Coverage looks awesome! specially that I'm new to the concept!! Good job!
Dec 05 2005
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.htmlIn 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.htmlWalter, 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:_Dmy6string5identAaI think this adjustment might prove very useful. - EricAnderton at yahoo
Dec 05 2005
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
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
"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
"Dave" <Dave_member pathlink.com> wrote in message news:dn30a9$2sct$1 digitaldaemon.com...In article <dn0i6d$2pgk$1 digitaldaemon.com>, Walter Bright says...shouldSome things of note: 1) This includes a new code coverage analyzer for dmd (I think gcovfinallywork for gdc users). I've been wanting to add this for 20 years, Itweak.realized it was a piece of cake. Took me 3 hours to write, 3 hours totoI shoulda done it a long time ago. I can't believe some third party toolsWeeelll, 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.do this cost $800+.Wow, this is very cool! I think mention of this should be added to http://digitalmars.com/d/comparison.htmland http://digitalmars.com/d/overview.html
Dec 05 2005
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
"Don Clugston" <dac nospam.com.au> wrote in message news:dn3nua$gsv$1 digitaldaemon.com...Walter Bright wrote:shouldSome things of note: 1) This includes a new code coverage analyzer for dmd (I think gcovfinallywork for gdc users). I've been wanting to add this for 20 years, Itweak.realized it was a piece of cake. Took me 3 hours to write, 3 hours totools toI shoulda done it a long time ago. I can't believe some third partyIt'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?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? :-) )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
"Walter Bright" <newshound digitalmars.com> wroteI 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