Perl
Dots and Dashes
;
Perl is (in)famous for the ability to write programs that look like line noise, and today I will take apart this beautiful piece of code. Written by tybalt89, it can decode sequences of dots and dashes to Latin letters in just 73 characters of code…
Anatomy of the heart
;
my$f= $[;my
$ch=0;{}
{,
(,$_)}{($_
,$_,$_)}{$_=$_;
(($_,$f,1));$f+=()/2;$f%=
();$f++if$ch%2;$ch++}my$q=
(.
);$_=$q; $q=~
;my@ever=1..&
;my$mine=$q
;{
@_;
}
$mine for @ever
This heart-shaped program is written in the language of choice for producing unreadable and obfuscated code: Perl 5. It also serves an unusual purpose of a proposal…
Regex prime checker
This Java snippet uses a regular expression for something way different than they were designed for: a primality check.
public static boolean
…