Is anyone else reminded of the insane and crappy code Sebastiani posted to "bend the rules" to allow a "null reference" and the resulting arguments?
Soma
Is anyone else reminded of the insane and crappy code Sebastiani posted to "bend the rules" to allow a "null reference" and the resulting arguments?
Soma
Last edited by Sebastiani; 06-02-2010 at 04:27 PM. Reason: mean-spirited remarks removed
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Like I said then, if you are going to break the rules, break the $*&# out of them. If you are going to pretend to reassign a reference, why not go all the way?
[Edit]
I read your post pre-edit. You didn't need to change it. I assumed you were poking at me much the same as I was poking at you.
[/Edit]
[Edit]
AND WHY DOES CBOARD INSIST ON EATING MY EDITS!?
[/Edit]
Soma
Last edited by phantomotap; 06-02-2010 at 04:37 PM. Reason: none of your business
FYI, using a tool in an unorthodox way does not equate to using it incorrectly.
Anyway, I'm not suprised by your response, really. You were, after all, the one who so brilliantly suggested that we allow the MiniBasic virtual machine to segfault on a malformed program! Apparently, designing robust software is much less important to you than writing "orthodox" code. How droll.
Last edited by Sebastiani; 06-02-2010 at 05:05 PM. Reason: seething insults removed - just kidding, minor rewording
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
LMAO!FYI, using a tool in an unorthodox way does not equate to using it incorrectly.
You are talking to a master jury rigger. I practically have a PhD in "unintended purposes". I also never implied you were doing anything incorrectly.
This I have a problem with. I never said anything of the sort. The compiler should catch a malformed program before the virtual machine has a chance to process it.You were, after all, the one who so brilliantly suggested that we allow the MiniBasic virtual machine to segfault on a malformed program!
I suggested that the virtual machine behave realistically. I said that if a programmer misused my imagining of the `PUSH'/`PEEK' implementation to trample over the instruction area they should face the consequences. I stand by this.
Soma
You guys make my head hurt.
I prefer using references when it comes to std::string. In fact if I ever see std::string * it usually throws up a red flag in my book. That is not to say it isn't valid it is just something I'm not all that used to seeing.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }