|
|
Long, long ago, when I was still young and wore - almost without exception -
tshirts that carried strange and wonderful messages and put me in the position
(or so I have been told) of 'swimming around in...' a 'shirt too big for the
three of us.'
One of those lovely devices bore an obfuscated work of code, forever lost, which
I often wish I still had these years later. As far as one can be considered the
author of a piece of couture, I was the author of this shirt. Ever since its
disposal (an ex got hold of it before I could transcribe it,) I've often wished
I'd been more proactive about getting some record of the device.
Last night, I re-wrote said shirt, though I believe much of the art has gone
from this incarnation simply because this can only ever be an ersatz layout.
The original is gone forever, lost in the mists of OCD SOs.
C Your Brain: See Basic
int fib(n) 10
{ 20 Back then, I took the time to
if(n<2) return 1; 30 work out a 4-line version of this.
return fib(n-1) + fib(n-2); 40
}
Brain Your C on Basic:
int s[999999];
int fib(int i)
{
_1: int t=0; s[t++] = i; s[t++] = 0; s[t] = 0;
_10: if (s[t-2] < 2) { s[t-2] = 1; t-=3; }
_20: if (t < 0) return s[0];
_30: if (s[t] == 1) goto _60;
_40: if (s[t] == 2) goto _70;
_50: s[t++]++; s[t++]=s[t-3]-1; s[t++]=0; s[t]=0; goto _10;
_60: s[t-1]=s[t+1]; s[t++]++; s[t++]=s[t-3]-2; s[t++]=0; s[t]=0; goto _10;
_70: s[t-2]=s[t-1]+s[t+1]; t-=3; goto _20;
}
UPDATE 20090927
I actually found a picture of myself and Marie back in college - and the
shirt is in the shot. I might be able to do some photoshop work to
recover the original. I'll keep ya posted. =]
|