www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - stupid errors

reply debugger <debugger_member pathlink.com> writes:
Detecting errors like this:

SomeType f(){
SomeType result;
result= SOMECONST;
return result;
}

void g(){
SomeType value;
value= f();
switch( value){
case SOMECONST:
assert( value == SOMECONST); // fails !!!
}
}

is no reputation for any language.

Changing the switch to cascaded if's worked okay, but for six years developing
this kind of bug is  !*$ and I am not interested in wasting my time
Mar 20 2006
next sibling parent reply "Derek Parnell" <derek psych.ward> writes:
On Tue, 21 Mar 2006 02:11:32 +1100, debugger  
<debugger_member pathlink.com> wrote:

 Detecting errors like this:

 SomeType f(){
 SomeType result;
 result= SOMECONST;
 return result;
 }

 void g(){
 SomeType value;
 value= f();
 switch( value){
 case SOMECONST:
 assert( value == SOMECONST); // fails !!!
 }
 }

 is no reputation for any language.

 Changing the switch to cascaded if's worked okay, but for six years  
 developing
 this kind of bug is  !*$ and I am not interested in wasting my time

I just tried this using dmd v.150 and Windows XP and it works fine. -- Derek Parnell Melbourne, Australia
Mar 20 2006
next sibling parent reply debugger <debugger_member pathlink.com> writes:
Derek Parnell says...
 this kind of bug is  !*$ and I am not interested in wasting my time


Lucky you. But I am really not interested in wasting my time by working in a buggy language nor by cutting my source down to the essential raising that bug. In fact the control flow took even the wrong path: switch( value){ case SOMECONST: assert( false); // not executed break; case SOMEOTHERCONST: assert( value == SOMEOTHERCONST); // failed }
Mar 20 2006
next sibling parent "Regan Heath" <regan netwin.co.nz> writes:
On Tue, 21 Mar 2006 00:44:29 +0000 (UTC), debugger  
<debugger_member pathlink.com> wrote:
 Derek Parnell says...
 this kind of bug is  !*$ and I am not interested in wasting my time


Lucky you. But I am really not interested in wasting my time by working in a buggy language nor by cutting my source down to the essential raising that bug. In fact the control flow took even the wrong path: switch( value){ case SOMECONST: assert( false); // not executed break; case SOMEOTHERCONST: assert( value == SOMEOTHERCONST); // failed }

It's your loss. Can you please at least post the code here so we can figure out whats going on. Regan
Mar 20 2006
prev sibling parent reply Derek Parnell <derek psych.ward> writes:
On Tue, 21 Mar 2006 00:44:29 +0000 (UTC), debugger wrote:

 Derek Parnell says...
 this kind of bug is  !*$ and I am not interested in wasting my time


Lucky you. But I am really not interested in wasting my time by working in a buggy language nor by cutting my source down to the essential raising that bug.

Of course you mean 'buggy compiler' and not 'buggy language', but that aside for now ... dmd v0.150 is *BETA* --- it is expected to have bugs in it still and that's why we are trying to find and fix them. If you don't want to help fix the compiler then fine, go away and come back later when other's have done the good deeds. My earlier reply was trying to say that the compiler is working in at least one environment so I assume you are not working in Windows or not using v0.150, or your code example is faulty because it doesn't exhibit the problem you reported.
 In fact the control flow took even the wrong path:
 
 switch( value){
 case SOMECONST:
 assert( false); // not executed
 break;
 case SOMEOTHERCONST:
 assert( value == SOMEOTHERCONST); // failed
 }

If you actually want this resolved, try showing us a complete (compilable) example that exhibits the problem. Until then, I'm assuming you have made a coding error rather than dmd is at fault. Prove otherwise. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocracy!" 21/03/2006 12:21:42 PM
Mar 20 2006
parent reply debugger <debugger_member pathlink.com> writes:
In article <1gjg8vs07wl1o$.tifrma18o0v$.dlg 40tude.net>, Derek Parnell says...
 that's why we are trying to find and fix them. 

until version 2.0 is released ... I want to see how many fingers will point into different directions when that bug in the reference compiler is still undetected.
If you actually want this resolved, try showing us a complete (compilable)
example that exhibits the problem. Until then, I'm assuming you have made a
coding error rather than dmd is at fault. Prove otherwise.

other code example in my "stops compiling" post does not exhibit any problem. If you want a proof: pay. Otherwise continue with your planless search and keep on whining about people who know more than your acknowledged crowd.
Mar 21 2006
next sibling parent "Regan Heath" <regan netwin.co.nz> writes:
On Wed, 22 Mar 2006 04:20:29 +0000 (UTC), debugger  
<debugger_member pathlink.com> wrote:
 In article <1gjg8vs07wl1o$.tifrma18o0v$.dlg 40tude.net>, Derek Parnell  
 says...
 that's why we are trying to find and fix them.

stay tuned until version 2.0 is released ... I want to see how many fingers will point into different directions when that bug in the reference compiler is still undetected.
 If you actually want this resolved, try showing us a complete  
 (compilable)
 example that exhibits the problem. Until then, I'm assuming you have  
 made a
 coding error rather than dmd is at fault. Prove otherwise.

that the other code example in my "stops compiling" post does not exhibit any problem. If you want a proof: pay. Otherwise continue with your planless search and keep on whining about people who know more than your acknowledged crowd.

If you've got nothing constructive to add stop posting, or, keep posting if it makes you happy just be prepared to be ignored as a "troll". Given the inflamatory nature of your post I am surprised you only got 1 agressive response. As Derek politely pointed out, you didn't post a complete example. Without a complete example there is no way for us to help you, in which case why post at all? (unless you're simply trolling?). I've done my best to produce a complete example, here is what I came up with: alias int SomeType; SomeType f(){ SomeType result; result = 1; return result; } void g(){ SomeType value; value = f(); switch(value){ case 1: assert(value == 1); // fails !!! } } void main() { g(); } I assume you meant for us to replace SOMECONST with an integer constant, if not, let me know what it was because nothing else I tried would compile. Using the code above I get no assert, which is the correct behaviour. Regan
Mar 21 2006
prev sibling parent Derek Parnell <Derek_member pathlink.com> writes:
In article <dvqjad$2ba9$1 digitaldaemon.com>, debugger says...

Nothing of any signficance.
Mar 21 2006
prev sibling parent Brad Roberts <braddr puremagic.com> writes:
On Wed, 22 Mar 2006, Regan Heath wrote:
 On Wed, 22 Mar 2006 04:20:29 +0000 (UTC), debugger
 <debugger_member pathlink.com> wrote:
 In article <1gjg8vs07wl1o$.tifrma18o0v$.dlg 40tude.net>, Derek Parnell
 says...


<snip pointless flamebait>
 If you've got nothing constructive to add stop posting, or, keep posting if it
 makes you happy just be prepared to be ignored as a "troll". Given the
 inflamatory nature of your post I am surprised you only got 1 agressive
 response.
 
 As Derek politely pointed out, you didn't post a complete example. Without a
 complete example there is no way for us to help you, in which case why post at
 all? (unless you're simply trolling?).
 
 I've done my best to produce a complete example, here is what I came up with:
 
 alias int SomeType;
 
 SomeType f(){
 	SomeType result;
 	result = 1;
 	return result;
 }
 
 void g(){
 	SomeType value;
 	value = f();		switch(value){
 	case 1:
 		assert(value == 1); // fails !!!
 	}
 }
 
 void main()
 {
 	g();
 }
 
 I assume you meant for us to replace SOMECONST with an integer constant, if
 not, let me know what it was because nothing else I tried would compile. Using
 the code above I get no assert, which is the correct behaviour.
 
 Regan

I also tried this example with s/1/SOMECONST/ and adding this block at the top: //alias char[] SomeType; //const char[] SOMECONST = "abcde"; alias int SomeType; const int SOMECONST = 1; Neither the char[] nor the int version assert for me. I used my gdc 0.18 pre-release as well as dmd 0.148 and 0.149, all on linux. I haven't grabbed 0.150 but Derek reported an inability to reproduce the problem with 0.150 on xp earlier in the thread. So, debugger, despite your arrogance and disdane for the rest of the D community, there's interesting in fixing bugs in the D compiler both from it's primary author and it's supporting team. If you'd be so kind as to point out the difference between these test cases and your as-of-yet undisclosed repro case, it'd be appreciated. If you'd also point out what compiler and platform you used that'd help too. Thanks, Brad
Mar 21 2006
prev sibling parent reply Tom <ihate spam.com> writes:
debugger escribió:
 Detecting errors like this:
 
 SomeType f(){
 SomeType result;
 result= SOMECONST;
 return result;
 }
 
 void g(){
 SomeType value;
 value= f();
 switch( value){
 case SOMECONST:
 assert( value == SOMECONST); // fails !!!
 }
 }
 
 is no reputation for any language.
 
 Changing the switch to cascaded if's worked okay, but for six years developing
 this kind of bug is  !*$ and I am not interested in wasting my time

Sorry, I can't contain myself but, what an asshole. Tom;
Mar 20 2006
parent reply debugger <debugger_member pathlink.com> writes:
Tom says...
Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.
Mar 21 2006
next sibling parent Kyle Furlong <kylefurlong gmail.com> writes:
debugger wrote:
 Tom says...
 Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.

People with your attitude are not welcome here. Use the language, but kindly *STFU* if you have nothing constructive to add to the discussion.
Mar 22 2006
prev sibling next sibling parent reply John Reimer <terminal.node gmail.com> writes:
debugger wrote:
 Tom says...
 Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.

Wow... I am... uh... speechless... lol! This guy has some unusually "witty" retorts. It makes me wonder... were these saved for just such an occasion or were they spontaneously contrived on the spur of the moment? It's not often we come across such a verbally gifted troll. I'm at a loss for what to do now except laugh! Interesting, really! Although, it's a wonder he even posted. He obviously had no interest in being helped here, so why are guys bothering to act all serious and offended? Wasn't his intent obvious from the beginning? (Why am I for that matter bothering to post this? Hmmm...pardon me... must be the stupid pill I took) Welcome to D, debugger; here lies a land full of people who bash bugs, debuggerlessly, and they do so with finesse, cheerfulness, and even perhaps a modicum of selflessness!(okay, maybe not all the time) You'll get along fine with them... honest! ...Okay, maybe only if you play nice for the first little while... otherwise... bye bye! -JJR
Mar 22 2006
next sibling parent reply BCS <BCS_member pathlink.com> writes:
debugger wrote:
 Tom says...
 Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.


proprietary code, pompous as whatever, money grubbing, language to make a sailer blush... Hm, if his C is anything like his English, he must work for MS.
Mar 22 2006
parent reply John Reimer <terminal.node gmail.com> writes:
BCS wrote:
 debugger wrote:
 Tom says...
 Sorry, I can't contain myself but, what an asshole.

they know how to get rid of their excrements themselves.


proprietary code, pompous as whatever, money grubbing, language to make a sailer blush... Hm, if his C is anything like his English, he must work for MS.

That's no way to attract the MS crowd! ;) There must be some good guys at MS... -JJR
Mar 22 2006
parent BCS <BCS_member pathlink.com> writes:
John Reimer wrote:
 BCS wrote:
 
 debugger wrote:

 Tom says...

 Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.


proprietary code, pompous as whatever, money grubbing, language to make a sailer blush... Hm, if his C is anything like his English, he must work for MS.

That's no way to attract the MS crowd! ;) There must be some good guys at MS... -JJR

Well at least Bill spends our money well (he's one of the biggest contributers to charity on the planet).
Mar 22 2006
prev sibling parent reply debugger <debugger_member pathlink.com> writes:
John Reimer says...
otherwise... bye bye!

Everyonce in a while I visit one of these open source packs and their habits did not change during time. In essence they are like lepers lingering at the outskirts of the town. For years Jesus walks by and nobody takes notice of each other. Then one day Jesus spends them bread and plenty of fish. They are not content because they get the food in baskets, but without dishes, "bad style" they say. Next day they know Jesus and as he walks by he says: "Look over there. There are fructiferous fig trees. They belong to nobody." Then a mourning started: "Yesterday he gave us food and today he gives us words---that bastard." Now I am giving you even more words: 0c2a425e0aeef2e7ad7e1b1dc6889023 2b3376687ca782dc9e1c0756cea52bdc These are two md5 foot prints of the proof of the bug I reported. You have several alternatives: 1) pay me 2) find it yourself 3) wait until the second upcoming main release for D, then you will get the proof for free 4) disdain the figs 5) ...
Mar 23 2006
next sibling parent "Regan Heath" <regan netwin.co.nz> writes:
On Thu, 23 Mar 2006 08:05:39 +0000 (UTC), debugger  
<debugger_member pathlink.com> wrote:
 John Reimer says...
 otherwise... bye bye!

Everyonce in a while I visit one of these open source packs and their habits did not change during time.

Not everyone here is "open source". In fact, even the DMD compiler backend is closed source. <snip insane ramblings> Your efforts at inciting a riot appear to be having little or no effect here. I wonder how long you can keep it up? Have a nice day/night ;0) Regan
Mar 23 2006
prev sibling next sibling parent Tom <ihate spam.com> writes:
debugger escribió:
[snip]
 You have several alternatives:
 
 1) pay me
 2) find it yourself
 3) wait until the second upcoming main release for D, then you will get the
 proof for free
 4) disdain the figs
 5) ...
 
 

One moment, I have to check my credit card, please, give me your account number, I'll send you the money! <g> Tom;
Mar 23 2006
prev sibling next sibling parent BCS <BCS_member pathlink.com> writes:
debugger wrote:
 
 In essence they are like lepers lingering at the outskirts of the town. For
 years Jesus walks by and nobody takes notice of each other.

i fail to see the parallel
 
 Then one day Jesus spends them bread and plenty of fish.
 
 They are not content because they get the food in baskets, but without dishes,
 "bad style" they say.
 
 Next day they know Jesus and as he walks by he says: "Look over there. There
are
 fructiferous fig trees. They belong to nobody."

Next day they know Jesus and as he walks by he says: "I known where some you can get some food. There are fructiferous fig trees. They belong to nobody. If you pay me I'll tell you where they are." Then a mourning started: "Yesterday he gave us food and today he make us pay."
 
 Now I am giving you even more words:
 0c2a425e0aeef2e7ad7e1b1dc6889023
 2b3376687ca782dc9e1c0756cea52bdc
 
 These are two md5 foot prints of the proof of the bug I reported.

00112557799F And here's the sorted digits of my mac address, so what.
 
 You have several alternatives:
 
 1) pay me

it being a bug in your program).
 2) find it yourself

we have found your bug.
Mar 23 2006
prev sibling parent reply Kyle Furlong <kylefurlong gmail.com> writes:
debugger wrote:
 John Reimer says...
 otherwise... bye bye!

Everyonce in a while I visit one of these open source packs and their habits did not change during time. In essence they are like lepers lingering at the outskirts of the town. For years Jesus walks by and nobody takes notice of each other. Then one day Jesus spends them bread and plenty of fish. They are not content because they get the food in baskets, but without dishes, "bad style" they say. Next day they know Jesus and as he walks by he says: "Look over there. There are fructiferous fig trees. They belong to nobody." Then a mourning started: "Yesterday he gave us food and today he gives us words---that bastard." Now I am giving you even more words: 0c2a425e0aeef2e7ad7e1b1dc6889023 2b3376687ca782dc9e1c0756cea52bdc These are two md5 foot prints of the proof of the bug I reported. You have several alternatives: 1) pay me 2) find it yourself 3) wait until the second upcoming main release for D, then you will get the proof for free 4) disdain the figs 5) ...

http://redwing.hutman.net/~mreed/warriorshtm/troller.htm
Mar 23 2006
parent Dave <Dave_member pathlink.com> writes:
In article <dvvf1u$2l1j$6 digitaldaemon.com>, Kyle Furlong says...
debugger wrote:
 John Reimer says...
 otherwise... bye bye!

Everyonce in a while I visit one of these open source packs and their habits did not change during time. In essence they are like lepers lingering at the outskirts of the town. For years Jesus walks by and nobody takes notice of each other. Then one day Jesus spends them bread and plenty of fish. They are not content because they get the food in baskets, but without dishes, "bad style" they say. Next day they know Jesus and as he walks by he says: "Look over there. There are fructiferous fig trees. They belong to nobody." Then a mourning started: "Yesterday he gave us food and today he gives us words---that bastard." Now I am giving you even more words: 0c2a425e0aeef2e7ad7e1b1dc6889023 2b3376687ca782dc9e1c0756cea52bdc These are two md5 foot prints of the proof of the bug I reported. You have several alternatives: 1) pay me 2) find it yourself 3) wait until the second upcoming main release for D, then you will get the proof for free 4) disdain the figs 5) ...

http://redwing.hutman.net/~mreed/warriorshtm/troller.htm

Either that or: http://redwing.hutman.net/~mreed/warriorshtm/bong.htm Actually, this is a good sign for D - you know you've hit general circulation when you get wack-jobs like this guy posting like he has. Either way when he sees the thread go a day or two with no response he'll probably jump in again, and when that happens, I think it's time we stop wasting our time and quit responding. I know this is my first (and last) post on the issue.
Mar 23 2006
prev sibling parent Tom <ihate spam.com> writes:
debugger escribió:
 Tom says...
 Sorry, I can't contain myself but, what an asshole.

Yes I am. And I like to work with other assholes, because in contrast to you they know how to get rid of their excrements themselves.

Mhhh... I shouldn't reply (JJR is right). WTF do you mean about the excrement thing? There's no doubt you write as if you were almighty. I don't get what get-rid-of-my-own-excrement has anything to do with being an asshole or something. Maybe you don't know how to get rid of your shit or maybe you know, I don't care, but you're still an asshole. Tom;
Mar 22 2006