comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Obfuscated IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Obfuscated IDL [message #28324] Tue, 04 December 2001 13:47 Go to next message
Bhautik Joshi is currently offline  Bhautik Joshi
Messages: 21
Registered: November 2001
Junior Member
Hi all,

I've just recently been viewing the International Obfuscated C Code
Contest (www.ioccc.org), and, last night, in a bout of insomnia, was
inspired to have a go at it in IDL instead :)

Please find attached a file called foo.pro. It can only be run from the
command prompt (ie type idl foo.pro ; don't try running it in idlde -
its a mess). I've tested it under solaris and linux and it seems to work
fine.

I'm not sure what the picture is; I think its the 'is it a vase, or two
faces' thingy, but its purely a matter of interpretation.

Its my implementation of the 'hungry cow' algorithm, and would probably
function as a good screensaver for all those old text terminals :P

Anyway, enjoy :)

cheers,
bhautik

--
/--------------------------------------------------(__)----- ----\
| nbj@imag.wsahs.nsw.gov.au | phone: 0404032617 |..|--\ -moo |
| ICQ #: 2464537 | http://cow.mooh.org | |--| |
|---------------------------+----------------------\OO/|| ------/
| international |
| roast. my sanity has gone |
| its lost forever |
\---------------------------/
; FOO.PRO bjoshi 05/12/2001
; bjoshi@geocities.com
;
; obfuscated IDL code!
;
; USAGE:
; at command prompt, type
; idl foo.pro
; enjoy :)
;
; WHAT:
; my implementation of the hungry cow algorithm
;
; WHY:
; why not? mess around with the w, l, and s parameters
; to get different speeds/smoothness of scrolling
;

w=0.05 & l = 30 $
& s = 3 & g='o'+$
'ooooO'+ 'OOOOo'+$
'ooooo'+ 'ooooO'+$
'OOOOo'+ 'ooooO'+$
'OOOOO'+ 'ooooo'+$
'oOOoo'+ 'OOOoo'+$
'Ooooo'+ 'ooOOO'+$
'OOooo'+ 'oooo' $
& e='-'+ '-----'+$
'-----'+ '-----'+$
'-----'+ '-----'+$
'-----'+ '-----'+$
'-----'+ '-----'+$
'-----'+ '-----'+$
'-----'+ '-----'+$
'--' & f0='(%'+$
'"\x1B'+ '\x63\'+$
'x0D\x'+ '0A\x1'+$
'B[7m' + '\x1B['+$
'%dC\x'+ '28 \'+$
'x29\x'+ '0D\x0'+$
'A\x1B'+ '[%dC|'+$
'..|--'+ '\x5C '+$
'\x2D\'+ 'x4Doo'+$
'!\x0D'+ '\x0A\'+$
'x1B[%'+ 'dC|\x'+$
'20 |-'+ '-|\x0'+$
'D\x0A'+ '\x1B['+$
'%dC\x'+ '5COO\'+$
'x2F||'+ '^\x1B'+$
'[0m\x'+ '0D")' &$
f1='(%'+ '"\x1B'+$
'\x63\'+ 'x0D\x'+$
'0A\x1'+ 'B[7m' +$
'\x1B['+ '%dC\x'+$
'28 \'+ 'x29\x'+$
'0D\x0'+ 'A\x1B'+$
'[%dC|'+ '^^|--'+$
'\x5C '+ '\x2D\'+$
'x4Doo'+ '!\x0D'+$
'\x0A\'+ 'x1B[%'+$
'dC|\x'+ '20 |-'+$
'-|\x0'+ 'D\x0A'+$
'\x1B['+ '%dC\x'+$
'5Coo\'+ 'x2F||'+$
'^\x1B'+ '[0m\x'+$
'0D")' & while 1$
do begin for h=1$
,359,s do begin i=FIX(sin(!DPI $
*(FLOAT(h)/180))*l)+ l $
& print, FORMAT=f0,i $
,i,i,i & if ((h le $
90) OR (h ge $
270)) then $
print, $
strmid(e,i-2, $
/reverse_offset)+ $
strmid(g,i) else print, $
e & wait,w & if ((h le 90) $
OR (h ge 270)) then print, $
FORMAT=f1,i,i,i,i else print, $
FORMAT=f0,i,i,i,i & if ((h $
le 90) OR (h ge 270)) then $
print, strmid (e , i-2, $
/reverse_offset) +strmid(g,i) $
else print, e & wait, w
  • Attachment: foo.pro
    (Size: 2.52KB, Downloaded 96 times)
Re: Obfuscated IDL [message #28412 is a reply to message #28324] Wed, 05 December 2001 04:50 Go to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
All my IDL is obfuscated, err.. I mean optimised for array operations.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: set_plot,'PS'
Next Topic: strange problem: Alarm Clock????....

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:05:12 PDT 2025

Total time taken to generate the page: 0.00436 seconds