|
freezway
|
|
Reply #1 Posted on: May 24, 2010, 05:30:21 pm |
|
|
Joined: Dec 2009
Posts: 220
|
recursion.... js: a = "js: a"
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
|
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #8 Posted on: May 25, 2010, 03:25:30 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
int main(); void recursion(){ main(); } int main(){ recursion(); } fix'd
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #10 Posted on: May 25, 2010, 05:24:36 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Yes, because it'd be a crying shame for it to not have a return value for the first processor with a stack size and clock speed of infinity to exit with.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
score_under
|
|
Reply #11 Posted on: May 26, 2010, 11:17:21 am |
|
|
Joined: Aug 2008
Posts: 308
|
int main(); int recursion(){ return main(); } int main(){ return recursion(); }
This is where the optimizer comes in. Inline the call to "recursion()": int main(){ return main(); } Tail call, optimize to a goto: int main(){ goto main; } Which is why the code only causes a stack overflow on lower optimization levels.
|
|
|
Logged
|
|
|
|
MahFreenAmeh
|
|
Reply #12 Posted on: May 26, 2010, 03:24:56 pm |
|
|
sysadmin
"Web Team" Location: Austin, TX Joined: Apr 2008
Posts: 13
|
|
|
|
Logged
|
sys(tem)admin(istrator) [java,c++,c,javascript,html,css,php,perl,ruby,python,sql] if you've got ideas, let me hear them.
|
|
|
Josh @ Dreamland
|
|
Reply #13 Posted on: May 26, 2010, 04:21:43 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
</thread>'; void 0
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|