Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Unbalanced, Introspective Japh

by liverpole (Monsignor)
on Jul 01, 2006 at 01:41 UTC ( #558718=obfuscated: print w/ replies, xml ) Need Help??

"Unbalanced" because of the unmatched parentheses, braces, and brackets.  "Introspective" because ... well, you'll have to figure that out for yourself.

This works with Perl version 5.8.6 (in Linux), and 5.8.7 (in Windows), and possibly with other versions of Perl (though I can't be sure).

My apologies if this has been done before (and please let me know if so).  I came up with the idea just this evening, but one can never be sure whether or not similar prior art exists.

( $ ||= open$ ) ,$ ^X) ;; X :; { $ ;+= print if ($_ = lc getc $)) eq# } ( split$ ,,q#- just another perl hacker# ) [ $ ;]; eof$ ( ?die$ /: redo } 060630# ]

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

Comment on Unbalanced, Introspective Japh
Download Code
Re: Unbalanced, Introspective Japh
by Hue-Bond (Priest) on Jul 01, 2006 at 06:24 UTC

    I never suspected that that sentence would be found in $^X :). On my system it takes a second to print it, then waits for some 30 more until it ends. Changing the eof test for something like 26==$; makes it end at the approppriate moment, although it's maybe less obfuscated. Can also do something more cluttered like $]*$]<$;, trading some of the whitespace magic.

    --
    David Serrano

      That's very interesting, and it's different from my system, where there's only a brief, almost undiscernable pause while printing "just", and the program ends immediately after printing the final word.  I'm guessing it's either because I have a faster processor or a different version of Perl.

      It was intentional that I didn't implement any tests which were more likely to depend on the specific version of Perl running, as that might have needlessly broken the program for other versions of Perl.  Which version of Perl *are* you running, by the way?


      s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
Re: Unbalanced, Introspective Japh
by jdalbec (Deacon) on Jul 01, 2006 at 20:55 UTC
Re: Unbalanced, Introspective Japh
by wulvrine (Friar) on Jul 05, 2006 at 11:15 UTC
    Great job as always! I had no idea you could do some of the things in here. You just make it look too easy (*humbled look*)

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Unbalanced, Introspective Japh
by starbolin (Hermit) on Jul 16, 2006 at 18:40 UTC

    Sorry for the late post. Does't do anything on either of my systems. Prints a single blank line on v5.8.6 openBSD v3.8 i386 and a single hyphen on v5.8.5 FreeBSD v5.3 i386. I'l look into why later tonight.



    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://558718]
Approved by McDarren
Front-paged by grinder
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-09-22 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls