Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Cyclical Japh

by liverpole (Monsignor)
on Nov 02, 2006 at 13:22 UTC ( #581888=obfuscated: print w/replies, xml ) Need Help??

This obfuscation was a good chance for me to become more familiar with the Date::Calc module.

(Update:  I should have made this more clear -- as my coworker discovered this morning -- you need to actually have Date::Calc installed, otherwise the program won't produce any output.)

The script takes either a single argument, in the form of a date (eg. "8/22/98" or "Aug-22-1998"), or two dates (earlier one first).

And the purpose of the program is ...

... displaying biorhythms.  Try giving your birthdate as a single argument and it will display your biorhythm chart for the current date.  Giving a second date argument will display your biorhythm for that date instead.  Optionally, a third argument will specify the total number of days to display.

The 3 cycles are P=Physical (23 days), E=Emotional (28 days) and I=Intellectual (33 days).

s''us e`Date ::Cal c`qw| :all|;su b`J{3 0+31* sin($ H*2/pop)} sub`A {Date _to_D ays@_ [0..2 ]}sub`P{$ ARGV[ pop]} sub`H {($_= P+pop)?A+D ecode _Date _US($_ ):A+T oday} sub`_{"|". Date_ to_Te xt+Ad d_Del ta_Da ys+(1 )x3,p op}su b`b{@ _=(2+ $A==$ J?"-" :$")x 61;$_ [30]= qw/h` j`a`p /[$P% 4];$_ [J+23] ="P"; $_[J+ 28]="E ";$_[ J+33] ="I"; warn" |".jo in("" ,@_). _($P+ ++-++ $H*0- 1).$/ ;--$J &&&b} `$J=( P+2)| |48;$ A=$J/2-1; $P=-$ A+H+1 ;b`if $H=$P -(H+0 )';s* [\s#] **gx; s\`\$ "\g ;eval

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re: Cyclical Japh
by chargrill (Parson) on Nov 02, 2006 at 19:42 UTC

    ++liverpole, very nice! I really like how the layout of the obfu matches the output (though that's hardly surprising for you!)

    Note, for maximal effect, anyone running this should have their terminal at least 49 lines high...

    As an aside, maybe this explains why I'm having a rotten week, I typed in my birthday and it looks like my "P" and "E" are at all time lows, and my "I" is halfway toward the bottom as well. 8-|

    Update: The following has been tucked away in case it acts as a bit of a spoiler:



    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
Re: Cyclical Japh
by wulvrine (Friar) on Nov 03, 2006 at 12:43 UTC
    liverpole,
    The rythms of your posts always amaze me. Now I know why I feel like a bio hazard this week. My head is still warped by the signs! LOL

    Great presentation too! A definite ++ in my book!

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Cyclical Japh
by f00li5h (Chaplain) on Nov 05, 2006 at 10:47 UTC

    Yowsers, now that's some nifty stuff, i feel honored to have even looked at it.

    Pure art!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://581888]
Approved by Arunbear
Front-paged by Arunbear
help
Chatterbox?
LanX embraces his new habit spqopiwjdnq
[ambrus]: qQUkZTmHTuKxStGT- BzTIK9gdudif7TkTLI t3mnF144UaAZjkknXY 8nN-QM19wHBsTrp5vB lEYU_Kksa7X1RIBB4x EWLD5X7SW3jGX5ryfN OMn_yL5FTdQxzjhtyX mKN9sjUCzBNHK5Rrp0 S2WMUvIb1i9aZFgjtq VR0GH1bjPMvm1G16iz hBqc1U6toPd4FbJOFj VsOeT745AN1_pO88rD SRAYKtBZwCZedESZmN mvutrOTHiSNwflB- pRfn_k
[Eily]: so far it seems to work
Your Mother reminds the monks they should be grateful not to share an office, lest they be subjugated to constant inanities like, "Czech please!"
[LanX]: what's strange is that the "Cowboy you said this already" message is missing #dqiwd
[LanX]: YM: BTW learn to mute your humanity
[Your Mother]: Cumin? Now I want tacos...
[Eily]: there should be an option in grep for fuzzy order of the letters in the pattern

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-27 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.