in reply to How I Learned About Quines
As a side note to your nice explanation: You are free to choose the ordering of code and data (encoding). If you start from code+data (opposed to data+code), you'll get a functional programming style quine, like this:
sub{print qq[sub{print qq[$_[0]]}->(q[$_[0]])]}->(q[sub{print qq[$_[0] +]}->(q[$_[0]])])
In a digestible form (but this way it screws up the whitespaces):
sub { print qq[ sub { print qq[ $_[0] ] }->( q[ $_[0] ] ) ] }->( q[ sub { print qq[ $_[0] ] }->( q[ $_[0] ] ) ] )
Sorry for the parentheses haters.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: How I Learned About Quines
by locked_user mtve (Deacon) on Apr 16, 2010 at 13:34 UTC |