Just another Perl hacker: Difference between revisions

Content deleted Content added
Pm5 (talk | contribs)
Examples: debug
major rework
Line 1:
'''Just another Perl hacker''', or '''JAPH''', typically refers to a [[Perl]] program which prints "Just another Perl hacker," (the comma beingis [[canonical]] but is occasionally omitted). using extremelyShort JAPH programs are often used as [[obfuscatedsignature codeblock|obfuscatedsignatures]] methods,in typicallyonline ones[[forum]]s. based onThe obscurephrase behavioursor ofacronym sometimesis rarely-usedalso functions,occasionally inused the spirit of the(without [[Thecode International(computer Obfuscated C Code Contestprogramming)|Obfuscated C Contestcode]]) for a signature.
 
JAPH programs are classically done using extremely [[obfuscated code|obfuscated]] methods, in the spirit of the [[The International Obfuscated C Code Contest|Obfuscated C Contest]]. More recently, as the phenomenon has become so well known, the phrase is sometimes used in ordinary examples (without obfuscation).
 
The idea of using tiny Perl programs which print a signature ''as a signature'' was originated by [[Randal L. Schwartz]], in his postings to the [[newsgroup]] comp.lang.perl.
 
==Examples==
The obfuscation can result from the code being total gibberish, e.g.:
 
JAPH program without obfuscation:
$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;
 
or from having print "Just another Perl hacker,\n" embedded in opaque code:;
 
Embedding JAPH in opaque code:
 
$_='987;s/^(d+)/$1-1/e;$1?eval:print"Just another Perl hacker,"';eval;
 
Decoding JAPH from an [[cryptography|encrypted]] [[string literal]]:
or from looking like it does something simple and completely
 
unrelated to printing "Just another Perl hacker":
$_="krJhruaesrltre c a cnP,ohet";$_.=$1,print$2while s/(..)(.)//;
 
Appearing as if it does something completely unrelated to printing JAPH:
 
$_ = "wftedskaebjgdpjgidbsmnjgc";
tr/a-z/oh, turtleneck Phrase Jar!/; print;
 
or maybe, one that usesUsing only Perl [[Keyword (computer)|keywords]], with(no nothing[[literal]]s elseor [[punctuation]]):
not exp log srand xor s qq qx xor
Line 33 ⟶ 41:
exec return y s gt sin sort split
 
orUsing oneonly that[[punctuation]] doesn't use a single(no [[alphanumeric]] charactercharacters):
 
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
Line 40 ⟶ 48:
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
 
==Immitations==
This phrase was popularized by [[Randal L. Schwartz]], who created most of the first such programs in the signatures of his postings to the [[Usenet newsgroup]] comp.lang.perl (the predecessor to the modern comp.lang.perl.misc). (In fact, the first and third of the JAPHs above are his.)
 
A variant of this, practiced by programmers working on the [[Parrot virtual machine|Parrot]] project, involves Parrot assembly programs printing the phrase "Just another Parrot hacker":
Line 58 ⟶ 66:
Often Parrot JAPHs are only lightly obfuscated; they're usually intended to demonstrate or test a feature in a non-trivial use.
 
==Additional information==
===See also===
*[[Obfuscated Perl contest]]
 
===References===
{{FOLDOC}}
 
===External links===
*[http://www-106.ibm.com/developerworks/linux/library/l-japh.html Cultured Perl: The Elegance of JAPH]