Code that runs the Game of Life on itself
Perl, w*h=233*1=233 (per cell)

Cells work in any grid size (actually even with irregular row length). Out of boundary cells are considered dead.

Dead Cell

my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});


Living Cell

my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});


Glider

my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});


generates:

my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=1}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});
my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});my$y;INIT{$y=__LINE__;$h{++$x{$y}}{$y}=0}eval($c=q{$n=0;$o++;for$i(-1..1){$n+=$i|$_&amp;&amp;$h{$o+$i}{$y+$_}for(-1..1)}print"my\$y;INIT{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=",$n==2?$h{$o}{$y}:$n==3||0,"}eval(\$c=q{$c});",!($o%=$x{$y})&amp;&amp;"\n"});


Explanation (not current)

# Perl has several special blocks that are executed at certain stages.
# BEGIN blocks are executed at compilation stage
BEGIN
{
  # current row index and row count in execution stage
  $y=__LINE__;
  # $x{$y} is the cell index in current row and cell count in execution stage
  # $h{..}{..} set cell to dead || alive
  $h{++$x{$y}}{$y}=1
}

# dead || alive
$v=1;
# row index
$p=__LINE__;
# write cell code to $c
$c=q{
  # reset neighbour count
  $n=0;
  # cell index
  $o++;
  # count living neighbours
  for$i(-1..1){$n+=$i|$_?$h{$o+$i}{$p+$_}:0for(-1..1)}
  # reset cell index to 0 when end of row is reached
  $o%=$x{$p};
  # dead || alive for next generation of this cell
  $v=$n==3||$n==2&amp;&amp;$v||0;
  # print the new cell
  print"BEGIN{\$y=__LINE__;\$h{++\$x{\$y}}{\$y}=$v}\$v=$v;\$p=__LINE__;\$c=q{$c};eval\$c;",$o?"":"\n"
};
# execute cell code
eval$c;


Perl, w*h=140*2=280 (per cell)

Multi-line cell is not efficient but can eliminate __LINE__.

Dead Cell

BEGIN{++$v}eval($c=q&lt;;;;;;;++$y;map{$i{$y}+=$h{$y+$_}}(-$a-1..-$a+1,-1,1,$a-1..$a+1);print'BEGIN{++$v}eval($c=q&lt;',$c,'&gt;);',!($y%$a)&amp;&amp;"\n"&gt;);
BEGIN{$a||=$v,$h{++$x}=0}eval($c=q&lt;$n=$i{++$z};print'BEGIN{$a||=$v,$h{++$x}=',$n==2?$h{$z}:$n==3||0,'}eval($c=q&lt;',$c,'&gt;);',!($z-$y)&amp;&amp;"\n"&gt;);


Living Cell

BEGIN{++$v}eval($c=q&lt;;;;;;;++$y;map{$i{$y}+=$h{$y+$_}}(-$a-1..-$a+1,-1,1,$a-1..$a+1);print'BEGIN{++$v}eval($c=q&lt;',$c,'&gt;);',!($y%$a)&amp;&amp;"\n"&gt;);
BEGIN{$a||=$v,$h{++$x}=1}eval($c=q&lt;$n=$i{++$z};print'BEGIN{$a||=$v,$h{++$x}=',$n==2?$h{$z}:$n==3||0,'}eval($c=q&lt;',$c,'&gt;);',!($z-$y)&amp;&amp;"\n"&gt;);