A new obfuscated code challenge...
John Esak
john at valar.com
Sun Sep 5 14:28:26 PDT 2004
Dear FP listers,
Things have been too dull around here. Who is always count-on-able to shake
things up?
"Ta-da-da. Here I come to save the day!!!" (sung to the tune of Mighty
Mouse, while envisioning Andy Kaufman lip-syncing along..."
I've stolen (sort of) this old "obfuscated" code I wrote for an fPDJ
Magazine article way back when... to put up here for fun. (Where did that
rag go anyway? We all loved it and want it back
Maybe when the fourth kid
hits college, huh Laura? :-)
I figure with Jay (and I) wrangling over everything from quotes, to
parentheses to all matter of syntax, it would be fun to show just how
amazingly flexible our beloved filePro really can be. Take a gander at this
code, cold... Don't put it up first. Just read it. <smile> That's where
the giggles are.
It actually all makes sense from one perspective, the code side, in that it
can really be run and performs as expected. On the other hand, it certainly
makes good Ogden Nash non-sense from another side, the human readable one.
The description from the original article follows, so when you get really
tired of trying to figure it out, you will be able to load it and run it on
any platform by following the instructions. But, give a full reading of it
a try first. Remember, "Real programmers eat obfuscated code for breakfast."
[And, yes, I think this may have been discussed some years ago on the list,
and maybe even Bill
Vermillion got it without "running it"
so he is disqualified from
everything except kibitzing this time. Fairlite may attack the soundness of
the science-fictional aspects of nothing, everything, infinity minus "1" and
the Zen it all displays, but if he thought filePro coding was confusing
before, this will have him running for his Perl books.
John Esak
P.S. One of my intentions is to have people throw up other bits of oddity as
well as munch on this one. Give it a try, it is great fun and quite
interesting in a mindless distraction kind of way.
>From FPDJ: v1n3 (Available at www.hwcomputer.com, but I have mutated the
original significantly for today's challenge.)
Instructions: You can cut and paste the entire colon-delimited obfuscated
table which is at the very end of this message into a prc table, and look at
it again in the regular cabe editor. When you get tired of trying to
decipher it, and your brain hurts, run this code in clerk as a -Z table in a
file with a completely blank screen. Go to that screen on any record, old or
new, and press the specified @KEY "T". If it doesn't work, call the code
police. Otherwise, aspirins may be required. :-)
filePro File: test
Processing Table: input
Last Modified: Sunday - Sep 5, 2004 at 2:45 PM
Documented: Sunday - Sep 5, 2004 at 2:46 PM
1 Then: end
@keyT If:
2 Then:
If: god eq ""
3 Then: god="9";infinity=(sqrt[god]*god-god)
If: eq gt le or co co ge
4 Then: show (nowhere,onscreen) anything ; eq=eq+nothing;dim null[19]
zen If: nowhere lt minus_one * infinity + "1"
5 Then:
ge=ge+"1";co=ge;nowhere=ge;minus_one="3";infinity=minus_one*"2";
onscreen=sqrt("256");everything=co;q=" ";goto never
6 Then: ;;end;declare
nowhere,onscreen,anything,nothing,everything[2,.0],
minus_one,infinity,god,qqq,ccc;le;eq;co
never If: 'again
7 Then:
8 Then: gosub gosub
If: ge eq god*sqrt(god)-god
9 Then: null[everything]=a{q&q&q&" "&a{q&q&qqq&" "&qqq&" "&s&q&"
"&s&" "&v&q&q&" "&m&q&" "&m
If: ge eq "14"
10 Then: null[everything]=chr("87")&" "&chr("87")&" "&chr("87")
&q&qqq&q&" "&qqq&q&s&q&" "&s&q&v&" "&q& " " &m&q&"
"&m
If: ge eq "7"
11 Then: null[everything]=qq; goto nirvana
If: ge eq god
12 Then: null[everything]=""
If: ge eq ff
13 Then: null[everything]=chr("72")&" "&n&q&repeat(chr("69"),"6")&
" "&v&q&" "&q&q&q&" "&v&q&" "&" "&q&repeat(qqq,ll)
If: ge eq "13"
14 Then: null[everything]=a&" "&q&a&q&qqq&q&" "&qqq&q&s&q&" "
&q&q&s&" "&v&q&q&" "& " " & m&q&" "&m
If: ge eq gg
15 Then: null[everything]=qq
If: ge eq "11"
16 Then: null[everything]=""; goto heaven
If: ge eq "19"
17 Then: null[everything]=a&" "&a&q&" "&repeat(qqq,"5")&" "&q&"R
R&" "&
repeat(v,"6")&q&repeat(m,"5")&q&q&q&"-from"<z{"s"{g
If: ge eq hh
18 Then: null[everything]=qq
If: ge eq "16"
19 Then: null[everything]=a&" "&a&" "&a&q&qqq&q&" "&q&q&q&qqq&q&s&
" "&s&q&q&" "&v&q&q&" "& m & " " &" "&q&q& m
If: ge eq "6"
20 Then: null[everything]=qq
heaven If: ge eq "10"
21 Then: null[everything]=""
If: ge eq jj
22 Then: null[everything]=qq; goto hell
If: ge eq "15"
23 Then: null[everything]=a&" "&a&" "&a&q&qqq&q&"
"&q&q&q&qqq&q&repeat(s,"
6")&q&" "&v&" "&q&q&q& " "&m&" "&" "&q&q&m
If: ge eq "8"
24 Then: null[everything]=n&"
"&q&q&n&q&repeat(z,"6")&q&repeat(v,"6")&q&re
peat(v,"6")&q&repeat(qqq,"7")
If: ge eq ii
25 Then: null[everything]=repeat(n,"5")&q&repeat(z,"6")&q&v&q&
" "&q&q&q&q&v&q&q&" "&q&q&q&qqq&q&q&q&q&" "&qqq
hell If: ge eq "17"
26 Then: null[everything]=a{a&q&a{a&q&qqq&q&" "&qqq&q&s&q&" "&s&q
&" "&v&q&q&q&" "&m&q&" "&m
If: ge eq "12"
27 Then: null[everything]=a&q&q&" "&a&q&" "&repeat(qqq,"5")&" "
&q&repeat(s,"6")&" "&q&v&" "&q&q&" "&repeat(m,"5")
nirvana If:
28 Then: anything=null[everything]
29 Then: goto @keyT
gosub If: 'stantiate your FP know-how at hvcomputer.com
30 Then:
31 Then: declare girl(10,mdyy/),niether
32 Then: niether=asc(dow(boy(girl)))+infinity*minus_one+"2"
33 Then: n=chr(niether+minus_one);z=chr(niether);v=chr(niether+"7")
34 Then: qqq=chr(niether+minus_one+infinity+"1")
35 Then: a=chr(niether+infinity*minus_one)
36 Then: s=chr(niether+minus_one+"1"*infinity+"4");m=chr(niether-"1")
37 Then: qq=n&q&q&" "&n&q&z&q&q&q&q&q&q&v&q&q&" "&" "& " " & q&v&q&q&
" "&" "&qqq&q&q&q &" "&q &qqq
38 Then: hh=god/"3";jj="5";gg="2";kk="6"
39 Then: ll="7";ii="4";ff="1";g="ak"
40 Then: return
(Come on, don't get discouraged. It's only 40 lines of code! All you have to
do is think like I do. . . Um, er, well, on second thought. . . two mind
threads like this going on simultaneously in the Universe might cause an
implosion of the time-space-continuum, and infinity minus"1" might actually
become possible!!. . . However, if you've given it a good College try. Cut
and paste the thing and try it as prescribed above.)
The cut-and-paste version:
::end:
@keyT:::
:god eq "":god="9";infinity=(sqrt[god]*god-god):
:eq gt le or co co ge:show (nowhere,onscreen) anything ; eq=eq+nothing;dim
null[19]:
zen:nowhere lt minus_one * infinity +
"1":ge=ge+"1";co=ge;nowhere=ge;minus_one="3";infinity=minus_one*"2";onscreen
=sqrt("256");everything=co;q=" ";goto never:
::;;end;declare nowhere,onscreen,anything,nothing,everything[2,.0],
minus_one,infinity,god,qqq,ccc;le;eq;co:
never:'again::
::gosub gosub:
:ge eq god*sqrt(god)-god:null[everything]=a{q&q&q&" "&a{q&q&qqq&"
"&qqq&" "&s&q&" "&s&" "&v&q&q&" "&m&q&" "&m:
:ge eq "14":null[everything]=chr("87")&" "&chr("87")&" "&chr("87")
&q&qqq&q&" "&qqq&q&s&q&" "&s&q&v&" "&q& " " &m&q&" "&m:
:ge eq "7":null[everything]=qq; goto nirvana:
:ge eq god:null[everything]="":
:ge eq ff:null[everything]=chr("72")&" "&n&q&repeat(chr("69"),"6")&"
"&v&q&" "&q&q&q&" "&v&q&" "&" "&q&repeat(qqq,ll):
:ge eq "13":null[everything]=a&" "&q&a&q&qqq&q&" "&qqq&q&s&q&"
"&q&q&s&" "&v&q&q&" "& " " & m&q&" "&m:
:ge eq gg:null[everything]=qq:
:ge eq "11":null[everything]=""; goto heaven:
:ge eq "19":null[everything]=a&" "&a&q&" "&repeat(qqq,"5")&" "&q&"R R
"&repeat(v,"6")&q&repeat(m,"5")&q&q&q&"-from"<z{"s"{g:
:ge eq hh:null[everything]=qq:
:ge eq "16":null[everything]=a&" "&a&" "&a&q&qqq&q&" "&q&q&q&qqq&q&s&"
"&s&q&q&" "&v&q&q&" "& m & " " &" "&q&q& m:
:ge eq "6":null[everything]=qq:
heaven:ge eq "10":null[everything]="":
:ge eq jj:null[everything]=qq; goto hell:
:ge eq "15":null[everything]=a&" "&a&" "&a&q&qqq&q&"
"&q&q&q&qqq&q&repeat(s,"6")&q&" "&v&" "&q&q&q& " "&m&" "&" "&q&q&m:
:ge eq "8":null[everything]=n&"
"&q&q&n&q&repeat(z,"6")&q&repeat(v,"6")&q&repeat(v,"6")&q&repeat(qqq,"7"):
:ge eq ii:null[everything]=repeat(n,"5")&q&repeat(z,"6")&q&v&q&"
"&q&q&q&q&v&q&q&" "&q&q&q&qqq&q&q&q&q&" "&qqq:
hell:ge eq "17":null[everything]=a{a&q&a{a&q&qqq&q&" "&qqq&q&s&q&"
"&s&q&" "&v&q&q&q&" "&m&q&" "&m:
:ge eq "12":null[everything]=a&q&q&" "&a&q&" "&repeat(qqq,"5")&"
"&q&repeat(s,"6")&" "&q&v&" "&q&q&" "&repeat(m,"5"):
nirvana::anything=null[everything]:
::goto @keyT:
gosub:'stantiate your FP know-how at hvcomputer.com::
::declare girl(10,mdyy/),niether:
::niether=asc(dow(boy(girl)))+infinity*minus_one+"2":
::n=chr(niether+minus_one);z=chr(niether);v=chr(niether+"7"):
::qqq=chr(niether+minus_one+infinity+"1"):
::a=chr(niether+infinity*minus_one):
::s=chr(niether+minus_one+"1"*infinity+"4");m=chr(niether-"1"):
::qq=n&q&q&" "&n&q&z&q&q&q&q&q&q&v&q&q&" "&" "& " " & q&v&q&q&" "&"
"&qqq&q&q&q &" "&q &qqq:
::hh=god/"3";jj="5";gg="2";kk="6":
::ll="7";ii="4";ff="1";g="ak":
::return:
More information about the Filepro-list
mailing list